/* Direction A: Editorial. Values come from design/tokens.md and design/components.md. */
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/literata-cyrillic-opsz-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/literata-latin-opsz-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: "Literata"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/literata-cyrillic-opsz-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/literata-latin-opsz-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; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/golos-text-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; }

:root {
  --paper: #F5F1EA; --ink: #1D1B18; --graphite: #5C564D; --rule: #D8D1C4; --cinnabar: #9A2A1F; --scrim: rgba(29, 27, 24, 0.55);
  --display: Literata, Georgia, "Times New Roman", serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/22px var(--text); font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
h1, h2, h3, p, ol, ul { margin: 0; }
[hidden] { display: none !important; }
button { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--cinnabar); }
:focus-visible { outline: 2px solid var(--cinnabar); outline-offset: 2px; }
input::placeholder { color: var(--graphite); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 30; }
.skip:focus { left: 0; }
.nowrap { white-space: nowrap; }
.muted { color: var(--graphite); }
.u { text-decoration: underline; text-underline-offset: 3px; }
.plain-list { padding-left: 20px; display: grid; gap: 8px; }

/* type scale */
.d1 { font: 600 40px/44px var(--display); letter-spacing: -0.01em; text-wrap: pretty; }
.d2 { font: 600 28px/32px var(--display); }
.d2-lede { font: 400 28px/32px var(--display); max-width: 640px; text-wrap: pretty; }
.d3 { font: 600 22px/28px var(--display); }
.d3-message { font: 400 22px/28px var(--display); }
.d4 { font: 400 18px/24px var(--display); }
.d-link { font: italic 400 17px/24px var(--display); }
.t1 { font: 400 17px/26px var(--text); text-wrap: pretty; }
.t3 { font-size: 13px; line-height: 18px; }
.t4 { font-size: 12px; line-height: 16px; }
.eyebrow { font: 400 12px/16px var(--text); text-transform: uppercase; letter-spacing: 0.08em; color: var(--graphite); }
.figure-xl { font: 400 40px/44px var(--display); color: var(--cinnabar); }
.figure-lg { font: 400 28px/32px var(--display); color: var(--cinnabar); }

/* layout */
.site-header, main, .site-footer { max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.site-header { padding-top: 16px; }
.brand-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 12px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.brand { font: 600 28px/32px var(--display); letter-spacing: -0.01em; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); }
.nav::-webkit-scrollbar { display: none; }
.nav-item { position: relative; min-height: 44px; padding: 0 8px; display: flex; align-items: center; gap: 4px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.nav-item[aria-current="page"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--ink); }
.nav-count { font-size: 12px; color: var(--graphite); }
.nav-count:empty { display: none; }
main { padding-top: 24px; }
.site-footer { margin-top: 48px; padding-bottom: 32px; }
.footer-links { border-top: 2px solid var(--ink); padding-top: 8px; display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
.site-footer .t4 { margin-top: 8px; color: var(--graphite); }
.home-top { display: grid; gap: 16px; }
.narrow { max-width: 720px; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.note { max-width: 560px; }
.back { margin-top: -16px; }
.back a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }

/* buttons and chips */
.btn { min-height: 44px; padding: 0 16px; border-radius: 2px; font-weight: 500; border: 1px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn.primary { background: var(--ink); color: var(--paper); min-height: 48px; }
.btn.secondary { background: transparent; }
.btn.lg { min-height: 48px; }
.btn.toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 0 12px; font-size: 13px; }
.btn-text { min-height: 44px; padding: 0 8px; font-weight: 500; }
.link-btn { min-height: 44px; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.link-btn:hover { color: var(--cinnabar); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 2px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-sm { font-size: 13px; }
.ext { min-height: 44px; display: inline-flex; align-items: center; }

/* search */
.search { display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--ink); max-width: 640px; }
.search input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; font-size: 17px; border-radius: 0; -webkit-appearance: none; appearance: none; }
.search-results { max-width: 640px; display: grid; gap: 16px; padding: 16px; border: 1px solid var(--rule); animation: fade 160ms ease-out; }
.group-h { margin-bottom: 4px; }
.result-row { width: 100%; min-height: 44px; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--rule); text-decoration: none; }
.result-row .name { font: 600 18px/24px var(--display); }
.result-row .side { font-size: 13px; color: var(--graphite); white-space: nowrap; }
.result-row.tall { min-height: 56px; padding: 8px 0; }
.studio-sub { display: block; font-size: 13px; line-height: 18px; color: var(--graphite); font-weight: 400; font-family: var(--text); }

