/* os.css — the Works OS and the conventional index fallback.
 *
 * The visual grammar is a printed desktop: ink outlines, offset paper shadow,
 * a single violet-to-plum wallpaper, and each app icon carrying its own
 * accent. It borrows the desktop metaphor without borrowing any operating
 * system's window chrome, title-bar buttons or bevels.
 *
 * Both views live in one file because they are two answers to one question.
 * The index is the floor: readable, plain, and correct with no script. */

:root {
  --ink: #17151F;
  --paper: #F6F1E7;
  --paper-2: #EFE7D9;
  --violet: #6D5BD0;
  --plum: #3A2F63;
  --accent: #6B5B8E;
  --line: rgba(23, 21, 31, .16);
  --sans: ui-sans-serif, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --shadow: 0 1px 0 rgba(255, 255, 255, .5), 0 10px 0 -4px rgba(23, 21, 31, .18);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

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

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 90;
  transform: translateY(-180%);
  padding: .7rem 1rem; border-radius: 8px;
  background: var(--ink); color: var(--paper);
  font-weight: 700; text-decoration: none;
}
.skip:focus-visible { transform: none; }

:where(a, button):focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Every overlay in this file sets display:flex or display:grid, which beats the
   user agent's [hidden] { display: none } on specificity. Without this the app
   window and the case overlay paint themselves on load while reporting
   hidden=true to the accessibility tree — and because os.js early-returns on
   `ui.app.hidden`, their own close buttons stop working. One rule, and the
   visible layer and the announced layer finally agree. */
[hidden] { display: none !important; }

/* ══ works header ═════════════════════════════════════════════════════════ */

.head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 1.25rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem) .9rem;
  border-bottom: 2px solid var(--ink);
}

.head__brand {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em;
}
.head__brand-mark {
  width: 15px; height: 15px; border: 2px solid var(--ink); border-radius: 4px;
  background: linear-gradient(140deg, var(--violet), var(--plum));
}
.head__title {
  margin: 0; flex: 1;
  font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700; letter-spacing: -.02em;
}
.head__switch { display: flex; gap: .4rem; }
.switch__btn {
  padding: .45rem .9rem; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: .82rem; font-weight: 700;
  letter-spacing: .06em; text-transform: lowercase; cursor: pointer;
}
.switch__btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ══ the desktop ══════════════════════════════════════════════════════════ */

.os {
  position: relative;
  min-height: calc(100vh - 6.2rem);
  padding: clamp(1rem, 3vw, 2rem);
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 50% 0%, #EFE6FF 0%, #DCD0F7 42%, #C9BAEA 72%, #B3A3DC 100%);
  overflow: hidden;
}

/* decorative clouds sitting behind the desktop frame */
.os__clouds { position: absolute; inset: 0; pointer-events: none; }
.cloud {
  position: absolute; display: block;
  width: 220px; height: 54px; border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  filter: blur(.4px);
}
.cloud::before, .cloud::after {
  content: ""; position: absolute; border-radius: 999px; background: inherit;
}
.cloud::before { width: 110px; height: 74px; left: 26px; bottom: 0; }
.cloud::after { width: 78px; height: 58px; right: 24px; bottom: 0; }
.cloud--1 { top: 8%; left: -60px; animation: drift 46s linear infinite; }
.cloud--2 { top: 30%; right: -80px; scale: .72; animation: drift 62s linear infinite reverse; }
.cloud--3 { bottom: 12%; left: 12%; scale: .55; animation: drift 78s linear infinite; }
@keyframes drift { to { translate: 62vw 0; } }

.frame {
  position: relative;
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 9rem));
  padding: 0 clamp(.85rem, 2.5vw, 2rem) clamp(.85rem, 2vw, 1.5rem);
  display: flex; flex-direction: column; gap: clamp(.75rem, 2vh, 1.4rem);
  border: 3px solid var(--ink); border-radius: 20px;
  background: linear-gradient(168deg, var(--accent) 0%, #8E7ACB 38%, #6A5A9E 72%, #4A3F72 100%);
  box-shadow: var(--shadow);
  transition: translate .5s cubic-bezier(.2, .9, .25, 1), scale .5s cubic-bezier(.2, .9, .25, 1);
}
.frame.is-framed { animation: grow .8s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes grow {
  from { transform: scale(.86); opacity: 0; }
  to { transform: none; opacity: 1; }
}
/* opening an app nudges the desktop, so the window feels like it left it */
.frame.is-behind { filter: brightness(.82) saturate(.9); }
.frame.is-shifted { translate: 0 -6px; scale: .988; }

.frame__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0 calc(-1 * clamp(.85rem, 2.5vw, 2rem));
  padding: .6rem clamp(1rem, 2.6vw, 2.1rem);
  border-bottom: 2px solid var(--ink);
  background: rgba(246, 241, 231, .9);
  color: var(--ink);
  border-radius: 17px 17px 0 0;
}
.frame__zone {
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .22em; text-transform: uppercase; font-weight: 700;
}
.frame__status { display: flex; gap: .9rem; align-items: center; }
.frame__date { font-size: .76rem; font-weight: 600; }
.frame__count {
  padding: .1rem .5rem; border: 1.5px solid var(--ink); border-radius: 999px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
}

