/* Lora (SIL OFL 1.1, ver fonts/OFL.txt), incluida para que el sitio funcione sin internet. */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(fonts/lora-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(fonts/lora-latin-wght-normal.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-display: swap;
  font-weight: 400 700;
  src: url(fonts/lora-latin-ext-wght-italic.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-display: swap;
  font-weight: 400 700;
  src: url(fonts/lora-latin-wght-italic.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px "Lora",
    Georgia,
    serif;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  outline-offset: 5px;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
a:hover,
button:hover:not(:disabled) {
  filter: brightness(1.13);
}
h1,
h2,
h3 {
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  margin: 0;
}
p {
  line-height: 1.65;
}
button {
  cursor: pointer;
  border-radius: 8px;
}
.topbar {
  max-width: 1440px;
  margin: auto;
  padding: 14px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}
.brand > span:last-child {
  color: var(--mint);
}
nav {
  display: flex;
  gap: 8px;
}
nav a {
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 7px;
}
nav a[aria-current="page"] {
  color: var(--mint);
  background: var(--t-342c42);
}
.count {
  font-size: 12px;
  border-radius: 8px;
  padding: 2px 5px;
  background: var(--t-4a3b5d);
  color: var(--mint);
  margin-left: 4px;
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 28px 5% 25px;
  min-height: calc(100vh - 140px);
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.7px;
  color: var(--mint);
  font-weight: 600;
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(26px, 2.4vw, 36px);
  letter-spacing: -1.5px;
  line-height: 1.2;
  max-width: 790px;
}
.page-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 0;
}
.text-link {
  color: var(--mint);
  font-size: 13px;
  flex-shrink: 0;
  padding-bottom: 5px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 22px;
}
.chamber {
  padding: 24px 24px 15px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 13px;
}
.panel-top h2 {
  font-size: 17px;
}
.live {
  font-size: 13px;
  color: var(--mint);
}
.live:before,
.dot {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  margin-right: 7px;
}
.canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 310px;
  background: var(--t-1b1922);
  border: 1px solid var(--t-4e445d);
  border-radius: 9px;
  overflow: hidden;
  margin-top: 22px;
}
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scale {
  position: absolute;
  left: 22px;
  bottom: 9px;
  font-size: 12px;
  letter-spacing: 1.8px;
  color: var(--t-aa95bf);
}
.sim-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  font-size: 13px;
  color: var(--muted);
}
.sim-tools > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quiet {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 5px;
  font-size: 13px;
}
.quiet:hover {
  color: var(--ink);
}
.settings {
  position: relative;
}
.settings summary {
  list-style: none;
  cursor: pointer;
  font-size: 13px;
}
.settings label {
  position: absolute;
  right: 0;
  bottom: 30px;
  width: 200px;
  padding: 16px;
  background: var(--t-342e40);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 30px #0005;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  color: var(--ink);
}
input[type="checkbox"] {
  accent-color: var(--mint);
}
.workspace {
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.pressure {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.pressure .eyebrow {
  color: var(--muted);
  font-size: 12px;
}
.pressure > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.pressure strong {
  font:
    500 46px "Lora",
    Georgia,
    serif;
  letter-spacing: -2px;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
.pressure div span {
  color: var(--muted);
  font-size: 14px;
}
.variable-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 25px;
}
.variable-tab {
  flex: 1;
  min-width: 0;
  background: var(--t-1b1921);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 10px 7px;
  text-align: left;
}
.variable-tab strong {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-top: 7px;
  color: var(--ink);
}
.variable-tab small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.variable-tab[aria-pressed="true"] {
  background: var(--t-393046);
  border-color: var(--t-b5a0ce);
}
.variable-tab[aria-pressed="true"] span,
.variable-tab[aria-pressed="true"] strong {
  color: var(--mint);
}
.value-editor {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.value-editor input {
  width: 115px;
  background: var(--t-1b1921);
  border: 1px solid var(--t-7d6a90);
  color: var(--ink);
  padding: 9px 12px;
  border-radius: 8px;
  font:
    500 25px "Lora",
    Georgia,
    serif;
  appearance: textfield;
}
.value-editor input::-webkit-inner-spin-button {
  appearance: none;
}
.value-editor > span {
  font-size: 15px;
  color: var(--muted);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--mint);
  height: 4px;
  margin: 22px 0 10px;
  cursor: pointer;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
#value-error {
  font-size: 13px;
  color: var(--t-e5bfd0);
  margin: 8px 0 0;
}
.explanation {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}
.control-action {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.secondary-link {
  font-size: 13px;
  color: var(--mint);
}
.notice {
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  min-height: 16px;
  margin: 13px 0 2px;
}
.reset {
  font-size: 12px;
  align-self: center;
}
.bottom-hint {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.bottom-hint a {
  color: var(--mint);
  white-space: nowrap;
}
.step-heading {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
#step-label {
  letter-spacing: 1px;
  color: var(--mint);
}
.steps {
  display: flex;
  gap: 10px;
  margin: 18px 0 26px;
}
.step {
  width: 37px;
  height: 37px;
  background: var(--t-1b1921);
  border: 1px solid var(--t-60516e);
  color: var(--muted);
  border-radius: 50%;
}
.step.done {
  color: var(--mint);
  background: var(--t-41364f);
}
.step.current {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  color: var(--mint);
}
#target-value {
  font-size: 22px;
  line-height: 1.4;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
#fixed-values {
  font-size: 13px;
  line-height: 1.9;
  margin-top: 14px;
}
.experiment-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.experiment-card {
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: start;
}
.card-number {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
}
.mini-graphic span {
  color: var(--mint);
  margin-left: 10px;
}
.experiment-card h2 {
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.8px;
}
.experiment-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 18px 0 24px;
  flex: 1;
}
.experiment-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 17px;
}
.experiment-card .primary {
  width: 100%;
  font-size: 13px;
}
.outline {
  display: inline-block;
  border: 1px solid var(--t-8d76a2);
  border-radius: 7px;
  background: transparent;
  color: var(--mint);
  padding: 10px 14px;
  font-size: 13px;
}
.results-toolbar {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
}
.results-toolbar label {
  color: var(--muted);
}
select {
  border: 1px solid var(--t-64556f);
  background: var(--t-2c2934);
  padding: 10px 32px 10px 12px;
  border-radius: 7px;
  color: var(--ink);
}
.results-toolbar .muted {
  margin-left: auto;
}
.empty-state {
  padding: 65px 25px;
  text-align: center;
}
.empty-icon {
  font-size: 40px;
  color: var(--mint);
}
.empty-state h2 {
  font-size: 25px;
  margin-top: 15px;
}
.empty-state p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 25px;
}
.chart-panel,
.data-panel {
  padding: 24px;
}
.data-panel {
  margin-top: 18px;
}
#chart {
  margin-top: 20px;
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
#chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.chart-tools .quiet[aria-pressed="true"] {
  color: var(--mint);
}
.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.legend-point,
.legend-theory {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
}
.legend-theory {
  width: 24px;
  height: 0;
  border-radius: 0;
  border-top: 2px dashed var(--muted);
  background: none;
  margin-left: 14px;
}
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.summary > div {
  display: block;
}
.summary dt {
  width: auto;
  font:
    13px "Lora",
    Georgia,
    serif;
  color: var(--muted);
}
.summary dd {
  margin: 4px 0 0;
  font-size: 19px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.table-scroll {
  overflow-x: auto;
  max-height: 300px;
  margin-top: 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
}
th,
td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-weight: 500;
  background: var(--t-2c2835);
  position: sticky;
  top: 0;
}
td {
  font-variant-numeric: tabular-nums;
}
details summary {
  cursor: pointer;
  line-height: 1.5;
}
details p {
  font-size: 13px;
  color: var(--muted);
}
.data-panel > details {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 13px;
}
.equation-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 45px;
  padding: 32px;
}
.big-equation {
  font:
    500 55px "Lora",
    Georgia,
    serif;
  letter-spacing: -2px;
  color: var(--mint);
  margin: 24px 0;
}
.big-equation span {
  color: var(--t-ae99c4);
}
.equation-card p {
  font-size: 13px;
  color: var(--muted);
}
dl {
  margin: 0;
  border-left: 1px solid var(--line);
  padding-left: 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
dl > div {
  display: flex;
  gap: 19px;
  align-items: baseline;
}
dt {
  color: var(--mint);
  font:
    500 18px "Lora",
    Georgia,
    serif;
  width: 17px;
}
dd {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.reading {
  margin-top: 22px;
}
.reading > details {
  border-bottom: 1px solid var(--line);
  padding: 20px 4px;
}
.reading summary {
  font-size: 15px;
}
.reading p {
  max-width: 850px;
}
.reading a {
  color: var(--mint);
}
.laws {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
@media (max-width: 560px) {
  .laws {
    gap: 10px;
  }
  .law {
    padding: 10px;
  }
  .quiz {
    padding: 20px;
  }
}
.laws h2,
.quiz h2 {
  grid-column: 1 / -1;
  font-size: 22px;
}
.law {
  margin: 0;
  padding: 16px 16px 14px;
}
.law svg {
  display: block;
  width: 100%;
  height: auto;
}
.law-axis {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.2;
}
.law-curve,
.law-extra {
  fill: none;
  stroke: var(--mint);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.law-label {
  fill: var(--muted);
  font:
    14px "Lora",
    Georgia,
    serif;
}
.law figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.law figcaption strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.quiz {
  margin-top: 22px;
  padding: 28px;
}
.quiz > p {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 18px;
}
.quiz fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 18px 0;
}
.quiz legend {
  float: left;
  width: 100%;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.quiz label {
  clear: left;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  padding: 6px 0;
  cursor: pointer;
}
.quiz input {
  accent-color: var(--mint);
  margin-top: 4px;
}
.quiz-why {
  font-size: 13px;
  margin: 8px 0 0;
  color: var(--muted);
}
.quiz-why[data-correct="true"] strong {
  color: var(--gas-ar);
}
.quiz-why[data-correct="false"] strong {
  color: var(--t-e5bfd0);
}
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
#quiz-score {
  font-size: 14px;
  margin: 0;
}
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 5px;
}
dialog {
  border: 1px solid var(--t-64556f);
  border-radius: 15px;
  background: var(--panel);
  color: var(--ink);
  padding: 28px;
  max-width: 450px;
  width: calc(100% - 36px);
}
dialog::backdrop {
  background: var(--t-100d17c9);
}
dialog h2 {
  font-size: 24px;
}
dialog p {
  font-size: 13px;
  color: var(--muted);
}
dialog form {
  display: flex;
  gap: 12px;
  justify-content: end;
  margin-top: 25px;
}
.danger {
  background: var(--t-dbbdcf);
  border: 0;
  color: var(--t-392638);
  padding: 10px 14px;
  font-size: 13px;
}
footer {
  max-width: 1152px;
  margin: auto;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--t-a99ab6);
  font-size: 12px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%) translateY(15px);
  background: var(--t-e2d6f1);
  color: var(--t-30263b);
  padding: 13px 22px;
  border-radius: 9px;
  box-shadow: 0 6px 30px #0005;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: 90%;
  width: max-content;
  z-index: 10;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.home-hero > .eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2.5px;
  margin-bottom: 20px;
}
.home-enter span {
  font-size: 18px;
  font-weight: 400;
}