/* feed */
.feed { column-width: 170px; column-gap: 16px; padding-top: 16px; }
.work { break-inside: avoid; margin: 0 0 24px; }
.work-photo { display: block; width: 100%; }
.work-photo img { width: 100%; height: auto; background: var(--rule); }
.work figcaption { margin-top: 8px; }
.cap-studio { font: italic 400 15px/20px var(--display); }
.cap-sub { font-size: 12px; line-height: 16px; color: var(--graphite); }
.broken { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border: 1px dashed var(--graphite); font-size: 13px; padding: 8px; text-align: center; text-decoration: none; }
.more-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 8px 0; }
.empty { padding: 48px 0; display: grid; gap: 16px; justify-items: start; }
.empty-sm { padding: 32px 0; }
.works-studio { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }

/* skeletons: final-layout blocks, no shimmer */
.skel { background: var(--rule); }
.skel-tile { break-inside: avoid; margin-bottom: 24px; }
.skel-ph { aspect-ratio: 4 / 5; }
.skel-l1 { height: 14px; width: 70%; margin-top: 8px; }
.skel-l2 { height: 10px; width: 45%; margin-top: 6px; }
.skel-row { padding: 24px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 12px; }
.skel-title { height: 24px; width: 55%; }
.skel-block { height: 72px; }

/* studio rows (SCR-3) */
.rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); column-gap: 48px; }
.row { min-width: 0; padding: 24px 0; border-top: 1px solid var(--ink); display: grid; gap: 16px; align-content: start; }
.row-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.row-head > div { min-width: 0; }
.row-name { font: 600 22px/28px var(--display); min-height: 44px; text-wrap: pretty; text-decoration: none; display: inline-flex; align-items: center; overflow-wrap: anywhere; max-width: 100%; }
.row-dist { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.mini { display: grid; gap: 4px; }
.mini-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 36px; gap: 8px; align-items: center; font-size: 12px; line-height: 14px; }
.mini-row .pct { text-align: right; }
.fig { text-align: right; }
.counters { display: flex; flex-wrap: wrap; gap: 0 16px; }
.counter { min-height: 44px; font-size: 13px; text-align: left; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.counter .n { text-decoration: underline; }
.list-end { margin-top: 24px; border-top: 1px solid var(--ink); padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }

/* bars */
.bar { height: 6px; background: var(--rule); position: relative; display: block; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0); background: var(--ink); }
.bar-fill.low { background: var(--cinnabar); }