/* the painted wallpaper: hills, sparks, and an accent that answers the icon
   under the pointer. Painted in with a mask when the desktop opens. */
.wallpaper {
  position: absolute; inset: 3.1rem 0 0; z-index: 0;
  --accent: #6B5B8E;
  background:
    radial-gradient(60% 34% at var(--mx, 50%) 22%, rgba(255, 255, 255, .3), transparent 70%),
    radial-gradient(80% 50% at 50% 118%, var(--accent) 0%, transparent 72%);
  opacity: .95;
  transition: background .6s ease;
  pointer-events: none;
}
.is-framed .wallpaper { animation: paint 1.1s .18s ease-out both; }
@keyframes paint { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: .95; clip-path: inset(0 0 0 0); } }

.wall__hill {
  position: absolute; left: -6%; width: 112%; border-radius: 50% 50% 0 0;
  background: rgba(23, 21, 31, .16);
}
.wall__hill--far { height: 150px; bottom: 96px; opacity: .5; }
.wall__hill--near { height: 100px; bottom: -30px; opacity: .7; background: rgba(23, 21, 31, .26); }

.wall__spark {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #FFF3D6; box-shadow: 0 0 12px 3px rgba(255, 243, 214, .7);
  animation: pulse 4.5s ease-in-out infinite;
}
.wall__spark--1 { top: 16%; left: 22%; }
.wall__spark--2 { top: 34%; right: 18%; animation-delay: 1.4s; }
.wall__spark--3 { top: 58%; left: 62%; animation-delay: 2.7s; }
@keyframes pulse { 50% { opacity: .25; scale: .7; } }

/* ── icon grid ───────────────────────────────────────────────────────────── */

