/* Olfactory Studio — workbench design system
   Ivory paper, near-black ink, oxblood for the one action that matters.
   Instrument Serif: Atlas headlines · Instrument Sans: controls & reading · IBM Plex Mono: vial numbers, %, elapsed time.
   Hierarchy from size, alignment, whitespace and fine rules — no cards, no pills, no gradients. */
:root {
  --paper: #f6f1e6; --paper-2: #ede6d7; --ink: #1c1a16; --ink-2: #57514a; --ink-3: #857d72;
  --rule: #d6ccba; --rule-2: #bfb39e;
  --ox: #6d1f24; --ox-2: #561519; --ox-ink: #fbf6ec; --ox-soft: #efe0da;
  --ok: #2f5b39; --warn: #7d5a10; --bad: #8f2d1c;
  --focus: #6d1f24; --field: #fffdf8;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 38rem;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 16.5px/1.55 var(--sans); -webkit-text-size-adjust: 100%; font-feature-settings: "kern"; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .4rem; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.12rem; } h3 { font-size: 1rem; }
p { margin: .3rem 0 .8rem; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono, .mono * { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.small { font-size: .86rem; }
.label { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
hr, .rule { border: 0; border-top: 1px solid var(--rule); margin: 18px 0; }

/* ---------- frame ---------- */
.top { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--ink); }
.top-in { max-width: 1040px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 4px; min-height: 52px; }
.brand { flex: 1; min-width: 0; text-decoration: none; display: flex; align-items: baseline; gap: 10px; }
.brand b { font: 400 1.35rem/1 var(--serif); white-space: nowrap; }
.brand small { font: 500 .72rem/1.2 var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .tbtn { background: none; border: 0; font: 600 .82rem var(--sans); letter-spacing: .08em; color: var(--ink); min-width: 44px; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.top .tbtn svg { width: 22px; height: 22px; }
main { max-width: 1040px; margin: 0 auto; padding: 18px 16px 104px; }
.col { max-width: 44rem; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; background: var(--paper); border-top: 1px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.nav-in { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; text-decoration: none; color: var(--ink-2); font-size: .7rem; font-weight: 600; letter-spacing: .02em; border-top: 2px solid transparent; margin-top: -1px; }
.nav a svg { width: 20px; height: 20px; }
.nav a[aria-current="page"] { color: var(--ox); border-top-color: var(--ox); }
body.in-session .nav { display: none; }
body.in-session main { padding-bottom: 16px; }

/* ---------- sections & rows (replace cards) ---------- */
.card, section.block { border-top: 1px solid var(--rule); padding: 16px 0 8px; margin: 0 0 8px; background: none; }
.card.tint { border-top: 2px solid var(--ox); }
.card > h2:first-child, .card > .row:first-child h2 { margin-top: 0; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px; }
.head h1 { margin: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--rule); }
.list > li:last-child { border-bottom: 0; }
.item { display: flex; gap: 14px; align-items: baseline; padding: 11px 0; min-height: 48px; color: inherit; text-decoration: none; }
a.item:hover .title { text-decoration: underline; text-underline-offset: 3px; }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 600; overflow-wrap: anywhere; }
.empty { padding: 22px 0; color: var(--ink-2); }

/* ---------- controls ---------- */
.btn { appearance: none; font: 600 .98rem/1.2 var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 3px;
  min-height: 48px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--paper-2); }
.btn.primary { background: var(--ox); border-color: var(--ox); color: var(--ox-ink); }
.btn.primary:hover { background: var(--ox-2); }
.btn.big { min-height: 58px; font-size: 1.05rem; width: 100%; }
.btn.wide { width: 100%; }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: .88rem; }
.btn.ghost, .btn.link { border-color: transparent; padding-left: 0; padding-right: 0; text-decoration: underline; text-underline-offset: 4px; }
.btn.ghost:hover, .btn.link:hover { background: none; color: var(--ox); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: none; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--field); border: 1px solid var(--rule-2); border-radius: 3px; padding: 12px 12px; min-height: 48px; }
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: 44px; margin: 0; }
.check input { width: 20px; height: 20px; accent-color: var(--ox); }

