/* Henlabs V2 · Lab view: the experiments hub, the Burn or keep steps, the
   result card and the assumptions sheet. */

/* ------------------------------------------------------------------ Hub -- */

.lab-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin: 44px 0 26px;
}
.lab-hero .lede { margin-top: 14px; }
.lab-hero img { width: 150px; margin-bottom: -8px; }

/* The wallet the experiments run on, or the form to pick one. */
.lab-using {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 18px 10px 10px;
  border: 2px solid var(--card-line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 4px 0 var(--sticker-drop);
  font-size: var(--fs-ui);
  color: var(--muted);
}
.lab-using img,
.lab-using-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; object-fit: cover; }
.lab-using-icon { display: grid; place-items: center; background: var(--soft); color: var(--text); }
.lab-using p { flex: 1 1 260px; }
.lab-using strong { color: var(--text); }

.lab-wallet {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}
.lab-wallet-copy .muted { margin-top: 4px; }
.lab-wallet-copy .lookup { margin-top: 18px; }
.lab-wallet-copy .meter { margin: 16px 0 0; }

.experiments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
  margin-top: 22px;
  list-style: none;
}
/* An odd last experiment takes the whole row rather than sitting beside a gap. */
.experiments > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.experiment {
  position: relative;
  display: grid;
  /* The art sits beside the button, so the title and text keep the card's full width. */
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'num num' 'title title' 'text text' 'go art';
  grid-template-rows: auto auto 1fr auto;
  align-items: end;
  column-gap: 20px;
  height: 100%;
  padding: 30px 30px 30px 34px;
  border: 2px solid var(--card-line);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--warn-bg), var(--surface) 62%);
  box-shadow: 0 4px 0 var(--sticker-drop);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.experiment:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--sticker-drop); }