/* studio card (SCR-4) */
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 0 64px; padding-top: 24px; }
.card-left { display: grid; gap: 32px; align-content: start; }
.card-right { display: grid; gap: 12px; align-content: start; padding-top: 32px; }
.dist { border-top: 2px solid var(--ink); padding-top: 16px; display: grid; gap: 16px; }
.dist-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dist-head-text { font-size: 15px; line-height: 20px; max-width: 220px; }
.dist-rows { display: grid; }
.dist-row { min-height: 44px; display: grid; grid-template-columns: 32px minmax(0, 1fr) 44px 44px; gap: 12px; align-items: center; border-bottom: 1px solid var(--rule); }
.dist-row .bar { height: 12px; }
.dist-star { font-weight: 600; }
.dist-n { text-align: right; font-size: 13px; color: var(--graphite); }
.dist-pct { text-align: right; font-weight: 600; white-space: nowrap; }
.dist-dot::after { content: " ●"; }
.dist-dot { display: none; }
.dist-row[aria-pressed="true"] .dist-dot { display: inline; }
.side-block { display: grid; gap: 8px; }
.list-row { min-height: 44px; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--rule); text-decoration: none; }
.maps { display: flex; gap: 16px; flex-wrap: wrap; }
.rule-strong { border-top: 2px solid var(--ink); padding-top: 16px; }
.active-filters { display: grid; justify-items: start; }
.active-filters button { min-height: 44px; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.fresh { border-top: 1px solid var(--rule); padding-top: 12px; line-height: 18px; }

/* review item */
.rv { padding: 24px 0; border-top: 1px solid var(--rule); display: grid; gap: 12px; }
.rv[hidden] { display: none; }
.rv-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 13px; line-height: 18px; color: var(--graphite); }
.stars { font-size: 15px; letter-spacing: 2px; color: var(--ink); }
.burst { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); text-decoration: none; }
.burst-tag { border: 1px solid var(--graphite); padding: 2px 8px; border-radius: 2px; }
.burst .u { color: var(--graphite); }
.rv-text { font: 400 17px/26px var(--text); text-wrap: pretty; white-space: pre-line; }
.rv-hidden { font-size: 15px; }
.rv-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { display: block; }
.rv-photos .thumb { width: 120px; }
.thumb img { width: 100%; height: auto; background: var(--rule); aspect-ratio: var(--ar, 1 / 1); object-fit: cover; }
.rv-photos .broken { width: 120px; height: 120px; aspect-ratio: auto; }
.rv-links { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 13px; }
.rv-links a { min-height: 44px; display: inline-flex; align-items: center; }
.ans-btn { min-height: 44px; font-size: 13px; font-weight: 600; }
.ans-box { padding: 12px 16px; border: 1px solid var(--rule); font-size: 15px; line-height: 22px; white-space: pre-line; animation: fade 160ms ease-out; }
.ans-box[hidden] { display: none; }

/* artist page */
.artist { display: grid; gap: 24px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.photo-grid .thumb img { aspect-ratio: 1 / 1; }
.photo-grid .broken { width: 100%; }

/* text pages */
.text-page { max-width: 640px; display: grid; gap: 24px; }
.text-page section { display: grid; gap: 8px; }
.formula { padding: 16px; border: 1px solid var(--rule); font: italic 400 18px/26px var(--display); }
.split-row { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--rule); padding: 12px 0; }
.reasons { list-style: none; padding: 0; display: grid; gap: 24px; }
.reason { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--ink); padding-top: 16px; }
.reason-n { font: 400 28px/32px var(--display); color: var(--cinnabar); }
.reason p { margin-top: 4px; }

/* my list (SCR-6) */
.list-item { padding: 16px 0; border-top: 1px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; }
.list-item .row-name { text-align: left; }
.list-share { color: var(--cinnabar); font-weight: 600; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--ink); padding-top: 16px; }
.fallback { display: grid; gap: 8px; font-size: 13px; color: var(--graphite); }
.fallback textarea { min-height: 160px; padding: 12px; border: 1px solid var(--rule); background: var(--paper); font: inherit; font-size: 13px; color: var(--ink); border-radius: 0; }

/* sheet and toast */
.scrim { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; animation: fade 160ms ease-out; z-index: 20; }
.sheet { background: var(--paper); width: 100%; max-width: 640px; max-height: 94%; overflow-y: auto; padding: 8px 16px 32px; display: grid; gap: 16px; animation: sheet-up 220ms cubic-bezier(.2, .7, .2, 1); }
.sheet-close-row { display: flex; justify-content: flex-end; }
.sheet-photo { background: var(--rule); }
.sheet-photo img { max-height: 360px; width: auto; max-width: 100%; margin: 0 auto; }
.sheet-photo .broken { height: 160px; aspect-ratio: auto; }
.sheet-meta { display: grid; gap: 4px; }
.sheet-review { border-top: 1px solid var(--rule); padding-top: 16px; display: grid; gap: 8px; }
.sheet-review .rv { padding: 0; border: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 2px; font-weight: 500; white-space: nowrap; animation: fade 160ms ease-out; z-index: 40; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