.home-hero em {
  color: var(--mint);
  font-style: italic;
  font-weight: 400;
}
.home-hero h1 {
  font-size: clamp(43px, 5.8vw, 76px);
  line-height: 1.08;
  letter-spacing: -2px;
}
.brand {
  font:
    600 25px "Lora",
    Georgia,
    serif;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  letter-spacing: -0.8px;
}
h1,
h2 {
  font-weight: 400;
}
.primary {
  display: inline-block;
  text-align: center;
  background: var(--mint);
  color: var(--t-30263d);
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
}
.mini-graphic {
  margin: 24px 0 28px;
  padding: 20px 15px;
  width: 100%;
  font:
    500 32px "Lora",
    Georgia,
    serif;
  color: var(--t-d3c2e7);
  border: 1px solid var(--t-554568);
  background: linear-gradient(120deg, var(--t-342d43), var(--t-28242f));
  border-radius: 10px;
  letter-spacing: 0;
}
.control-caption {
  color: var(--muted);
  margin: 0 0 11px;
  font-size: 13px;
}
.variable-tab span {
  display: block;
  line-height: 1.25;
  font-size: 12px;
}
.model-note {
  color: var(--muted);
  margin: 12px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  font-size: 13px;
}
#chart svg text {
  font-family: "Lora", Georgia, serif;
}
::selection {
  background: var(--t-c6b8e8);
  color: var(--t-30263d);
}

