/* Notalis website. Tokens are the app's own (docs/DESIGN.md); nothing here is invented. */

:root {
  color-scheme: light dark;

  --bg: #F7F7F5;        /* bgWorkspace: the desk */
  --surface: #FFFFFF;   /* bgSurface: bars, cards, the pill */
  --paper: #FFFFFF;     /* a page of the document */
  --edge: #E6E8E6;      /* borderSubtle: every 1 pt edge */
  --text: #202321;      /* textPrimary */
  --text-2: #636962;    /* textSecondary: small text, 5.3:1 */
  --text-3: #858B83;    /* textTertiary: decoration only */
  --brand: #173D30;     /* brandPrimary: fills only */
  --on-brand: #FFFFFF;
  --brand-text: #173D30;
  --brand-press: #285744;
  --brand-wash: #E5EDE7;
  --danger: #C0412C;
  --mark: #E8B023;
  --float: 0 2px 12px rgb(0 0 0 / .08);

  --r-control: 8px;
  --r-inner: 6px;
  --r-card: 12px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --t-feedback: 120ms;
  --t-standard: 250ms;
  --t-panel: 350ms;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --line: color-mix(in srgb, var(--text) 17%, transparent);
  --pill-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121413;
    --surface: #1C1F1E;
    --paper: #1C1F1E;
    --edge: #2C302E;
    --text: #F0F2F0;
    --text-2: #8E9690;
    --text-3: #8E9690;
    --brand: #3B7A62;
    --brand-text: #56A888;
    --brand-wash: #1B2E26;
    --danger: #FF7B61;
    --mark: #F0BE45;
    --float: 0 2px 12px rgb(0 0 0 / .24);
  }
}

@media (prefers-contrast: more) {
  :root { --edge: #A9AFA9; --text-2: #3F443E; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --edge: #5C635E; --text-2: #C4CBC5; }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--edge) transparent;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--brand-text);
}

::selection { background: var(--brand-wash); color: var(--text); }

a {
  color: var(--brand-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
}
@media (prefers-contrast: more) {
  :focus-visible { outline-width: 3px; }
}

.skip {
  position: absolute; left: .75rem; top: -4rem; z-index: 100;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--edge); border-radius: var(--r-control);
  padding: .625rem 1rem; text-decoration: none;
}
.skip:focus { top: .75rem; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.375rem; height: 1.375rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- the desk ---------- */

.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 56rem; margin: 0 auto; padding: .5rem .5rem .5rem .25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .625rem; min-height: 44px;
  color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em;
}
.brand svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: .25rem; }
.top nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .75rem;
  color: var(--text-2); text-decoration: none; font-size: .9375rem;
  border-radius: var(--r-control);
}
.top nav a:hover { color: var(--text); background: var(--brand-wash); }

.desk { padding: 0 .5rem 9rem; }

/* ---------- a page of the document ---------- */

.sheet {
  position: relative; isolation: isolate; container-type: inline-size;
  width: min(100%, 56rem); margin: 0 auto 1.25rem;
  padding: clamp(1.5rem, 5.5vw, 4rem) clamp(1.25rem, 5.5vw, 4rem) clamp(3.5rem, 6vw, 4.5rem);
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: var(--r-inner);
  scroll-margin-top: .75rem;
}
.sheet--cover {
  min-height: max(36rem, calc(100svh - 7.25rem));
  padding-bottom: 7rem;
}

.folio {
  position: absolute; right: 1.25rem; bottom: .875rem;
  font-size: .8125rem; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.cols { display: block; }
.main { min-width: 0; }
.aside { margin-top: 1.5rem; }

@container (min-width: 44rem) {
  .cols {
    display: grid; grid-template-columns: minmax(0, 1fr) 13.5rem;
    column-gap: 3rem; align-items: start;
  }
  .aside { margin-top: .5rem; }
  .wide { grid-column: 1 / -1; }
}

/* ---------- type: one scale ---------- */

h1, h2, h3, p, ul, ol, dl, figure { margin-block-start: 0; }

h1 {
  margin-bottom: 1.5rem; font-weight: 600;
  font-size: clamp(2.75rem, 1rem + 5vw, 4.5rem);
  line-height: 1.03; letter-spacing: -.035em; text-wrap: balance;
}
h2 {
  margin-bottom: 1.25rem; font-weight: 600;
  font-size: clamp(1.875rem, 1.3rem + 1.9vw, 2.625rem);
  line-height: 1.08; letter-spacing: -.028em; text-wrap: balance;
}
h3 {
  margin: 2.25rem 0 .5rem; font-weight: 600;
  font-size: 1.0625rem; line-height: 1.35; letter-spacing: -.005em;
}
p { margin-bottom: 1rem; max-width: 62ch; text-wrap: pretty; }

.lede { font-size: 1.3125rem; line-height: 1.45; letter-spacing: -.012em; max-width: 34ch; }
.note { font-size: .875rem; line-height: 1.55; color: var(--text-2); max-width: 28ch; }
.note + .note { margin-top: 1rem; }
.meta { font-size: .8125rem; color: var(--text-2); font-variant-numeric: tabular-nums; }

.state {
  position: relative; margin: 2rem 0 0; padding-left: 1.125rem;
  font-size: .9375rem; color: var(--text-2);
}
.state::before {
  content: ""; position: absolute; left: 0; top: .5em; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--brand);
}

