/* AntJanus — Memphis Milano redesign (demo 017)
   Laminate colors, Bacterio squiggles, hard offset shadows, black outlines. */

:root {
  /* primitives */
  --cream-100: #fff6e6;
  --cream-200: #ffecc9;
  --white: #ffffff;
  --ink-900: #16121c;
  --ink-700: #3a3444;
  --ink-500: #5a5366;
  --night-900: #15121b;
  --night-800: #211c2a;
  --night-700: #2e2839;
  --paper-100: #fff4e0;
  --paper-300: #e8dccb;
  --paper-500: #c4b9cf;

  --pink: #ff5fa2;
  --yellow: #ffd23f;
  --teal: #20b8a6;
  --blue: #3056ff;
  --on-blue: #ffffff;
  --orange: #ff6a3d;
  --lilac: #b9a4ff;
  --slate: #364f6a; /* brand laminate */
  --on-slate: #ffffff;

  /* semantic */
  --ground: var(--cream-100);
  --ground-alt: var(--cream-200);
  --surface: var(--white);
  --text: var(--ink-900);
  --text-body: var(--ink-700);
  --text-muted: var(--ink-500);
  --line: var(--ink-900);
  --link: #2340c9;
  --focus: #2340c9;
  --on-fill: #16121c;
  --code-bg: #16121c;
  --code-text: #fff4e0;
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%2316121c' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M12 24q8-12 16 0t16 0'/%3E%3Cpath d='M92 14q9 8 0 16t0 16'/%3E%3Cpath d='M140 40q10-9 20 0'/%3E%3Cpath d='M30 84q8 10 16 0t16 0t16 0'/%3E%3Cpath d='M118 90q-8 10 0 20'/%3E%3Cpath d='M150 128q8-10 16 0'/%3E%3Cpath d='M18 140q10 6 12 18'/%3E%3Cpath d='M70 150q8-12 16 0t16 0'/%3E%3Cpath d='M60 44q4 8 12 6'/%3E%3Cpath d='M100 160q6-4 4-12'/%3E%3C/svg%3E");
  --squiggle-opacity: .13;

  --shadow-offset: 9px;
  --radius-pill: 999px;
  --radius-md: 14px;
  --border: 3px solid var(--line);

  --font-display: "Dela Gothic One", "Arial Black", Impact, sans-serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: var(--night-900);
    --ground-alt: var(--night-800);
    --surface: var(--night-800);
    --text: var(--paper-100);
    --text-body: var(--paper-300);
    --text-muted: var(--paper-500);
    --line: var(--paper-100);
    --link: #a9bcff;
    --focus: #ffd23f;
    --blue: #7b95ff;
    --on-blue: #16121c;
    --slate: #6f92bd;
    --on-slate: #16121c;
    --code-bg: #0c0a10;
    --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%23fff4e0' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M12 24q8-12 16 0t16 0'/%3E%3Cpath d='M92 14q9 8 0 16t0 16'/%3E%3Cpath d='M140 40q10-9 20 0'/%3E%3Cpath d='M30 84q8 10 16 0t16 0t16 0'/%3E%3Cpath d='M118 90q-8 10 0 20'/%3E%3Cpath d='M150 128q8-10 16 0'/%3E%3Cpath d='M18 140q10 6 12 18'/%3E%3Cpath d='M70 150q8-12 16 0t16 0'/%3E%3Cpath d='M60 44q4 8 12 6'/%3E%3Cpath d='M100 160q6-4 4-12'/%3E%3C/svg%3E");
    --squiggle-opacity: .09;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: var(--night-900);
  --ground-alt: var(--night-800);
  --surface: var(--night-800);
  --text: var(--paper-100);
  --text-body: var(--paper-300);
  --text-muted: var(--paper-500);
  --line: var(--paper-100);
  --link: #a9bcff;
  --focus: #ffd23f;
  --blue: #7b95ff;
  --on-blue: #16121c;
  --slate: #6f92bd;
  --on-slate: #16121c;
  --code-bg: #0c0a10;
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%23fff4e0' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M12 24q8-12 16 0t16 0'/%3E%3Cpath d='M92 14q9 8 0 16t0 16'/%3E%3Cpath d='M140 40q10-9 20 0'/%3E%3Cpath d='M30 84q8 10 16 0t16 0t16 0'/%3E%3Cpath d='M118 90q-8 10 0 20'/%3E%3Cpath d='M150 128q8-10 16 0'/%3E%3Cpath d='M18 140q10 6 12 18'/%3E%3Cpath d='M70 150q8-12 16 0t16 0'/%3E%3Cpath d='M60 44q4 8 12 6'/%3E%3Cpath d='M100 160q6-4 4-12'/%3E%3C/svg%3E");
  --squiggle-opacity: .09;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--pink); }
h1, h2, h3, h4 { color: var(--text); margin: 0 0 .5em; line-height: 1.15; }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--yellow); color: #16121c; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--yellow); color: #16121c; padding: 10px 16px; border: var(--border); font-weight: 700; }
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section--alt { background: var(--ground-alt); border-block: var(--border); }
.bacterio { position: relative; isolation: isolate; }
.bacterio::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--squiggle); background-size: 180px; opacity: var(--squiggle-opacity);
}
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono); font-size: .875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--pink); border: 2px solid var(--line); flex: none; }
.lede { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; color: var(--text-body); max-width: 62ch; }
.muted { color: var(--text-muted); }