.home-enter {
  padding: 15px 25px;
  font-size: 13px;
  display: inline-flex;
  gap: 25px;
  align-items: center;
  margin-top: 30px;
}
.lab-actions .outline {
  font-size: 14px;
}
#mission-score {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
}
.gas-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gas-picker > span {
  font-size: 13px;
  color: var(--muted);
}
.gas-picker select {
  font-size: 13px;
  background: var(--t-29242f);
  padding: 8px 26px 8px 10px;
  border-color: var(--t-50455e);
}
.observation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.observation-bar .quiet {
  font-size: 13px;
}
.observation-bar .quiet[aria-pressed="true"] {
  color: var(--mint);
}
#rms-readout {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.comparison-panel {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px 12px;
  border: 1px solid var(--t-50445e);
  background: var(--t-30283a);
  border-radius: 8px;
  margin: -6px 0 22px;
}
.comparison-panel > div {
  flex: 1;
}
.comparison-panel span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.comparison-panel strong {
  display: block;
  font-size: 14px;
  color: var(--mint);
  margin-top: 4px;
  font-weight: 500;
}
.comparison-panel > button {
  font-size: 20px;
  padding: 0;
}
.mission-panel {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 15px 30px;
  padding: 24px;
  background: var(--t-292333);
  border: 1px solid var(--t-68547f);
  border-radius: 13px;
  margin-bottom: 22px;
}
.mission-panel .eyebrow {
  font-size: 12px;
}
.mission-panel h2 {
  font-size: 24px;
  margin-top: 7px;
}
.mission-panel p {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
}
.mission-panel summary {
  font-size: 13px;
  color: var(--mint);
}
.mission-panel details p {
  font-size: 13px;
}
.mission-target {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.mission-target > span {
  font-size: 12px;
  color: var(--muted);
}
.mission-target > strong {
  color: var(--mint);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 5px;
}
.mission-target > .quiet {
  font-size: 12px;
  padding: 2px;
}
#mission-feedback {
  grid-column: 1/-1;
  margin: 0;
  color: var(--t-d8c9ed);
  line-height: 1.65;
}
.mission-panel #mission-feedback:empty {
  display: none;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.dialog-heading h2 {
  font-size: 25px;
}
.dialog-heading form {
  margin: 0;
}
.dialog-heading button {
  font-size: 24px;
  padding: 0 5px;
}
#missions-dialog {
  max-width: 530px;
}
.mission-option {
  display: block;
  width: 100%;
  padding: 18px;
  margin-top: 13px;
  background: var(--t-2b2533);
  border: 1px solid var(--t-51455e);
  text-align: left;
  color: var(--ink);
}
.mission-option:hover {
  border-color: var(--mint);
}
.mission-option strong {
  display: block;
  color: var(--mint);
  font-size: 17px;
  font-weight: 500;
}
.mission-option span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 6px;
}
td:nth-child(4) {
  color: var(--ink);
}
td:nth-child(5) {
  color: var(--mint);
}

.brand-mark {
  display: block;
  margin-right: 10px;
  flex-shrink: 0;
}
.home-logo {
  display: block;
  margin: 0 auto 31px;
  width: 78px;
  height: 78px;
}
.footer-brand {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.footer-brand img {
  opacity: 0.8;
}
.scene-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.scene-cards > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.scene-card {
  display: grid;
  grid-template-columns: 85px 1fr;
  column-gap: 22px;
  padding: 28px;
  align-items: center;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.scene-card:hover {
  background: var(--t-2a2433);
  border-color: var(--t-a58bc7);
}
.scene-card svg {
  grid-column: 1;
  grid-row: 1/4;
  width: 84px;
  height: 98px;
  fill: none;
  stroke: var(--mint);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scene-card:nth-child(2) svg {
  stroke: var(--t-e6c7b2);
}
.scene-card:nth-child(3) svg {
  stroke: var(--t-aecfc6);
}
.scene-card h2 {
  font-size: 23px;
  line-height: 1.3;
}
.scene-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 17px;
}
.scene-card > span {
  font-size: 13px;
  color: var(--mint);
}
.scene-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}
.scene-actions > button {
  flex: 1;
  font-size: 13px;
  padding: 11px 7px;
}
.piston-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 48px;
  padding: 0;
  background: var(--t-514064);
  color: var(--t-f0e9f9);
  border: 1px solid var(--t-c6b8e8);
  border-radius: 6px;
  cursor: ew-resize;
  touch-action: none;
  box-shadow: 0 0 18px #0005;
  z-index: 1;
  font-size: 17px;
}
.piston-handle:active {
  background: var(--t-8a72ac);
}
.scene-info {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.scene-info p {
  font-size: 13px;
  line-height: 1.7;
}
.unit-toggle {
  font-size: 13px;
  padding: 9px;
}
.variable-tab:disabled {
  opacity: 0.8;
  cursor: default;
}
.home-main:before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  max-width: 95vw;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(circle, var(--t-a58bdb19), transparent 68%);
}

.native-select {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  pointer-events: none;
  clip-path: inset(50%);
}
.themed-select {
  position: relative;
  display: inline-block;
  min-width: 170px;
  max-width: 100%;
}
.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 40px;
  background: linear-gradient(140deg, var(--t-302938), var(--t-25212c));
  border: 1px solid var(--t-665375);
  border-radius: 9px;
  color: var(--ink);
  padding: 10px 13px;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  box-shadow: 0 2px 8px #0002;
}
.select-trigger > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-chevron {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--mint);
  transition: transform 0.2s ease;
}
.select-chevron svg {
  display: block;
}
.select-trigger[aria-expanded="true"] .select-chevron {
  transform: rotate(180deg);
}
.select-trigger[aria-expanded="true"] {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px var(--t-c6b8e81a);
}
.select-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 6px;
  background: linear-gradient(140deg, var(--t-2c2535), var(--t-201c28));
  border: 1px solid var(--t-79618d);
  border-radius: 11px;
  box-shadow: 0 16px 48px #0009;
  color: var(--ink);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--t-8d76a2) var(--t-241e2d);
}
.select-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
}
.select-option[aria-selected="true"] {
  background: var(--t-443451);
  color: var(--t-e4d5f5);
}
.select-option:hover {
  background: var(--t-392d46);
}
.select-option:focus-visible {
  outline: 1px solid var(--mint);
  outline-offset: -2px;
  background: var(--t-40304d);
}
.select-option > span:last-child {
  color: var(--mint);
}
.gas-picker .themed-select {
  min-width: 116px;
  max-width: 180px;
}
.gas-picker .select-trigger {
  font-size: 13px;
  min-height: 37px;
  padding: 7px 10px;
}
.results-toolbar .themed-select {
  min-width: 220px;
  max-width: 100%;
}
.customize-button {
  border-color: var(--t-b29acc);
  background: var(--t-34283f);
  color: var(--t-e6d9f5);
}
.random-mission {
  margin-top: 17px;
  width: 100%;
}
#mission-options {
  max-height: 58dvh;
  overflow: auto;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: var(--t-8d76a2) var(--t-241e2d);
}

