/* =========================================================================
   Game Design Projects — "print catalogue" identity.

   Ink on paper, hairline rules, one vermilion accent, generative riso plates.
   Dark is the hero theme; light is the same catalogue on warm newsprint.
   ========================================================================= */

/* ---------- tokens ------------------------------------------------------- */
:root {
  color-scheme: dark;

  --paper: #0c0c0e;
  --paper-2: #121216;
  --raised: #16161a;
  --ink: #f3f0e9;
  --ink-soft: #c9c4bb;
  --muted: #95908a;
  --line: #27272d;
  --line-strong: #3a3a42;
  --accent: #ff5c2b;
  --accent-ink: #120b06;
  --accent-wash: rgba(255, 92, 43, 0.12);

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(1.15rem, 4.2vw, 4.5rem);
  --maxw: 1500px;

  --grain: 0.055;
  --plate-bright: 1;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --paper: #f5f2ea;
    --paper-2: #efebe1;
    --raised: #fffdf8;
    --ink: #171613;
    --ink-soft: #3c3a35;
    --muted: #6b665e;
    --line: #ddd7c9;
    --line-strong: #c4bcaa;
    --accent: #b32f0c;
    --accent-ink: #fff6f0;
    --accent-wash: rgba(179, 47, 12, 0.09);
    --grain: 0.075;
    --plate-bright: 0.97;
  }
}

:root[data-theme='light'] {
  color-scheme: light;
  --paper: #f5f2ea;
  --paper-2: #efebe1;
  --raised: #fffdf8;
  --ink: #171613;
  --ink-soft: #3c3a35;
  --muted: #6b665e;
  --line: #ddd7c9;
  --line-strong: #c4bcaa;
  --accent: #b32f0c;
  --accent-ink: #fff6f0;
  --accent-wash: rgba(179, 47, 12, 0.09);
  --grain: 0.075;
  --plate-bright: 0.97;
}