/* ---------- header / nav ---------- */
.progress { position: fixed; top: 0; left: 0; height: 6px; width: 0; z-index: 60;
  background: repeating-linear-gradient(90deg, var(--pink) 0 24px, var(--yellow) 24px 48px, var(--teal) 48px 72px, var(--blue) 72px 96px); }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ground); border-bottom: var(--border); }
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -13px; height: 10px; pointer-events: none;
  background: linear-gradient(135deg, var(--ground) 25%, transparent 25%) -5px 0/10px 10px,
              linear-gradient(225deg, var(--ground) 25%, transparent 25%) -5px 0/10px 10px;
}
.nav { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand svg { width: 52px; height: 52px; flex: none; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word small { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.brand-word strong { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 2px solid transparent; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-weight: 700; font-size: .9375rem; text-transform: uppercase; color: var(--text); text-decoration: none;
  transition: transform .15s, background-color .15s, box-shadow .15s;
}
.nav-links a:hover { border-color: var(--line); background: var(--yellow); color: #16121c; box-shadow: 3px 3px 0 var(--line); transform: translate(-1px, -1px); }
.nav-links a[aria-current="page"] { background: var(--pink); color: #16121c; border-color: var(--line); box-shadow: 3px 3px 0 var(--line); }
.nav-links a.nav-ai { background: repeating-linear-gradient(-45deg, var(--teal) 0 8px, var(--yellow) 8px 16px); color: #16121c; border-color: var(--line); }
.nav-links a.nav-ai span { background: var(--surface); color: var(--text); padding: 0 6px; border-radius: 6px; }
.nav-links a.nav-ai[aria-current="page"] { box-shadow: 3px 3px 0 var(--line); }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; border: var(--border); background: var(--yellow); color: #16121c; cursor: pointer;
  display: inline-grid; place-items: center; box-shadow: 3px 3px 0 var(--line); transition: transform .15s, box-shadow .15s; flex: none;
}
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.icon-btn svg { width: 22px; height: 22px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.menu-btn { display: none; background: var(--teal); }
@media (max-width: 960px) {
  .menu-btn { display: inline-grid; }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 3px); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--ground); border-bottom: var(--border); padding: 16px var(--gutter) 24px; gap: 8px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { width: 100%; font-size: 1.05rem; border-color: var(--line); background: var(--surface); }
  .brand-word small { display: none; }
}

/* ---------- buttons, chips ---------- */
.btn {
  --btn-bg: var(--yellow); --btn-fg: #16121c;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 22px;
  background: var(--btn-bg); color: var(--btn-fg); border: var(--border); border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
  box-shadow: 5px 5px 0 var(--line); cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--line); color: var(--btn-fg); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--line); }
.btn--pink { --btn-bg: var(--pink); }
.btn--teal { --btn-bg: var(--teal); }
.btn--blue { --btn-bg: var(--blue); --btn-fg: var(--on-blue); }
.btn--ghost { --btn-bg: var(--surface); --btn-fg: var(--text); }
.btn--sm { min-height: 44px; padding: 6px 16px; font-size: .875rem; box-shadow: 3px 3px 0 var(--line); }
.btn--sm:hover { box-shadow: 5px 5px 0 var(--line); }
.link-quiet { font-family: var(--font-mono); font-weight: 700; font-size: .9375rem; text-transform: uppercase; color: var(--text); text-decoration-style: wavy; text-decoration-color: var(--pink); display: inline-flex; min-height: 44px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 3px 12px; border: 2px solid var(--line); border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: .875rem; color: var(--text); background: var(--surface); text-decoration: none;
}
a.chip:hover { background: var(--yellow); color: #16121c; }
.badge {
  display: inline-block; padding: 2px 10px; border: 2px solid var(--line); font-family: var(--font-mono); font-weight: 700; font-size: .8125rem;
  text-transform: uppercase; letter-spacing: .06em; background: var(--yellow); color: #16121c; transform: rotate(-3deg);
}
.badge--new { background: var(--pink); }
.badge--updated { background: var(--teal); }
.pill-toggle {
  min-height: 44px; padding: 6px 16px; border: 2px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--text);
  font-family: var(--font-mono); font-weight: 700; font-size: .9375rem; cursor: pointer; transition: background-color .15s, transform .15s;
}
.pill-toggle:hover { background: var(--ground-alt); transform: translateY(-1px); }
.pill-toggle[aria-pressed="true"] { background: var(--ink-900); color: var(--yellow); border-color: var(--line); box-shadow: 3px 3px 0 var(--pink); }
:root[data-theme="dark"] .pill-toggle[aria-pressed="true"] { background: var(--yellow); color: #16121c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill-toggle[aria-pressed="true"] { background: var(--yellow); color: #16121c; } }

/* ---------- section heads ---------- */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0; display: flex; align-items: center; gap: 16px; }
.sec-head h2 svg { width: 48px; height: 48px; flex: none; }
.sec-head p { margin: 8px 0 0; color: var(--text-muted); font-size: 1.125rem; }

/* ---------- confetti ---------- */
.confetti { position: absolute; pointer-events: none; z-index: 0; }
.confetti svg { display: block; width: 100%; height: auto; overflow: visible; }
.f-pink { fill: var(--pink); } .f-yellow { fill: var(--yellow); } .f-teal { fill: var(--teal); } .f-blue { fill: var(--blue); }
.f-orange { fill: var(--orange); } .f-lilac { fill: var(--lilac); } .f-slate { fill: var(--slate); } .f-ink { fill: var(--line); } .f-none { fill: none; }
.s-line { stroke: var(--line); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.s-pink { stroke: var(--pink); } .s-teal { stroke: var(--teal); } .s-blue { stroke: var(--blue); } .s-yellow { stroke: var(--yellow); } .s-ink { stroke: var(--line); }
.s-orange { stroke: var(--orange); } .s-lilac { stroke: var(--lilac); }
.s-thick { stroke-width: 7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .float { animation: bob 7s ease-in-out infinite; }
  .float:nth-of-type(2n) { animation-duration: 9s; animation-delay: -2s; }
  .float:nth-of-type(3n) { animation-duration: 11s; animation-delay: -4s; }
  @keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(8deg); } }
}

/* ---------- hero (home) ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 112px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); line-height: 1.04; margin-bottom: 24px; }
.hero h1 .hl { background: linear-gradient(transparent 58%, var(--yellow) 58% 92%, transparent 92%); padding: 0 .08em; }
.hero h1 .hl-pink { background: linear-gradient(transparent 58%, var(--pink) 58% 92%, transparent 92%); padding: 0 .08em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 18px 22px; align-items: center; margin-top: 32px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 36px; max-width: 560px; }
.stat {
  border: var(--border); background: var(--surface); padding: 14px 16px; position: relative; box-shadow: 5px 5px 0 var(--c, var(--pink));
}
.stat:nth-child(1) { --c: var(--pink); border-radius: 22px 4px 22px 4px; }
.stat:nth-child(2) { --c: var(--teal); border-radius: 4px; }
.stat:nth-child(3) { --c: var(--blue); border-radius: 40px 40px 4px 4px; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--text); line-height: 1.1; }
.stat span { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; color: var(--text-body); }

.portrait { position: relative; max-width: 480px; margin-left: auto; width: 100%; aspect-ratio: 4 / 5; }
.portrait .stripes {
  position: absolute; inset: 8% -6% -6% 10%; border: var(--border); border-radius: 200px 200px 0 0;
  background: repeating-linear-gradient(-45deg, var(--line) 0 6px, transparent 6px 16px);
}
.portrait .blob { position: absolute; width: 42%; aspect-ratio: 1; border-radius: 50%; background: var(--yellow); border: var(--border); left: -12%; bottom: 6%; }
.portrait .photo {
  position: absolute; inset: 0 8% 6% 0; border: var(--border); border-radius: 200px 200px 0 0; overflow: hidden; background: var(--teal);
  box-shadow: 10px 10px 0 var(--pink);
}
.portrait .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; }
.portrait .sticker {
  position: absolute; right: -2%; top: 6%; z-index: 3; width: 132px; height: 132px; border-radius: 50%; border: var(--border); background: var(--pink); color: #16121c;
  display: grid; place-items: center; text-align: center; font-family: var(--font-mono); font-weight: 700; font-size: .875rem; line-height: 1.2; text-transform: uppercase; transform: rotate(12deg);
}
.portrait .sticker b { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; display: block; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 340px; margin: 12px auto 0; }
  .portrait .sticker { width: 108px; height: 108px; font-size: .8125rem; }
}
@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr; }
  .stat { display: flex; align-items: baseline; gap: 12px; }
}

/* ---------- marquee ---------- */
.marquee { background: var(--ink-900); color: var(--yellow); border-block: var(--border); overflow: hidden; white-space: nowrap; }
:root[data-theme="dark"] .marquee { background: var(--yellow); color: #16121c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .marquee { background: var(--yellow); color: #16121c; } }
.marquee-track { display: inline-flex; gap: 32px; padding: 16px 0; font-family: var(--font-display); font-size: clamp(1.1rem, 2.2vw, 1.6rem); }
.marquee-track span { display: inline-flex; align-items: center; gap: 32px; }
.marquee-track span::after { content: "✶"; color: var(--pink); }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: slide 40s linear infinite; }
  @keyframes slide { to { transform: translateX(-50%); } }
}