dialog.tuning-drawer {
  position: fixed;
  inset: 12px 12px 12px auto;
  margin: 0;
  width: min(460px, calc(100vw - 24px));
  max-width: none;
  height: calc(100dvh - 24px);
  max-height: none;
  padding: 0;
  background: linear-gradient(150deg, var(--t-28222f), var(--t-1d1a23));
  border: 1px solid var(--t-665274);
  border-radius: 17px;
  box-shadow: -20px 0 80px #0006;
  overflow: hidden;
}
.tuning-drawer::backdrop {
  background: var(--t-100c17a6);
  backdrop-filter: blur(2px);
}
.tuning-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 23px 18px;
  flex-shrink: 0;
}
.tuning-heading > div {
  display: flex;
  align-items: center;
  gap: 11px;
}
.tuning-heading h2 {
  font-size: 26px;
  letter-spacing: -0.7px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--t-352a40);
  border: 1px solid var(--t-5c476e);
  color: var(--mint);
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}
.tuning-preview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 0 23px 18px;
  padding: 13px 15px;
  background: var(--t-1c1823);
  border: 1px solid var(--t-44364f);
  border-radius: 10px;
  flex-shrink: 0;
}
.tuning-preview span {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.tuning-preview strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--mint);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.tuning-tabs {
  display: flex;
  gap: 5px;
  margin: 0 23px 0;
  padding: 4px;
  background: var(--t-19161f);
  border: 1px solid var(--t-44364f);
  border-radius: 9px;
  flex-shrink: 0;
}
.tuning-tabs button {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
}
.tuning-tabs button[aria-selected="true"] {
  background: var(--t-493755);
  color: var(--t-eaddf8);
  box-shadow: 0 2px 8px #0003;
}
.tuning-body {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 20px 23px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--t-8d76a2) var(--t-241e2d);
}
.weather-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.weather-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 13px 7px;
  background: linear-gradient(145deg, var(--t-3a2c48), var(--t-2c2635));
  border: 1px solid var(--t-624c76);
  color: var(--mint);
  min-height: 98px;
}
.weather-card > span {
  font-size: 26px;
  line-height: 1;
}
.weather-card strong {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.weather-card:nth-child(2) > span {
  color: var(--t-e6c7b2);
}
.weather-card:nth-child(3) > span {
  color: var(--t-aecfc6);
}
.weather-card:hover:not(:disabled) {
  border-color: var(--t-c6b8e8);
  background: var(--t-453152);
}
.tune-control {
  padding: 17px 0;
  border-bottom: 1px solid var(--t-413448);
}
.tune-control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.tune-control-heading > label {
  font-size: 13px;
  line-height: 1.6;
  color: var(--t-ddd2e7);
  max-width: 230px;
}
.tune-value {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  background: var(--t-19161f);
  border: 1px solid var(--t-655171);
  border-radius: 7px;
  flex-shrink: 0;
}
.tune-value input {
  width: 57px;
  text-align: right;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  appearance: textfield;
  padding: 0;
}
.tune-value input::-webkit-inner-spin-button {
  appearance: none;
}
.tune-value span {
  font-size: 12px;
  color: var(--muted);
}
.tune-control input[type="range"] {
  appearance: none;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    to right,
    var(--t-c6b8e8) 0%,
    var(--t-c6b8e8) var(--range-progress, 50%),
    var(--t-45354f) var(--range-progress, 50%),
    var(--t-45354f) 100%
  );
  margin: 18px 0 7px;
  border-radius: 5px;
  cursor: pointer;
}
.tune-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  background: var(--t-dfd1f0);
  border: 2px solid var(--t-89729d);
  border-radius: 50%;
  box-shadow: 0 1px 7px #0005;
}
.tune-control input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--t-dfd1f0);
  border: 2px solid var(--t-89729d);
  border-radius: 50%;
}
.tune-control input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.tune-help summary {
  font-size: 12px;
  color: var(--t-a99ab6);
  margin-top: 5px;
}
.tune-help p {
  font-size: 13px;
  line-height: 1.7;
}
.tune-error {
  font-size: 12px;
  color: var(--t-e5bfd0);
  margin: 5px 0 0;
}
.tune-error:empty {
  display: none;
}
.tuning-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 12px;
  padding: 11px 13px;
  background: var(--t-33273c);
  border-left: 2px solid var(--t-8d76a2);
  border-radius: 0 6px 6px 0;
}
.inside-metrics {
  background: var(--t-1b1721);
  border: 1px solid var(--t-4a3a55);
  border-radius: 10px;
  padding: 17px;
  margin-top: 22px;
}
.inside-metrics h3 {
  font-size: 16px;
  margin: 0 0 17px;
  color: var(--mint);
}
.inside-metrics dl {
  border: 0;
  padding: 0;
  margin: 0;
  gap: 12px;
}
.inside-metrics dl > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.inside-metrics dt {
  width: auto;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.inside-metrics dd {
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.tune-switches {
  padding: 12px 0;
}
.tune-switches label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--t-413448);
}
.tune-switches input {
  appearance: none;
  width: 36px;
  height: 21px;
  border: 1px solid var(--t-665070);
  border-radius: 15px;
  background: var(--t-302537);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.tune-switches input:before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--t-b7a2c6);
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.15s;
}
.tune-switches input:checked {
  background: var(--t-70548b);
  border-color: var(--t-b199c8);
}
.tune-switches input:checked:before {
  transform: translateX(15px);
  background: var(--t-f0e6f8);
}
.pressure-unit-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}
.pressure-unit-row > label {
  font-size: 13px;
}
.pressure-unit-row .themed-select {
  width: 100%;
}
.pressure-unit-row > small {
  font-size: 12px;
  color: var(--muted);
}
.tuning-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: none;
  margin: 0;
  padding: 16px 23px 19px;
  border-top: 1px solid var(--t-51405e);
  background: var(--t-211b29);
  flex-shrink: 0;
  color: var(--t-a99ab6);
  font-size: 12px;
}
.tuning-footer .primary {
  width: 100%;
  padding: 12px;
  font-size: 13px;
}
.tuning-footer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tuning-footer .quiet {
  font-size: 12px;
  color: var(--t-c6b8e8);
  padding: 6px 0;
}