/* labels that used to be pills: plain small caps text */
.chip { display: inline-block; font: 600 .7rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; background: none; border: 0; padding: 0; }
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); } .chip.bad { color: var(--bad); } .chip.accent { color: var(--ox); }
button.chip, .tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; font: 600 .82rem var(--sans); letter-spacing: .04em; text-transform: none;
  color: var(--ink-2); padding: 8px 2px; min-height: 40px; cursor: pointer; margin-right: 12px; }
button.chip[aria-pressed="true"], .tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ox); }
.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
.notice { padding: 8px 0 8px 12px; margin: 0 0 14px; border-left: 2px solid var(--ink-3); }
.notice.warn { border-left-color: var(--warn); } .notice.bad { border-left-color: var(--bad); } .notice.ok { border-left-color: var(--ok); }
.toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 3px; z-index: 20; max-width: calc(100% - 32px); font-weight: 600; font-size: .92rem; }
.kbd { font: .7rem var(--mono); border: 1px solid var(--rule-2); border-radius: 2px; padding: 0 4px; color: var(--ink-3); }
details > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.progress-bar { height: 3px; background: var(--rule); } .progress-bar > span { display: block; height: 100%; background: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 9px 8px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
th { font: 600 .7rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); border-bottom-color: var(--ink); }
.table-wrap { overflow-x: auto; }