.grid {
  position: relative; z-index: 2;
  flex: 1;
  margin: 0; padding: clamp(.4rem, 1.5vh, 1rem) 0;
  list-style: none;
  display: grid; gap: clamp(.6rem, 1.6vw, 1.15rem);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: center;
  justify-items: center;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.slot { display: grid; place-items: center; }

.icon {
  --accent: #6B5B8E;
  position: relative;
  width: 100%; max-width: 148px;
  padding: 0; border: 0; background: none;
  display: grid; justify-items: center; gap: .35rem;
  font: inherit; color: inherit; cursor: pointer;
}

.icon__art {
  position: relative;
  display: block; width: clamp(64px, 7.4vw, 104px); aspect-ratio: 96 / 112;
  filter: drop-shadow(2px 4px 0 rgba(23, 21, 31, .22));
  transition: scale .22s cubic-bezier(.2, .9, .25, 1);
}
.icon__art svg { width: 100%; height: 100%; display: block; }
/* the hand-drawn loop behind the art: selected state, drawn not rendered */
.icon__loop {
  position: absolute; inset: -7% -6%;
  border: 2.5px solid rgba(255, 255, 255, .0);
  border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  rotate: -4deg;
  transition: border-color .25s ease, scale .25s ease;
}
.icon.is-selected .icon__loop {
  border-color: #FFF3D6;
  scale: 1.04;
}
.icon.is-selected { filter: drop-shadow(2px 6px 0 rgba(23, 21, 31, .3)); }

.icon__label { display: grid; gap: .05rem; text-align: center; }
.icon__name {
  font-family: var(--serif); font-size: .88rem; font-weight: 700;
  letter-spacing: -.01em; color: #FFF8EA; line-height: 1.2;
}
.icon__trade {
  font-size: .66rem; line-height: 1.25; letter-spacing: .04em;
  color: rgba(255, 248, 234, .72);
}

/* hover grows by a few percent — never enough to look like a hover state */
@media (hover: hover) {
  .icon:hover .icon__art { scale: 1.06; }
  .icon:hover .icon__loop { border-color: rgba(255, 243, 214, .55); }
}
.icon:focus-visible { outline-offset: 6px; outline-color: #FFF3D6; }
.icon:focus-visible .icon__loop { border-color: #FFF3D6; scale: 1.04; }

/* idle movement, one icon at a time, so the desktop is never fully still */
.icon:nth-child(3n) .icon__art { animation: bob 7s ease-in-out infinite; }
.icon:nth-child(4n + 3) .icon__art { animation: bob 9s 1.2s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -4px; rotate: -.6deg; } }
.icon:nth-child(7) .icon__art { animation: wiggle 6.5s 2s ease-in-out infinite; }
@keyframes wiggle {
  0%, 88%, 100% { rotate: 0deg; }
  92% { rotate: -5deg; } 96% { rotate: 4deg; }
}

/* entrance: each icon drops in with a slightly different arrival */
.icon {
  opacity: 0; translate: 0 -14px;
  transition: opacity .5s ease, translate .5s cubic-bezier(.2, .9, .25, 1);
}
.icon.is-in {
  opacity: 1; translate: 0 0;
  transition-delay: calc(var(--i, 0) * 55ms);
}
.icon:nth-child(even).is-in { translate: 0 -20px; }
.icon:nth-child(3n).is-in { scale: .86; }
.icon:nth-child(3n).is-in { translate: 0 12px; }
.icon.is-in { scale: 1; }
.slot:nth-child(even) .icon.is-in { rotate: -1.2deg; }
.slot:nth-child(odd) .icon.is-in { rotate: 1deg; }

/* ── pointer + system note ───────────────────────────────────────────────── */

.pointer {
  position: absolute; z-index: 3;
  right: clamp(1.2rem, 4vw, 3.4rem); top: clamp(5.5rem, 12vh, 8rem);
  margin: 0; display: flex; align-items: flex-start; gap: .4rem;
  rotate: -6deg; pointer-events: none;
  animation: settle .6s 1.15s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes settle { from { opacity: 0; translate: 26px -10px; } to { opacity: 1; translate: 0; } }
.pointer svg { filter: drop-shadow(1px 2px 0 rgba(23, 21, 31, .3)); }
.pointer__hint {
  margin-top: 1.4rem; white-space: nowrap;
  padding: .2rem .5rem; border: 1.5px solid var(--ink); border-radius: 6px;
  background: #FFF3D6; color: var(--ink);
  font-family: var(--mono); font-size: .64rem; letter-spacing: .08em;
}

.note {
  position: relative; z-index: 2; margin: 0;
  align-self: flex-start;
  padding: .35rem .7rem; border: 1.5px solid var(--ink); border-radius: 6px;
  background: #FFF3D6; color: var(--ink);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .04em;
  rotate: -.6deg;
}
.note b { font-weight: 700; }

.bin {
  position: relative; z-index: 4; margin: 0;
  padding: .5rem .8rem; border: 2px solid var(--ink); border-radius: 8px;
  background: #FFF3D6; color: var(--ink);
  font-family: var(--mono); font-size: .72rem;
  box-shadow: 4px 4px 0 rgba(23, 21, 31, .25);
}

/* ── dock ────────────────────────────────────────────────────────────────── */

.dock {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: .5rem;
  align-self: center;
  max-width: 100%; overflow: auto;
  padding: .4rem .55rem;
  border: 2px solid var(--ink); border-radius: 14px;
  background: rgba(246, 241, 231, .86);
}
.dock__item {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .55rem; border: 1.5px solid transparent; border-radius: 9px;
  background: none; color: var(--ink);
  font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.dock__item:hover { background: var(--paper-2); border-color: var(--ink); }
.dock__glyph { font-size: .9rem; line-height: 1; }
.dock__text { letter-spacing: .02em; }

.dock__list {
  display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none;
  border-inline: 1.5px solid var(--line);
}
.dock__list.is-collapsed { display: none; }
.dock__entry button {
  display: block; width: 30px; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 6px;
}
.dock__entry svg { width: 100%; height: auto; display: block; }
.dock__entry button:hover { scale: 1.08; }

.dock__clock {
  margin-left: auto; padding-left: .5rem;
  border-left: 1.5px solid var(--line);
  font-family: var(--mono); font-size: .74rem; font-weight: 700;
}

/* ══ app window ═══════════════════════════════════════════════════════════ */

.app {
  position: fixed; inset: clamp(.5rem, 3vw, 2.4rem);
  z-index: 40;
  display: flex; flex-direction: column;
  border: 3px solid var(--ink); border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 24px 60px -20px rgba(23, 21, 31, .55);
  overflow: hidden;
  animation: window-in .42s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes window-in {
  from { opacity: 0; scale: .82; translate: 0 8%; }
  to { opacity: 1; scale: 1; translate: 0; }
}

.app__bar {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem clamp(.7rem, 2vw, 1.2rem);
  border-bottom: 2px solid var(--ink);
  background: var(--paper-2);
}
.app__logo { width: 30px; flex: none; }
.app__logo svg { width: 100%; height: auto; display: block; }
.app__titles { display: grid; flex: 1; min-width: 0; }
.app__title {
  font-family: var(--serif); font-size: 1.02rem; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app__trade { font-size: .72rem; color: rgba(23, 21, 31, .66); }
.app__wins { display: flex; align-items: center; gap: .35rem; }
.app__nav, .app__close {
  padding: .35rem .6rem; border: 1.5px solid var(--ink); border-radius: 8px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.app__nav:hover, .app__close:hover { background: var(--ink); color: var(--paper); }
.app__close { background: var(--ink); color: var(--paper); }
@media (max-width: 700px) { .app__nav { display: none; } }

.app__view {
  position: relative; flex: 1; min-height: 0;
  background: repeating-linear-gradient(45deg, #E6DFD2 0 10px, #EDE6DA 10px 20px);
}
.app__frame { width: 100%; height: 100%; border: 0; background: #fff; }

/* the loading line, shown until the world paints. position:absolute so it does
   not reflow the frame it is sitting on. */
.app__status {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: center;
  padding: .5rem 1rem;
  background: var(--paper); border-bottom: 2px solid var(--ink);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
}

/* Stepping into the preview is a deliberate act, so the affordance says so. */
.app__preview {
  padding: .5rem .8rem; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.app__preview:hover { background: var(--ink); color: var(--paper); }

/* js/lazy.js pins the one live frame to the viewport when a world goes full
   screen. The frame never moves in the DOM, so it needs no class to be found —
   only the z-index the loader does not set. */
.app__frame.is-expanded { z-index: 70; }

/* The window in full screen: chrome out, one floating way back. */
.app.is-expanded { animation: none; }
.app.is-expanded .app__bar,
.app.is-expanded .app__foot,
.app.is-expanded .app__notes { display: none; }
.app.is-expanded .app__view { border-radius: 0; }
.app.is-leaving { transition: scale .42s cubic-bezier(.6, 0, .8, .3), opacity .3s ease; }
.app.is-leaving .app__view { scale: .86; opacity: 0; }
.app__fallback {
  position: absolute; inset: auto 0 0 0; margin: 0;
  padding: .7rem 1rem; background: var(--paper); border-top: 2px solid var(--ink);
  font-size: .8rem;
}

.app__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .6rem clamp(.7rem, 2vw, 1.2rem);
  border-top: 2px solid var(--ink);
  background: var(--paper-2);
}
.app__enter {
  padding: .55rem 1.1rem; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: inherit; font-size: .8rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.app__enter:hover { background: var(--violet); border-color: var(--violet); }
.app__direct, .app__case {
  padding: .5rem .8rem; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: .78rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.app__case { margin-left: auto; }
.app__case:hover, .app__direct:hover { background: var(--ink); color: var(--paper); }

.app__notes {
  display: grid; gap: .5rem 1.2rem; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  padding: .7rem clamp(.7rem, 2vw, 1.2rem);
  border-top: 1.5px dashed var(--line);
  background: var(--paper);
}
.app__note dt {
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(23, 21, 31, .6);
}
.app__note dd { margin: .1rem 0 0; font-size: .8rem; line-height: 1.4; }

/* the coloured particle that flies home when a window closes */
.puff {
  position: absolute; z-index: 5; left: 50%; top: 40%;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  animation: puff .7s ease-out forwards;
}
@keyframes puff {
  to { opacity: 0; scale: .3; translate: -46vw -26vh; }
}

/* ══ full screen ══════════════════════════════════════════════════════════ */

.full { position: fixed; inset: 0; z-index: 60; background: #0B0A10; }
.full__frame { width: 100%; height: 100%; border: 0; background: #0B0A10; }
.full__controls {
  position: absolute; z-index: 2; left: 50%; bottom: clamp(.8rem, 3vh, 1.6rem);
  translate: -50% 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem;
  padding: .4rem; border: 2px solid rgba(255, 255, 255, .3); border-radius: 999px;
  background: rgba(11, 10, 16, .82);
  backdrop-filter: blur(6px);
}
.full__back, .full__case, .full__direct {
  padding: .45rem .85rem; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 999px;
  background: none; color: #FFF8EA;
  font: inherit; font-size: .76rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.full__back { background: #FFF8EA; color: #0B0A10; border-color: #FFF8EA; }
.full__back:hover, .full__case:hover, .full__direct:hover { background: var(--violet); border-color: var(--violet); color: #fff; }
.full__fallback {
  position: absolute; inset: 0; margin: 0; display: grid; place-content: center;
  gap: .5rem; text-align: center; color: #FFF8EA;
}
.full__fallback a { color: #FFF3D6; }

body.is-full .head, body.is-full .os { visibility: hidden; }

/* ══ case study ══════════════════════════════════════════════════════════ */

.case {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: clamp(.6rem, 3vw, 2rem);
  background: rgba(11, 10, 16, .74);
  animation: fade .25s ease both;
}
@keyframes fade { from { opacity: 0; } }
.case__panel {
  width: min(760px, 100%); max-height: 100%;
  overflow: auto;
  border: 3px solid var(--ink); border-radius: 16px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .6);
}
.case__bar {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem clamp(.9rem, 3vw, 1.6rem);
  border-bottom: 2px solid var(--ink); background: var(--paper-2);
}
.case__title { margin: 0; font-family: var(--serif); font-size: clamp(1.05rem, 3vw, 1.4rem); }
.case__close {
  padding: .4rem .8rem; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer;
}
.case__lede {
  margin: 0; padding: clamp(.9rem, 3vw, 1.6rem) clamp(.9rem, 3vw, 1.6rem) 0;
  font-family: var(--serif); font-size: 1.02rem; font-style: italic;
}
.case__rows {
  margin: 0; padding: clamp(.9rem, 3vw, 1.6rem);
  display: grid; gap: 1rem;
}
.case__row { display: grid; gap: .2rem; padding-top: .8rem; border-top: 1.5px dashed var(--line); }
.case__row dt {
  font-family: var(--mono); font-size: .64rem;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(23, 21, 31, .62);
}
.case__row dd { margin: 0; font-size: .9rem; line-height: 1.55; }
.case__foot {
  margin: 0; padding: .8rem clamp(.9rem, 3vw, 1.6rem) 1.2rem;
  font-size: .74rem; color: rgba(23, 21, 31, .6);
}

/* ══ index view — the floor ═══════════════════════════════════════════════ */

.index {
  max-width: 74ch;
  margin: 0 auto;
  padding: clamp(1.6rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) 5rem;
}
.index__lede {
  margin: 0 0 clamp(1.4rem, 4vw, 2.4rem);
  font-family: var(--serif); font-size: clamp(1.05rem, 2.4vw, 1.32rem);
  line-height: 1.5;
}
.index__list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.index__item { border-bottom: 1.5px solid var(--line); }
.index__link {
  display: grid; gap: .1rem .9rem;
  grid-template-columns: 2.4rem 1fr auto;
  grid-template-areas: "num name trade" "num line trade";
  align-items: baseline;
  padding: 1rem .5rem;
  color: var(--ink); text-decoration: none;
}
.index__link:hover { background: var(--paper-2); }
.index__link:focus-visible { outline-offset: -3px; }
.index__num {
  grid-area: num; align-self: start;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em;
  color: rgba(23, 21, 31, .5);
}
.index__name { grid-area: name; font-family: var(--serif); font-size: clamp(1.1rem, 2.6vw, 1.5rem); font-weight: 700; letter-spacing: -.015em; }
.index__trade { grid-area: trade; font-size: .8rem; color: rgba(23, 21, 31, .66); text-align: right; }
.index__line { grid-area: line; font-size: .88rem; color: rgba(23, 21, 31, .72); }
.index__link:hover .index__name { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .index__link {
    grid-template-columns: 2.2rem 1fr;
    grid-template-areas: "num name" "num trade" "num line";
  }
  .index__trade { text-align: left; }
}

.index__foot {
  margin: clamp(1.6rem, 4vw, 2.6rem) 0 0;
  padding-top: 1.2rem; border-top: 1.5px dashed var(--line);
  font-size: .85rem; color: rgba(23, 21, 31, .7);
}
.index__foot a { color: var(--violet); font-weight: 700; }

/* ══ reduced motion ═══════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .icon { opacity: 1; translate: none; scale: 1; rotate: none; }
  .pointer { animation: none; }
}