/* Portada */
.home-main {
  place-items: center;
  padding-bottom: 45px;
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 0;
  padding-top: 40px;
}
.home-hero {
  position: relative;
  text-align: center;
  padding: 24px 0;
  max-width: 650px;
  margin: 0 auto;
}
.home-description {
  font-size: 15px;
  color: var(--muted);
  max-width: 560px;
  margin: 24px auto 30px;
  line-height: 1.6;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}
.home-actions .home-enter {
  margin-top: 0;
}
.home-actions .outline {
  padding: 14px 22px;
}
.home-demo {
  position: relative;
  width: 100%;
  height: 150px;
  margin: 45px 0 30px;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: var(--panel);
}
.home-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.home-path {
  display: block;
  padding: 24px;
  transition: border-color 0.2s;
}
.home-path:hover,
.home-path:focus-visible {
  border-color: var(--mint);
}
.home-path h2 {
  font-size: 21px;
  margin: 10px 0;
}
.home-path p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
footer a {
  color: var(--muted);
}
footer a:hover {
  color: var(--ink);
}
/* Barra fija del simulador en móvil */
.mobile-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px #0006;
}
.mobile-pressure strong {
  font-size: 22px;
  font-weight: 500;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
.mobile-bar .muted {
  font-size: 12px;
  flex: 1;
}
.mobile-bar .primary {
  padding: 11px 16px;
  font-size: 13px;
}
@media (max-width: 950px) {
  .laws {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    padding-left: 4%;
    padding-right: 4%;
  }
  nav {
    gap: 0;
  }
  nav a {
    padding: 9px 10px;
    font-size: 13px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 15px;
  }
  .lab-layout {
    grid-template-columns: 1.3fr minmax(300px, 1fr);
  }
  .chamber,
  .workspace {
    padding: 20px;
  }
  .sim-tools {
    align-items: start;
    flex-direction: column;
  }
  .experiment-card {
    padding: 20px;
  }
  .experiment-card h2 {
    font-size: 22px;
  }
  .mini-graphic {
    font-size: 25px;
    letter-spacing: 0;
  }
  .mini-graphic span {
    margin-left: 5px;
  }
  footer {
    margin: 0 5%;
  }
  .variable-tab {
    padding: 9px 5px;
  }
  .variable-tab strong {
    font-size: 13px;
  }

  .home-paths {
    grid-template-columns: 1fr;
  }
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
dialog.tuning-drawer.docked {
  z-index: 40;
  inset: 90px 12px 12px auto;
  height: calc(100dvh - 102px);
}
.theme-toggle {
  flex-shrink: 0;
  white-space: nowrap;
}
/* Impresión de Resultados: solo la gráfica, el resumen y la tabla. */
/* Animaciones: cortas y suaves; se desactivan con movimiento reducido. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}
@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
}
@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}
main > * {
  animation: rise 0.4s ease-out both;
}
main > :nth-child(2) {
  animation-delay: 0.05s;
}
main > :nth-child(3) {
  animation-delay: 0.1s;
}
main > :nth-child(n + 4) {
  animation-delay: 0.15s;
}
.scene-cards > *,
.experiment-cards > *,
.home-paths > *,
.laws > figure {
  animation: rise 0.45s ease-out both;
}
.scene-cards > :nth-child(2),
.experiment-cards > :nth-child(2),
.home-paths > :nth-child(2),
.laws > figure:nth-of-type(2) {
  animation-delay: 0.08s;
}
.scene-cards > :nth-child(3),
.experiment-cards > :nth-child(3),
.home-paths > :nth-child(3),
.laws > figure:nth-of-type(3) {
  animation-delay: 0.16s;
}
.scene-cards > :nth-child(4),
.experiment-cards > :nth-child(4),
.laws > figure:nth-of-type(4) {
  animation-delay: 0.24s;
}
.scene-cards > :nth-child(n + 5) {
  animation-delay: 0.32s;
}
.scene-card,
.experiment-card,
.home-path,
.law {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}
.scene-card:hover,
.experiment-card:hover,
.home-path:hover {
  transform: translateY(-2px);
}
button,
.primary,
.outline,
.quiet,
nav a {
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    filter 0.15s ease,
    transform 0.1s ease;
}
button:active:not(:disabled),
.primary:active,
.outline:active {
  transform: scale(0.97);
}
.select-menu:popover-open {
  animation: menu-in 0.15s ease-out;
}
dialog[open] {
  animation: rise 0.2s ease-out;
}
dialog.tuning-drawer[open] {
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.25s ease-out;
}
dialog[open]::backdrop {
  animation: backdrop-in 0.25s ease-out;
}
details[open] > :not(summary) {
  animation: rise 0.25s ease-out;
}
.quiz-why:not([hidden]),
#quiz-score:not(:empty),
#mission-panel:not([hidden]),
#comparison-panel:not([hidden]) {
  animation: rise 0.25s ease-out;
}
.law-curve {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s ease-out;
}
.law:not(.drawn) .law-curve {
  stroke-dashoffset: 1;
}
.law-extra {
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  transition: opacity 0.4s ease 0.8s;
}
.law:not(.drawn) .law-extra {
  opacity: 0;
}
/* Al cambiar de tema, los colores se funden en lugar de saltar. */
.theme-fade,
.theme-fade *,
.theme-fade *::before,
.theme-fade *::after {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    fill 0.35s ease,
    stroke 0.35s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  #toast {
    transition: none;
  }

  .tune-switches input:before {
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
/* Tema claro para proyector: los mismos tonos con la luminosidad invertida. */
/* Tema claro: halos violeta suaves que imitan el brillo del lavanda sobre grafito. */
:root[data-theme="light"] {
  /* Halo de las partículas: tonos más claros y saturados que el núcleo, para que brillen sobre el beige. */
  color-scheme: light;
  --bg: #f6f0e4;
  --panel: #efe6d5;
  --line: #d8cab2;
  --muted: #5f5446;
  --ink: #2b2230;
  --mint: #5e44a0;
  --canvas-grid: #dad2eb;
  --canvas-fill: #efe5d7;
  --canvas-wall: #614b80;
  --canvas-detail: #ab9fbd;
  --canvas-trail: #c2410cb3;
  --canvas-tracked: #c2410c;
  --canvas-tracked-ring: #fff8ee;
  --gas-air: #5e44a0;
  --gas-he: #97502a;
  --gas-ne: #7d6408;
  --gas-ar: #2f6a5c;
  --gas-o2: #8f3a63;
  --glow-air: #9b7bff;
  --glow-ne: #f2c230;
  --glow-he: #ff8a3d;
  --glow-ar: #1fbf98;
  --glow-o2: #f0559e;
  --canvas-tracked-glow: #ff7a1a;
  --canvas-wall-glow: #9b7bff80;
  --t-100c17a6: #fff5e6a6;
  --t-100d17c9: #fef4e6c9;
  --t-19161f: #fbf1e3;
  --t-1b1721: #faf0e1;
  --t-1b1921: #f8eee0;
  --t-1b1922: #f8eee0;
  --t-1c1823: #f8eedf;
  --t-1d1a23: #f7eddf;
  --t-201c28: #f3e9da;
  --t-211b29: #f2e9da;
  --t-241e2d: #eee5d6;
  --t-25212c: #eee4d6;
  --t-28222f: #ece2d4;
  --t-28242f: #ebe1d3;
  --t-292333: #e8dfd0;
  --t-29242f: #ebe1d3;
  --t-2a2433: #e8dfd0;
  --t-2b2533: #e8dfd0;
  --t-2c2535: #e7ddcf;
  --t-2c2635: #e6ddce;
  --t-2c2835: #e0d8f1;
  --t-2c2934: #e0d9f2;
  --t-302537: #e6d7ee;
  --t-30263b: #dfd5ed;
  --t-30263d: #ded3ec;
  --t-30273b: #e0d4ec;
  --t-30283a: #e0d4ec;
  --t-302938: #e0d6ef;
  --t-33273c: #e1d4eb;
  --t-34283f: #ddd1e9;
  --t-342c42: #d7cde6;
  --t-342d43: #d4cce5;
  --t-342e40: #d7cfe8;
  --t-352a40: #dbcfe7;
  --t-392638: #ead5ea;
  --t-392d46: #d5cbe3;
  --t-393046: #d4c9e1;
  --t-3a2c48: #d5c9e1;
  --t-40304d: #d1c5dc;
  --t-413448: #d6c7dd;
  --t-41364f: #ccc1d9;
  --t-443451: #cdc1d8;
  --t-44364f: #cec1d8;
  --t-453152: #cfc0d9;
  --t-45354f: #d0c1d8;
  --t-493755: #cbbdd4;
  --t-4a3a55: #cabcd2;
  --t-4a3b5d: #c1b5d0;
  --t-4e445d: #bdb3cb;
  --t-50445e: #bdb2ca;
  --t-50455e: #bdb2ca;
  --t-51405e: #c1b3cb;
  --t-514064: #bbaecb;
  --t-51455e: #bdb2ca;
  --t-554568: #b7a9c6;
  --t-5c476e: #b5a4c4;
  --t-60516e: #afa3bb;
  --t-624c76: #ae9cbf;
  --t-64556f: #aea1b7;
  --t-655171: #b1a0bb;
  --t-665070: #b3a1bc;
  --t-665274: #ae9dba;
  --t-665375: #ac9cb9;
  --t-68547f: #b19297;
  --t-70548b: #a785ad;
  --t-79618d: #a5838d;
  --t-7b638c: #a5858a;
  --t-7d6a90: #9b8281;
  --t-89729d: #936f8a;
  --t-8a72ac: #7a5ea0;
  --t-8d76a2: #866996;
  --t-a38db9: #6b5285;
  --t-a58bc7: #614289;
  --t-a58bdb19: #4a2b8b19;
  --t-a58bdb28: #4a2b8b28;
  --t-a99ab6: #715659;
  --t-aa95bf: #644c7d;
  --t-ae99c4: #5f4679;
  --t-aecfc6: #2f6a5c;
  --t-b199c8: #5e427a;
  --t-b29acc: #5a3d79;
  --t-b5a0ce: #553b73;
  --t-b7a2c6: #644467;
  --t-c6b8e8: #5e44a0;
  --t-c6b8e81a: #5e44a01a;
  --t-c6b8e850: #5e44a050;
  --t-d3c2e7: #382153;
  --t-d8c9ed: #2f1a4d;
  --t-dbbdcf: #563237;
  --t-ddd2e7: #3c2328;
  --t-dfd1f0: #2c1745;
  --t-e2d6f1: #2b153c;
  --t-e4d5f5: #281043;
  --t-e5bfd0: #99304f;
  --t-e6c7b2: #97502a;
  --t-e6d9f5: #26103e;
  --t-eaddf8: #230c3b;
  --t-f0e6f8: #280d22;
  --t-f0e9f9: #250c1b;
  --halo: #9b7bff;
}
:root[data-theme="light"] .primary {
  box-shadow:
    0 0 0 1px #9b7bff40,
    0 3px 16px #9b7bff59;
}
:root[data-theme="light"] .primary:hover:not(:disabled) {
  box-shadow:
    0 0 0 1px #9b7bff66,
    0 4px 22px #9b7bff80;
}
:root[data-theme="light"] nav a[aria-current="page"],
:root[data-theme="light"] .variable-tab[aria-pressed="true"],
:root[data-theme="light"] .tuning-tabs button[aria-selected="true"],
:root[data-theme="light"] .chart-tools .quiet[aria-pressed="true"],
:root[data-theme="light"] .observation-bar .quiet[aria-pressed="true"],
:root[data-theme="light"] .count {
  box-shadow: 0 0 14px #9b7bff4d;
}
:root[data-theme="light"] .count {
  color: #46307f;
}
:root[data-theme="light"] .outline:hover:not(:disabled),
:root[data-theme="light"] .outline:focus-visible {
  box-shadow: 0 0 12px #9b7bff40;
}
:root[data-theme="light"] .pressure strong,
:root[data-theme="light"] #pressure,
:root[data-theme="light"] .brand > span:last-child,
:root[data-theme="light"] .mini-graphic {
  text-shadow: 0 0 18px #9b7bff73;
}
:root[data-theme="light"] .brand-mark,
:root[data-theme="light"] .scene-card svg,
:root[data-theme="light"] .law svg,
:root[data-theme="light"] .home-logo {
  filter: drop-shadow(0 0 6px #9b7bff66);
}
:root[data-theme="light"] .panel,
:root[data-theme="light"] .canvas-wrap {
  box-shadow:
    0 1px 3px #4a35201a,
    0 0 28px #9b7bff1f;
}
:root[data-theme="light"] .scene-card:hover,
:root[data-theme="light"] .experiment-card:hover,
:root[data-theme="light"] .home-path:hover {
  box-shadow:
    0 1px 3px #4a35201a,
    0 0 30px #9b7bff4d;
}
:root[data-theme="light"] .tune-control input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0 0 10px #9b7bff99;
}
:root[data-theme="light"] .tune-control input[type="range"]::-moz-range-thumb {
  box-shadow: 0 0 10px #9b7bff99;
}
@media print {
  * {
    text-shadow: none !important;
    filter: none !important;
  }
  .law-curve {
    stroke-dashoffset: 0 !important;
  }
  .law-extra {
    opacity: 1 !important;
  }
  main > *,
  .laws > figure {
    animation: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .topbar,
  footer,
  .bottom-hint,
  .heading-actions,
  .chart-tools,
  #clear,
  #toast,
  .select-chevron,
  .data-panel details summary {
    display: none !important;
  }
  .panel {
    border: 1px solid #bbb;
    box-shadow: none;
    break-inside: avoid;
  }
  .table-scroll {
    max-height: none;
    overflow: visible;
  }
  th {
    position: static;
  }
  .data-panel details {
    display: block;
  }
  .data-panel details > p {
    display: block;
  }
}
#pressure {
  display: inline-block;
  transform-origin: left bottom;
}
/* Barra de desplazamiento con los colores del tema. */
:root {
  color-scheme: dark;
  --bg: #18171c;
  --panel: #222128;
  --line: #413e4d;
  --muted: #b5b0bf;
  --ink: #eee9f2;
  --mint: #c6b8e8;
  --canvas-grid: #302a3d;
  --canvas-fill: #211d2c;
  --canvas-wall: #a492bf;
  --canvas-detail: #5d4f72;
  --canvas-trail: #e6c7b299;
  --canvas-tracked: #f7e6d5;
  --canvas-tracked-ring: #18171c;
  --gas-air: #c6b8e8;
  --gas-he: #e6c7b2;
  --gas-ne: #e8dca0;
  --gas-ar: #aecfc6;
  --gas-o2: #e3b3c8;
  --t-100c17a6: #100c17a6;
  --t-100d17c9: #100d17c9;
  --t-19161f: #19161f;
  --t-1b1721: #1b1721;
  --t-1b1921: #1b1921;
  --t-1b1922: #1b1922;
  --t-1c1823: #1c1823;
  --t-1d1a23: #1d1a23;
  --t-201c28: #201c28;
  --t-211b29: #211b29;
  --t-241e2d: #241e2d;
  --t-25212c: #25212c;
  --t-28222f: #28222f;
  --t-28242f: #28242f;
  --t-292333: #292333;
  --t-29242f: #29242f;
  --t-2a2433: #2a2433;
  --t-2b2533: #2b2533;
  --t-2c2535: #2c2535;
  --t-2c2635: #2c2635;
  --t-2c2835: #2c2835;
  --t-2c2934: #2c2934;
  --t-302537: #302537;
  --t-30263b: #30263b;
  --t-30263d: #30263d;
  --t-30273b: #30273b;
  --t-30283a: #30283a;
  --t-302938: #302938;
  --t-33273c: #33273c;
  --t-34283f: #34283f;
  --t-342c42: #342c42;
  --t-342d43: #342d43;
  --t-342e40: #342e40;
  --t-352a40: #352a40;
  --t-392638: #392638;
  --t-392d46: #392d46;
  --t-393046: #393046;
  --t-3a2c48: #3a2c48;
  --t-40304d: #40304d;
  --t-413448: #413448;
  --t-41364f: #41364f;
  --t-443451: #443451;
  --t-44364f: #44364f;
  --t-453152: #453152;
  --t-45354f: #45354f;
  --t-493755: #493755;
  --t-4a3a55: #4a3a55;
  --t-4a3b5d: #4a3b5d;
  --t-4e445d: #4e445d;
  --t-50445e: #50445e;
  --t-50455e: #50455e;
  --t-51405e: #51405e;
  --t-514064: #514064;
  --t-51455e: #51455e;
  --t-554568: #554568;
  --t-5c476e: #5c476e;
  --t-60516e: #60516e;
  --t-624c76: #624c76;
  --t-64556f: #64556f;
  --t-655171: #655171;
  --t-665070: #665070;
  --t-665274: #665274;
  --t-665375: #665375;
  --t-68547f: #68547f;
  --t-70548b: #70548b;
  --t-79618d: #79618d;
  --t-7b638c: #7b638c;
  --t-7d6a90: #7d6a90;
  --t-89729d: #89729d;
  --t-8a72ac: #8a72ac;
  --t-8d76a2: #8d76a2;
  --t-a38db9: #a38db9;
  --t-a58bc7: #a58bc7;
  --t-a58bdb19: #a58bdb19;
  --t-a58bdb28: #a58bdb28;
  --t-a99ab6: #a99ab6;
  --t-aa95bf: #aa95bf;
  --t-ae99c4: #ae99c4;
  --t-aecfc6: #aecfc6;
  --t-b199c8: #b199c8;
  --t-b29acc: #b29acc;
  --t-b5a0ce: #b5a0ce;
  --t-b7a2c6: #b7a2c6;
  --t-c6b8e8: #c6b8e8;
  --t-c6b8e81a: #c6b8e81a;
  --t-c6b8e850: #c6b8e850;
  --t-d3c2e7: #d3c2e7;
  --t-d8c9ed: #d8c9ed;
  --t-dbbdcf: #dbbdcf;
  --t-ddd2e7: #ddd2e7;
  --t-dfd1f0: #dfd1f0;
  --t-e2d6f1: #e2d6f1;
  --t-e4d5f5: #e4d5f5;
  --t-e5bfd0: #e5bfd0;
  --t-e6c7b2: #e6c7b2;
  --t-e6d9f5: #e6d9f5;
  --t-eaddf8: #eaddf8;
  --t-f0e6f8: #f0e6f8;
  --t-f0e9f9: #f0e9f9;
  --scroll-thumb: color-mix(in oklab, var(--mint) 45%, var(--bg));
  --scroll-thumb-hover: color-mix(in oklab, var(--mint) 75%, var(--bg));
}
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 3px solid var(--bg);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}
::-webkit-scrollbar-corner {
  background: var(--bg);
}
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-color: var(--scroll-thumb) var(--bg);
    scrollbar-width: thin;
  }
}
/* El panel de controles queda a la vista al desplazarse por el recipiente. */
@media (min-width: 951px) {
  .lab-layout {
    align-items: start;
  }
  .workspace {
    position: sticky;
    top: 12px;
  }
  .chamber {
    min-height: min(640px, calc(100vh - 24px));
  }
}
.lab-actions {
  display: flex;
  align-items: center;
  margin: 0 0 16px;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}
