/* Generated by build.mjs from src/site.css. Edit the source, then run: node build.mjs */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(fonts/dm-sans-latin.woff2) format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/eb-garamond-latin.woff2) format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400 800; font-display: swap; src: url(fonts/eb-garamond-latin-italic.woff2) format('woff2'); }
:root[data-page="index"] { color-scheme: light; --bg: #f5f4f0; --surface: #ffffff; --surface2: #ecebe5; --text: #2b2b31; --strong: #111114; --muted: #5c5c66; --line: #dddcd4; --link: #3b37b0; --accent: #3b37b0; --accent2: #5c5c66; --btn-bg: #1c1c22; --btn-text: #ffffff; --focus: #3b37b0; --frame: #0c0d11; --acc-jarvis: #00687a; --acc-saw: #85601f; --acc-css: #5b36e8; }
@media (prefers-color-scheme: dark) { :root[data-page="index"]:not([data-theme="light"]) { color-scheme: dark; --bg: #0e0f13; --surface: #16171d; --surface2: #1f2129; --text: #c9cad3; --strong: #f1f1f5; --muted: #9a9ca9; --line: #2a2c35; --link: #aeabff; --accent: #aeabff; --accent2: #9a9ca9; --btn-bg: #ecebf5; --btn-text: #111114; --focus: #aeabff; --frame: #000000; --acc-jarvis: #6ff0ff; --acc-saw: #d6a24a; --acc-css: #a58eff; } }
:root[data-page="index"][data-theme="dark"] { color-scheme: dark; --bg: #0e0f13; --surface: #16171d; --surface2: #1f2129; --text: #c9cad3; --strong: #f1f1f5; --muted: #9a9ca9; --line: #2a2c35; --link: #aeabff; --accent: #aeabff; --accent2: #9a9ca9; --btn-bg: #ecebf5; --btn-text: #111114; --focus: #aeabff; --frame: #000000; --acc-jarvis: #6ff0ff; --acc-saw: #d6a24a; --acc-css: #a58eff; }
:root[data-page="jarvis"] { color-scheme: light; --bg: #eaf1f4; --surface: #ffffff; --surface2: #e0ebf0; --text: #22343d; --strong: #0b1a21; --muted: #4a6270; --line: #c5d8e0; --link: #00687a; --accent: #00687a; --accent2: #8f4f00; --btn-bg: #00687a; --btn-text: #ffffff; --focus: #00687a; --frame: #04080d; --grid: rgb(0 104 122 / 7%); }
@media (prefers-color-scheme: dark) { :root[data-page="jarvis"]:not([data-theme="light"]) { color-scheme: dark; --bg: #04080d; --surface: #0a141d; --surface2: #0f1f2b; --text: #a9c3ce; --strong: #e2f6fb; --muted: #7299a8; --line: #17394b; --link: #6ff0ff; --accent: #6ff0ff; --accent2: #ffb648; --btn-bg: #6ff0ff; --btn-text: #04080d; --focus: #6ff0ff; --frame: #04080d; --grid: rgb(111 240 255 / 4.5%); } }
:root[data-page="jarvis"][data-theme="dark"] { color-scheme: dark; --bg: #04080d; --surface: #0a141d; --surface2: #0f1f2b; --text: #a9c3ce; --strong: #e2f6fb; --muted: #7299a8; --line: #17394b; --link: #6ff0ff; --accent: #6ff0ff; --accent2: #ffb648; --btn-bg: #6ff0ff; --btn-text: #04080d; --focus: #6ff0ff; --frame: #04080d; --grid: rgb(111 240 255 / 4.5%); }
:root[data-page="self-aware-writing"] { color-scheme: light; --bg: #f7f2e7; --surface: #fffdf7; --surface2: #efe7d4; --text: #2b2924; --strong: #1a1a17; --muted: #67625a; --line: #e0d7c3; --link: #7f5b1c; --accent: #8a6220; --accent2: #7f5b1c; --btn-bg: #c8922e; --btn-text: #1a1a17; --focus: #8a6220; --frame: #0c0c0d; }
@media (prefers-color-scheme: dark) { :root[data-page="self-aware-writing"]:not([data-theme="light"]) { color-scheme: dark; --bg: #0c0c0d; --surface: #151517; --surface2: #1d1d20; --text: #d9d3c7; --strong: #f3ede1; --muted: #9a958b; --line: #2c2b28; --link: #dcaa52; --accent: #c8922e; --accent2: #d6a24a; --btn-bg: #c8922e; --btn-text: #0c0c0d; --focus: #d6a24a; --frame: #0c0c0d; } }
:root[data-page="self-aware-writing"][data-theme="dark"] { color-scheme: dark; --bg: #0c0c0d; --surface: #151517; --surface2: #1d1d20; --text: #d9d3c7; --strong: #f3ede1; --muted: #9a958b; --line: #2c2b28; --link: #dcaa52; --accent: #c8922e; --accent2: #d6a24a; --btn-bg: #c8922e; --btn-text: #0c0c0d; --focus: #d6a24a; --frame: #0c0c0d; }
:root[data-page="css-3d-lab"] { color-scheme: light; --bg: #f3f4fc; --surface: #ffffff; --surface2: #e9ebfa; --text: #2a2e48; --strong: #14172b; --muted: #575c7d; --line: #dcdff2; --link: #5632e6; --accent: #6a45f5; --accent2: #0a7a71; --btn-bg: #6a45f5; --btn-bg2: #c42a76; --btn-text: #ffffff; --focus: #5632e6; --frame: #0b0d18; --dot: rgb(20 23 43 / 13%); --glow-a: rgb(139 108 255 / 14%); --glow-b: rgb(255 77 157 / 9%); }
@media (prefers-color-scheme: dark) { :root[data-page="css-3d-lab"]:not([data-theme="light"]) { color-scheme: dark; --bg: #0b0d18; --surface: #121528; --surface2: #1a1e38; --text: #c9cce6; --strong: #eceefb; --muted: #9296bb; --line: #272b48; --link: #ab97ff; --accent: #8b6cff; --accent2: #2ee6d6; --btn-bg: #6a45f5; --btn-bg2: #c42a76; --btn-text: #ffffff; --focus: #2ee6d6; --frame: #0b0d18; --dot: rgb(255 255 255 / 9%); --glow-a: rgb(139 108 255 / 20%); --glow-b: rgb(255 77 157 / 13%); } }
:root[data-page="css-3d-lab"][data-theme="dark"] { color-scheme: dark; --bg: #0b0d18; --surface: #121528; --surface2: #1a1e38; --text: #c9cce6; --strong: #eceefb; --muted: #9296bb; --line: #272b48; --link: #ab97ff; --accent: #8b6cff; --accent2: #2ee6d6; --btn-bg: #6a45f5; --btn-bg2: #c42a76; --btn-text: #ffffff; --focus: #2ee6d6; --frame: #0b0d18; --dot: rgb(255 255 255 / 9%); --glow-a: rgb(139 108 255 / 20%); --glow-b: rgb(255 77 157 / 13%); }
/* ---------------------------------------------------------------------------------------------
   Shared components for the index and the three article pages. Colours come from the tokens that
   build.mjs writes above this file (one set per page, light and dark). Each page sets its own type
   and shape below; everything else is shared.
   --------------------------------------------------------------------------------------------- */

:root {
  --gutter: 16px;
  --page: 1200px;
  --f-ui: 'DM Sans', system-ui, 'Segoe UI', sans-serif;
  --f-body: 'DM Sans', system-ui, 'Segoe UI', sans-serif;
  --f-display: 'DM Sans', system-ui, 'Segoe UI', sans-serif;
  --f-kicker: var(--f-ui);
  --f-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --body-size: 18.5px;
  --lh: 1.68;
  --h1-weight: 700;
  --h2-weight: 700;
  --h-track: -0.02em;
  --strong-weight: 700;
  --kicker-track: 0.18em;
  --radius: 14px;
  --radius-ui: 12px;
  --radius-btn: 999px;
  --frame-pad: 0px;
  --frame-line: rgb(255 255 255 / 8%);
  --frame-shadow: 0 1px 2px rgb(0 0 0 / 8%), 0 18px 40px -18px rgb(0 0 0 / 35%);
  --sheet-bg: transparent;
  --sheet-line: transparent;
  --sheet-pad: 0px;
}
@media (min-width: 700px) { :root { --gutter: 28px; } }

/* --- each page's identity -------------------------------------------------------------------- */
:root[data-page="index"] {
  --f-display: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --h1-weight: 500;
  --h2-weight: 500;
  --h-track: -0.01em;
}

/* J.A.R.V.I.S.: the console's HUD. Mono labels, square corners, a faint grid, a panel for the text. */
:root[data-page="jarvis"] {
  --f-body: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --f-display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --f-ui: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --body-size: 18px;
  --lh: 1.72;
  --h1-weight: 700;
  --h2-weight: 600;
  --h-track: 0;
  --strong-weight: 600;
  --kicker-track: 0.2em;
  --radius: 3px;
  --radius-ui: 3px;
  --radius-btn: 2px;
  --frame-line: var(--line);
  --sheet-bg: var(--surface);
  --sheet-line: var(--line);
  --sheet-pad: clamp(16px, 5vw, 56px);
  --bg-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  --bg-size: 44px 44px;
}
:root[data-page="jarvis"] .prose h2::before { content: ""; display: block; width: 32px; height: 2px; margin-bottom: 14px; background: var(--accent); }
:root[data-page="jarvis"] .prose strong { color: var(--strong); }
:root[data-page="jarvis"] .story-head h1 { text-transform: none; }
:root[data-page="jarvis"] .kit-box { border-top: 2px solid var(--accent); }
:root[data-page="jarvis"] .btn, :root[data-page="jarvis"] .chip, :root[data-page="jarvis"] .kit-title { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11.5px; }
:root[data-page="jarvis"] .theme-switch button { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
:root[data-page="jarvis"] .story { position: relative; }
:root[data-page="jarvis"] .story::before,
:root[data-page="jarvis"] .story::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--accent); pointer-events: none; }
:root[data-page="jarvis"] .story::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
:root[data-page="jarvis"] .story::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* Self-Aware Writing: a book. Garamond at reading size, gold, italics, a drop cap, no panels. */
:root[data-page="self-aware-writing"] {
  --f-body: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --f-display: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --body-size: 21px;
  --lh: 1.6;
  --h1-weight: 500;
  --h2-weight: 500;
  --h-track: -0.005em;
  --strong-weight: 650;
  --kicker-track: 0.24em;
  --radius: 10px;
  --radius-btn: 999px;
}
:root[data-page="self-aware-writing"] .dek { font-style: italic; }
:root[data-page="self-aware-writing"] .prose h2 { font-size: clamp(26px, 3vw, 32px); }
:root[data-page="self-aware-writing"] .prose h2::after { content: ""; display: block; width: 40px; height: 1px; margin-top: 12px; background: var(--accent); }
:root[data-page="self-aware-writing"] .prose > p:first-child::first-letter {
  float: left; font-size: 3.55em; line-height: 0.82; padding: 0.07em 0.08em 0 0; color: var(--accent2); font-weight: 500;
}
:root[data-page="self-aware-writing"] .story-head { text-align: left; }

/* CSS 3D Lab: the lab's dotted grid, violet / pink / teal, a light sheet over the grid. */
:root[data-page="css-3d-lab"] {
  --f-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --f-kicker: var(--f-mono);
  --h1-weight: 750;
  --h-track: -0.03em;
  --radius: 16px;
  --sheet-bg: var(--surface);
  --sheet-line: var(--line);
  --sheet-pad: clamp(16px, 5vw, 56px);
  --bg-image: radial-gradient(circle at 0% 0%, var(--glow-a), transparent 42%), radial-gradient(circle at 100% 100%, var(--glow-b), transparent 45%), radial-gradient(var(--dot) 1.3px, transparent 1.7px);
  --bg-size: 100% 100%, 100% 100%, 28px 28px;
  --btn-image: linear-gradient(90deg, var(--btn-bg), var(--btn-bg2));
}
:root[data-page="css-3d-lab"] .story-head::before { content: ""; display: block; width: 64px; height: 4px; border-radius: 4px; margin-bottom: 18px; background: linear-gradient(90deg, #8b6cff, #ff4d9d 55%, #ffb547); }
:root[data-page="css-3d-lab"] .story { box-shadow: 0 30px 80px -40px rgb(40 20 120 / 35%); }

/* --- base ------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-image, none);
  background-size: var(--bg-size, auto);
  color: var(--text);
  font: 400 var(--body-size) / var(--lh) var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
[tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; padding: 10px 14px; background: var(--surface); color: var(--strong); font: 600 14px/1 var(--f-ui); border: 1px solid var(--line); border-radius: 8px; }
.skip:focus { left: var(--gutter); }

/* --- header and footer ----------------------------------------------------------------------- */
.site-head, .site-foot {
  max-width: var(--page); margin: 0 auto; padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 500 14px/1.3 var(--f-ui);
}
.site-head .home { color: var(--strong); text-decoration: none; font-weight: 600; }
.site-head .home:hover { text-decoration: underline; }
.site-foot { padding-block: 32px 40px; color: var(--muted); border-top: 1px solid var(--line); flex-wrap: wrap; }
.site-foot a { color: var(--muted); }

.theme-switch { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--surface); }
.theme-switch[hidden] { display: none; }
.theme-switch button {
  font: 500 12.5px/1 var(--f-ui); color: var(--muted); background: transparent; border: 0;
  padding: 7px 10px; border-radius: var(--radius-btn); cursor: pointer; min-height: 30px;
}
.theme-switch button:hover { color: var(--strong); }
.theme-switch button[aria-pressed="true"] { background: var(--surface2); color: var(--strong); font-weight: 600; }

/* --- article layout: the story, and the kit beside it on wide screens ------------------------- */
.layout { max-width: var(--page); margin: 0 auto; padding: 4px var(--gutter) 72px; display: grid; gap: 24px; }
.story { min-width: 0; background: var(--sheet-bg); border: 1px solid var(--sheet-line); border-radius: var(--radius); padding: var(--sheet-pad); }
.kit { min-width: 0; }
@media (min-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; padding-top: 12px; }
  .story { grid-column: 1; grid-row: 1; }
  .kit { grid-column: 2; grid-row: 1; position: sticky; top: 16px; }
  .kit-box { max-height: calc(100vh - 32px); overflow: auto; overscroll-behavior: contain; }
}

.story-head { max-width: 68ch; margin: clamp(8px, 3vw, 28px) 0 30px; }
.kicker { margin: 0 0 14px; font: 600 12.5px/1.35 var(--f-kicker); letter-spacing: var(--kicker-track); text-transform: uppercase; color: var(--accent2); }
.story-head h1 {
  margin: 0; color: var(--strong); text-wrap: balance;
  font: var(--h1-weight) clamp(32px, 5.2vw, 54px) / 1.06 var(--f-display); letter-spacing: var(--h-track);
}
.dek { margin: 18px 0 0; font-size: clamp(19px, 2.1vw, 23px); line-height: 1.45; color: var(--text); text-wrap: pretty; }
.byline { margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 4px 0; font: 400 14px/1.6 var(--f-ui); color: var(--muted); }
.byline > *:not(:last-child)::after { content: "·"; margin: 0 10px; color: var(--muted); }
.byline > span:first-child { color: var(--strong); font-weight: 600; }

/* --- the story's other homes: Medium, LinkedIn, the project ------------------------------ */
.also { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 400 14px/1.5 var(--f-ui); }
.also p { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.also-label { color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.also a { font-weight: 600; }
.story-foot { max-width: 68ch; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); font: 400 15px/1.55 var(--f-ui); }
.also-end { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--text); }
.also-end > span:not(:last-child)::after { content: "·"; margin: 0 12px; color: var(--muted); }
.also-end a { font-weight: 600; }
.more { margin-top: 26px; }
.more h2 { margin: 0 0 10px; font: 600 12px/1.2 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.more ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.more a { font: var(--h2-weight) 18px/1.3 var(--f-display); letter-spacing: var(--h-track); }
:root[data-page="jarvis"] .also-label, :root[data-page="jarvis"] .more h2 { letter-spacing: 0.16em; }

/* --- figures: the images are dark by design, so they sit in a dark frame in both modes -------- */
.fig { margin: 36px 0; }
.fig-cover { margin: 0 0 40px; }
.frame {
  background: var(--frame); border: 1px solid var(--frame-line); border-radius: var(--radius);
  padding: var(--frame-pad); box-shadow: var(--frame-shadow); overflow: hidden;
}
.frame img { width: 100%; }
figcaption { margin-top: 12px; font: 400 14.5px/1.55 var(--f-ui); color: var(--muted); }
.cap { margin: 0; max-width: 68ch; }
.fig-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 6px 11px;
  font: 500 12.5px/1.1 var(--f-ui); color: var(--strong); text-decoration: none; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-btn);
}
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.is-done, .btn.is-done { border-color: var(--accent); }
details.alt > summary { cursor: pointer; margin-top: 10px; font: 500 13px/1.4 var(--f-ui); color: var(--muted); width: fit-content; }
details.alt > summary span { font-weight: 400; }
details.alt > summary:hover { color: var(--strong); }
details.alt p { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--surface2); color: var(--text); font: 400 14px/1.55 var(--f-ui); max-width: 68ch; }
details.alt p.lbl { padding: 0; background: none; margin: 10px 0 -4px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

/* --- the article text ------------------------------------------------------------------------ */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 0; }
.prose p { margin: 0 0 1.05em; }
.prose h2 {
  margin: 2.1em 0 0.6em; color: var(--strong); text-wrap: balance;
  font: var(--h2-weight) clamp(24px, 2.8vw, 30px) / 1.2 var(--f-display); letter-spacing: var(--h-track);
}
.prose strong { color: var(--strong); font-weight: var(--strong-weight); }
.prose ul { margin: 0 0 1.25em; padding-left: 1.2em; }
.prose li { margin: 0 0 0.55em; padding-left: 0.2em; }
.prose li::marker { color: var(--accent); }
.prose code { font: 0.84em var(--f-mono); background: var(--surface2); padding: 0.1em 0.35em; border-radius: 4px; }
.prose .close { margin-top: 2em; color: var(--muted); font-size: 0.92em; }
.prose .fig { margin: 2em 0; }

/* --- the publishing kit ---------------------------------------------------------------------- */
.kit-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ui); font: 400 14px/1.5 var(--f-ui); }
.kit-box > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px;
}
.kit-box > summary::-webkit-details-marker { display: none; }
.kit-box > summary::after {
  content: ""; margin-left: auto; flex: none; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px);
}
.kit-box[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.kit-sum { display: grid; gap: 1px; }
.kit-title { font-weight: 700; color: var(--strong); font-size: 15px; }
.kit-hint { color: var(--muted); font-size: 13px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kit-body { padding: 2px 16px 18px; display: grid; gap: 26px; }
.kit h2 { margin: 0 0 10px; font: 600 11.5px/1.2 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn {
  min-height: 40px; padding: 9px 12px; cursor: pointer; text-align: center;
  font: 600 13px/1.2 var(--f-ui); color: var(--strong);
  background: var(--surface2); border: 1px solid var(--line); border-radius: var(--radius-btn);
}
.btn:hover { border-color: var(--accent); }
.btn.wide { grid-column: 1 / -1; }
.btn.primary { grid-column: 1 / -1; background-color: var(--btn-bg); background-image: var(--btn-image, none); color: var(--btn-text); border-color: transparent; font-size: 14px; }
.btn.primary:hover { filter: brightness(1.08); }
.kit-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.kit textarea {
  display: block; width: 100%; margin-top: 8px; resize: vertical; min-height: 140px; padding: 10px 12px;
  font: 400 12.5px/1.5 var(--f-mono); color: var(--text); background: var(--surface2); border: 1px solid var(--line); border-radius: 8px;
}
.img-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.img-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.img-row > img { width: 88px; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; border-radius: 6px; background: var(--frame); border: 1px solid var(--line); }
.img-name { margin: 0; font-weight: 600; color: var(--strong); font-size: 13.5px; line-height: 1.35; }
.img-name span { display: block; font-weight: 400; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.img-more { grid-column: 1 / -1; }
.img-row .fig-tools { margin-top: 0; gap: 5px; }
.img-row details.alt > summary { margin-top: 6px; }
.img-row .chip { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.img-row details.alt p { font-size: 13px; }
.share { border: 1px solid var(--line); border-radius: calc(var(--radius-ui) - 2px); padding: 12px; background: var(--bg); }
.share + .share { margin-top: 10px; }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.share h3 { margin: 0; font: 600 13.5px/1.3 var(--f-ui); color: var(--strong); }
.share-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.share pre {
  margin: 10px 0 0; max-height: 13em; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 400 13px/1.55 var(--f-ui); color: var(--text); background: var(--surface2); padding: 10px 12px; border-radius: 6px;
}

/* --- copy feedback --------------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 30; transform: translate(-50%, 8px);
  width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px;
  font: 500 14px/1.45 var(--f-ui); color: var(--bg); background: var(--strong);
  box-shadow: 0 12px 30px rgb(0 0 0 / 30%); opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { outline: 3px solid var(--accent2); }

/* --- index ----------------------------------------------------------------------------------- */
.index { max-width: var(--page); margin: 0 auto; padding: 8px var(--gutter) 80px; }
.index-head { max-width: 62ch; margin: clamp(16px, 5vw, 56px) 0 clamp(28px, 5vw, 56px); }
.index-head h1 { margin: 0; color: var(--strong); font: 500 clamp(36px, 6vw, 64px) / 1.04 var(--f-display); letter-spacing: -0.01em; text-wrap: balance; }
.index-head .dek { font-size: clamp(18px, 2vw, 21px); }
.cards { display: grid; gap: 28px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card[data-accent="jarvis"] { --card-accent: var(--acc-jarvis); }
.card[data-accent="self-aware-writing"] { --card-accent: var(--acc-saw); }
.card[data-accent="css-3d-lab"] { --card-accent: var(--acc-css); }
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--card-accent); z-index: 1; }
.card:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -28px rgb(0 0 0 / 45%); border-color: var(--card-accent); }
.card .frame { border-radius: 0; border: 0; box-shadow: none; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card .kicker { color: var(--card-accent); font-size: 11.5px; margin-bottom: 10px; }
.card h2 { margin: 0; font: 500 clamp(24px, 2.4vw, 28px) / 1.15 var(--f-display); color: var(--strong); text-wrap: balance; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.card .sub { margin: 10px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--text); }
.card .meta { margin: 14px 0 0; font: 400 13.5px/1.4 var(--f-ui); color: var(--muted); }
.card .links { margin: auto 0 0; padding-top: 16px; font: 600 15px/1.3 var(--f-ui); }
.card .elsewhere { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font: 500 13px/1.5 var(--f-ui); }
.card .elsewhere .also-label { font-size: 11px; }
.card .elsewhere .grp { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.card .elsewhere a { position: relative; z-index: 2; color: var(--text); }
.card .links a { position: relative; z-index: 2; color: var(--strong); }

/* --- motion ---------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}