/* ---------- vial numbers ---------- */
.vial-badge, .vno { font: 500 1.05rem/1 var(--mono); font-variant-numeric: tabular-nums; min-width: 2.6ch; display: inline-block; color: var(--ink); }
.vial-num { font: 500 clamp(8rem, 46vw, 15rem)/.9 var(--mono); letter-spacing: -.04em; text-align: center; color: var(--ink); margin: 0; font-variant-numeric: tabular-nums; }
.vial-label { text-align: center; font: 600 .72rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.pair { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.pair > div { padding: 14px 8px; text-align: center; }
.pair > div + div { border-left: 1px solid var(--rule); }
.pair .vial-num { font-size: clamp(4.2rem, 22vw, 8rem); }

/* ---------- Train: the blind bench ---------- */
.bench { display: flex; flex-direction: column; min-height: calc(100dvh - 92px); }
.bench-meta { display: flex; justify-content: space-between; align-items: center; font: 500 .82rem var(--mono); color: var(--ink-2); border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.bench-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 18px 0; }
.bench-form { border-top: 1px solid var(--ink); padding-top: 12px; }
.bench-form .actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 10px; }
.reveal-id { border-top: 2px solid var(--ink); padding-top: 12px; }
.reveal-id .name { font: 600 clamp(1.5rem, 6vw, 2.2rem)/1.15 var(--sans); letter-spacing: -.015em; overflow-wrap: anywhere; }
.compare { display: grid; grid-template-columns: 7.5rem 1fr; border-top: 1px solid var(--rule); }
.compare > dt, .compare > dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.compare > dt { font: 600 .7rem/1.6 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding-top: 11px; }
.assess { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.assess .btn { flex-direction: column; min-height: 72px; gap: 2px; padding: 8px 4px; min-width: 0; font-size: .95rem; }
.assess .btn .sym { font: 500 1.25rem/1 var(--mono); }
.btn.ok { color: var(--ok); border-color: var(--ok); } .btn.warn { color: var(--warn); border-color: var(--warn); } .btn.bad { color: var(--bad); border-color: var(--bad); }

/* ---------- inventory (My Kit, lists of vials) ---------- */
.inv { width: 100%; border-collapse: collapse; }
.inv th { padding-top: 0; }
.inv td { padding: 10px 10px 10px 0; }
.inv td.no { width: 4.2rem; font: 500 1rem var(--mono); }
.inv td.conc, .inv th.conc { font-family: var(--mono); text-align: right; white-space: nowrap; width: 5rem; }
.inv th.conc { font-family: var(--sans); }
.inv td.name a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.inv td.name a:hover { text-decoration: underline; }
.inv tr.fam td { border-bottom: 1px solid var(--ink); padding: 22px 0 6px; font: 400 1.35rem/1.1 var(--serif); }
.inv tr.fam td .faint { font: 500 .75rem var(--mono); margin-left: 8px; }
.inv tr.hit td { background: var(--ox-soft); }
@media (max-width: 680px) {
  .inv thead { display: none; }
  .inv tr:not(.fam) { display: grid; grid-template-columns: 3.4rem 1fr auto; border-bottom: 1px solid var(--rule); padding: 9px 0; }
  .inv tr:not(.fam) td { border: 0; padding: 0; }
  .inv td.no { grid-row: 1 / span 2; width: auto; padding-top: 1px; }
  .inv td.name { grid-column: 2; }
  .inv td.conc { grid-column: 3; grid-row: 1; width: auto; font-size: .82rem; color: var(--ink-2); padding-left: 8px; }
  .inv td.fam-col { display: none; }
  .inv td.meta { grid-column: 2 / span 2; font-size: .8rem; }
}

/* ---------- Learn: open notebook ---------- */
.ident { display: grid; grid-template-columns: auto 1fr; gap: 0 16px; align-items: baseline; border-bottom: 1px solid var(--ink); padding-bottom: 12px; margin-bottom: 14px; }
.ident .vno { font-size: clamp(2.4rem, 11vw, 3.6rem); font-weight: 500; letter-spacing: -.03em; }
.ident .name { font: 600 clamp(1.3rem, 5vw, 1.9rem)/1.15 var(--sans); overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0 0 6px; padding: 0; }
.timeline li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.timeline .t { font: 500 .9rem var(--mono); color: var(--ox); }
.ref-sheet { border-top: 1px solid var(--ink); }

/* ---------- next action ---------- */
.next { border-top: 2px solid var(--ink); padding: 14px 0 4px; margin-bottom: 18px; }
.next .what { font: 600 clamp(1.4rem, 5.6vw, 1.9rem)/1.15 var(--sans); letter-spacing: -.015em; margin: 4px 0 6px; }
.figures { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 6px 0 14px; }
.figures div { font-size: .82rem; color: var(--ink-2); }
.figures b { display: block; font: 500 1.35rem/1.2 var(--mono); color: var(--ink); }
.hero { border-top: 2px solid var(--ink); padding: 14px 0; margin-bottom: 14px; }
.kicker { font: 600 .72rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- Atlas: the publication ---------- */
.masthead { border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.masthead .t { font: 400 clamp(1.9rem, 7vw, 2.6rem)/1 var(--serif); }
.spread { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 28px; }
@media (min-width: 860px) { .spread { grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: end; } }
.spread h2, .ed-title { font: 400 clamp(3rem, 13vw, 5.6rem)/.92 var(--serif); letter-spacing: -.01em; margin: 8px 0 12px; }
.spread h2 a { text-decoration: none; }
.dek { font: 400 clamp(1.2rem, 4.4vw, 1.5rem)/1.3 var(--serif); font-style: italic; color: var(--ink); max-width: 32rem; }
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--paper-2); }
figcaption { font-size: .78rem; line-height: 1.4; color: var(--ink-2); padding-top: 6px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
figcaption a { color: var(--ink-2); }
.article { max-width: var(--measure); margin: 0 auto; }
.article .prose { font-size: 1.05rem; line-height: 1.65; }
.article .prose h2 { font: 400 1.8rem/1.15 var(--serif); margin: 2.2rem 0 .6rem; letter-spacing: 0; }
.article .prose p { margin: 0 0 1rem; }
.article .prose ol { padding-left: 1.3rem; }
.article .prose li { margin-bottom: .4rem; }
.ed-head { max-width: 48rem; margin: 0 auto 22px; }
.ed-wide { max-width: 60rem; margin: 0 auto 26px; }
.meta-dl { display: grid; grid-template-columns: 8.5rem 1fr; border-top: 1px solid var(--ink); margin: 18px 0 8px; font-size: .92rem; }
.meta-dl dt, .meta-dl dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.meta-dl dt { font: 600 .7rem/1.9 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.cite { font: 500 .66em var(--mono); vertical-align: super; text-decoration: none; color: var(--ox); padding: 0 1px; }
.perfumes { list-style: none; padding: 0; margin: 0; counter-reset: p; }
.perfumes li { counter-increment: p; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0 10px; border-top: 1px solid var(--rule); padding: 14px 0; }
.perfumes li::before { content: counter(p, decimal-leading-zero); font: 500 .9rem var(--mono); color: var(--ink-2); padding-top: 4px; }
.perfumes h3 { font: 400 1.45rem/1.15 var(--serif); margin: 0; letter-spacing: 0; }
.sources { font-size: .84rem; line-height: 1.45; padding-left: 0; list-style: none; }
.sources li { display: grid; grid-template-columns: 2.4rem 1fr; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.sources li b { font: 500 .8rem var(--mono); color: var(--ox); }
.index { width: 100%; border-collapse: collapse; }
.index td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.index td.no { font: 500 .85rem var(--mono); width: 3rem; color: var(--ink-2); }
.index td.t a { font: 400 1.55rem/1.1 var(--serif); text-decoration: none; }
.index td.t a:hover { text-decoration: underline; }
.index td.w { font: 500 .8rem var(--mono); color: var(--ink-2); text-align: right; white-space: nowrap; }
.kit-hit { border-top: 2px solid var(--ox); border-bottom: 1px solid var(--rule); padding: 12px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }
@media print { .top, .nav, .no-print { display: none !important; } main { padding: 0; } }
button.item { width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.item[disabled] { opacity: .45; cursor: not-allowed; }
@media (min-width: 681px) { .kit-fam-m { display: none; } }
.head + .next, .head + .notice + .next { border-top: 0; padding-top: 2px; }
.count { font: 500 .85rem var(--sans); color: var(--ink-2); white-space: nowrap; }
details > summary::before { content: "+"; font: 500 1rem var(--mono); width: 1.2em; color: var(--ox); }
details[open] > summary::before { content: "–"; }
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; }
@media (min-width: 681px) { .inv td.meta, .inv th:last-child { padding-left: 24px; width: 11rem; } }

/* ---------- secondary screens: groups, assessments, admin, import, settings, sign-in ---------- */
.back { display: inline-flex; align-items: center; min-height: 40px; font-size: .86rem; color: var(--ink-2); text-decoration: none; margin-bottom: 2px; }
.back:hover { color: var(--ox); }
.arrow { font: 500 1rem var(--mono); color: var(--ink-3); flex: none; }
a.item:hover .arrow { color: var(--ox); }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); } .warn-t { color: var(--warn); }
.narrow { max-width: 30rem; }
.split { display: grid; grid-template-columns: 1fr; gap: 0 40px; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }
.figures span { font-size: .82rem; color: var(--ink-2); }
.figures span b { display: block; font: 500 1.35rem/1.2 var(--mono); color: var(--ink); }
.mark { width: 1.4rem; flex: none; color: var(--ink-3); } .mark.ok { color: var(--ok); }

/* numbered steps (welcome, import) — like numbered inventory entries */
.steps { list-style: none; margin: 0 0 18px; padding: 0; }
.steps > li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 14px; border-top: 1px solid var(--rule); padding: 16px 0 10px; }
.steps > li > .n { font: 500 1rem/1.6 var(--mono); color: var(--ox); }
.steps h2 { margin-bottom: .3rem; }
@media (max-width: 560px) { .steps > li { grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0 8px; } }

/* sign-in: a title page */
.title-page { display: grid; grid-template-columns: 1fr; gap: 10px 56px; padding-top: 4vh; }
@media (min-width: 860px) { .title-page { grid-template-columns: 1.1fr 1fr; align-items: start; padding-top: 9vh; } }
.wordmark { font: 400 clamp(3.2rem, 15vw, 6.2rem)/.9 var(--serif); letter-spacing: -.015em; margin: 8px 0 14px; }
.tp-left { border-bottom: 1px solid var(--ink); padding-bottom: 12px; }
@media (min-width: 860px) { .tp-left { border-bottom: 0; border-right: 1px solid var(--rule); padding-right: 40px; padding-bottom: 24px; } }
.tp-right { max-width: 28rem; }

/* group page */
.jump { position: sticky; top: 52px; z-index: 3; background: var(--paper); overflow-x: auto; flex-wrap: nowrap; margin-bottom: 4px; }
.jump .tab { white-space: nowrap; }
.invite { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.code-big { font-size: clamp(2.2rem, 10vw, 3rem); font-weight: 500; letter-spacing: .12em; line-height: 1.1; }
details.lrow { border-bottom: 1px solid var(--rule); }
details.lrow > summary { display: grid; grid-template-columns: 1.2em minmax(0, 1fr) auto auto; gap: 4px 14px; align-items: baseline; padding: 10px 0; }
details.lrow > summary .who { font-weight: 600; overflow-wrap: anywhere; }
details.lrow > summary > :last-child { grid-column: 2 / -1; }
@media (min-width: 680px) { details.lrow > summary { grid-template-columns: 1.2em minmax(0, 1fr) 6rem 5rem 9rem; } details.lrow > summary > :last-child { grid-column: auto; text-align: right; } }
.lrow-body { display: grid; grid-template-columns: 1fr; gap: 8px 40px; padding: 4px 0 16px 1.2em; }
@media (min-width: 760px) { .lrow-body { grid-template-columns: 1fr 1fr; } }
table.modes td { padding: 4px 8px 4px 0; vertical-align: middle; }
table.modes td:first-child { width: 1.4rem; }
table.modes select { min-height: 40px; padding: 6px 8px; font-size: .9rem; }
.pairrow { align-items: center; }
.pairrow .pv { font-size: 1.05rem; white-space: nowrap; min-width: 6.5rem; }
.who-done { display: inline-block; margin-right: 14px; color: var(--ink-2); white-space: nowrap; }
.who-done.ok { color: var(--ok); }
details.addform { border-top: 1px solid var(--rule); margin-top: 6px; padding-bottom: 6px; }
details.addform > summary { color: var(--ox); }
.picklist { max-height: 22rem; overflow: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin-top: 8px; }
.pick { border-bottom: 1px solid var(--rule); padding: 4px 0; gap: 12px; }
.pick .vno { width: 2.6rem; flex: none; }
.pick .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.pick[hidden] { display: none; }

/* assessments: key, answers, answer sheet */
.keytable td { vertical-align: middle; }
.keytable td.code, .sheet .code { font: 400 2rem/1 var(--serif); width: 3.2rem; color: var(--ox); }
.keytable td.no { font: 500 1.15rem var(--mono); width: 4rem; }
.keytable td.name { font-weight: 600; overflow-wrap: anywhere; }
.answers th.c { text-align: left; font: 400 1.2rem var(--serif); color: var(--ox); letter-spacing: 0; text-transform: none; }
.answers td.who { font-weight: 600; white-space: nowrap; }
.sheet { max-width: 34rem; border-top: 1px solid var(--ink); }
.sheet-row { display: grid; grid-template-columns: 3.2rem 1fr; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule); padding: 8px 0; }
.sheet-row .code { margin: 0; text-align: center; }
.sheet-row input { border-color: transparent; background: transparent; border-bottom: 1px solid var(--rule-2); border-radius: 0; }

/* admin */
.deps { list-style: none; padding: 0; margin: 6px 0 4px; }
.deps li { display: grid; grid-template-columns: 1.6rem 1fr; padding: 3px 0; }
.deps li.missing { color: var(--bad); }
.runs td { vertical-align: top; }
.log { font-size: .76rem; line-height: 1.5; color: var(--ink-2); max-height: 16rem; overflow: auto; }
.correction { border-top: 1px solid var(--rule); padding: 10px 0; }

/* notebook */
.day-h { font: 400 1.35rem/1.1 var(--serif); letter-spacing: 0; border-bottom: 1px solid var(--ink); padding: 22px 0 6px; margin: 0; }
.note { display: grid; grid-template-columns: 3.8rem minmax(0, 1fr); gap: 12px; padding: 11px 0; }
.note .t { font-size: .9rem; color: var(--ox); padding-top: 1px; }
.note-text { margin: 3px 0; }

/* import */
.file-block { border-top: 1px solid var(--rule); padding: 10px 0; }
.files { border-top: 1px solid var(--rule); margin-top: 8px; }
.files .item { min-height: 36px; padding: 6px 0; }
.maptable td { vertical-align: middle; }
.maptable td.col label { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.maptable td.use { width: 15rem; }
.maptable td.use select { min-height: 40px; padding: 6px 8px; }
.maptable td.ex { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .maptable thead { display: none; }
  .maptable tr { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .maptable td { border: 0; padding: 2px 0; width: auto !important; }
}
fieldset.decide { border: 0; border-top: 1px solid var(--rule); padding: 10px 0; margin: 0; min-width: 0; }
fieldset.decide legend { font-weight: 600; padding: 0; }
input[type=file] { font: .92rem var(--sans); max-width: 100%; padding: 8px 0; }
input[type=file]::file-selector-button { font: 600 .92rem var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 3px; padding: 10px 14px; margin-right: 12px; cursor: pointer; }
@media print { .keytable td.code { color: #000; } }
.jump { scrollbar-width: none; } .jump::-webkit-scrollbar { display: none; }
@media (max-width: 680px) {
  table.modes tr { display: grid; grid-template-columns: 1.4rem 1fr; padding: 6px 0; border-bottom: 1px solid var(--rule); }
  table.modes td { border: 0; padding: 2px 0; }
  table.modes td:last-child { grid-column: 2; }
}
@media (max-width: 560px) { .pick > .faint { display: none; } }
.answers td.who { white-space: normal; min-width: 9rem; }
@media (max-width: 680px) {
  .runs thead { display: none; }
  .runs tr { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: 0 10px; border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .runs td { border: 0; padding: 1px 0; min-width: 0; }
  .runs td:nth-child(2) { overflow-wrap: anywhere; }
  .runs td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .runs td:nth-child(4) { grid-column: 3; grid-row: 1; text-align: right; }
  .runs td:nth-child(5) { grid-column: 2 / -1; }
  .runs td:nth-child(5):empty { display: none; }
}
.head + .block, .head + .split > .block:first-child { border-top: 0; padding-top: 2px; }
@media (min-width: 760px) { .head + .split > .block { border-top: 0; padding-top: 2px; } }
fieldset.decide { border-top: 0; box-shadow: inset 0 1px 0 var(--rule); padding-top: 12px; }
fieldset.decide legend { float: left; width: 100%; margin-bottom: 4px; }
fieldset.decide legend + * { clear: both; }
.head + .steps > li:first-child { border-top: 0; }
.jump + .block { border-top: 0; }

/* ---------- refinements: progress bars, reveal grouping, in-session comparison ---------- */
.bar { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ox); transition: width .25s ease; }
.bench-meta { gap: 14px; }
.bench-meta .bar { flex: 1; max-width: 22rem; }
.bench-meta .sess-pos { white-space: nowrap; }
.kitbar { margin: -2px 0 16px; }
.kitbar .kb-label { font-weight: 600; margin-bottom: 6px; }
.kitbar .bar { height: 5px; }
.kitbar p { margin: 6px 0 0; }
@media (min-width: 760px) {
  .bench { min-height: 0; }
  .bench-stage { flex: none; padding: 34px 0 26px; }
}
.reveal-card { border-bottom: 1px solid var(--ink); padding-bottom: 14px; margin: 12px 0 6px; }
.reveal-card .reveal-id { border-top: 2px solid var(--ink); padding-top: 10px; }
.reveal-card .compare { margin-top: 10px; }
.mixup { margin-top: 10px; }
.mixup label { margin-top: 0; }
.btn.toggle { white-space: nowrap; }
.btn.toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.bench-form .actions.three { grid-template-columns: auto 1fr 1.4fr; }
@media (max-width: 480px) { .bench-form .actions.three { grid-template-columns: 1fr 1fr; } .bench-form .actions.three .link { grid-column: 1 / -1; order: 3; } }
.pair-h { margin: 16px 0 8px; }
.pair-named .vial-num { font-size: clamp(3.4rem, 16vw, 6rem); }
.pair-named .pn { font-weight: 600; overflow-wrap: anywhere; }
.pair-blind .vial-num { font-size: clamp(4.4rem, 22vw, 8rem); }
.cue { border-left: 2px solid var(--ox); padding: 4px 0 4px 12px; margin: 10px 0 0; }
.cue p { margin: .2rem 0 .4rem; }
.ref-links { margin-top: 10px; }
.list.compact .item { min-height: 36px; padding: 6px 0; }
.chips { gap: 6px; margin: 6px 0; }

/* ---------- Olfactory Reference ---------- */
.wheel-wrap, .pyr-wrap { display: grid; grid-template-columns: 1fr; gap: 18px 40px; align-items: start; }
@media (min-width: 860px) { .wheel-wrap { grid-template-columns: minmax(0, 440px) 1fr; } .pyr-wrap { grid-template-columns: minmax(0, 360px) 1fr; align-items: center; } }
.wheel { width: 100%; max-width: 440px; height: auto; display: block; }
.wheel .seg path { stroke: var(--paper); stroke-width: 2; cursor: pointer; }
.wheel .seg text { font: 600 10.5px var(--sans); fill: var(--ink); pointer-events: none; }
.wheel .g-floral path { fill: var(--w-floral); } .wheel .g-amber path { fill: var(--w-amber); } .wheel .g-woody path { fill: var(--w-woody); } .wheel .g-fresh path { fill: var(--w-fresh); }
.wheel .seg:hover path, .wheel .seg:focus path { fill: var(--paper-2); }
.wheel .seg:focus { outline: none; }
.wheel .seg:focus path { stroke: var(--ink); stroke-width: 2.5; }
.wheel .seg.on path { fill: var(--ox); } .wheel .seg.on text { fill: var(--ox-ink); }
.wheel .hub { fill: var(--paper); stroke: var(--rule); }
.wheel .hub-t { font: 600 9px var(--sans); letter-spacing: .12em; text-transform: uppercase; fill: var(--ink-2); }
.wheel-list { list-style: none; margin: 4px 0 12px; padding: 0; }
.wheel-list li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.wheel-list a { font: 400 1.25rem var(--serif); text-decoration: none; margin-right: 8px; }
.wheel-list a[aria-current="true"] { color: var(--ox); text-decoration: underline; }
@media (min-width: 760px) { .wl-group { display: inline-block; vertical-align: top; width: 49%; padding-right: 24px; } }
.pyramid { width: 100%; max-width: 360px; height: auto; display: block; }
.pyramid .layer path { fill: var(--paper-2); stroke: var(--paper); stroke-width: 3; cursor: pointer; }
.pyramid .layer text { font: 600 12px var(--sans); fill: var(--ink); pointer-events: none; }
.pyramid .layer:focus { outline: none; }
.pyramid .layer:focus path { stroke: var(--ink); }
.pyramid .layer.on path { fill: var(--ox); } .pyramid .layer.on text { fill: var(--ox-ink); }
.facets { padding-left: 1.1rem; margin: 0 0 .6rem; }
.facets li { margin-bottom: .2rem; }
@media (max-width: 520px) {
  .mixup .row { flex-wrap: wrap !important; }
  .mixup select { flex-basis: 100% !important; }
  .mixup .toggle { width: 100%; }
}
.block > .what { font: 600 1.2rem/1.2 var(--sans); margin: 4px 0 6px; }
.strip-row { display: flex; align-items: center; gap: 8px; } .strip-row > a.item { flex: 1; min-width: 0; } .strip-rm { color: var(--ink-2); }
.top { padding-top: env(safe-area-inset-top); }

/* ---------- feel: reveal, rating confirmation, bench rhythm, compact path, Atlas photo ---------- */
:root { --w-floral: #ead7cf; --w-amber: #e6d6b8; --w-woody: #d9cfbc; --w-fresh: #dfe1cf; }
@keyframes os-reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.reveal-card .reveal-id .name, .reveal-card .reveal-id .vno { animation: os-reveal .34s ease-out both; }
.reveal-card .reveal-id .name { animation-delay: .06s; }
.assess .btn.chosen { color: var(--paper); }
.assess .btn.ok.chosen { background: var(--ok); } .assess .btn.warn.chosen { background: var(--warn); } .assess .btn.bad.chosen { background: var(--bad); }
.assess .btn[disabled] { opacity: 1; } .assess .btn[disabled]:not(.chosen) { opacity: .35; }
.rhythm { text-align: center; font-size: .82rem; color: var(--ink-2); margin-top: 10px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.rhythm .btn.link { min-height: 32px; }
.rh-t { min-width: 4.5ch; color: var(--ink); } .rh-t.go { color: var(--ox); font-weight: 600; }
.path-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-top: 8px; }
.path-strip span { height: 4px; background: var(--rule); border-radius: 2px; }
.path-strip span.done { background: var(--ink-3); } .path-strip span.now { background: var(--ox); }
.all-stages > summary { min-height: 36px; color: var(--ink-2); }
.atlas-teaser .at-link { display: grid; grid-template-columns: 1fr; gap: 10px; text-decoration: none; margin-top: 6px; }
.atlas-teaser img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: var(--paper-2); }
.atlas-teaser .at-title { display: block; font-size: 2.1rem; line-height: 1.05; margin: 0 0 4px; }
.atlas-teaser .at-hook { display: block; }
@media (min-width: 560px) { .atlas-teaser .at-link { grid-template-columns: 160px 1fr; align-items: center; } }
@media (prefers-reduced-motion: reduce) {
  .reveal-card .reveal-id .name, .reveal-card .reveal-id .vno { animation: none; }
  .bar > span { transition: none; }
}

/* ---------- night bench: the same design in the dark, following the device setting ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #17140f; --paper-2: #221e17; --ink: #efe7d8; --ink-2: #b9ae9c; --ink-3: #8c8273;
    --rule: #39322a; --rule-2: #4d4538;
    --ox: #be5c63; --ox-2: #a84d54; --ox-ink: #fbf6ec; --ox-soft: #3a2326;
    --ok: #86b791; --warn: #d4a650; --bad: #e3806b; --focus: #e6a3a7; --field: #1f1b15;
    --w-floral: #4a3330; --w-amber: #4a3f2c; --w-woody: #3e372d; --w-fresh: #363a2e;
  }
  img { opacity: .94; }
}
.atlas-teaser .at-link { grid-template-columns: 96px 1fr; align-items: center; gap: 12px; }
.atlas-teaser .at-title { font-size: 1.7rem; }
.atlas-teaser .at-hook { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 560px) { .atlas-teaser .at-link { grid-template-columns: 160px 1fr; } .atlas-teaser .at-title { font-size: 2.1rem; } .atlas-teaser .at-hook { font-size: 1rem; -webkit-line-clamp: unset; display: block; } }
.reveal-card.settled .reveal-id .name, .reveal-card.settled .reveal-id .vno { animation: none; opacity: 1; transform: none; }
.btn.primary { background: var(--ox-btn, var(--ox)); border-color: var(--ox-btn, var(--ox)); }
.btn.primary:hover { background: var(--ox-btn-2, var(--ox-2)); }
@media (prefers-color-scheme: dark) { :root { --ox-btn: #8f343b; --ox-btn-2: #7a2b31; } }
.wheel .seg.on path, .pyramid .layer.on path { fill: var(--ox-btn, var(--ox)); }