#pin-reference {
  margin-left: auto;
}
@media (max-width: 1100px) and (min-width: 701px) {
  .experiment-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    gap: 14px;
  }
  nav a {
    padding: 9px 10px;
  }
}
@media (max-width: 700px) {
  .lab-layout {
    grid-template-columns: 1fr;
  }
  .sim-tools {
    flex-direction: row;
    align-items: center;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  main {
    padding-top: 28px;
  }
  .experiment-cards {
    grid-template-columns: 1fr;
  }
  .experiment-card h2 br {
    display: none;
  }
  .mini-graphic {
    margin: 15px 0 22px;
    padding: 14px 20px;
    font-size: 28px;
  }
  .experiment-card p {
    margin: 12px 0 20px;
  }
  .experiment-card .primary {
    width: auto;
  }
  .experiment-meta {
    margin-bottom: 12px;
  }
  .equation-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
  }
  dl {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
  }
  .bottom-hint {
    flex-direction: column;
    gap: 9px;
  }
  .pressure strong {
    font-size: 42px;
  }
  .results-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .results-toolbar .muted {
    margin-left: 0;
  }
  .chart-panel,
  .data-panel {
    padding: 18px;
  }
  .panel-top .muted {
    font-size: 12px;
  }
  th,
  td {
    padding: 12px 10px;
  }
  footer {
    flex-direction: column;
    gap: 6px;
  }
  .value-editor input {
    font-size: 23px;
  }
  .steps {
    margin-bottom: 23px;
  }
  .explanation {
    min-height: 0;
  }
  .pressure {
    margin-bottom: 20px;
  }
  .data-panel .panel-top h2 {
    font-size: 15px;
  }
  .home-hero {
    padding: 20px 0;
  }
  .home-description {
    font-size: 13px;
  }
  .home-hero > .eyebrow {
    font-size: 11px;
  }

  .home-hero h1 {
    font-size: clamp(39px, 9.5vw, 56px);
    letter-spacing: -1.5px;
  }
  .lab-actions .quiet {
    font-size: 13px;
  }
  .mission-panel {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }
  .mission-target {
    align-items: start;
    text-align: left;
  }
  .mission-target .primary {
    width: 100%;
  }
  .mission-target .quiet {
    align-self: center;
  }
  .observation-bar {
    align-items: start;
    flex-direction: column;
    gap: 1px;
  }
  .gas-picker select {
    max-width: 160px;
  }
  .chamber .panel-top {
    gap: 8px;
  }
  .live {
    font-size: 12px;
  }
  .home-enter {
    font-size: 13px;
    padding: 13px 20px;
    margin-top: 27px;
  }

  .scene-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .scene-card {
    padding: 22px;
    grid-template-columns: 68px 1fr;
    gap: 0 18px;
  }
  .scene-card svg {
    width: 68px;
    height: 88px;
  }
  .scene-card h2 {
    font-size: 21px;
  }
  .scene-card p {
    font-size: 13px;
    margin: 10px 0 15px;
  }
  .home-logo {
    width: 65px;
    height: 65px;
    margin-bottom: 27px;
  }
  .scene-actions > button {
    font-size: 13px;
  }
  .piston-handle {
    width: 30px;
    height: 48px;
  }
  .variable-tabs {
    gap: 5px;
  }
  .variable-tab {
    padding: 11px 7px;
  }
  .variable-tab span {
    font-size: 12px;
  }

  dialog.tuning-drawer {
    inset: 6px 6px 6px auto;
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    border-radius: 14px;
  }
  .tuning-heading {
    padding: 18px 18px 14px;
  }
  .tuning-heading h2 {
    font-size: 24px;
  }
  .tuning-preview {
    margin: 0 18px 14px;
    padding: 12px;
    gap: 8px;
  }
  .tuning-preview strong {
    font-size: 13px;
  }
  .tuning-tabs {
    margin: 0 18px;
  }
  .tuning-body {
    padding: 17px 18px 22px;
  }
  .tune-control-heading > label {
    font-size: 13px;
    max-width: 190px;
  }
  .tune-value {
    padding: 6px 7px;
  }
  .tune-value input {
    width: 50px;
    font-size: 13px;
  }
  .weather-card strong {
    font-size: 12px;
  }
  .weather-card {
    min-height: 89px;
  }
  .gas-picker .themed-select {
    min-width: 112px;
    max-width: 160px;
  }
  .results-toolbar .themed-select {
    min-width: 0;
    width: 100%;
  }
  .select-menu {
    max-width: calc(100vw - 24px);
  }
  .select-option {
    font-size: 13px;
  }
  .customize-button {
    font-size: 13px;
    padding: 10px 12px;
  }
  .lab-actions {
    flex-wrap: wrap;
    margin: 0 0 20px;
    gap: 10px;
  }
  .lab-actions > #pin-reference {
    margin-left: auto;
  }
  .tuning-footer {
    padding: 13px 18px 15px;
  }

  .home-main {
    padding-bottom: 35px;
    padding-top: 20px;
  }
  .home-demo {
    height: 110px;
    margin: 32px 0 22px;
  }
  .canvas-wrap {
    min-height: 230px;
  }
  body[data-page="lab"] footer {
    padding-bottom: 90px;
  }

  /* Móvil: logo y tema en una fila, navegación deslizable debajo. */
  .topbar {
    flex-direction: column;
    padding-top: 18px;
    padding-bottom: 15px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 12px 4% 8px;
  }
  .brand {
    font-size: 21px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .theme-toggle {
    margin-top: -8px;
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 6px 8px;
  }
  nav {
    width: 100%;
    row-gap: 2px;
    grid-column: 1 / -1;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -4%;
    padding: 0 4%;
    mask-image: linear-gradient(90deg, #000 calc(100% - 40px), #0000);
  }
  nav::-webkit-scrollbar {
    display: none;
  }
  nav.at-end {
    mask-image: none;
  }
  nav a {
    flex-shrink: 0;
    padding: 8px 10px;
    font-size: 13px;
  }
}