.plain { font: 500 .875em/1 var(--mono); }
.after-list { margin-top: 1.25rem; }
.after-tints { margin-top: 1rem; }
.note--full { max-width: none; }
.papers + .note { margin-top: 1.5rem; }

kbd {
  font: 500 .8125em/1 var(--mono); padding: .2em .45em; border-radius: 4px;
  border: 1px solid var(--edge); background: var(--bg); color: var(--text);
}

/* ---------- ledgers: ruled lists of facts ---------- */

.ledger { margin: 1.5rem 0 0; border-top: 1px solid var(--edge); }
.ledger > div {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .25rem 1.5rem;
  padding: .875rem 0; border-bottom: 1px solid var(--edge);
}
.ledger dt { font-weight: 600; }
.ledger dd { margin: 0; }
@container (max-width: 34rem) {
  .ledger > div { grid-template-columns: 1fr; }
}

/* ---------- status pills (the app's sync vocabulary) ---------- */

.statuses { margin: 1.25rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--edge); }
.statuses li {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .25rem 1.25rem;
  align-items: center; padding: .625rem 0; border-bottom: 1px solid var(--edge);
}
@container (max-width: 34rem) {
  .statuses li { grid-template-columns: 1fr; }
}
.status {
  display: inline-flex; align-items: center; gap: .375rem; width: fit-content;
  min-height: 2rem; padding: .125rem .75rem .125rem .5rem;
  border: 1px solid var(--edge); border-radius: 999px;
  font-size: .9375rem; font-weight: 600;
}
.status .ico { width: 1.25rem; height: 1.25rem; }
.status--synced .ico { color: var(--brand-text); }
.status--conflict .ico { color: var(--danger); }
.spin { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .spin { animation: spin 4s linear infinite paused; }
  .statuses.is-live .spin { animation-play-state: running; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- paper templates ---------- */

.papers {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
  gap: 1.125rem .875rem; margin: 1.75rem 0 0; padding: 0; list-style: none;
}
.mini {
  position: relative; aspect-ratio: 3 / 4; margin-bottom: .5rem; overflow: hidden;
  background-color: var(--paper); border: 1px solid var(--edge); border-radius: 4px;
}
.mini--narrow { background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 9px; background-position: 0 7px; }
.mini--wide { background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 15px; background-position: 0 10px; }
.mini--grid {
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 11px 11px;
}
.mini--dots {
  background-image: radial-gradient(circle, var(--text-2) 1.1px, transparent 1.5px);
  background-size: 12px 12px; background-position: 6px 6px;
}
.mini--cornell {
  background-image:
    linear-gradient(90deg, transparent 27%, var(--line) 27%, var(--line) calc(27% + 1px), transparent calc(27% + 1px)),
    linear-gradient(0deg, transparent 21%, var(--line) 21%, var(--line) calc(21% + 1px), transparent calc(21% + 1px)),
    linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 9px;
}
.mini svg { position: absolute; inset: 0; width: 100%; height: 100%; stroke: var(--line); stroke-width: 1; fill: none; }
.papers figcaption, .papers .cap { font-size: .8125rem; line-height: 1.3; color: var(--text-2); }

.tints { display: flex; flex-wrap: wrap; gap: .5rem .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.tints li {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2rem;
  padding: .125rem .75rem .125rem .375rem; border: 1px solid var(--edge); border-radius: 999px;
  font-size: .875rem;
}
.tints i { width: 1.125rem; height: 1.125rem; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); background: var(--c); }
.t-white { --c: #FFFFFF; } .t-ivory { --c: #FDF9EC; } .t-legal { --c: #FFF8C3; }
.t-gray { --c: #ECEDEF; } .t-charcoal { --c: #2A2B2F; } .t-kraft { --c: #D9C4A0; }
.t-sage { --c: #DDE5D7; } .t-blush { --c: #F6E4E0; } .t-chalk { --c: #2B3E36; }

/* ---------- illustrations of the app (drawn from its tokens, not screenshots) ---------- */

.illus { margin: 2rem 0 .5rem; }
.illus figcaption { margin-top: .75rem; font-size: .8125rem; color: var(--text-2); }
.app {
  max-width: 41rem; background: var(--surface); color: var(--text);
  border: 1px solid var(--edge); border-radius: var(--r-card); overflow: hidden;
  font-size: .9375rem; line-height: 1.4; user-select: none; -webkit-user-select: none;
  pointer-events: none;
}
.app-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .875rem 1rem; }
.app-bar b { font-weight: 600; font-size: 1.0625rem; }
.app-bar span { color: var(--text-2); font-size: .8125rem; }
.rows { background: var(--bg); border-block: 1px solid var(--edge); }
.row {
  display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto 1.5rem; gap: .75rem;
  align-items: center; padding: .5rem 1rem; border-bottom: 1px solid var(--edge);
}
.row:last-child { border-bottom: 0; }
.row--dir { background: var(--surface); font-weight: 600; grid-template-columns: 1.75rem minmax(0, 1fr); }
.row--dir .ico { width: 1.125rem; height: 1.125rem; color: var(--text-2); justify-self: center; }
.row--in { padding-left: 2.25rem; }
.row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: .8125rem; }
.row .pages { color: var(--text-2); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .x { color: var(--text-3); width: 1rem; height: 1rem; }
.thumb {
  width: 1.375rem; height: 1.75rem; border: 1px solid var(--edge); border-radius: 3px;
  background-color: var(--paper);
  background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 4px; background-position: 0 3px;
}
.app-opts { display: grid; gap: .5rem; padding: .875rem 1rem; }
.field {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .5rem .75rem; background: var(--bg); border: 1px solid var(--edge); border-radius: var(--r-control);
  font-size: .875rem;
}
.field span:first-child { color: var(--text-2); }
.tag {
  display: inline-block; padding: .0625rem .5rem; border: 1px solid var(--edge); border-radius: var(--r-control);
  background: var(--bg); font-size: .8125rem;
}
.app-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .875rem 1rem 1rem; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: .625rem; font-size: .875rem; }
.switch i {
  position: relative; width: 2.375rem; height: 1.4375rem; border-radius: 999px; background: var(--brand);
}
.switch i::after {
  content: ""; position: absolute; top: .125rem; right: .125rem; width: 1.1875rem; height: 1.1875rem;
  border-radius: 50%; background: #fff;
}
.fake-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0 1.125rem;
  border-radius: var(--r-control); font-weight: 600; font-size: .9375rem;
  background: var(--brand); color: var(--on-brand);
}
.fake-btn--plain { background: var(--surface); color: var(--text); border: 1px solid var(--edge); }

.rows .row:nth-child(1) { --i: 0; }
.rows .row:nth-child(2) { --i: 1; }
.rows .row:nth-child(3) { --i: 2; }
.rows .row:nth-child(4) { --i: 3; }
.rows .row:nth-child(5) { --i: 4; }
.rows .row:nth-child(6) { --i: 5; }
.rows .row:nth-child(7) { --i: 6; }
.rows .row:nth-child(8) { --i: 7; }

/* a notebook window with the resume card */
.nbwin { position: relative; }
.tabs { display: flex; gap: 0; padding: 0 .5rem; border-bottom: 1px solid var(--edge); background: var(--surface); }
.tab {
  position: relative; padding: .625rem .875rem; font-size: .875rem; color: var(--text-2); white-space: nowrap;
}
.tab--on { color: var(--text); font-weight: 600; }
.tab--on::after {
  content: ""; position: absolute; left: .875rem; right: .875rem; bottom: -1px; height: 2px; background: var(--brand);
}
.deskarea { position: relative; height: 23rem; padding: 1.25rem 1.25rem 0; background: var(--bg); }
.pg {
  height: 100%; border: 1px solid var(--edge); border-bottom: 0; border-radius: var(--r-inner) var(--r-inner) 0 0;
  background-color: var(--paper);
  background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 1.75rem; background-position: 0 3.25rem;
  padding: .875rem 1.25rem; font-size: .8125rem; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.resume {
  position: absolute; left: 0; right: 0; bottom: 1rem; margin-inline: auto; width: min(21.5rem, calc(100% - 1.5rem));
  padding: 1rem; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-card);
  box-shadow: var(--float); display: grid; gap: .5rem;
}
.resume .fake-btn { justify-content: flex-start; flex-direction: column; align-items: flex-start; gap: .0625rem; min-height: 2.75rem; padding: .5rem .875rem; font-weight: 600; }
.resume .fake-btn small { font-weight: 400; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.resume .fake-btn--plain { min-height: 2.5rem; justify-content: center; }
.remember { display: flex; align-items: center; gap: .625rem; margin-top: .25rem; font-size: .875rem; }
.remember i { width: 1.125rem; height: 1.125rem; border-radius: 4px; background: var(--brand); display: grid; place-items: center; color: var(--on-brand); }
.remember i svg { width: .75rem; height: .75rem; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- where it stands ---------- */

.stand h3 { display: flex; align-items: center; gap: .625rem; margin-top: 2rem; }
.stand ul { margin: .25rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--edge); max-width: 62ch; }
.stand li { padding: .625rem 0; border-bottom: 1px solid var(--edge); }
.badge {
  display: inline-flex; align-items: center; min-height: 1.5rem; padding: 0 .625rem; border-radius: 999px;
  border: 1px solid var(--edge); font-size: .8125rem; font-weight: 600; color: var(--text);
}
.badge--done { background: var(--brand-wash); border-color: transparent; color: var(--brand-text); }
.badge--done::before { content: "\2713\00a0"; }

/* ---------- the footer ---------- */

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  width: min(100%, 56rem); margin: 0 auto; padding: 1.5rem .25rem 0;
  font-size: .875rem; color: var(--text-2);
}
.foot p { margin: 0; max-width: none; }
.foot a { color: var(--text-2); }

/* ---------- the pen demo: ink layers ---------- */

.ink-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: inherit; }
.ink-layer--hl { z-index: 1; mix-blend-mode: multiply; }
.ink-layer--pen { z-index: 2; }
.sheet a, .sheet .raise { position: relative; z-index: 3; }

@media (prefers-color-scheme: dark) {
  /* marker goes under the words on dark paper, as in the app (multiply would vanish) */
  .ink-layer--hl { z-index: -1; mix-blend-mode: normal; opacity: .78; }
}

body.drawing .sheet { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
body.drawing[data-tool="pen"] .sheet, body.drawing[data-tool="hl"] .sheet { cursor: crosshair; }
body.drawing[data-tool="eraser"] .sheet { cursor: none; }
body.drawing .sheet a { cursor: pointer; }

.ring {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  border: 1.5px solid var(--text); border-radius: 50%; background: color-mix(in srgb, var(--paper) 40%, transparent);
}
.ring[hidden] { display: none; }

.hint-fine, .hint-coarse { display: none; }
html[data-input="fine"] .hint-fine { display: block; }
html[data-input="coarse"] .hint-coarse { display: block; }
html:not([data-input]) .hint-fine { display: block; }

/* ---------- the tool pill ---------- */

.pill {
  position: fixed; z-index: 50; left: 0; right: 0; margin-inline: auto; width: max-content;
  bottom: max(.75rem, env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .125rem .375rem;
  max-width: calc(100vw - 1rem); padding: .375rem;
  background: var(--surface); border: 1px solid var(--edge); border-radius: 1.75rem;
  box-shadow: var(--float);
}
.pill[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .pill { animation: rise 450ms var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

.zone { display: flex; align-items: center; gap: .125rem; }
.zone[hidden] { display: none; }
.sep { width: 1px; height: 1.5rem; background: var(--edge); margin: 0 .125rem; }

.pill button {
  position: relative; display: inline-grid; place-items: center; flex: none;
  min-width: 44px; height: 44px; padding: 0; margin: 0;
  background: transparent; color: var(--text); border: 0; border-radius: 1.375rem;
  font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-feedback) ease-out, color var(--t-feedback) ease-out, transform var(--t-feedback) ease-out;
}
.pill button:hover { background: var(--brand-wash); }
.pill button:active { transform: scale(.94); }
.pill button:disabled { color: var(--text-3); cursor: default; background: transparent; transform: none; }
.pill button:disabled:hover { background: transparent; }
.pill .tool[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.pill .tool[aria-pressed="true"]:hover { background: var(--brand-press); }

.slot-color i {
  width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--c);
  border: 1px solid color-mix(in srgb, var(--text) 28%, transparent);
}
.slot[aria-pressed="true"] i { outline: 2px solid var(--text); outline-offset: 2.5px; }
.slot-width i {
  display: block; width: 1.5rem; height: var(--t, 3px); border-radius: 999px; background: var(--text);
}
.slot-width.slot-eraser i { width: var(--t, 10px); height: var(--t, 10px); border-radius: 50%; background: none; border: 1.5px solid var(--text); }
.slot-width[aria-pressed="true"] { background: var(--brand-wash); }
.slot-width[aria-pressed="true"]::after {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .3125rem; height: 2px; border-radius: 1px; background: var(--brand-text);
}

.pages-btn { display: inline-flex !important; gap: .375rem; padding: 0 .75rem 0 .625rem !important; border-radius: 1.375rem !important; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.pages-btn[aria-expanded="true"] { background: var(--brand-wash); }

@media (max-width: 46rem) {
  .pill { gap: 0 .25rem; }
  .pill button { min-width: 40px; height: 40px; }
  .zone-slots { order: 5; justify-content: center; }
  .zone-pages { order: 6; }
  .sep { display: none; }
}

/* ---------- the page sorter popover ---------- */

.sorter {
  position: fixed; z-index: 55; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--pill-h) + 1.25rem + env(safe-area-inset-bottom));
  width: min(48rem, calc(100vw - 1rem)); max-height: min(34rem, calc(100svh - var(--pill-h) - 4rem)); overflow: auto;
  padding: 1rem; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-card);
  box-shadow: var(--float);
  transform-origin: 50% 100%;
}
.sorter[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .sorter { animation: pop 220ms var(--ease) both; }
  @keyframes pop { from { opacity: 0; transform: translateX(-50%) scale(.97); } }
  .sorter.is-closing { animation: pop-out 120ms ease-in both; }
  @keyframes pop-out { to { opacity: 0; transform: translateX(-50%) scale(.98); } }
}
.sorter h2 { font-size: 1.0625rem; letter-spacing: -.005em; margin: 0 0 .875rem; }
.sorter ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 1rem .75rem; margin: 0; padding: 0; list-style: none; }
.sorter a { display: block; color: var(--text); text-decoration: none; border-radius: var(--r-inner); }
.sorter .pv {
  position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden;
  background: var(--paper); border: 1px solid var(--edge); border-radius: 4px;
}
.sorter a:hover .pv { border-color: var(--text-2); }
.sorter a[aria-current="page"] .pv { outline: 2px solid var(--brand); outline-offset: 1px; }
.sorter .pv > div {
  position: absolute; left: 0; top: 0; width: 56rem; transform-origin: 0 0; pointer-events: none; margin: 0 !important;
}
.sorter .cap { display: block; margin-top: .375rem; font-size: .8125rem; line-height: 1.3; }
.sorter .cap b { font-variant-numeric: tabular-nums; margin-right: .375rem; }
.sorter a[aria-current="page"] .cap b::after { content: " \2713"; color: var(--brand-text); }

/* thumbnails always show their finished state */
.sorter *, .sorter *::before, .sorter *::after { animation: none !important; transition: none !important; }
.sorter .rise, .sorter .studio .row { opacity: 1 !important; transform: none !important; }

/* ---------- motion: exhibits arrive once, chrome only ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(10px); transition: opacity var(--t-panel) var(--ease), transform var(--t-panel) var(--ease); }
  .js .rise.is-in { opacity: 1; transform: none; }
  .js .resume.rise { transform: translateY(18px); }
  .js .resume.rise.is-in { transform: none; }
  .js .studio .row { opacity: 0; transform: translateY(6px); transition: opacity var(--t-standard) var(--ease), transform var(--t-standard) var(--ease); transition-delay: calc(var(--i, 0) * 55ms); }
  .js .studio.is-in .row { opacity: 1; transform: none; }
}

/* ---------- plain pages: privacy and 404 ---------- */

.sheet--plain { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.h-page {
  margin-bottom: 1.25rem; font-weight: 600; font-size: clamp(2.25rem, 1.4rem + 3vw, 3.25rem);
  line-height: 1.05; letter-spacing: -.03em;
}
.plainlist { margin: .25rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--edge); max-width: 62ch; }
.plainlist li { padding: .75rem 0; border-bottom: 1px solid var(--edge); }
.top nav a[aria-current="page"] { color: var(--text); }

@media print {
  .pill, .sorter, .ring { display: none !important; }
  .sheet { break-inside: avoid; }
}
