/* One dark palette: the covers bring the color, the UI stays out of their way. */
:root {
  color-scheme: dark;
  /* Chart line: the accent, checked for contrast on the card surface. */
  --viz-line: #ffc93c; --viz-band: color-mix(in srgb, #ffc93c 7%, transparent);
  /* Second line (raw copies): blue, checked against the gold for colour-blind separation on the card surface. */
  --viz-2: #4f8fe8; --viz-2-band: color-mix(in srgb, #4f8fe8 11%, transparent);
  --bg: #121114; --card: #1a181e; --fg: #f5f1ea; --muted: #a9a2af; --line: #2e2a33;
  --accent: #ffc93c; --accent-soft: #2e2817; --focus: #ffc93c; --shadow: 0 16px 40px rgba(0, 0, 0, .5);
  --tile: #1d1b21; --good: #6cc47a; --bad: #f0955a;
  --display: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.5 Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--fg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* header */
.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.brand { display: block; flex-shrink: 0; line-height: 0; }
.brand img { display: block; height: 44px; width: auto; }
.top .search { flex: 1; min-width: 0; max-width: 540px; }
.top-nav { margin-left: auto; display: flex; gap: 20px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.top-nav a { color: var(--fg); padding: 10px 0; }
.top-nav a:hover { color: var(--accent); text-decoration: none; }
.top-nav + .account { margin-left: 0; }
.acct-more:empty { display: none; }
/* The phone header's menu (shown under 640px). */
.menu { display: none; position: relative; }
.menu summary { list-style: none; display: grid; place-items: center; width: 40px; height: 40px; color: var(--fg); border: 1px solid #5a5462; border-radius: 10px; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { border-color: var(--accent); color: var(--accent); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 200px; display: flex; flex-direction: column; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
.menu-panel a, .menu-panel .link-btn { display: block; width: 100%; text-align: left; font-size: 15px; font-weight: 600; color: var(--fg); padding: 10px 12px; border-radius: 8px; }
.menu-panel a:hover, .menu-panel .link-btn:hover { background: var(--tile); text-decoration: none; }
.menu-panel .go-pro { color: var(--accent); }
.menu-account:not(:empty) { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

/* search */
.search { position: relative; }
.search input {
  width: 100%; font: inherit; color: var(--fg); background: var(--tile);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; outline: none;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: #77707f; }
.search input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.search-big input { font-size: 19px; font-weight: 500; padding: 18px 22px; border-radius: 14px; border: 0; background: #fff; color: #121114; box-shadow: var(--shadow); }
.search-big input::placeholder { color: #6e6876; }
.search-big input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 60%, transparent); }
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  max-height: min(70vh, 560px); overflow-y: auto; z-index: 20; color: var(--fg);
}
.results li { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.results li[aria-selected="true"], .results li:hover { background: var(--accent-soft); }
.results img { width: 34px; height: 52px; object-fit: cover; border-radius: 3px; flex: none; background: var(--tile); }
.results .r-main { flex: 1; min-width: 0; }
.results .r-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.results .r-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .r-price { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.results .r-empty { color: var(--muted); cursor: default; padding: 12px; }
.results .r-empty:hover { background: none; }
.kb { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #121114; background: var(--accent); border-radius: 4px; padding: 0 5px; margin-right: 6px; }

/* home: hero over a wall of covers */
.home { flex: 1; width: 100%; }
.home-hero { position: relative; min-height: 620px; display: flex; align-items: center; }
/* The backdrop clips itself, so the search dropdown can still hang below the hero. */
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
/* A fixed collage of covers (public/hero-covers.avif/.webp), already darkened, cropped to fill the hero. */
.hero-wall {
  position: absolute; top: -24px; left: -24px; width: calc(100% + 48px); height: calc(100% + 48px);
  object-fit: cover; object-position: center top; transform: rotate(-4deg) scale(1.08); background: var(--bg);
}
.hero-text { position: relative; z-index: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 80px 16px; text-align: center; }
.home-hero h1 { font: 900 clamp(40px, 6.6vw, 84px)/.98 var(--display); font-stretch: 112%; letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance; }
.home-hero h1 em { font-style: normal; color: var(--accent); }
.home-hero .lede { color: #e2dcd2; font-size: 20px; margin: 0 auto 30px; max-width: 600px; }
.home-hero .search { text-align: left; max-width: 660px; margin: 0 auto; }
.tries { margin: 20px 0 0; color: #c8c1b6; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.chip { font: inherit; font-size: 14px; font-weight: 500; color: var(--fg); background: rgba(18, 17, 20, .6); border: 1px solid #5a5462; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.chip:hover { background: var(--accent); border-color: var(--accent); color: #121114; }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; margin-bottom: 22px; }
.section-head h2 { font: 900 clamp(28px, 3.4vw, 44px)/1 var(--display); font-stretch: 112%; letter-spacing: -.01em; margin: 0; }
.section-head p { margin: 0; }
.wall { max-width: 1360px; margin: 0 auto; padding: 60px 24px 32px; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
/* Each tile: the cover, then what it is and what it's worth under it, always shown. */
.wall-tile { display: flex; flex-direction: column; color: var(--fg); }
.wall-tile img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; border-radius: 4px; background: var(--tile); }
.wall-cap { padding: 8px 2px 0; display: flex; flex-direction: column; gap: 2px; }
.wall-tile:hover, .wall-tile:focus-visible { text-decoration: none; }
.wall-tile:hover img, .wall-tile:focus-visible img { outline: 3px solid var(--accent); outline-offset: 2px; }
.wall-tile:hover .wall-title { color: var(--accent); }
.wall-title { font-weight: 800; font-size: 14px; line-height: 1.2; }
.wall-key { font-size: 12px; font-weight: 600; color: var(--accent); }
.wall-grid { row-gap: 22px; }
.kv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kv-price { font-weight: 700; font-size: 14px; }
.kv-change { font-size: 12px; font-weight: 700; }
.kv-change.up { color: var(--good); }
.kv-change.down { color: var(--bad); }
.hot { max-width: 1360px; margin: 0 auto; padding: 60px 24px 0; }

.shelves { max-width: 1360px; margin: 0 auto; padding: 0 24px 64px; }
.shelf-block { padding-top: 32px; }
.shelf-block h3 { font: 800 24px/1.2 var(--display); font-stretch: 108%; margin: 0 0 14px; }
.shelf { display: flex; gap: 18px; overflow-x: auto; padding: 4px 4px 14px; scrollbar-width: thin; scrollbar-color: #3a3640 transparent; }
.book { flex: none; width: 168px; display: flex; flex-direction: column; gap: 4px; color: var(--fg); }
.book img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; border-radius: 4px; background: var(--tile); margin-bottom: 4px; }
.book-title { font-weight: 700; font-size: 15px; line-height: 1.25; }
.book-key { font-size: 13px; color: var(--muted); }
.book:hover { text-decoration: none; }
.book:hover .book-title { color: var(--accent); }
.book:hover img, .book:focus-visible img { outline: 3px solid var(--accent); outline-offset: 2px; }

.band { background: var(--accent); color: #121114; }
.band-inner { max-width: 1360px; margin: 0 auto; padding: 44px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.band h2 { font: 900 clamp(26px, 3vw, 40px)/1.05 var(--display); font-stretch: 112%; margin: 0 0 6px; }
.band p { margin: 0; font-size: 17px; }
.band-cta { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; background: #121114; color: var(--accent); border-radius: 999px; font-weight: 800; }
.band-cta:hover { text-decoration: none; color: #fff; }

/* issue page */
.page { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 24px 48px; }
.hero { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px; align-items: start; margin-bottom: 32px; }
.cover { margin: 0; }
.cover img { display: block; width: 100%; height: auto; aspect-ratio: 300 / 456; object-fit: cover; object-position: top; border-radius: 6px; box-shadow: 0 24px 50px rgba(0, 0, 0, .55); background: var(--tile); }
.series { margin: 4px 0 0; font-size: 18px; font-weight: 600; }
.info h1 { font: 900 clamp(44px, 7vw, 76px)/1 var(--display); font-stretch: 112%; margin: 4px 0 10px; letter-spacing: -.02em; }
.info h1 .hash { color: var(--accent); margin-right: 2px; }
/* The issue page's h1 is the whole title: the series line above the big number. */
.info h1 .series { display: block; margin: 0 0 4px; font: 600 18px/1.5 Archivo, system-ui, -apple-system, "Segoe UI", sans-serif; font-stretch: normal; letter-spacing: normal; color: var(--fg); }
.info h1 a.series:hover { color: var(--accent); text-decoration: none; }
.info h1 .issue-no { display: block; }
.crumbs { font-size: 14px; color: var(--muted); margin: -8px 0 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--fg); }
.issue-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 600; }
.issue-nav > :last-child { text-align: right; }
/* series page */
.series-page h1 { font: 900 clamp(34px, 5vw, 56px)/1.05 var(--display); font-stretch: 112%; letter-spacing: -.02em; margin: 0 0 8px; }
.series-page h2, .issue-more h2 { font: 800 24px/1.2 var(--display); font-stretch: 108%; margin: 32px 0 14px; }
.issue-about p { max-width: 70ch; line-height: 1.6; margin: 0; }
/* publishers */
.pubs { max-width: 1360px; margin: 0 auto; padding: 0 24px 64px; }
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pub-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); height: 100%; }
.pub-list a:hover { border-color: var(--accent); text-decoration: none; }
.pl-name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.pl-count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.pub-series { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 24px; }
.pub-series li { break-inside: avoid; padding: 4px 0; }
.series-keys { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.series-keys a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); height: 100%; }
.series-keys a:hover { border-color: var(--accent); text-decoration: none; }
.si-num { font: 800 20px/1.2 var(--display); }
.si-note { font-size: 14px; color: var(--accent); }
.series-issues { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.series-issues a { display: block; padding: 8px 6px; text-align: center; background: var(--tile); border: 1px solid var(--line); border-radius: 8px; color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.series-issues a:hover { border-color: var(--accent); text-decoration: none; }
.series-issues .is-key a { border-color: var(--accent); color: var(--accent); }
.meta { color: var(--muted); margin: 0 0 16px; }
.key { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.key-badge { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #121114; background: var(--accent); border-radius: 999px; padding: 4px 10px; }
.key-note { font-weight: 600; font-size: 18px; }
.editions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 20px; }
.editions-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.ed-chip { font-size: 13px; font-weight: 600; color: var(--fg); background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.ed-chip:hover { border-color: #5a5462; text-decoration: none; }
.ed-chip.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.ed-more { color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.tile-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tile-value { font-family: var(--display); font-stretch: 108%; font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; margin: 2px 0; }
.tile-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 22px; overflow: hidden; }
.card h2 { font-size: 18px; font-weight: 800; margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card h2 .muted { font-weight: 400; }
.fmv h2 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.card.fmv { overflow: visible; }
.fmv-title { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ed-menu { position: relative; font-family: inherit; }
.ed-btn {
  display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; user-select: none;
  font-size: 14px; font-weight: 600; line-height: 1; color: var(--fg); background: var(--tile);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px 7px 13px;
  transition: border-color .15s, background .15s;
}
.ed-btn::-webkit-details-marker { display: none; }
.ed-btn:hover { border-color: #5a5462; }
.ed-btn:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.ed-menu[open] .ed-btn { border-color: var(--accent); background: var(--accent-soft); }
.ed-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ed-value { color: var(--accent); }
.ed-caret { width: 12px; height: 12px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.ed-menu[open] .ed-caret { transform: rotate(180deg); stroke: var(--accent); }
.ed-panel {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: min(290px, calc(100vw - 32px));
  max-height: min(70vh, 520px); overflow-y: auto; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  font-size: 15px; font-weight: 500; animation: ed-in .12s ease-out;
}
@keyframes ed-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .ed-panel { animation: none; } .ed-caret { transition: none; } }
.ed-group + .ed-group { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.ed-head { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.ed-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--fg); }
.ed-opt:hover, .ed-opt:focus-visible { background: var(--accent-soft); text-decoration: none; outline: none; }
.ed-opt.on { color: var(--accent); font-weight: 700; }
.ed-name { min-width: 0; overflow-wrap: anywhere; }
.ed-check { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fmv.fmv-loading { opacity: 0.6; transition: opacity 0.15s; }
.fmv h2 .census { font-size: 14px; font-weight: 600; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strong { font-weight: 600; }
.sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 6px; }
.num .sub { justify-content: flex-end; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 6px; }
.empty { padding: 28px 18px; margin: 0; color: var(--muted); text-align: center; }
.updated { font-size: 13px; text-align: right; }
.show-sm { display: none; }

/* fair market value */
.fmv-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; }
.fmv-ladder { border-right: 1px solid var(--line); min-width: 0; }
.fmv td.rough { color: var(--muted); }
.fmv sup { font-size: 10px; margin-left: 1px; }
.fmv-side { min-width: 0; display: flex; flex-direction: column; }
/* Value chart (public/search.js draws it). */
.vc { margin: 0; padding: 14px 18px 4px; position: relative; }
.vc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 12px; flex-wrap: wrap; }
.vc-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vc-title { font-size: 18px; font-weight: 800; line-height: 1.25; min-height: 1.25em; }
.vc-ranges { display: inline-flex; gap: 2px; padding: 2px; background: var(--tile); border: 1px solid var(--line); border-radius: 8px; }
.vc-range { font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 6px; padding: 4px 9px; cursor: pointer; font-variant-numeric: tabular-nums; }
.vc-range:hover { color: var(--fg); }
.vc-range[aria-pressed="true"] { color: var(--fg); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.vc-range:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.vc-panel + .vc-panel { margin-top: 6px; }
.vc-item { display: flex; align-items: baseline; gap: 7px; margin: 12px 0 2px; font-size: 13px; }
.vc-name { color: var(--muted); }
.vc-now { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vc-change { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.vc-change.up { color: var(--good); }
.vc-change.down { color: var(--bad); }
.vc-key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; align-self: center; flex: none; }
.vc-key.c0 { background: var(--viz-line); }
.vc-key.c1 { background: var(--viz-2); }
.vc-plot { position: relative; min-height: 200px; margin: 0 -4px; outline: none; touch-action: pan-y; }
.vc-plot:focus-visible { box-shadow: 0 0 0 2px var(--focus); border-radius: 6px; }
.vc-svg { position: relative; }
.vc-plot svg { display: block; overflow: visible; }
.vc-none { font-size: 13px; margin: 4px 0 10px; }
.vc-grid { stroke: var(--line); stroke-width: 1; }
.vc-axis { stroke: color-mix(in srgb, var(--muted) 45%, transparent); stroke-width: 1; }
.vc-xtick { stroke: color-mix(in srgb, var(--muted) 45%, transparent); stroke-width: 1; }
.vc-tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.vc-band.c0 { fill: var(--viz-band); }
.vc-band.c1 { fill: var(--viz-2-band); }
.vc-edge { fill: none; stroke-width: 1; stroke-opacity: .28; stroke-linejoin: round; }
.vc-edge.c0 { stroke: var(--viz-line); }
.vc-edge.c1 { stroke: var(--viz-2); }
.vc-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vc-line.c0 { stroke: var(--viz-line); }
.vc-line.c1 { stroke: var(--viz-2); }
.vc-dot { stroke: var(--card); stroke-width: 2; }
.vc-dot.c0 { fill: var(--viz-line); }
.vc-dot.c1 { fill: var(--viz-2); }
.vc-cross { stroke: var(--muted); stroke-width: 1; }
.vc-hit { fill: transparent; cursor: crosshair; }
.vc-tip { position: absolute; top: 4px; pointer-events: none; background: var(--tile); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; padding: 7px 10px; font-size: 12px; white-space: nowrap; z-index: 2; display: grid; gap: 2px; }
.vc-tip[hidden] { display: none; }
.vc-tip-day { color: var(--muted); margin-bottom: 2px; }
.vc-tip-value { font-size: 14px; font-variant-numeric: tabular-nums; }
.vc-tip-range { font-variant-numeric: tabular-nums; }
.vc .t-table { margin: 0 -18px; }
.vc .t-table .table-wrap { max-height: 320px; overflow-y: auto; }
.t-table { border-top: 1px solid var(--line); }
.t-table summary { cursor: pointer; padding: 10px 18px; font-size: 13px; color: var(--muted); }
.fmv-note { font-size: 12px; margin: 0; padding: 10px 18px 14px; border-top: 1px solid var(--line); }
/* break-even for buying raw to grade */
.fmv tr[data-be-grade] { cursor: pointer; }
.fmv tr[data-be-grade]:hover { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.fmv tr[data-be-grade]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.fmv tr.be-on, .fmv tr.be-on:hover { background: var(--accent-soft); }
/* in the money: grading a raw copy at that grade beats selling it raw */
.fmv tr.be-money td:first-child { box-shadow: inset 3px 0 0 var(--good); }
.be-gain { display: inline-block; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.be-key { color: var(--good); font-weight: 700; }
.breakeven { border-top: 1px solid var(--line); padding: 14px 18px; }
.be-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; }
.be-big { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.be-say, .be-lead, .be-cmp { margin: 4px 0 10px; font-size: 14px; }
.be-lead { font-weight: 600; }
.be-cmp { font-weight: 600; }
.be-good { color: var(--good); }
.be-bad { color: var(--bad); }
.be-rows { font-size: 14px; margin: 6px 0 10px; }
.be-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.be-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.be-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; font-weight: 700; }
.be-ship { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.be-ship input { width: 80px; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; margin-left: 4px; }
.be-note { font-size: 12px; margin: 10px 0 0; }
@media (max-width: 860px) {
  .fmv-layout { grid-template-columns: minmax(0, 1fr); }
  .fmv-ladder { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* account (header) and the collection page */
.account { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; white-space: nowrap; }
.link-btn { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.link-btn:hover { color: var(--fg); text-decoration: underline; }
.col-tiles { grid-template-columns: repeat(2, minmax(0, 260px)); margin-bottom: 18px; }
.col-tiles .tile-value { font-size: 24px; white-space: nowrap; }
.col-tiles.col-tiles-3 { grid-template-columns: repeat(3, minmax(0, 220px)); }
.copy-trend { max-width: 720px; }
.col-tools { margin: 0 0 16px; }
.col-tools[hidden], .tile[hidden], .cc[hidden], .col-none[hidden] { display: none; }
.col-bar { display: flex; gap: 8px; }
.col-bar input, .col-bar select { font: inherit; font-size: 15px; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-width: 0; }
.col-bar input { flex: 1; }
.col-bar input:focus, .col-bar select:focus { outline: 2px solid var(--focus); outline-offset: -1px; }
.col-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.col-quick .chip { font-size: 13px; padding: 5px 12px; }
.col-quick .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #121114; font-weight: 700; }
.col-help { font-size: 13px; margin-left: 4px; }
.col-help summary { list-style: none; display: inline; }
.col-help summary::-webkit-details-marker { display: none; }
.col-help ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
.col-help code { color: var(--fg); background: var(--tile); border-radius: 4px; padding: 0 4px; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.cc { display: flex; flex-direction: column; min-width: 0; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cc:hover { text-decoration: none; border-color: var(--focus); }
.cc-cover { position: relative; aspect-ratio: 300 / 456; background: var(--tile); }
.cc-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cc-key { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #121114; background: var(--accent); border-radius: 999px; padding: 2px 8px; }
.cc-body { padding: 10px 12px 12px; font-size: 13px; display: grid; gap: 2px; }
.cc-title { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-value { font-family: var(--display); font-stretch: 108%; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.cc-value .muted { font-family: inherit; font-size: 12px; font-weight: 400; font-stretch: 100%; }
.cc-line { font-size: 12px; }
.cc-line:empty { display: none; }
.col-none { margin: 24px 0; }
@media (max-width: 520px) {
  .col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .col-bar select { max-width: 42%; }
}
.row-actions { font-size: 13px; margin-top: 2px; color: var(--muted); }
.chip-primary { background: var(--accent); border-color: var(--accent); color: #121114; font-weight: 700; }
.chip-primary:hover { border-color: var(--focus); background: var(--accent); color: #121114; filter: brightness(1.08); }
.chip:disabled { opacity: .6; cursor: default; }
.add-copy { margin: 0 0 18px; font-size: 14px; }
.add-copy:empty { display: none; }
.add-status { margin-left: 8px; color: var(--muted); }
.copy-dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.copy-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.copy-dialog h2 { margin: 0; font-size: 20px; }
.copy-dialog [data-issue] { margin: 2px 0 12px; font-size: 14px; }
.copy-dialog fieldset, .copy-form fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 10px 0; display: grid; gap: 8px; }
.copy-dialog legend, .copy-form legend { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 6px 0 0; }
.copy-dialog label, .copy-form label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; }
.copy-dialog select, .copy-dialog input, .copy-form select, .copy-form input { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; width: 60%; min-width: 0; }
.form-error { color: var(--bad); font-size: 14px; margin: 6px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.copy-form { padding: 4px 18px 16px; max-width: 520px; }
.copy-form fieldset:first-child { border-top: 0; }
.form-help { font-size: 13px; margin: 0; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.link-btn.danger { color: var(--bad); }
.crumb { margin: 0 0 14px; font-size: 14px; }
.copy .info h1.copy-label { font: 800 clamp(26px, 4vw, 36px)/1.15 var(--display); letter-spacing: -.01em; margin: 4px 0 16px; }
.copy-note { font-size: 14px; margin: 10px 0 0; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.report-actions .chip { text-decoration: none; }
.share-link { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; max-width: 560px; }
.share-link[hidden] { display: none; }
.share-link input { flex: 1; min-width: 0; font: inherit; font-size: 14px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.share-link .link-btn { white-space: nowrap; }
.listing-summary { margin: 8px 0 0; max-width: 560px; font-size: 14px; }
.listing-summary summary { cursor: pointer; color: var(--muted); }
.listing-summary textarea { display: block; box-sizing: border-box; width: 100%; margin: 8px 0 0; resize: vertical; font: inherit; font-size: 13px; line-height: 1.45; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
/* The copy's cover as a turnable 3D comic (public/comic3d.js). The flat <img> keeps the layout; the canvas sits 8%
   past it on every side (MARGIN in client/comic3d.js) so the corners can swing out. */
.comic3d-stage { position: relative; }
.comic3d-stage img { visibility: hidden; }
.comic3d { position: absolute; left: -8%; top: -8%; width: 116%; height: 116%; cursor: grab; touch-action: pan-y; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5)); outline: none; }
.comic3d.dragging { cursor: grabbing; }
.comic3d:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 8px; }

/* grailworth Pro: the blurred FMV stand-in, the subscribe page and sign-in */
.fmv-locked { position: relative; margin-bottom: 22px; }
.fmv-blur { filter: blur(7px); pointer-events: none; user-select: none; }
.fmv-blur .card { margin-bottom: 0; }
.fmv-lock {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 32px));
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px 22px; text-align: center;
}
.fmv-lock h2 { margin: 0 0 6px; font: 800 22px/1.2 var(--display); }
.fmv-lock p { margin: 0 0 12px; }
.fmv-lock p:last-child { margin-bottom: 0; font-size: 14px; }
.go-pro { font-weight: 700; }
.pro-needed { max-width: 560px; }
.plans { border: 0; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.plans legend { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.plan { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.plan:has(input:checked) { border-color: var(--accent); }
.plan input { accent-color: var(--accent); margin: 0; }
.plan-name { font-weight: 700; display: flex; flex-direction: column; }
.plan-detail { font-size: 13px; font-weight: 600; color: var(--accent); }
.plan-price { margin-left: auto; font-variant-numeric: tabular-nums; }
.chip-big { font-size: 17px; padding: 12px 22px; }
.small { font-size: 13px; }
.sub-state h2 { font: 800 24px/1.2 var(--display); margin: 8px 0; }
.signin-buttons { display: grid; gap: 10px; margin-top: 14px; }
.signin-btn { width: 100%; padding: 11px 14px; }
.quiet-link { color: var(--muted); text-decoration: underline; }
.chip-danger { background: var(--bad); border-color: var(--bad); color: #121114; font-weight: 700; }
.chip-danger:hover { background: var(--bad); border-color: var(--bad); color: #121114; filter: brightness(1.08); }
.delete-confirm { display: inline-flex; gap: 8px; align-items: center; }

/* /subscribe: grailworth Pro */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pro { flex: 1; width: 100%; }
.pro-hero { position: relative; overflow: hidden; }
.pro-hero .hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 17, 20, .92) 0%, rgba(18, 17, 20, .7) 55%, rgba(18, 17, 20, .55) 100%); }
.pro-hero-inner {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 72px 24px 64px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
.pro-eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pro-eyebrow span { color: var(--accent); }
.pro-hero h1 { font: 900 clamp(38px, 5.4vw, 68px)/1 var(--display); font-stretch: 112%; letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance; }
.pro-hero h1 em { font-style: normal; color: var(--accent); }
.pro-hero .lede { color: #e2dcd2; font-size: 19px; margin: 0 0 28px; max-width: 540px; }
.pro-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0; }
.pro-hero-cta .chip-big:hover { text-decoration: none; }
.pro-preview {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 4px 0 6px; transform: rotate(1.2deg);
}
.pro-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 6px; }
.pro-preview-title { font: 800 18px/1.2 var(--display); }
.pill-example { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.pro-preview table td, .pro-preview table th { padding: 7px 18px; }
.pro-preview td.strong { color: var(--accent); }
.pro-covers { overflow: hidden; border-block: 1px solid var(--line); background: #0d0c0f; }
.pro-cover-row { display: flex; gap: 10px; padding: 14px 0; width: max-content; opacity: .85; }
.pro-cover-row img { display: block; width: 110px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; border-radius: 3px; background: var(--tile); }
.pro-section { max-width: 1180px; margin: 0 auto; padding: 64px 24px 0; }
.pro-h2 { font: 900 clamp(28px, 3.4vw, 42px)/1.05 var(--display); font-stretch: 112%; letter-spacing: -.01em; margin: 0 0 26px; text-wrap: balance; }
.pro-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pro-benefit { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 20px; }
.pro-icon { width: 30px; height: 30px; color: var(--accent); margin-bottom: 12px; }
.pro-benefit h3, .pro-moment h3 { font: 800 19px/1.25 var(--display); margin: 0 0 8px; }
.pro-benefit p, .pro-moment p { margin: 0; color: #d6d0c6; line-height: 1.55; }
.pro-moments { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pro-moment { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; }
.pro-plans > * { max-width: 640px; }
.plan-title { display: flex; align-items: center; gap: 8px; }
.plan-best { border-color: var(--accent); }
.plan-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #121114; background: var(--accent); border-radius: 999px; padding: 2px 8px; vertical-align: 2px; }
.plan-trial { font-size: 13px; font-weight: 600; color: var(--good); }
.pro-start { width: 100%; justify-content: center; }
.pro-faq { padding-bottom: 64px; }
.pro-faq > * { max-width: 760px; }
.pro-faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.pro-faq summary { cursor: pointer; font-weight: 700; font-size: 17px; padding: 12px 0; list-style-position: inside; }
.pro-faq details p { margin: 0 0 14px; color: #d6d0c6; line-height: 1.6; }
@media (max-width: 860px) {
  .pro-hero-inner { grid-template-columns: minmax(0, 1fr); padding: 48px 16px 40px; gap: 32px; }
  .pro-preview { transform: none; }
  .pro-section { padding: 48px 16px 0; }
}

.foot { border-top: 1px solid var(--line); margin-top: auto; padding: 18px 24px; font-size: 13px; color: var(--muted); text-align: center; }
.foot p { margin: 0; }
.foot-links { margin-top: 6px !important; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--fg); }
/* the policies */
.legal { max-width: 760px; }
.legal h1 { font: 800 clamp(30px, 5vw, 40px)/1.15 var(--display); margin: 0 0 4px; }
.legal h2 { font: 800 21px/1.3 var(--display); margin: 30px 0 8px; }
.legal h3 { font-size: 16px; margin: 18px 0 4px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }

@media (max-width: 860px) {
  .tiles, .col-tiles.col-tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top { padding: 10px 16px; gap: 10px 12px; flex-wrap: wrap; }
  .brand img { height: 40px; }
  /* Search gets its own full-width row under the brand and account, so it and its results aren't squeezed. */
  .top .search { order: 3; flex: 1 0 100%; max-width: none; }
  .results { max-height: min(60vh, 560px); }
  /* Phones keep My collection (or Sign in) in the header; the site links, Go Pro and Sign out move to the menu. */
  .top-nav, .account .acct-more { display: none; }
  .top-nav + .account { margin-left: auto; }
  .menu { display: block; }
  .home-hero { min-height: 520px; }
  .wall, .hot { padding-top: 44px; }
  .wall-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .book { width: 132px; }
  .page { padding: 18px 16px 36px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cover { max-width: 180px; margin: 0 auto; }
  .info { text-align: left; }
  th, td { padding: 8px 10px; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .tile-value { font-size: 22px; }
}

/* the grader (client/grade.ts): /collection/:id/grade and /grade/:issueId */
.grade .grader { max-width: 640px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.copy-grade { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 14px 0 0; font-size: 14px; }
.copy-grade .chip, .add-copy a.chip { text-decoration: none; }
.gbar { display: flex; align-items: stretch; margin-bottom: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gbar-slab { width: 96px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 4px; }
.gbar-label { font-size: 9px; font-weight: 900; letter-spacing: .08em; white-space: nowrap; }
.gbar-grade { font: 900 34px/1 var(--display); font-stretch: 90%; font-variant-numeric: tabular-nums; }
.gbar-word { font-size: 12px; font-weight: 700; }
.gbar-info { flex: 1; min-width: 0; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.gbar-title { font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbar-status { font-size: 13px; }
.gbar-progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.gbar-progress span { display: block; height: 100%; transition: width .2s; }
.gq h1, .gres h1 { font: 800 28px/1.15 var(--display); margin: 0 0 8px; outline: none; }
.gq > p { margin: 0 0 12px; }
.gq-skip { margin: 0 0 14px; padding: 10px 14px; font-size: 14px; color: var(--muted); background: var(--tile); border: 1px solid var(--line); border-radius: 12px; }
.gq-options { display: grid; gap: 8px; margin: 14px 0; }
.gq-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; text-align: left; font: inherit; color: var(--fg); background: var(--tile); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.gq-opt:hover { border-color: #5a5462; }
.gq-opt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.gq-opt[aria-checked="true"] { background: var(--accent-soft); border: 2px solid var(--accent); padding: 9px 13px; }
.gq-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gq-opt-label { font-weight: 600; }
.gq-opt-note { font-size: 13px; color: var(--muted); }
.gq-cap { flex: none; font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.gq-none { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.swatch { flex: none; width: 34px; height: 46px; border-radius: 1px 3px 3px 1px; border: 1px solid #8a8f99; box-shadow: inset 3px 0 #9ca2ad; }
.gq-actions { margin: 16px 0; }
.gq-big { min-height: 48px; padding: 10px 24px; font-size: 16px; }
.gq-sources { font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.gq-small { font-size: 13px; }
.gq-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-weight: 600; }
.gq-nav .link-btn { color: var(--accent); }
.gq-photos { margin: 16px 0 0; }
.gcard > .gq-photos { margin: 0; }
.ph-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.ph { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--tile); border: 1px solid var(--line); flex: none; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-small .ph { width: 52px; height: 52px; }
.ph-remove { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.ph-add { display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--muted); cursor: pointer; border-style: dashed; }
.ph-add:hover, .ph-add:focus-within { color: var(--accent); border-color: var(--accent); }
.ph-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 14px 0; }
.gcard > p { margin: 0 0 6px; }
.gcard > p:last-child { margin-bottom: 0; }
.gres-grade { font-size: 40px !important; }
.gres-open { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.gres-value { font: 900 34px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.gres-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.gres-details { display: grid; gap: 10px; }
.gres-details p { margin: 0; }
.gres-defects { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gres-defect { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gres-defect .link-btn { color: var(--accent); font-size: 13px; font-weight: 600; white-space: nowrap; }
.gres-skipped summary { cursor: pointer; font-weight: 600; }
.gres-skipped ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.gres-skipped li span { display: block; }
.gres-actions { display: grid; gap: 10px; margin: 18px 0; }
.gres-save { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gres-saved { text-align: center; font-weight: 700; color: var(--good); margin: 0; }
@media (max-width: 640px) {
  .gq h1 { font-size: 24px; }
  .gq-opt { gap: 10px; padding: 10px 12px; }
}

/* Market trends (/market, src/marketRender.ts): index cards, the age grid, movers, and the series page's link. */
.market h1 { font: 900 clamp(34px, 5vw, 56px)/1.05 var(--display); font-stretch: 112%; letter-spacing: -.02em; margin: 0 0 8px; }
.market h1 .muted { font-weight: 600; font-size: .5em; letter-spacing: 0; }
.market .lede { font-size: 17px; margin: 0 0 22px; max-width: 640px; }
.mk-section { margin-top: 36px; }
.mk-section h2 { font: 800 24px/1.2 var(--display); font-stretch: 108%; margin: 0 0 6px; }
.mk-section > .muted { margin: 0 0 14px; font-size: 14px; }
.mk-section h2 + .mk-ages { margin-top: 14px; }
.mk-card { overflow: visible; }
.mk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.mk-stat { padding: 14px 18px; min-width: 0; }
.mk-stat + .mk-stat { border-left: 1px solid var(--line); }
.mk-stat-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-stat-value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.mk-stat-value .mk-change { font-size: inherit; }
.mk-change { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-change.up { color: var(--good); }
.mk-change.down { color: var(--bad); }
.mk-spark { display: block; width: 100%; height: 36px; }
.mk-spark polyline { fill: none; stroke: var(--muted); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mk-spark.up polyline { stroke: var(--good); }
.mk-spark.down polyline { stroke: var(--bad); }
.mk-ages { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.mk-age { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); }
.mk-age:hover, .mk-age.on { border-color: var(--accent); text-decoration: none; }
.mk-age-name { font: 800 18px/1.2 var(--display); }
.mk-age-years { font-size: 13px; }
.mk-age-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 8px; }
.mk-age-level { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mk-age-period { font-size: 12px; }
.mk-age .mk-spark { margin-top: 6px; }
.mk-movers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.mk-movers-col h3 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.mk-movers { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.mk-movers li + li { border-top: 1px solid var(--line); }
.mk-movers a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name change" "sub change"; align-items: center; column-gap: 12px; padding: 10px 14px; color: var(--fg); }
.mk-movers a:hover { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); text-decoration: none; }
.mk-mover-name { grid-area: name; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-mover-sub { grid-area: sub; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-movers .mk-change { grid-area: change; font-size: 15px; }
.mk-method p { max-width: 720px; color: var(--muted); margin: 0 0 10px; }
.mk-teaser { display: grid; grid-template-columns: auto minmax(80px, 160px) auto; align-items: center; gap: 8px 18px; margin: 4px 0 8px; padding: 12px 16px; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); max-width: 560px; }
.mk-teaser:hover { border-color: var(--accent); text-decoration: none; }
.mk-teaser-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.mk-teaser-kicker { flex-basis: 100%; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mk-teaser-level { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mk-teaser-text .muted { font-size: 12px; }
.mk-teaser-go { font-weight: 700; color: var(--accent); white-space: nowrap; }
@media (max-width: 640px) {
  .mk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-stat:nth-child(3) { border-left: 0; }
  .mk-stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .mk-movers-grid { grid-template-columns: minmax(0, 1fr); }
  .mk-teaser { grid-template-columns: minmax(0, 1fr); }
}