/* ---------- base --------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: 'kern' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper grain over the whole page — one cheap tiled SVG, not per-card. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, p, dl, dd, dt, figure, figcaption { margin: 0; }

/* Layout classes below set display: keep [hidden] authoritative. */
[hidden] { display: none !important; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 0; top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  font: 500 0.78rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.skip:focus { top: 0; }

.rule--top {
  height: 3px;
  background: var(--accent);
}

/* ---------- masthead ----------------------------------------------------- */
.masthead {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font: 600 0.72rem/1 var(--sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.wordmark__mark {
  width: 11px;
  height: 11px;
  background: var(--accent);
  flex: none;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}

.masthead__nav {
  display: flex;
  gap: 1.35rem;
  font: 400 0.76rem/1 var(--mono);
}
.masthead__nav a {
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.masthead__nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- hero --------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  padding: clamp(2.6rem, 7vw, 6rem) 0 clamp(2.4rem, 5vw, 4.2rem);
}

.eyebrow {
  font: 400 0.72rem/1 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.85rem, 8.2vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: -0.021em;
  margin: 1.5rem 0 0;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.lede {
  max-width: 44ch;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.05vw, 1.1rem);
  line-height: 1.62;
}

.ledger {
  display: flex;
  flex-wrap: wrap;
  margin-top: 2.4rem;
  border-top: 1px solid var(--line);
}
.ledger__item {
  padding: 0.85rem 1.6rem 0.85rem 0;
  margin-right: 1.6rem;
  border-right: 1px solid var(--line);
  min-width: 7.5rem;
}
.ledger__item:last-child { border-right: 0; margin-right: 0; }
.ledger dt {
  font: 400 0.66rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.ledger dd {
  margin-top: 0.45rem;
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.ledger dd.is-word { font-size: 1.2rem; font-family: var(--sans); font-weight: 500; }

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2.1rem;
}

.link-arrow {
  font: 500 0.82rem/1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.18s, color 0.18s, gap 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.link-arrow::after { content: '→'; transition: transform 0.22s ease; }
.link-arrow:hover { border-bottom-color: var(--accent); color: var(--accent); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow--accent { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- featured plate ---------------------------------------------- */
.featured { min-width: 0; }

.featured__frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
}
.featured__frame::after {
  /* halftone print texture over the plate */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.5) 0.8px, transparent 0.9px);
  background-size: 4px 4px;
  opacity: 0.2;
  mix-blend-mode: multiply;
}

.featured__art,
.featured .plateart {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  filter: brightness(var(--plate-bright));
}

.featured__cap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding-top: 0.9rem;
}
.featured__title {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.9vw, 1.7rem);
  line-height: 1.15;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s, color 0.18s;
}
a.featured__title:hover { color: var(--accent); border-bottom-color: var(--accent); }
.featured__meta {
  font: 400 0.72rem/1.4 var(--mono);
  color: var(--muted);
  margin-left: auto;
  text-align: right;
}

.featured__desc {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 52ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured__cta { margin-top: 0.95rem; }

.tag {
  font: 500 0.62rem/1 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.38rem 0.5rem;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.tag--latest {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------- library ------------------------------------------------------ */
.library {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 7vw, 6rem);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.015em;
}
.section-head__note {
  font: 400 0.75rem/1.3 var(--mono);
  color: var(--muted);
}
.section-head__note b { color: var(--ink); font-weight: 500; }

/* ---------- toolbar ------------------------------------------------------ */
.toolbar {
  padding: 1.1rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.toolbar__search { position: relative; }
.toolbar__search input {
  width: 100%;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.25;
  padding: 0.25rem 0 0.6rem;
  border-bottom: 1px solid var(--line);
}
.toolbar__search input::placeholder { color: var(--muted); opacity: 1; }
.toolbar__search input:focus { outline: none; }
.toolbar__search input::-webkit-search-cancel-button { filter: grayscale(1); }
.toolbar__searchline {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toolbar__search input:focus ~ .toolbar__searchline,
.toolbar__search input:not(:placeholder-shown) ~ .toolbar__searchline { width: 100%; }

.toolbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.6rem;
  flex-wrap: wrap;
  margin-top: 1.15rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 500 0.74rem/1 var(--sans);
  letter-spacing: 0.02em;
  padding: 0.5rem 0.72rem;
  cursor: pointer;
  border-radius: 2px;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
  display: inline-flex;
  align-items: baseline;
  gap: 0.42rem;
  white-space: nowrap;
}
.chip span {
  font-family: var(--mono);
  font-size: 0.66rem;
  opacity: 0.75;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip[aria-pressed='true'] span { opacity: 0.6; }

.toolbar__controls {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.field { display: inline-flex; align-items: center; gap: 0.5rem; }
.field__label {
  font: 400 0.66rem/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.field select {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font: 500 0.78rem/1 var(--sans);
  padding: 0.35rem 1.35rem 0.35rem 0.1rem;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 9px) 55%, calc(100% - 5px) 55%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.field select:focus-visible { outline-offset: 2px; }

.viewtoggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.viewtoggle button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font: 500 0.72rem/1 var(--mono);
  letter-spacing: 0.06em;
  padding: 0.52rem 0.8rem;
  cursor: pointer;
  transition: color 0.16s, background 0.16s;
}
.viewtoggle button + button { border-left: 1px solid var(--line); }
.viewtoggle button:hover { color: var(--ink); }
.viewtoggle button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }

.linkbtn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- shelf: shared ------------------------------------------------ */
.shelf { min-height: 260px; }
.shelf:empty { min-height: 0; border: 0; }

.plate {
  position: relative;
  background: var(--paper);
  min-width: 0;
}

.plate__frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.plate__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.5) 0.8px, transparent 0.9px);
  background-size: 4px 4px;
  opacity: 0.2;
  mix-blend-mode: multiply;
}
.plate .plateart {
  display: block;
  width: 100%;
  height: 100%;
  filter: brightness(var(--plate-bright));
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.plate__frame .plateart__ink { transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }

.plate__badge {
  position: absolute;
  top: 0; right: 0;
  z-index: 2;
  background: var(--accent);
  color: var(--accent-ink);
  font: 500 0.6rem/1 var(--mono);
  letter-spacing: 0.16em;
  padding: 0.4rem 0.55rem;
}

.plate__no {
  font: 400 0.68rem/1 var(--mono);
  color: var(--muted);
  letter-spacing: 0.06em;
  transition: color 0.18s;
}

.plate__title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.12;
}
.plate__title a {
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: 2px;
}
.plate:hover .plate__title a,
.plate__title a:focus-visible { background-size: 100% 1px; }

.plate__desc {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.plate__desc--empty { font-style: italic; opacity: 0.8; }

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  font: 400 0.68rem/1.4 var(--mono);
  color: var(--muted);
}
.topics span::before { content: '#'; opacity: 0.5; }

.plate__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font: 400 0.7rem/1.4 var(--mono);
  color: var(--muted);
}
.plate__meta i { font-style: normal; opacity: 0.45; }
.plate__lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
}
.plate__lang::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  flex: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: 500 0.72rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  background: transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn--play {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn--play:hover { border-color: var(--accent); filter: brightness(1.08); }
.btn::after { content: '↗'; opacity: 0.6; font-size: 0.85em; }
.btn--code::after { content: ''; display: none; }

/* ---------- shelf: plates view ------------------------------------------ */
.shelf--plates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(250px, 24vw, 330px), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.shelf--plates .plate {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: background 0.22s;
}
.shelf--plates .plate:hover { background: var(--accent-wash); }
.shelf--plates .plate:hover .plateart__ink { transform: scale(1.055) rotate(-0.6deg); }
.shelf--plates .plate:hover .plate__no { color: var(--accent); }

.shelf--plates .plate__frame { aspect-ratio: 4 / 3; }

.shelf--plates .plate__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem 1.05rem 1.15rem;
  flex: 1;
}
.shelf--plates .plate__head {
  padding: 0.85rem 1.05rem 0;
}
.shelf--plates .plate__head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.shelf--plates .plate__title { font-size: 1.3rem; }
.shelf--plates .plate__spacer { flex: 1; min-height: 0.15rem; }
.shelf--plates .actions { margin-top: 0.35rem; }

.plate__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* ---------- shelf: index view ------------------------------------------- */
.shelf--index {
  display: block;
  border-top: 1px solid var(--line);
}
.shelf--index .plate {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  padding: 0.8rem 0.55rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s, padding-left 0.2s;
}
.shelf--index .plate:hover { background: var(--accent-wash); padding-left: 1rem; }
.shelf--index .plate:hover .plate__no { color: var(--accent); }
.shelf--index .plate:hover .plateart__ink { transform: scale(1.12); }

.shelf--index .plate__frame {
  width: 78px;
  flex: none;
  aspect-ratio: 4 / 3;
  order: 2;
}
.shelf--index .plate__frame::after { opacity: 0.14; }

.shelf--index .plate__body {
  order: 3;
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'title actions'
    'desc  actions'
    'meta  actions'
    'tops  actions';
  align-items: center;
  column-gap: 1.4rem;
  row-gap: 0.12rem;
}
.shelf--index .plate__head {
  order: 1;
  flex: none;
  width: 2.9rem;
  align-self: center;
  padding: 0;
}
.shelf--index .plate__title { grid-area: title; font-size: 1.16rem; }
.shelf--index .plate__desc { grid-area: desc; -webkit-line-clamp: 1; line-clamp: 1; }
.shelf--index .plate__meta { grid-area: meta; margin-top: 0.18rem; }
.shelf--index .topics { grid-area: tops; margin-top: 0.15rem; }
.shelf--index .plate__spacer { display: none; }
.shelf--index .actions { grid-area: actions; justify-content: flex-end; }

.shelf--index .plate__badge {
  position: static;
  padding: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  font-size: 0;
  overflow: hidden;
  flex: none;
}

/* ---------- entrance ----------------------------------------------------- */
.plate {
  animation: plate-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 28ms);
}
@keyframes plate-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- skeletons ---------------------------------------------------- */
.skel-block,
.skel-line {
  background: linear-gradient(100deg, var(--paper-2) 30%, var(--raised) 50%, var(--paper-2) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
  from { background-position: 150% 0; }
  to { background-position: -150% 0; }
}
.skel-text { color: var(--muted); opacity: 0.55; }

.plate--skel .plate__frame { aspect-ratio: 4 / 3; }
.plate--skel .skel-block { width: 100%; height: 100%; }
.plate--skel .skel-line { height: 0.82rem; }
.plate--skel .skel-line.w1 { width: 62%; height: 1.15rem; }
.plate--skel .skel-line.w2 { width: 92%; }
.plate--skel .skel-line.w3 { width: 45%; }

/* ---------- empty / error ------------------------------------------------ */
.empty {
  padding: 3.5rem 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.notice {
  margin-top: 2rem;
  border: 1px solid var(--accent);
  border-left-width: 3px;
  padding: 1.3rem 1.5rem;
  background: var(--accent-wash);
  max-width: 52ch;
}
.notice__title {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}
.notice__body { color: var(--ink-soft); font-size: 0.92rem; }
.notice__body a { color: var(--accent); text-underline-offset: 3px; }

/* ---------- footer ------------------------------------------------------- */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.4rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  font: 400 0.73rem/1.5 var(--mono);
  color: var(--muted);
}
.foot__source {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.foot__source::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.foot__source[data-source='live']::before { background: #3ecf8e; }
.foot__source[data-source='snapshot']::before { background: #f6c445; }
.foot__source[data-source='error']::before { background: var(--accent); }
.foot__mid { flex: 1 1 22ch; max-width: 46ch; }
.foot a { color: var(--ink-soft); text-underline-offset: 3px; }
.foot a:hover { color: var(--accent); }

/* ---------- responsive --------------------------------------------------- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 2.4rem;
  }
  .featured { order: 3; }
}

@media (max-width: 720px) {
  .shelf--index .plate { gap: 0.8rem; align-items: flex-start; padding: 0.9rem 0.4rem; }
  .shelf--index .plate__frame { width: 58px; margin-top: 0.2rem; }
  .shelf--index .plate__head { width: 2.1rem; align-self: flex-start; margin-top: 0.3rem; }
  .shelf--index .plate__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'title' 'desc' 'meta' 'tops' 'actions';
    align-items: start;
    row-gap: 0.2rem;
  }
  .shelf--index .actions { justify-content: flex-start; margin-top: 0.55rem; }
  .shelf--index .plate__title { font-size: 1.08rem; }
}

@media (max-width: 560px) {
  .ledger__item {
    padding-right: 1.05rem;
    margin-right: 1.05rem;
    min-width: 0;
    flex: 1 1 auto;
  }
  .ledger dd { font-size: 1.5rem; }
  .ledger dd.is-word { font-size: 1rem; }
  .toolbar__controls { width: 100%; justify-content: space-between; }
  .section-head { align-items: flex-start; }
  .foot { flex-direction: column; }
}

/* ---------- motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .plate:hover .plateart__ink { transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