/* The experiment's number is a pink sticker tag, tipped like the page kickers. */
.experiment-num {
  grid-area: num;
  justify-self: start;
  padding: 5px 10px 4px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--gloss), #ff6fbb;
  box-shadow: 0 2px 0 var(--ink);
  color: #0e0e12;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  transform-origin: left center;
}
.experiment-title {
  grid-area: title;
  margin-top: 6px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.experiment-text { grid-area: text; align-self: start; max-width: 28em; margin-top: 10px; color: var(--muted); font-size: 16.5px; }
.experiment-go {
  grid-area: go;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  height: 46px;
  margin-top: 22px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--btn-bg);
  box-shadow: 0 3px 0 var(--fuchsia);
  color: var(--btn-text);
  font-weight: 700;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.experiment:hover .experiment-go { transform: translateY(-1px); box-shadow: 0 4px 0 var(--fuchsia); }
.experiment-go .i { transition: transform .25s var(--ease); }
.experiment:hover .experiment-go .i { transform: translateX(3px); }
.experiment img {
  grid-area: art;
  align-self: end;
  width: auto;
  height: 132px;
  margin: -24px -8px -12px 0;
  transition: transform .35s var(--ease);
}
.experiment:hover img { transform: rotate(-3deg) scale(1.03); }

.explainer {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 16px;
  background: var(--info-bg);
}
.explainer img { width: 70px; flex: none; }
.explainer p { max-width: 62em; margin-top: 6px; color: var(--muted); }

/* The notebook: saved runs, each with its forecast, what really happened and a verdict. */
.notebook { margin-top: 56px; }
.notebook .section-head .muted { max-width: 46em; margin-top: 4px; }
.notebook-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; list-style: none; }
.run { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px 20px; }
.run-head { display: flex; align-items: flex-start; gap: 10px; }
.run-name { flex: 1; min-width: 0; }
.run-title { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.15; letter-spacing: -.025em; }
.run-meta { margin-top: 4px; color: var(--muted); font-size: var(--fs-small); }
.run-badge { margin-top: 2px; background: var(--soft); color: var(--muted); }
.run-badge.is-good { background: var(--good-bg); color: var(--good-text); }
.run-badge.is-warn { background: var(--warn-bg); color: var(--warn-text); }
.run-delete { flex: none; width: 34px; height: 34px; margin: -4px -8px 0 -2px; }
.run-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.run-figures dt { font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.run-figures dd { margin-top: 4px; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.run-figures small { font-family: var(--body); font-size: .62em; color: var(--muted); letter-spacing: 0; }
.run-figures .to { display: block; margin-top: 2px; font-size: .72em; color: var(--muted); }
/* The estimated range as a band on a bar from zero, with what really happened marked on it. */
.run-bar { position: relative; height: 14px; border-radius: 999px; background: var(--soft); }
.run-band { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: color-mix(in srgb, var(--sky) 45%, transparent); }
.run-mark { position: absolute; top: -4px; width: 4px; height: 22px; margin-left: -2px; border-radius: 2px; background: var(--fuchsia); box-shadow: 0 0 0 2px var(--surface); }
.run-mark.is-good { background: var(--good-text); }
.run-foot { color: var(--muted); font-size: var(--fs-small); line-height: 1.5; }
.run > .btn { align-self: flex-start; }
.run-retry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.notebook-empty { display: flex; align-items: center; gap: 22px; padding: 24px 28px; }
.notebook-empty > div { flex: 1; }
.notebook-empty .muted { max-width: 40em; margin-top: 4px; }
.notebook-empty img { flex: none; width: 82px; }

/* Under a Burn or keep result: save the run to grade later, or share it as an image. */
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.result-actions > * { display: flex; flex: 1 1 200px; }
.result-actions .btn { flex: 1; }
.result-actions-note { margin-top: 10px; color: var(--muted); font-size: var(--fs-small); }
.run-saved .i { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--lime); color: #0e0e12; stroke-width: 3; }

/* --------------------------------------------------------- Burn or keep -- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  color: var(--muted);
  font-size: var(--fs-ui);
  font-weight: 700;
  text-decoration: none;
  transition: color .15s ease;
}
.back-link:hover { color: var(--text); }
.back-link .i { transition: transform .2s var(--ease); }
.back-link:hover .i { transform: translateX(-3px); }

.lab-head { margin-top: 14px; }
.lab-head .lede { max-width: 36em; margin-top: 10px; font-size: 17.5px; }
/* The header's claims countdown is hidden on phones; experiment heads carry it there instead. */
.lab-clock { display: none; align-items: center; gap: 6px; margin-top: 12px; font-size: var(--fs-small); color: var(--muted); }
.lab-clock [data-countdown] { color: var(--text); font-weight: 700; }

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: start;
  gap: 20px;
}
.lab-steps { padding: 32px; }

/* Step 1: Hens as picture cards when there are few enough to scan. */
.hen-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 8px;
}
.pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.pick:hover { border-color: var(--line-strong); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick:has(input:checked) { border-color: var(--sticker-line); background: var(--surface); box-shadow: 0 3px 0 var(--sticker-drop); }
.pick:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.pick img { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: cover; }
.pick > span { display: grid; min-width: 0; font-size: var(--fs-ui); font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.pick small { overflow: hidden; color: var(--muted); font-size: var(--fs-label); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.pick.is-full { opacity: .55; }
.pick .pick-room { color: var(--good-text); font-weight: 700; }
.pick.is-full .pick-room { color: var(--muted); font-weight: 400; }

/* Step 2: one big number, a slider and quick amounts. */
.amount {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 20px;
  border: 2px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.amount:focus-within { border-color: var(--sticker-line); box-shadow: 0 3px 0 var(--fuchsia); }
.amount input {
  width: 100%;
  min-width: 0;
  height: 66px;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--display);
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
/* An example, not a value: smaller and lighter than anything typed. */
.amount input::placeholder { color: var(--faint); font-family: var(--body); font-size: .5em; font-weight: 400; letter-spacing: 0; }
.amount-unit { font-weight: 700; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* Step 4: what the chosen scenario assumes, read like a receipt. */
.assume-card {
  margin-top: 14px;
  padding: 18px 20px 20px;
  border-radius: var(--r-lg);
  background: var(--soft);
}
.assume-card .label { margin-bottom: 12px; }
.assume-card .field-help { margin-top: 12px; }
.assume-card .btn { margin-top: 16px; }
.receipt-flag { color: var(--warn-text); }

/* Prices, the scenario and the sheet: labelled inputs side by side. */
.assume-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fee-fields { display: grid; gap: 14px; }
.assume-field { display: grid; align-content: start; gap: 6px; }
.assume-label { font-size: var(--fs-small); font-weight: 700; color: var(--muted); }
.assume-field .input { min-height: 50px; padding: 0 14px; }
.assume-field .input input { height: 46px; }
.assume-field .field-error { margin-top: 0; }
.field-error:empty { display: none; }

/* A price box and the line under it saying whose price is in use. */
.price-field { display: grid; align-content: start; gap: 6px; }
.price-source { font-size: var(--fs-small); line-height: 1.45; color: var(--muted); }
.price-source .text-button { padding: 2px 0; font-size: var(--fs-small); }
.live-tag {
  position: relative;
  display: inline-block;
  margin-right: 7px;
  padding: 1px 8px 1px 17px;
  border-radius: 999px;
  background: var(--good-bg);
  color: var(--good-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.live-tag::before { content: ''; position: absolute; top: 50%; left: 7px; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: currentColor; }
.live-tag.is-wait { background: var(--soft); color: var(--muted); }

/* --------------------------------------------------------------- Result -- */

.lab-result { padding: 30px; scroll-margin-top: 84px; }
.lab-result .mega { margin-top: 10px; }
.mega-gld { font-size: clamp(42px, 5vw, 64px); }
/* A range reads as two lines: the low end large, "to" the high end beneath it. */
.mega .mega-to { display: block; margin-top: 6px; font-size: .46em; color: var(--muted); letter-spacing: -.02em; }
.mega-to .unit { color: var(--lime); }

.lab-result .sub strong { color: var(--text); }
/* The answer to the page's question in dollars, right under the headline. */
.lab-result .verdict { margin-top: 12px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.lab-result .verdict strong { color: var(--lime); }
.lab-result .verdict .btn { display: flex; width: fit-content; margin-top: 12px; }
.lab-result .verdict-note { display: block; margin-top: 4px; font-size: var(--fs-ui); font-weight: 400; color: var(--muted); }
.lab-result .verdict.is-ask { font-size: var(--fs-ui); font-weight: 400; color: var(--muted); }

/* Result blocks: one tinted section per kind of number, and the colour means the same in
   every experiment: lime is what you get, pink what you spend, sky your own HEGG. */
.rblocks { display: grid; gap: 12px; margin-top: 24px; }
.rblock {
  --tone: #ffffff;
  padding: 16px 18px 4px;
  border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent);
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 12%, transparent), color-mix(in srgb, var(--tone) 4%, transparent) 70%);
}
.rblock-gld { --tone: #aaff37; }
.rblock-hegg { --tone: #ff6fbb; }
.rblock-wallet { --tone: #6cc2ff; }
.rblock-note { --tone: #d9dbe6; }
.rblock-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 2px; }
.rblock-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--tone);
}
.rblock-title::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 22%, transparent);
}
.rbadge { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.rbadge.is-good { background: rgba(170, 255, 55, .16); color: #c4ff7a; }
.rbadge.is-short { background: rgba(255, 196, 77, .16); color: #ffcf6e; }

.rrows div { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 16px; padding: 12px 0; }
.rrows div + div { border-top: 1px solid var(--line); }
.rrows dt { flex: 1 1 8em; font-size: var(--fs-ui); color: var(--muted); }
.rrows dt:only-child { flex-basis: 100%; }
.rrows dd { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; text-align: right; font-variant-numeric: tabular-nums; }
.rrows dd small { font-family: var(--body); font-size: .68em; letter-spacing: 0; color: var(--muted); }
.rrows .to { display: block; margin-top: 2px; font-size: .78em; color: var(--muted); }
.rnote { display: block; margin-top: 3px; font-size: var(--fs-small); line-height: 1.45; color: var(--faint); }
.rline { padding: 12px 0 14px; border-top: 1px solid var(--line); font-size: var(--fs-small); line-height: 1.5; color: var(--muted); }
.rline strong { color: var(--text); }

/* What to do first: numbered, in the attention colour. */
.rsteps { display: grid; gap: 10px; margin: 4px 0 14px; padding: 14px; border-radius: 14px; background: rgba(255, 196, 77, .1); list-style: none; counter-reset: get; }
.rsteps li { display: flex; gap: 10px; font-size: var(--fs-ui); line-height: 1.45; counter-increment: get; }
.rsteps li::before {
  content: counter(get);
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: #ffc44d;
  color: #0e0e12;
  font-size: 12px;
  font-weight: 800;
}
.rsteps strong { color: var(--text); }
.rsteps a { color: var(--link); font-weight: 700; }

.result-foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.result-foot .result-actions { margin-top: 0; }
.result-foot .fineprint { margin-top: 12px; }
#lab-amount-note:empty { display: none; }

/* Hen lookup: a number box and its button on one line. */
.hen-find { display: flex; flex-wrap: wrap; gap: 10px; }
.hen-find .input { flex: 1 1 140px; min-height: 52px; padding: 0 14px; }
.hen-find .input input { height: 48px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.hen-find .btn { min-height: 52px; }

/* Burn or buy: the best-value listings, one tappable row each, above the lookup. */
.listing-picks { display: grid; gap: 8px; margin-bottom: 14px; }
.listing {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s var(--ease);
}
.listing:hover { border-color: var(--line-strong); }
.listing input { position: absolute; opacity: 0; pointer-events: none; }
.listing:has(input:checked) { border-color: var(--text); background: var(--soft); box-shadow: inset 0 0 0 1px var(--text); }
.listing:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.listing img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.listing-hen, .listing-price { display: grid; gap: 1px; min-width: 0; font-variant-numeric: tabular-nums; }
.listing-hen strong, .listing-price strong { font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.listing small { overflow: hidden; color: var(--muted); font-size: var(--fs-label); text-overflow: ellipsis; white-space: nowrap; }
.listing-price { text-align: right; }
.listing-tag {
  position: absolute;
  top: -9px;
  left: 62px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--lime);
  color: #0e0e12;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.listing:first-child { margin-top: 6px; }
.picks-note { margin-bottom: 14px; font-size: var(--fs-small); color: var(--muted); }

/* Two routes side by side: a label column and one column per route. */
.rcompare { width: 100%; margin-bottom: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rcompare thead td, .rcompare thead th { padding: 6px 0 10px; }
.rcompare thead th { font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: right; vertical-align: bottom; }
.rcompare thead th.is-cheaper { color: var(--lime); }
.rcompare tbody th { padding: 12px 12px 12px 0; font-size: var(--fs-ui); font-weight: 400; color: var(--muted); text-align: left; vertical-align: top; }
.rcompare tbody td { padding: 12px 0 12px 12px; font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: -.01em; text-align: right; vertical-align: top; white-space: nowrap; }
.rcompare tbody tr { border-top: 1px solid var(--line); }
.rcompare tbody tr:last-child td { font-family: var(--body); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0; white-space: normal; }
.rcompare td .rnote { font-family: var(--body); font-weight: 400; letter-spacing: 0; white-space: normal; }

/* Plain sentences in a result block. */
.rlist { display: grid; gap: 10px; margin: 6px 0 14px; padding: 0; list-style: none; }
.rlist li { position: relative; padding-left: 18px; font-size: var(--fs-ui); line-height: 1.5; color: var(--muted); }
.rlist li::before { content: ''; position: absolute; top: .62em; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
.rlist li.is-warn { color: var(--text); }
.rlist li.is-warn::before { background: #ffc44d; }
.rlist strong { color: var(--text); }
.rlist a { color: var(--link); font-weight: 700; }

.result-errors { display: grid; justify-items: center; padding: 18px 4px; text-align: center; }
.result-errors img { width: 84px; margin-bottom: 10px; }
.result-errors ul { margin-top: 10px; padding: 0; list-style: none; color: var(--warn-text); }
.result-errors li + li { margin-top: 6px; }

.lab-chart { margin-top: 20px; }

/* History charts below an experiment: totals in a row, then each chart under its own title. */
/* A chart card's intro sits under its title; a head with controls keeps them alongside. */
.lab-chart .section-head:has(> .muted) { display: block; }
.lab-chart .section-head .muted { max-width: 62ch; margin-top: 4px; }
.chart-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 4px 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.chart-stat { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; }
.chart-stat:first-child { padding-left: 0; }
.chart-stat + .chart-stat { border-left: 1px solid var(--line); }
.chart-stat-value {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.chart-stat-value small { font-size: .52em; color: var(--muted); letter-spacing: 0; }
.chart-stat .sub { font-size: var(--fs-small); color: var(--muted); }
.chart-skeleton { height: 300px; }
.budget-ceiling .compare { max-width: 680px; }
.budget-ceiling .compare-figure small { font-size: .86em; color: var(--muted); }
.budget-ceiling .fineprint { max-width: 62ch; }
.professor {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--soft);
  color: var(--muted);
  font-size: var(--fs-ui);
}
.professor img { width: 42px; flex: none; }

/* Growth planner: the day-by-day schedule under its chart. */
.plan-schedule { margin-top: 22px; }
.plan-days { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); font-variant-numeric: tabular-nums; }
.plan-days th, .plan-days td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.plan-days thead th { padding-top: 0; font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.plan-days tbody th { font-weight: 700; white-space: nowrap; }
.plan-days td:last-child, .plan-days th:last-child { padding-right: 0; text-align: right; white-space: nowrap; }
.plan-days .burn { display: inline-block; margin: 0 12px 2px 0; color: var(--muted); }
.plan-days .burn strong { color: var(--text); }
.plan-more summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.plan-more summary::-webkit-details-marker { display: none; }
.plan-more summary .i { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.plan-more[open] summary .i { transform: rotate(180deg); }
.plan-more .plan-days { margin-top: 8px; }
.plan-more .plan-days thead { display: none; }
.plan-schedule > .fineprint { margin-top: 14px; }

/* ---------------------------------------------------- Assumptions sheet -- */

.assume-groups { display: grid; gap: 22px; margin-top: 22px; }
.assume-group { min-width: 0; margin: 0; padding: 0 0 22px; border: 0; border-bottom: 1px solid var(--line); }
.assume-group:last-child { padding-bottom: 0; border-bottom: 0; }
.assume-group legend { padding: 0; font-size: 16.5px; font-weight: 700; }
.assume-group > .field-help { margin: 2px 0 12px; }
/* The live estimate and the way out stay pinned to the bottom of the sheet while it scrolls. */
.assume-dock {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 24px -28px -28px;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.assume-live { color: var(--muted); font-size: var(--fs-ui); }
.assume-live strong { color: var(--text); white-space: nowrap; }
.assume-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 16px; margin-top: 14px; }
.assume-actions .text-button { margin-right: auto; }
.assume-actions .btn { min-width: 120px; }

/* ------------------------------------------------------------- Peek bar -- */

/* The result's headline for one-column layouts; lab.js shows it while the result is below. */
.lab-peek { display: none; }

@media (min-width: 761px) {
  #lab-dialog { max-width: min(580px, calc(100vw - 32px)); }
}

/* The result stays in view beside the steps when the screen is tall enough to hold it. */
@media (min-width: 1081px) and (min-height: 760px) {
  .lab-result { position: sticky; top: 92px; }
}

@media (max-width: 1080px) {
  .lab-grid { grid-template-columns: minmax(0, 1fr); }

  .lab-peek {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 35;
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(460px, calc(100% - 24px));
    padding: 10px 10px 10px 18px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 20px;
    background: #0e0e12;
    color: #fff;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55);
    text-align: left;
    transform: translate(-50%, calc(100% + 120px));
    visibility: hidden;
    transition: transform .28s var(--ease), visibility 0s linear .28s;
  }
  .lab-peek.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .28s var(--ease); }
  .lab-peek-text { display: grid; flex: 1; min-width: 0; }
  .lab-peek-text small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .64); }
  .lab-peek-text strong { overflow: hidden; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; text-overflow: ellipsis; }
  .lab-peek-text strong span { font-size: .72em; color: var(--lime); }
  .lab-peek .i { flex: none; width: 36px; height: 36px; padding: 9px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
  body:has(.lab-peek.is-on) .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

@media (max-width: 900px) {
  .experiments, .notebook-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .chart-stats { grid-template-columns: 1fr; }
  .chart-stat, .chart-stat:first-child { padding: 14px 0; }
  .chart-stat + .chart-stat { border-left: 0; border-top: 1px solid var(--line); }
  .chart-stat-value { font-size: 23px; }
  .lab-hero { margin: 28px 0 20px; }
  .lab-hero img { width: 92px; }
  .lab-wallet { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lab-wallet > img { width: 92px; }
  /* The art moves beside the button, so the title keeps the card's full width. */
  .experiment { padding: 24px 22px 22px; }
  .experiment img { height: 92px; margin: -12px -10px -8px 0; }
  .explainer { align-items: flex-start; }
  .explainer img { width: 52px; }
  .notebook { margin-top: 44px; }
  .run { padding: 18px 18px 16px; }
  .run-head { flex-wrap: wrap; }
  .run-name { flex-basis: calc(100% - 40px); }
  .run-badge { order: 3; }
  .notebook-empty { flex-wrap: wrap; padding: 20px; }
  .notebook-empty img { width: 64px; }
  .notebook-empty > div { flex-basis: calc(100% - 86px); }

  .back-link { margin-top: 22px; }
  .lab-head .lede { font-size: 16.5px; }
  .lab-steps { padding: 22px 20px; }
  .lab-result { padding: 22px 20px; border-radius: 24px; }
  .lab-peek { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body:has(.lab-peek.is-on) .toast { bottom: calc(160px + env(safe-area-inset-bottom)); }
  .assume-dock {
    margin: 22px -20px calc(-24px - env(safe-area-inset-bottom));
    padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .lab-clock { display: flex; }
  .lab-hero { grid-template-columns: minmax(0, 1fr) 88px; }
  .lab-hero img { width: 70px; }
  .amount input { font-size: 32px; height: 60px; }
  .rblock { padding: 14px 14px 2px; }
  .rrows dd { font-size: 17px; }
  .rcompare tbody th { padding-right: 8px; font-size: var(--fs-small); }
  .rcompare tbody td { padding-left: 8px; font-size: 15px; }
  .listing { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px 8px 8px; }
  .listing img { width: 36px; height: 36px; border-radius: 8px; }
  .listing-tag { left: 52px; }
}

@media (max-width: 420px) {
  .pick { gap: 8px; padding: 6px; }
  .pick img { width: 34px; height: 34px; border-radius: 8px; }
  .pick-unit { display: none; }
}

@media (max-width: 380px) {
  .assume-pair { grid-template-columns: minmax(0, 1fr); }
  .assume-card { padding: 16px 14px; }
  .assume-card .btn { width: 100%; padding: 0 10px; }
  .assume-card .btn .i { display: none; }
}