/* ---------- cards ---------- */
.grid { display: grid; gap: 32px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card {
  --c: var(--pink);
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 -3px var(--c), var(--shadow-offset) var(--shadow-offset) 0 0 var(--line);
  transition: transform .15s, box-shadow .15s; min-width: 0;
}
.card:hover, .card:focus-within { transform: translate(-3px, -3px); box-shadow: 13px 13px 0 -3px var(--c), 13px 13px 0 0 var(--line); }
.rot > .card:nth-child(6n+1), .rot > .card:nth-child(6n+1) { --c: var(--pink); }
.rot > :nth-child(6n+2) { --c: var(--yellow); }
.rot > :nth-child(6n+3) { --c: var(--teal); }
.rot > :nth-child(6n+4) { --c: var(--blue); }
.rot > :nth-child(6n+5) { --c: var(--orange); }
.rot > :nth-child(6n+6) { --c: var(--lilac); }
.card-media { aspect-ratio: 16 / 9; border-bottom: var(--border); overflow: hidden; border-radius: 11px 11px 0 0; background: var(--c); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.card-body h3 { margin: 0; font-size: 1.3rem; line-height: 1.25; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-body h3 a:hover { text-decoration: underline wavy var(--pink) 2px; }
.card-body p { margin: 0; color: var(--text-body); font-size: 1.0625rem; }
.card-meta { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.card .chips, .card .chip { position: relative; z-index: 2; }

/* generated cover when an article has no image */
.cover-gen { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.cover-gen::before { content: ""; position: absolute; inset: 0; background-image: var(--squiggle); background-size: 140px; opacity: .35; }
.cover-gen .cg-word { position: relative; font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); color: #16121c; background: var(--surface-fixed, #fff6e6); border: 3px solid #16121c; padding: 6px 16px; transform: rotate(-4deg); box-shadow: 5px 5px 0 #16121c; text-align: center; max-width: 80%; line-height: 1.1; }
.cover-gen .cg-shape { position: absolute; width: 38%; aspect-ratio: 1; border: 3px solid #16121c; }
.cover-gen .cg-shape.a { border-radius: 50%; background: var(--yellow); right: -8%; top: -14%; }
.cover-gen .cg-shape.b { background: repeating-linear-gradient(45deg, #16121c 0 5px, transparent 5px 12px); left: -6%; bottom: -18%; transform: rotate(18deg); }

/* list rows */
.rows { list-style: none; margin: 0; padding: 0; border-top: var(--border); }
.row { border-bottom: var(--border); display: grid; grid-template-columns: 150px 1fr auto; gap: 8px 28px; padding: 22px 8px; align-items: baseline; position: relative; transition: background-color .15s; }
.row:hover { background: var(--ground-alt); }
.row time { font-family: var(--font-mono); font-size: .9375rem; color: var(--text-muted); }
.row h3 { margin: 0 0 4px; font-size: 1.25rem; }
.row h3 a { color: var(--text); text-decoration: none; }
.row h3 a::after { content: ""; position: absolute; inset: 0; }
.row h3 a:hover { text-decoration: underline wavy var(--pink) 2px; }
.row p { margin: 0; color: var(--text-body); }
.row .arrow { font-family: var(--font-display); font-size: 1.5rem; color: var(--text); }
@media (max-width: 700px) { .row { grid-template-columns: 1fr; } .row .arrow { display: none; } }

/* shape cards (experiments) */
.shape-card { text-align: left; padding: 26px 22px; }
.shape-card .shape-ico { width: 64px; height: 64px; margin-bottom: 8px; }

/* panels */
.panel { border: var(--border); border-radius: var(--radius-md); background: var(--surface); padding: clamp(22px, 3vw, 36px); position: relative; }
.panel--dark { background: var(--ink-900); color: var(--paper-300); border-color: var(--ink-900); }
.panel--dark h2, .panel--dark h3, .panel--dark .eyebrow { color: var(--paper-100); }
:root[data-theme="dark"] .panel--dark { background: #0c0a10; border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .panel--dark { background: #0c0a10; border-color: var(--line); } }
.panel--dark a:not(.btn) { color: var(--yellow); }
.panel--stripe { box-shadow: 10px 10px 0 -3px var(--yellow), 10px 10px 0 0 var(--line); }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; } }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; background: var(--ground); }
.link-list a:hover { background: var(--yellow); color: #16121c; }
.link-list a small { font-family: var(--font-mono); font-size: .875rem; font-weight: 400; }

/* page hero (inner) */
.page-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 88px); position: relative; overflow: hidden; }
.page-hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 64px); align-items: center; position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.6rem, 6.5vw, 5.4rem); line-height: 1; margin-bottom: 20px; }
.tilt-frame { position: relative; border: var(--border); border-radius: var(--radius-md); overflow: hidden; transform: rotate(2.5deg); box-shadow: 12px 12px 0 -3px var(--teal), 12px 12px 0 0 var(--line); background: var(--blue); aspect-ratio: 4 / 3; }
.tilt-frame img { width: 100%; height: 100%; object-fit: cover; }
.tilt-frame.left { transform: rotate(-2.5deg); box-shadow: 12px 12px 0 -3px var(--pink), 12px 12px 0 0 var(--line); }
@media (max-width: 860px) { .page-hero-grid { grid-template-columns: 1fr; } .tilt-frame { max-width: 520px; } }

/* jump nav */
.jump { position: sticky; top: 79px; z-index: 30; background: var(--ground); border-bottom: var(--border); padding: 12px 0; }
.jump .wrap { display: flex; gap: 10px; overflow-x: auto; align-items: center; scrollbar-width: thin; }
.jump b { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; color: var(--text); flex: none; }
.jump .chip { flex: none; min-height: 40px; font-weight: 700; }

/* landscape project cards */
.land { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.land .card-media { aspect-ratio: auto; min-height: 280px; border-bottom: 0; border-right: var(--border); border-radius: 11px 0 0 11px; }
.land.flip .card-media { order: 2; border-right: 0; border-left: var(--border); border-radius: 0 11px 11px 0; }
.land .card-body { padding: 28px 30px; justify-content: center; }
.land .card-body h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.mini-stats span { border: 2px solid var(--line); padding: 4px 12px; font-family: var(--font-mono); font-size: .875rem; color: var(--text); background: var(--ground); }
.mini-stats b { font-size: 1rem; }
@media (max-width: 800px) {
  .land { grid-template-columns: 1fr; }
  .land .card-media, .land.flip .card-media { order: 0; border: 0; border-bottom: var(--border); border-radius: 11px 11px 0 0; min-height: 200px; aspect-ratio: 16 / 9; }
}
.gif-note { position: absolute; left: 10px; bottom: 10px; background: #16121c; color: #fff4e0; font-family: var(--font-mono); font-size: .8125rem; padding: 2px 8px; border: 2px solid #fff4e0; }

/* featured slab */
.feature-slab { display: grid; grid-template-columns: 1.1fr .9fr; border: var(--border); border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: 14px 14px 0 -3px var(--yellow), 14px 14px 0 0 var(--line); }
.feature-slab .fs-img { background: #0c1f33; min-height: 320px; border-right: var(--border); }
.feature-slab .fs-img img { width: 100%; height: 100%; object-fit: cover; }
.feature-slab .fs-body { padding: clamp(24px, 4vw, 44px); }
.feature-slab h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.bigstats { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--border); margin: 22px 0; }
.bigstats div { padding: 12px 14px; border-right: var(--border); }
.bigstats div:last-child { border-right: 0; }
.bigstats div:nth-child(1) { background: var(--pink); } .bigstats div:nth-child(2) { background: var(--teal); } .bigstats div:nth-child(3) { background: var(--yellow); }
.bigstats b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 2rem; color: #16121c; line-height: 1.1; }
.bigstats span { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; color: #16121c; }
@media (max-width: 860px) { .feature-slab { grid-template-columns: 1fr; } .feature-slab .fs-img { border-right: 0; border-bottom: var(--border); min-height: 220px; } }

/* callout strip */
.strip-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; border: var(--border); border-radius: var(--radius-pill); padding: 16px 16px 16px 32px; background: repeating-linear-gradient(90deg, var(--surface) 0 100%); box-shadow: 6px 6px 0 var(--line); }
.strip-cta p { margin: 0; font-weight: 600; color: var(--text); font-size: 1.15rem; }
@media (max-width: 700px) { .strip-cta { border-radius: 22px; padding: 20px; } }

/* forms */
.field { display: flex; flex-wrap: wrap; gap: 12px; }
.input {
  flex: 1 1 220px; min-height: 52px; padding: 10px 18px; border: var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text);
  font: inherit; font-size: 1.0625rem;
}
.input::placeholder { color: var(--text-muted); }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.form-note { font-size: 1rem; color: var(--text-muted); margin-top: 10px; }
.form-success { display: none; border: var(--border); background: var(--teal); color: #16121c; padding: 14px 18px; border-radius: 14px; font-weight: 600; }
form.is-done .field { display: none; }
form.is-done .form-success { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 1rem; margin-top: 12px; }
.check input { width: 22px; height: 22px; accent-color: var(--pink); margin-top: 3px; flex: none; }

/* ---------- footer ---------- */
.site-footer { margin-top: 0; border-top: var(--border); background: var(--ground-alt); position: relative; }
.footer-top { height: 28px; border-bottom: var(--border); background: repeating-linear-gradient(90deg, var(--pink) 0 40px, var(--yellow) 40px 80px, var(--teal) 80px 120px, var(--blue) 120px 160px, var(--lilac) 160px 200px, var(--orange) 200px 240px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 40px; padding: 56px 0 40px; }
.footer-grid h2 { font-family: var(--font-mono); font-weight: 700; font-size: .9375rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.footer-grid ul a { color: var(--text); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; font-weight: 500; }
.footer-grid ul a:hover { text-decoration: underline wavy var(--pink) 2px; }
.footer-bottom { border-top: var(--border); padding: 20px 0 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: .875rem; color: var(--text-muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- article ---------- */
.art-hero { position: relative; padding: clamp(32px, 5vw, 64px) 0 40px; overflow: hidden; }
.art-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; position: relative; z-index: 1; }
.art-hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.05; }
.crumbs { font-family: var(--font-mono); font-size: .9375rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.crumbs a { color: var(--text); font-weight: 700; }
.art-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.art-meta span { border: 2px solid var(--line); padding: 4px 12px; font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; color: var(--text); background: var(--surface); }
.art-meta span:nth-child(1) { background: var(--yellow); color: #16121c; }
.art-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 72px; }
.toc { position: sticky; top: 112px; border: var(--border); border-radius: var(--radius-md); background: var(--surface); padding: 18px 16px; box-shadow: 6px 6px 0 -3px var(--teal), 6px 6px 0 0 var(--line); }
.toc h2 { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--text-body); text-decoration: none; font-size: 1rem; line-height: 1.35; border: 2px solid transparent; }
.toc ol a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: .875rem; color: var(--text-muted); padding-top: 1px; }
.toc a:hover { background: var(--ground-alt); }
.toc a[aria-current="true"] { background: var(--yellow); color: #16121c; border-color: var(--line); font-weight: 600; }
.toc ol a[aria-current="true"]::before { color: #16121c; }
.toc-mobile { display: none; }
@media (max-width: 1080px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .toc-mobile { display: block; margin-bottom: 32px; border: var(--border); border-radius: var(--radius-md); background: var(--surface); }
  .toc-mobile summary { cursor: pointer; padding: 14px 18px; min-height: 48px; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; color: var(--text); }
  .toc-mobile ol { margin: 0; padding: 0 18px 16px 44px; }
  .toc-mobile a { display: inline-block; padding: 6px 0; color: var(--text); }
}
@media (max-width: 860px) { .art-hero-grid { grid-template-columns: 1fr; } }

.prose { max-width: 70ch; font-size: 1.1875rem; line-height: 1.7; color: var(--text-body); }
.prose-sheet { background: var(--surface); border: var(--border); border-radius: 18px; padding: clamp(22px, 5vw, 56px); position: relative; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 2.2em 0 .6em; scroll-margin-top: 110px; display: flex; align-items: center; gap: 14px; }
.prose h2::before { content: ""; width: 22px; height: 22px; flex: none; border: 3px solid var(--line); background: var(--c, var(--pink)); }
.prose h2:nth-of-type(6n+1)::before { --c: var(--pink); border-radius: 50%; }
.prose h2:nth-of-type(6n+2)::before { --c: var(--yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; background: var(--yellow); }
.prose h2:nth-of-type(6n+3)::before { --c: var(--teal); }
.prose h2:nth-of-type(6n+4)::before { --c: var(--blue); border-radius: 50% 50% 0 0; }
.prose h2:nth-of-type(6n+5)::before { --c: var(--orange); transform: rotate(45deg); }
.prose h2:nth-of-type(6n+6)::before { --c: var(--lilac); border-radius: 0 50%; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose li { margin-bottom: .35em; }
.prose ol li::marker { font-family: var(--font-mono); font-weight: 700; color: var(--text); }
.prose code:not(pre code) { font-family: var(--font-mono); font-size: .88em; background: var(--ground-alt); border: 1.5px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--text); }
.prose em { font-style: italic; }
.prose strong { color: var(--text); }
.codeblock { margin: 1.6em 0 1.8em; border: var(--border); border-radius: 14px; overflow: hidden; background: var(--code-bg); box-shadow: 8px 8px 0 -3px var(--pink), 8px 8px 0 0 var(--line); }
.codeblock:nth-of-type(3n+2) { box-shadow: 8px 8px 0 -3px var(--teal), 8px 8px 0 0 var(--line); }
.codeblock:nth-of-type(3n) { box-shadow: 8px 8px 0 -3px var(--yellow), 8px 8px 0 0 var(--line); }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; border-bottom: 3px solid #16121c; background: repeating-linear-gradient(-45deg, #fff4e0 0 6px, #ffd23f 6px 12px); }
.code-bar span { font-family: var(--font-mono); font-weight: 700; font-size: .875rem; background: #16121c; color: #fff4e0; padding: 2px 10px; }
.copy-btn { min-height: 36px; padding: 4px 14px; border: 2px solid #16121c; border-radius: 999px; background: #fff; color: #16121c; font-family: var(--font-mono); font-weight: 700; font-size: .875rem; cursor: pointer; }
.copy-btn:hover { background: var(--pink); }
.codeblock pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: .95rem; line-height: 1.6; color: var(--code-text); tab-size: 2; }
.tk-k { color: #ff8cc0; } .tk-s { color: #ffe27a; } .tk-c { color: #a79fb4; font-style: italic; } .tk-t { color: #6fe3d4; } .tk-f { color: #b5c4ff; }
.callout { margin: 1.6em 0; border: var(--border); border-radius: 14px; padding: 18px 22px 18px 74px; position: relative; background: var(--ground); color: var(--text-body); }
.callout::before { position: absolute; left: 16px; top: 16px; width: 42px; height: 42px; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.3rem; color: #16121c; border: 3px solid var(--line); }
.callout p { margin: 0; }
.callout strong:first-child { font-family: var(--font-mono); text-transform: uppercase; font-size: .9375rem; letter-spacing: .04em; margin-right: 6px; }
.callout--why { background: color-mix(in srgb, var(--yellow) 22%, var(--surface)); }
.callout--why::before { content: "?"; background: var(--yellow); border-radius: 4px; transform: rotate(-6deg); }
.callout--ask { background: color-mix(in srgb, var(--pink) 16%, var(--surface)); }
.callout--ask::before { content: "✎"; background: var(--pink); border-radius: 50%; }
.callout--note { background: color-mix(in srgb, var(--teal) 16%, var(--surface)); }
.callout--note::before { content: "!"; background: var(--teal); border-radius: 50% 50% 4px 4px; }
.callout--skill { background: color-mix(in srgb, var(--blue) 12%, var(--surface)); }
.callout--skill::before { content: "⚛"; background: var(--lilac); border-radius: 4px 50% 4px 50%; }

.filed { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 3px dashed var(--line); }
.filed b { font-family: var(--font-mono); text-transform: uppercase; font-size: .9375rem; color: var(--text); }
.share-row { display: flex; flex-wrap: wrap; gap: 14px; }
.news-card { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 800px) { .news-card { grid-template-columns: 1fr; } }

/* ---------- about ---------- */
.about-hero-photo { position: relative; aspect-ratio: 1; max-width: 440px; width: 100%; margin-left: auto; }
.about-hero-photo .ring { position: absolute; inset: -4%; border-radius: 50%; border: var(--border); background: repeating-conic-gradient(var(--pink) 0 15deg, var(--yellow) 15deg 30deg); }
.about-hero-photo img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: cover; border-radius: 50%; border: var(--border); background: var(--teal); }
@media (max-width: 860px) { .about-hero-photo { max-width: 300px; margin: 12px auto 0; } }
.career-bar { display: flex; border: var(--border); border-radius: 12px; overflow: hidden; margin: 28px 0 40px; min-height: 76px; }
.career-bar div { padding: 10px 10px; border-right: 3px solid var(--line); color: #16121c; font-size: .9375rem; line-height: 1.25; min-width: 0; }
.career-bar div:last-child { border-right: 0; }
.career-bar b { display: block; font-size: .9375rem; overflow-wrap: anywhere; }
.career-bar span { font-family: var(--font-mono); font-size: .8125rem; }
@media (max-width: 900px) { .career-bar { flex-direction: column; } .career-bar div { border-right: 0; border-bottom: 3px solid var(--line); flex: none !important; display: flex; justify-content: space-between; gap: 12px; } .career-bar div:last-child { border-bottom: 0; } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.phase { display: grid; grid-template-columns: 200px 1fr; gap: 28px; }
.phase-when { font-family: var(--font-display); font-size: 1.3rem; color: var(--text); }
.phase-when small { display: block; font-family: var(--font-mono); font-size: .875rem; color: var(--text-muted); margin-top: 6px; }
.phase .panel { box-shadow: 6px 6px 0 -3px var(--c), 6px 6px 0 0 var(--line); }
.role { border-top: 2px dashed var(--line); padding-top: 12px; margin-top: 12px; }
.role h4 { margin: 0; font-size: 1.1rem; }
.role .mono { font-size: .875rem; color: var(--text-muted); }
.role ul { margin: 8px 0 0; padding-left: 22px; }
@media (max-width: 760px) { .phase { grid-template-columns: 1fr; gap: 10px; } }
details.reveal > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.reveal > summary::-webkit-details-marker { display: none; }
details.reveal[open] > summary .when-closed, details.reveal:not([open]) > summary .when-open { display: none; }
.proverbs { list-style: none; counter-reset: pv; margin: 0; padding: 0; display: grid; gap: 18px; }
.proverbs li { counter-increment: pv; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; font-size: clamp(1.15rem, 2vw, 1.45rem); font-style: italic; color: var(--paper-100); }
.proverbs li::before { content: counter(pv); width: 52px; height: 52px; display: grid; place-items: center; font-family: var(--font-display); font-style: normal; color: #16121c; border: 3px solid var(--paper-100); }
.proverbs li:nth-child(1)::before { background: var(--pink); border-radius: 50%; }
.proverbs li:nth-child(2)::before { background: var(--yellow); }
.proverbs li:nth-child(3)::before { background: var(--teal); border-radius: 50% 50% 0 0; }
.proverbs li:nth-child(4)::before { background: #9db0ff; border-radius: 0 50%; }
.proverbs li:nth-child(5)::before { background: var(--orange); border-radius: 12px; transform: rotate(8deg); }
.cap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cap { border: 3px solid var(--paper-100); border-radius: 14px; padding: 22px; }
.cap h3 { color: var(--paper-100); }
.cap p { color: var(--paper-300); }
.cap .chip { background: transparent; color: var(--paper-100); border-color: var(--paper-500); }
@media (max-width: 760px) { .cap-grid { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.beyond li { margin-bottom: 18px; }
.beyond { list-style: none; padding: 0; margin: 0; }
.beyond b { display: block; font-family: var(--font-display); font-weight: 400; color: var(--text); font-size: 1.3rem; }

/* ---------- AI / stories ---------- */
.series-track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .series-track { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); } }
.part-no { position: absolute; top: -18px; left: 18px; z-index: 3; width: 52px; height: 52px; border-radius: 50%; border: var(--border); background: var(--yellow); display: grid; place-items: center; font-family: var(--font-display); color: #16121c; font-size: 1.2rem; }
.card.soon { border-style: dashed; box-shadow: none; background: transparent; }
.card.soon:hover { transform: none; }
.soon .card-media { background: repeating-linear-gradient(45deg, var(--ground-alt) 0 12px, var(--ground) 12px 24px); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; color: var(--text); text-transform: uppercase; border-bottom-style: dashed; }
.notice { border: var(--border); border-radius: 14px; background: color-mix(in srgb, var(--yellow) 30%, var(--surface)); padding: 16px 20px; display: flex; gap: 14px; align-items: flex-start; }
.notice svg { width: 40px; height: 40px; flex: none; }
.notice p { margin: 0; color: var(--text); }

/* ---------- patterns ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); }
.three-ways > div { padding: 24px; border-right: var(--border); }
.three-ways > div:last-child { border-right: 0; }
.three-ways h3 { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; }
.three-ways h3 i { width: 26px; height: 26px; border: 3px solid var(--line); display: inline-block; flex: none; }
.three-ways > div:nth-child(1) h3 i { background: var(--pink); border-radius: 50%; }
.three-ways > div:nth-child(2) h3 i { background: var(--teal); }
.three-ways > div:nth-child(3) h3 i { background: var(--yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; }
.three-ways .tw-foot { grid-column: 1 / -1; border-top: var(--border); background: var(--ground-alt); border-right: 0; }
.three-ways .tw-foot p { margin: 0; color: var(--text); }
@media (max-width: 860px) { .three-ways { grid-template-columns: 1fr; } .three-ways > div { border-right: 0; border-bottom: var(--border); } .three-ways > div:last-child { border-bottom: 0; } }
.toolbar { display: grid; gap: 18px; margin-bottom: 36px; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.count-line { font-family: var(--font-mono); font-weight: 700; color: var(--text); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.select { min-height: 44px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); padding: 6px 14px; font: inherit; font-size: 1rem; }
.search-big { width: 100%; min-height: 60px; font-size: 1.125rem; border-radius: 18px; box-shadow: 6px 6px 0 var(--line); }
.pcard .thumb { aspect-ratio: 16 / 10; border-bottom: var(--border); border-radius: 11px 11px 0 0; position: relative; overflow: hidden; background: var(--ground-alt); }
.thumb::before { content: ""; position: absolute; inset: 0; background-image: var(--squiggle); background-size: 120px; opacity: var(--squiggle-opacity); }
.thumb .t { position: absolute; border: 3px solid var(--line); }
/* category thumbs */
.th-data .t1 { left: 12%; bottom: 14%; width: 11%; height: 40%; background: var(--pink); }
.th-data .t2 { left: 27%; bottom: 14%; width: 11%; height: 62%; background: var(--yellow); }
.th-data .t3 { left: 42%; bottom: 14%; width: 11%; height: 28%; background: var(--teal); }
.th-data .t4 { left: 57%; bottom: 14%; width: 11%; height: 72%; background: var(--blue); }
.th-data .t5 { right: 8%; top: 12%; width: 18%; aspect-ratio: 1; border-radius: 50%; background: var(--c); }
.th-layout .t1 { left: 10%; top: 14%; width: 38%; height: 72%; background: var(--c); border-radius: 10px; }
.th-layout .t2 { left: 54%; top: 14%; width: 36%; height: 32%; background: var(--yellow); border-radius: 10px; }
.th-layout .t3 { left: 54%; top: 54%; width: 36%; height: 32%; background: var(--surface); border-radius: 10px; background-image: repeating-linear-gradient(-45deg, var(--line) 0 3px, transparent 3px 10px); }
.th-inter .t1 { left: 14%; top: 34%; width: 52%; height: 30%; background: var(--c); border-radius: 999px; box-shadow: 6px 6px 0 var(--line); }
.th-inter .t2 { left: 58%; top: 50%; width: 0; height: 0; border: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-bottom: 34px solid var(--line); transform: rotate(-28deg); }
.th-inter .t3 { right: 8%; top: 10%; width: 16%; aspect-ratio: 1; background: var(--pink); transform: rotate(20deg); }
.th-forms .t1 { left: 10%; top: 22%; width: 80%; height: 22%; background: var(--surface); border-radius: 999px; }
.th-forms .t2 { left: 10%; top: 56%; width: 26%; height: 18%; background: var(--c); border-radius: 999px; }
.th-forms .t3 { left: 40%; top: 56%; width: 22%; height: 18%; background: var(--yellow); border-radius: 999px; }
.th-color .t1 { left: 10%; top: 20%; width: 24%; aspect-ratio: 1; background: var(--pink); border-radius: 50%; }
.th-color .t2 { left: 38%; top: 20%; width: 24%; aspect-ratio: 1; background: var(--teal); border-radius: 50%; }
.th-color .t3 { left: 66%; top: 20%; width: 24%; aspect-ratio: 1; background: var(--c); border-radius: 50%; }
.th-color .t4 { left: 10%; bottom: 12%; width: 80%; height: 14%; background: linear-gradient(90deg, var(--yellow), var(--orange), var(--pink), var(--lilac), var(--blue)); }
.pcard .card-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.pcard .good { font-size: 1rem; color: var(--text-body); }
.pcard .good b { color: var(--text); }
.empty { border: 3px dashed var(--line); border-radius: 18px; padding: 48px 24px; text-align: center; }
.empty svg { width: 120px; margin: 0 auto 16px; }
.empty h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; }
[hidden] { display: none !important; }

/* pattern detail */
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--font-mono); font-weight: 700; color: var(--text); text-transform: uppercase; }
.uses { columns: 2; column-gap: 40px; padding-left: 0; list-style: none; }
.uses li { break-inside: avoid; padding-left: 30px; position: relative; margin-bottom: 10px; }
.uses li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border: 2.5px solid var(--line); background: var(--pink); border-radius: 50%; }
.uses li:nth-child(2n)::before { background: var(--yellow); border-radius: 0; }
.uses li:nth-child(3n)::before { background: var(--teal); border-radius: 50% 50% 0 0; }
@media (max-width: 640px) { .uses { columns: 1; } }
.panes { border: var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; box-shadow: 12px 12px 0 -3px var(--lilac), 12px 12px 0 0 var(--line); }
.panes-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 10px; border-bottom: var(--border); background: var(--ground-alt); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { min-height: 44px; padding: 6px 16px; border: 2px solid transparent; border-radius: 999px; background: transparent; color: var(--text); font-family: var(--font-mono); font-weight: 700; font-size: .9375rem; cursor: pointer; }
.tab:hover { border-color: var(--line); }
.tab[aria-selected="true"] { background: var(--pink); color: #16121c; border-color: var(--line); box-shadow: 3px 3px 0 var(--line); }
.pane-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pane { padding: clamp(18px, 3vw, 32px); }
.pane pre { margin: 0; font-family: var(--font-mono); font-size: .95rem; line-height: 1.6; overflow-x: auto; color: var(--text); white-space: pre; }
.pane-note { border: 2px dashed var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 1rem; }
.prompt-text { max-width: 70ch; }
.stage { background: var(--ground); border: 2px solid var(--line); border-radius: 14px; padding: clamp(16px, 3vw, 28px); }
.stage-cap { font-size: 1rem; color: var(--text-muted); margin: 0 0 12px; }
/* hairline stat strip demo */
.hss { display: grid; gap: 3px; background: var(--line); border: 3px solid var(--line); border-radius: 12px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 28px; }
@media (min-width: 21rem) { .hss { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 52rem) { .hss--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hss--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hss > * { background: var(--surface); padding: 14px 16px; min-width: 0; }
.hss .lbl { display: block; font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.hss .fig { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.hss .fig.none { color: var(--text-muted); }
.hss .sub { display: block; font-size: .9375rem; color: var(--text-body); }
.hss button { border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.hss button:hover { background: var(--ground-alt); }
.hss button[aria-pressed="true"] { background: var(--yellow); }
.hss button[aria-pressed="true"] .lbl, .hss button[aria-pressed="true"] .fig, .hss button[aria-pressed="true"] .sub { color: #16121c; }
.hss button:focus-visible { outline-offset: -5px; }
.dl-list { list-style: none; margin: 0; padding: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.dl-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 2px solid var(--line); background: var(--surface); color: var(--text); flex-wrap: wrap; }
.dl-list li:last-child { border-bottom: 0; }
.dl-list .st { font-family: var(--font-mono); font-size: .875rem; border: 2px solid var(--line); padding: 0 8px; border-radius: 999px; color: #16121c; }
.st-Done { background: var(--teal); } .st-Queued { background: var(--lilac); } .st-Downloading { background: var(--yellow); } .st-Failed { background: var(--orange); }
.status-line { font-family: var(--font-mono); font-size: .9375rem; color: var(--text); margin-top: 12px; }

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

/* fix pass */
.prose > :first-child { margin-top: 0; }
.art-hero .tilt-frame { aspect-ratio: 16 / 9; }
.toc .link-quiet { padding: 0; }
@media (max-width: 700px) {
  .hero .confetti, .page-hero .confetti, .art-hero .confetti { display: none; }
  .callout { padding: 64px 18px 18px; }
  .callout::before { top: 12px; left: 16px; }
  .sec-head h2 svg { width: 36px; height: 36px; }
}

/* UI pattern library article */
.prose .prose-fig { margin: 32px 0; transform: rotate(-1deg); border: var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: 10px 10px 0 -3px var(--pink), 10px 10px 0 0 var(--line); }
.prose .prose-fig img { height: auto; object-fit: contain; display: block; }
.prose .callout p + p { margin-top: .8em; }
.prose .live-pattern a.btn { white-space: normal; text-decoration: none; }
.prose p code { overflow-wrap: anywhere; }
