/* Bauhaus Revival — antjanus.com
   Kandinsky key (1923): yellow triangle = AI, red square = writing, blue circle = projects.
   The shape decides the color, and the same shape keeps that color everywhere. */

:root {
  --red-500: #c62b1d;
  --red-300: #ff6a55;
  --yellow-400: #f2b705;
  --blue-600: #1d4aa0;
  --blue-300: #86adff;
  --black-900: #141414;
  --black-800: #1f1f1f;
  --black-700: #2b2b2b;
  --cream-100: #f4eee2;
  --cream-200: #e9e1cf;
  --paper-50: #fbf8f1;
  --grey-600: #4d4a44;
  --grey-300: #b9b3a6;

  --ground: var(--cream-100);
  --surface: var(--paper-50);
  --surface-2: var(--cream-200);
  --ink: var(--black-900);
  --ink-soft: var(--grey-600);
  --rule: var(--black-900);
  --red: var(--red-500);
  --blue: var(--blue-600);
  --yellow: var(--yellow-400);
  --red-text: var(--red-500);
  --blue-text: var(--blue-600);
  --on-color: #ffffff;
  --code-bg: var(--black-900);
  --code-ink: #f4eee2;
  --focus: var(--blue-600);

  --font-display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-body: "Jost", "Futura", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --bar: 6px;
  --rule-w: 3px;
  --max: 1320px;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ground: var(--black-900);
  --surface: var(--black-800);
  --surface-2: var(--black-700);
  --ink: var(--cream-100);
  --ink-soft: var(--grey-300);
  --rule: var(--cream-100);
  --red-text: var(--red-300);
  --blue-text: var(--blue-300);
  --code-bg: #0b0b0b;
  --focus: var(--yellow-400);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: var(--black-900);
    --surface: var(--black-800);
    --surface-2: var(--black-700);
    --ink: var(--cream-100);
    --ink-soft: var(--grey-300);
    --rule: var(--cream-100);
    --red-text: var(--red-300);
    --blue-text: var(--blue-300);
    --code-bg: #0b0b0b;
    --focus: var(--yellow-400);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
code, kbd, pre { font-family: var(--font-mono); }
p code, li code { font-size: .92em; background: var(--surface-2); padding: .1em .35em; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; margin: 0; font-weight: 800; letter-spacing: -.02em; }
.lc { text-transform: lowercase; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: #141414; padding: .75rem 1rem; z-index: 100; font-weight: 700; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- shapes ---------- */
.shape { display: inline-block; flex: none; width: 1em; height: 1em; }
.shape.circle { background: var(--blue); border-radius: 50%; }
.shape.square { background: var(--red); }
.shape.triangle { background: var(--yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.shape.half { background: var(--ink); border-radius: 1em 1em 0 0; height: .5em; margin-top: .5em; }
.shape.ring { border: .18em solid var(--ink); border-radius: 50%; }

/* ---------- header / nav ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--ground);
  border-bottom: var(--bar) solid var(--rule);
}
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.03em; }
.brand:hover { color: inherit; }
.brand svg { width: 44px; height: 44px; flex: none; }
.brand small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); line-height: 1; }
.brand span { line-height: 1.05; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav a {
  display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .85rem;
  text-decoration: none; font-weight: 600; font-size: 1.0625rem; text-transform: lowercase;
  border: var(--rule-w) solid transparent;
}
.nav a .shape { font-size: .75rem; }
.nav a:hover { border-color: var(--rule); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--ground); }
.nav a[aria-current="page"] .shape.half { background: var(--ground); }
.nav a.nav-ai { background: var(--yellow); color: #141414; }
.nav a.nav-ai .shape.triangle { background: #141414; }
.nav a.nav-ai[aria-current="page"] { outline: var(--rule-w) solid var(--ink); outline-offset: 2px; }
.theme-btn, .menu-btn {
  width: 48px; height: 48px; border: var(--rule-w) solid var(--rule); background: var(--surface);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.theme-btn svg { width: 26px; height: 26px; }
.theme-btn:hover, .menu-btn:hover { background: var(--yellow); color: #141414; }
.menu-btn { display: none; }
.menu-btn span { display: block; width: 22px; height: 3px; background: currentColor; box-shadow: 0 7px 0 currentColor, 0 -7px 0 currentColor; }

@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .site-head .wrap { flex-wrap: wrap; gap: .75rem; }
  .brand { margin-right: auto; }
  .nav { order: 3; width: 100%; flex-direction: column; align-items: stretch; margin: 0 0 1rem; display: none; border-top: var(--rule-w) solid var(--rule); padding-top: .5rem; }
  .nav.open { display: flex; }
  .nav a { font-size: 1.25rem; min-height: 52px; }
}

/* ---------- common blocks ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: .875rem; letter-spacing: .12em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .6rem; color: var(--ink-soft);
}
.eyebrow .shape { font-size: .8rem; }
.section { padding: clamp(3rem, 7vw, 6rem) 0; border-bottom: var(--rule-w) solid var(--rule); }
.section-head { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: end; margin-bottom: 2.5rem; }
.section-head .num { font-family: var(--font-mono); font-size: 1rem; align-self: start; padding-top: .5rem; }
.section-head h2 { font-size: clamp(2.5rem, 6vw, 4.75rem); text-transform: lowercase; }
.section-head p { margin: .5rem 0 0; color: var(--ink-soft); font-size: 1.1875rem; }
.section-head .more { font-weight: 700; text-decoration: none; border-bottom: var(--rule-w) solid currentColor; white-space: nowrap; }
@media (max-width: 700px) {
  .section-head { grid-template-columns: 1fr; gap: .5rem; }
}

.btn {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 52px; padding: .75rem 1.4rem;
  font: 700 1.0625rem/1 var(--font-body); text-decoration: none; text-transform: lowercase;
  border: var(--rule-w) solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer;
  box-shadow: 5px 5px 0 var(--rule); transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--rule); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--rule); }
.btn.red { background: var(--red); color: var(--on-color); border-color: var(--rule); }
.btn.blue { background: var(--blue); color: var(--on-color); }
.btn.yellow { background: var(--yellow); color: #141414; }
.btn.ghost { box-shadow: none; background: transparent; }
.btn.ghost:hover { transform: none; background: var(--surface-2); }

.tag {
  display: inline-block; font-family: var(--font-mono); font-size: .875rem; padding: .2rem .55rem;
  border: 2px solid var(--rule); text-decoration: none; line-height: 1.4;
}
a.tag:hover { background: var(--ink); color: var(--ground); }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; list-style: none; }

.meta { font-family: var(--font-mono); font-size: .875rem; color: var(--ink-soft); letter-spacing: .04em; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 0; border-top: var(--rule-w) solid var(--rule); border-left: var(--rule-w) solid var(--rule); }
.grid > * { border-right: var(--rule-w) solid var(--rule); border-bottom: var(--rule-w) solid var(--rule); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

.card { position: relative; background: var(--surface); display: flex; flex-direction: column; }
.card .media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); border-bottom: var(--rule-w) solid var(--rule); }
.card .media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); transition: filter .2s ease; }
.card .media::after { content: ""; position: absolute; inset: 0; background: var(--card-tint, var(--red)); mix-blend-mode: multiply; opacity: .55; transition: opacity .2s ease; pointer-events: none; }
.card:hover .media img, .card:focus-within .media img { filter: none; }
.card:hover .media::after, .card:focus-within .media::after { opacity: 0; }
.card .body { padding: 1.5rem 1.5rem 1.75rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.card h3 { font-size: 1.625rem; line-height: 1.12; letter-spacing: -.015em; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card p { margin: 0; color: var(--ink-soft); }
.card .corner { position: absolute; top: 0; right: 0; width: 2.75rem; height: 2.75rem; padding: .55rem; background: #141414; z-index: 2; }
.card .corner .shape.half { background: #f4eee2; }
.card .corner .shape { width: 100%; height: 100%; }
.card .tags { position: relative; z-index: 2; margin-top: auto; padding-top: .5rem; }
.card.is-ai { --card-tint: var(--yellow); }
.card.is-writing { --card-tint: var(--red); }
.card.is-project { --card-tint: var(--blue); }
.card.is-tools { --card-tint: #141414; }
.card:hover { background: var(--surface-2); }

.ph { position: absolute; inset: 0; display: grid; place-items: center; background: var(--surface-2); }
.ph svg { width: 60%; height: 80%; }

.filler { background: repeating-linear-gradient(45deg, var(--surface-2) 0 14px, var(--ground) 14px 28px); }
@media (max-width: 1080px) { .filler { display: none; } }

/* list rows */
.rows { list-style: none; margin: 0; padding: 0; border-top: var(--rule-w) solid var(--rule); }
.rows li { border-bottom: var(--rule-w) solid var(--rule); }
.row { display: grid; grid-template-columns: 8.5rem 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.25rem .25rem; text-decoration: none; }
.row:hover { background: var(--surface); color: var(--ink); }
.row h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; }
.row p { margin: .3rem 0 0; color: var(--ink-soft); }
.row .kind { display: flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-size: .875rem; }
@media (max-width: 680px) {
  .row { grid-template-columns: 1fr; gap: .35rem; }
}

/* ---------- home hero ---------- */
.hero { border-bottom: var(--bar) solid var(--rule); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: 0; min-height: min(78vh, 760px); }
.hero-copy { padding: clamp(2.5rem, 6vw, 5rem) clamp(0rem, 3vw, 3rem) clamp(2.5rem, 6vw, 5rem) 0; display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(3rem, 8.2vw, 7.5rem); line-height: .92; letter-spacing: -.045em; text-transform: lowercase; }
.hero h1 em { font-style: normal; color: var(--red-text); }
.hero h1 .u { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: .14em; text-underline-offset: .06em; text-decoration-skip-ink: none; }
.hero .sub { font-size: 1.3125rem; max-width: 36ch; margin: 0; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: center; }
.hero .tertiary { font-weight: 600; color: var(--ink-soft); }
.hero-art { position: relative; border-left: var(--bar) solid var(--rule); }
.hero-art .bg-red { position: absolute; inset: 0 0 45% 0; background: var(--red); }
.hero-art .bg-yellow { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: var(--yellow); border-top: var(--bar) solid var(--rule); }
.hero-art .portrait {
  position: absolute; width: min(78%, 420px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  left: 50%; top: 46%; transform: translate(-50%, -50%); border: var(--bar) solid var(--rule); background: var(--blue);
}
.hero-art .portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; filter: grayscale(1) contrast(1.15); mix-blend-mode: luminosity; }
.hero-art .tri { position: absolute; right: 8%; bottom: 7%; width: 26%; aspect-ratio: 1; background: #141414; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.hero-art .bar { position: absolute; left: -2%; top: 12%; width: 55%; height: 22px; background: #141414; transform: rotate(-24deg); transform-origin: left; }
.hero-art .dot { position: absolute; left: 10%; bottom: 10%; width: 14%; aspect-ratio: 1; border-radius: 50%; background: var(--blue); border: 4px solid #141414; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--rule-w) solid var(--rule); max-width: 40rem; }
.stat { padding: 1rem 1rem 0 0; display: flex; gap: .75rem; align-items: flex-start; }
.stat + .stat { padding-left: 1rem; border-left: var(--rule-w) solid var(--rule); }
.stat .shape { font-size: 1.1rem; margin-top: .45rem; }
.stat b { display: block; font-size: 2.25rem; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.stat span { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 0; }
  .hero-copy { padding: 2.5rem var(--gutter); }
  .hero-art { border-left: 0; border-top: var(--bar) solid var(--rule); min-height: 400px; order: -1; }
  .hero-art .portrait { width: min(62%, 300px); }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 2px solid var(--rule); }
  .stat { padding: .75rem 0; }
}

/* key legend strip */
.legend { background: var(--ink); color: var(--ground); }
.legend .wrap { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; padding-top: 1rem; padding-bottom: 1rem; align-items: center; font-family: var(--font-mono); font-size: .9375rem; }
.legend a { text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; }
.legend a:hover { color: var(--yellow); }
.legend .shape.half { background: var(--ground); }

/* shelf: start here */
.shelf { display: grid; grid-template-columns: 1.3fr 1fr 1fr; }
@media (max-width: 1000px) { .shelf { grid-template-columns: 1fr; } }
.shelf .card:first-child h3 { font-size: 2.125rem; }

/* experiments (four shape tiles) */
.shape-tiles .tile { background: var(--surface); padding: 1.75rem 1.5rem; position: relative; display: flex; flex-direction: column; gap: .75rem; min-height: 280px; }
.shape-tiles .tile .big { font-size: 4.5rem; }
.shape-tiles .tile h3 { font-size: 1.5rem; }
.shape-tiles .tile h3 a { text-decoration: none; }
.shape-tiles .tile h3 a::after { content: ""; position: absolute; inset: 0; }
.shape-tiles .tile p { margin: 0; color: var(--ink-soft); }
.shape-tiles .tile:hover { background: var(--surface-2); }
.shape-tiles .tile .meta { margin-top: auto; }

/* bottom trio */
.trio { display: grid; grid-template-columns: 1fr 1fr 1.2fr; }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; } }
.trio > div { padding: 2rem 1.75rem; background: var(--surface); }
.trio h3 { font-size: 1.75rem; margin-bottom: 1rem; text-transform: lowercase; display: flex; align-items: center; gap: .6rem; }
.trio h3 .shape { font-size: 1rem; }
.linklist { list-style: none; padding: 0; margin: 0; }
.linklist li { border-top: 2px solid var(--rule); }
.linklist a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; text-decoration: none; font-weight: 600; min-height: 44px; }
.linklist a span { font-family: var(--font-mono); font-weight: 400; font-size: .875rem; color: var(--ink-soft); }
.trio .work { background: var(--blue); color: #fff; }
.trio .work p { font-size: 1.25rem; }
.trio .work .btn { background: var(--yellow); color: #141414; border-color: #141414; box-shadow: 5px 5px 0 #141414; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { border-bottom: var(--bar) solid var(--rule); overflow: hidden; }
.page-hero .wrap { display: grid; grid-template-columns: 1fr minmax(260px, 38%); min-height: 420px; }
.page-hero .copy { padding: clamp(2.5rem, 6vw, 4.5rem) 2rem clamp(2.5rem, 6vw, 4.5rem) 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.25rem; }
.page-hero h1 { font-size: clamp(3.25rem, 9vw, 8.5rem); line-height: .88; letter-spacing: -.05em; text-transform: lowercase; }
.page-hero .lede { font-size: 1.375rem; line-height: 1.45; max-width: 42ch; margin: 0; }
.page-hero .art { position: relative; border-left: var(--bar) solid var(--rule); min-height: 300px; }
.page-hero .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.page-hero .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.2); }
.page-hero .art .tint { position: absolute; inset: 0; mix-blend-mode: multiply; }
@media (max-width: 820px) {
  .page-hero .wrap { grid-template-columns: 1fr; padding: 0; }
  .page-hero .copy { padding: 2.25rem var(--gutter); }
  .page-hero .art { border-left: 0; border-top: var(--bar) solid var(--rule); min-height: 240px; order: -1; }
}

/* jump bar */
.jump { position: sticky; top: calc(4.5rem + var(--bar)); z-index: 40; background: var(--ground); border-bottom: var(--rule-w) solid var(--rule); }
.jump .wrap { display: flex; gap: .5rem; overflow-x: auto; padding-top: .6rem; padding-bottom: .6rem; scrollbar-width: thin; }
.jump a { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; text-decoration: none; font-weight: 600; min-height: 44px; padding: 0 .9rem; border: 2px solid var(--rule); }
.jump a:hover { background: var(--ink); color: var(--ground); }
.jump a .shape { font-size: .7rem; }
.jump a .shape.half { background: currentColor; }
@media (max-width: 960px) { .jump { position: static; } }

/* ---------- projects ---------- */
.feature { display: grid; grid-template-columns: 1.1fr 1fr; border: var(--bar) solid var(--rule); background: var(--surface); }
.feature .img { position: relative; min-height: 340px; border-right: var(--bar) solid var(--rule); background: var(--blue); overflow: hidden; }
.feature .img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: luminosity; }
.feature .txt { padding: 2.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.feature h3 { font-size: clamp(2.25rem, 4vw, 3.5rem); text-transform: lowercase; }
.feature p { margin: 0; }
.bignums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--rule-w) solid var(--rule); }
.bignums div { padding: 1rem 0; }
.bignums div + div { border-left: var(--rule-w) solid var(--rule); padding-left: 1rem; }
.bignums b { display: block; font-size: clamp(1.75rem, 7vw, 3rem); line-height: 1; font-weight: 800; }
.bignums span { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature .img { border-right: 0; border-bottom: var(--bar) solid var(--rule); min-height: 220px; }
  .feature .txt { padding: 1.5rem; }
}

.oss { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0; border-top: var(--rule-w) solid var(--rule); }
.oss-item { grid-column: span 12; display: grid; grid-template-columns: 5fr 7fr; border-bottom: var(--rule-w) solid var(--rule); }
.oss-item:nth-child(even) { grid-template-columns: 7fr 5fr; }
.oss-item:nth-child(even) .oss-img { order: 2; border-right: 0; border-left: var(--rule-w) solid var(--rule); }
.oss-img { position: relative; min-height: 280px; border-right: var(--rule-w) solid var(--rule); background: #141414; overflow: hidden; }
.oss-img img { width: 100%; height: 100%; object-fit: cover; }
.oss-img .stamp { position: absolute; top: 1rem; left: 1rem; width: 3rem; height: 3rem; }
.oss-txt { padding: 2rem 2rem 2rem 2rem; display: flex; flex-direction: column; gap: .8rem; background: var(--surface); }
.oss-txt h3 { font-size: 2.25rem; text-transform: lowercase; }
.oss-txt h3 a { text-decoration: none; }
.oss-txt p { margin: 0; }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 3rem; border-top: var(--rule-w) solid var(--rule); border-left: var(--rule-w) solid var(--rule); }
@media (max-width: 860px) {
  .oss-item, .oss-item:nth-child(even) { grid-template-columns: 1fr; }
  .oss-item:nth-child(even) .oss-img { order: 0; border-left: 0; }
  .oss-img { border-right: 0; border-bottom: var(--rule-w) solid var(--rule); min-height: 220px; }
  .oss-txt { padding: 1.5rem; }
}
.stars { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .9375rem; font-weight: 500; }

/* ---------- about ---------- */
.about-hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 560px; }
.about-hero .art { position: relative; background: var(--yellow); border-left: var(--bar) solid var(--rule); overflow: hidden; }
.about-hero .art .sq { position: absolute; right: 0; top: 0; width: 55%; height: 55%; background: var(--red); border-left: var(--bar) solid #141414; border-bottom: var(--bar) solid #141414; }
.about-hero .art .circ { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: min(76%, 400px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: var(--bar) solid #141414; background: var(--blue); }
.about-hero .art .circ img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); }
.about-hero .copy { padding: 4rem 3rem 4rem 0; display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.about-hero h1 { font-size: clamp(3.25rem, 8vw, 7rem); line-height: .9; letter-spacing: -.05em; text-transform: lowercase; }
@media (max-width: 860px) {
  .about-hero .wrap { grid-template-columns: 1fr; padding: 0; }
  .about-hero .art { border-left: 0; border-bottom: var(--bar) solid var(--rule); min-height: 380px; order: -1; }
  .about-hero .copy { padding: 2.25rem var(--gutter); }
}
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1.25rem; }
.two-col { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.shape-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: var(--rule-w) solid var(--rule); }
.shape-stats > div { padding: 1.75rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; background: var(--surface); position: relative; overflow: hidden; min-height: 190px; }
.shape-stats > div + div { border-left: var(--rule-w) solid var(--rule); }
.shape-stats b { font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; font-weight: 800; letter-spacing: -.04em; position: relative; z-index: 1; }
.shape-stats span { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; position: relative; z-index: 1; }
.shape-stats .bgshape { position: absolute; right: 1rem; top: 1rem; font-size: 1.5rem; line-height: 0; }
.shape-stats .bgshape .shape { font-size: inherit; }
@media (max-width: 700px) {
  .shape-stats { grid-template-columns: 1fr; }
  .shape-stats > div + div { border-left: 0; border-top: var(--rule-w) solid var(--rule); }
}

.career { display: flex; border: var(--rule-w) solid var(--rule); margin: 1.5rem 0 2.5rem; min-height: 96px; }
.career div { padding: .65rem .6rem; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; font-size: .9375rem; font-weight: 700; line-height: 1.15; }
.career div + div { border-left: var(--rule-w) solid var(--rule); }
.career div span { font-family: var(--font-mono); font-weight: 400; font-size: .8125rem; }
.career .c-red { background: var(--red); color: #fff; }
.career .c-blue { background: var(--blue); color: #fff; }
.career .c-yellow { background: var(--yellow); color: #141414; }
.career .c-black { background: #141414; color: #f4eee2; }
.career .c-paper { background: var(--surface); }
@media (max-width: 900px) {
  .career { flex-direction: column; }
  .career div { flex: none !important; flex-direction: row; gap: 1rem; padding: .7rem 1rem; }
  .career div + div { border-left: 0; border-top: var(--rule-w) solid var(--rule); }
}
details.history > summary { list-style: none; cursor: pointer; }
details.history > summary::-webkit-details-marker { display: none; }
details.history[open] .show-label::before { content: "hide"; }
details.history:not([open]) .show-label::before { content: "show"; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--rule-w) solid var(--rule); border-left: var(--rule-w) solid var(--rule); }
.phase { border-right: var(--rule-w) solid var(--rule); border-bottom: var(--rule-w) solid var(--rule); padding: 1.5rem; background: var(--surface); display: flex; flex-direction: column; gap: .75rem; }
.phase h3 { font-size: 1.5rem; text-transform: lowercase; }
.phase p { margin: 0; color: var(--ink-soft); }
.phase ul { margin: 0; padding: 0; list-style: none; }
.phase li { border-top: 2px solid var(--rule); padding: .55rem 0; font-size: 1rem; }
.phase li b { display: block; }
@media (max-width: 1000px) { .phases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .phases { grid-template-columns: 1fr; } }

.principles { background: #141414; color: #f4eee2; }
.principles .section-head p { color: #b9b3a6; }
.principles ol { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.principles li { counter-increment: p; display: grid; grid-template-columns: 5rem 1fr; gap: 1.5rem; align-items: center; padding: 1.4rem 0; border-top: 3px solid #f4eee2; font-size: clamp(1.5rem, 3.2vw, 2.5rem); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }
.principles li::before { content: counter(p, decimal-leading-zero); font-family: var(--font-mono); font-size: 1rem; font-weight: 400; color: var(--yellow); }
.principles li:nth-child(3n+1) .mark { color: var(--red-300); }
.principles a { color: var(--yellow); }
.principles .section-head .more { color: var(--yellow); }

.beyond { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: var(--rule-w) solid var(--rule); }
.beyond .photo { position: relative; min-height: 420px; border-right: var(--rule-w) solid var(--rule); background: var(--red); overflow: hidden; }
.beyond .photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); mix-blend-mode: multiply; }
.beyond ul { list-style: none; margin: 0; padding: 0; background: var(--surface); }
.beyond li { padding: 1.75rem; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; }
.beyond li + li { border-top: var(--rule-w) solid var(--rule); }
.beyond li .shape { font-size: 2rem; margin-top: .2rem; }
.beyond h3 { font-size: 1.5rem; margin-bottom: .35rem; text-transform: lowercase; }
.beyond p { margin: 0; color: var(--ink-soft); }
@media (max-width: 820px) {
  .beyond { grid-template-columns: 1fr; }
  .beyond .photo { border-right: 0; border-bottom: var(--rule-w) solid var(--rule); min-height: 300px; }
}
.caps .cap { background: var(--surface); padding: 1.75rem; display: flex; flex-direction: column; gap: .75rem; }
.caps .cap h3 { font-size: 1.625rem; text-transform: lowercase; display: flex; align-items: center; gap: .6rem; }
.caps .cap h3 .shape { font-size: .9rem; }
.caps .cap p { margin: 0; color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: .5rem 0 0; padding: 0; }
.chips li { font-size: 1rem; font-weight: 600; padding: .3rem .65rem; background: var(--surface-2); }

/* ---------- AI page ---------- */
.consult { background: var(--yellow); color: #141414; border-bottom: var(--rule-w) solid var(--rule); }
.consult .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.consult p { margin: 0; font-size: 1.3125rem; font-weight: 600; max-width: 48ch; }
.consult .btn { background: #141414; color: #f4eee2; border-color: #141414; box-shadow: 5px 5px 0 var(--red); }
.consult .btn:hover { color: #f4eee2; }

.series { display: grid; grid-template-columns: repeat(5, 1fr); border-top: var(--rule-w) solid var(--rule); border-left: var(--rule-w) solid var(--rule); counter-reset: part; }
.part { border-right: var(--rule-w) solid var(--rule); border-bottom: var(--rule-w) solid var(--rule); background: var(--surface); position: relative; display: flex; flex-direction: column; }
.part .art { aspect-ratio: 1; position: relative; border-bottom: var(--rule-w) solid var(--rule); overflow: hidden; background: var(--blue); }
.part .art img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15); mix-blend-mode: luminosity; }
.part .no { position: absolute; left: 0; top: 0; background: #141414; color: #f4eee2; font-family: var(--font-mono); padding: .35rem .6rem; font-size: .9375rem; z-index: 1; }
.part .txt { padding: 1.25rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.part h3 { font-size: 1.375rem; line-height: 1.12; }
.part h3 a { text-decoration: none; }
.part h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.part p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.part.soon { background: repeating-linear-gradient(-45deg, var(--surface), var(--surface) 12px, var(--surface-2) 12px, var(--surface-2) 24px); }
.part.soon .art { background: var(--surface-2); display: grid; place-items: center; }
.part.soon .art .shape { font-size: 5rem; opacity: .9; }
@media (max-width: 1100px) { .series { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .series { grid-template-columns: 1fr; } .part .art { aspect-ratio: 16/9; } }
.notice { border: var(--rule-w) solid var(--rule); border-left: 16px solid var(--yellow); background: var(--surface); padding: 1rem 1.25rem; margin-bottom: 2rem; max-width: 60rem; }
.notice p { margin: 0; }

/* ---------- writing ---------- */
.discover { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: var(--rule-w) solid var(--rule); }
.discover > div { padding: 2rem; background: var(--surface); }
.discover > div + div { border-left: var(--rule-w) solid var(--rule); background: var(--surface-2); }
.discover h3 { font-size: 2rem; text-transform: lowercase; display: flex; gap: .6rem; align-items: center; }
.discover .sub { margin: .25rem 0 1.25rem; color: var(--ink-soft); }
.discover ol { margin: 0; padding: 0; list-style: none; counter-reset: d; }
.discover li { counter-increment: d; border-top: 2px solid var(--rule); }
.discover li a { display: grid; grid-template-columns: 2.5rem 1fr; gap: .75rem; padding: 1rem 0; text-decoration: none; font-weight: 700; font-size: 1.25rem; line-height: 1.25; }
.discover li a::before { content: counter(d, decimal-leading-zero); font-family: var(--font-mono); font-weight: 400; font-size: 1rem; color: var(--red-text); padding-top: .15rem; }
@media (max-width: 760px) { .discover { grid-template-columns: 1fr; } .discover > div + div { border-left: 0; border-top: var(--rule-w) solid var(--rule); } }
.tagcloud { display: flex; flex-wrap: wrap; gap: .6rem; }
.tagcloud a { text-decoration: none; font-weight: 700; padding: .35rem .8rem; border: var(--rule-w) solid var(--rule); display: inline-flex; gap: .45rem; align-items: baseline; min-height: 44px; align-items: center; }
.tagcloud a span { font-family: var(--font-mono); font-weight: 400; font-size: .875rem; color: var(--ink-soft); }
.tagcloud a:hover { background: var(--red); color: #fff; }
.tagcloud a:hover span { color: #fff; }
.tagcloud a.xl { font-size: 1.5rem; }
.tagcloud a.lg { font-size: 1.25rem; }

/* ---------- article ---------- */
.progress { position: fixed; top: 0; left: 0; height: 6px; width: 0; background: var(--red); z-index: 60; }
.art-hero { border-bottom: var(--bar) solid var(--rule); }
.art-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
.art-hero .copy { padding: 3.5rem 3rem 3rem 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.25rem; }
.art-hero h1 { font-size: clamp(2.75rem, 6.2vw, 5.75rem); line-height: .93; letter-spacing: -.045em; text-transform: lowercase; }
.art-hero .lede { font-size: 1.375rem; margin: 0; max-width: 34ch; }
.art-hero .crumb { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; text-decoration: none; text-transform: lowercase; background: var(--red); color: #fff; padding: .35rem .8rem; align-self: flex-start; min-height: 44px; }
.art-hero .crumb:hover { background: var(--ink); color: var(--ground); }
.art-hero .art { position: relative; border-left: var(--bar) solid var(--rule); background: var(--red); overflow: hidden; }
.art-hero .art .sq { position: absolute; left: 8%; top: 14%; width: 74%; border: var(--bar) solid #141414; overflow: hidden; background: var(--blue); }
.art-hero .art .sq img { width: 100%; height: auto; }
.art-hero .art .c { position: absolute; right: 6%; bottom: 8%; width: 30%; aspect-ratio: 1; border-radius: 50%; background: var(--yellow); border: var(--bar) solid #141414; }
.art-hero .art .b { position: absolute; left: 0; right: 0; bottom: 20%; height: 18px; background: #141414; }
@media (max-width: 900px) {
  .art-hero .wrap { grid-template-columns: 1fr; padding: 0; }
  .art-hero .copy { padding: 2rem var(--gutter) 2.5rem; }
  .art-hero .art { border-left: 0; border-bottom: var(--bar) solid var(--rule); min-height: 340px; order: -1; }
}
.metarow { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-family: var(--font-mono); font-size: .9375rem; text-transform: uppercase; letter-spacing: .06em; }
.metarow span { display: inline-flex; gap: .45rem; align-items: center; }

.art-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding-top: 3.5rem; padding-bottom: 4rem; }
.toc { position: sticky; top: 7rem; align-self: start; }
.toc h2 { font-family: var(--font-mono); font-size: .875rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; padding-bottom: .6rem; border-bottom: var(--rule-w) solid var(--rule); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; border-bottom: 2px solid var(--rule); }
.toc ol a { display: grid; grid-template-columns: 2rem 1fr; gap: .5rem; padding: .7rem 0; text-decoration: none; font-weight: 600; line-height: 1.3; font-size: 1.0625rem; }
.toc ol a::before { content: counter(t, decimal-leading-zero); font-family: var(--font-mono); font-weight: 400; font-size: .875rem; padding-top: .15rem; }
.toc ol a.active { color: var(--red-text); }
.toc ol a.active::before { content: ""; width: .9rem; height: .9rem; background: var(--red); margin-top: .3rem; }
.toc .aside-actions { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
details.toc-mobile { display: none; border: var(--rule-w) solid var(--rule); margin-bottom: 2rem; background: var(--surface); }
details.toc-mobile summary { padding: .9rem 1rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; cursor: pointer; min-height: 44px; }
details.toc-mobile ol { margin: 0; padding: 0 1rem 1rem 2.25rem; }
details.toc-mobile li { padding: .35rem 0; }
@media (max-width: 1080px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  details.toc-mobile { display: block; }
}

.article { font-size: 1.1875rem; line-height: 1.7; max-width: 44rem; }
.article > p { margin: 0 0 1.4rem; }
.article h2 { font-size: clamp(2rem, 4vw, 3rem); text-transform: lowercase; margin: 3.5rem 0 1.25rem; padding-top: 1rem; border-top: var(--bar) solid var(--rule); display: flex; gap: .9rem; align-items: baseline; }
.article h2 .n { font-family: var(--font-mono); font-size: 1rem; font-weight: 400; color: var(--red-text); letter-spacing: 0; }
.article ol, .article ul { padding-left: 0; margin: 0 0 1.5rem; list-style: none; counter-reset: li; }
.article ol li { counter-increment: li; display: grid; grid-template-columns: 2.5rem 1fr; padding: .35rem 0; }
.article ol li::before { content: counter(li); font-weight: 800; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; background: var(--ink); color: var(--ground); font-size: .95rem; margin-top: .15rem; }
.article a { color: var(--blue-text); }
.article a:hover { color: var(--red-text); }
.article em { font-style: italic; }

.callout { position: relative; margin: 2rem 0; padding: 1.25rem 1.5rem 1.25rem 4.5rem; border: var(--rule-w) solid var(--rule); background: var(--surface); }
.callout p { margin: 0; }
.callout .ico { position: absolute; left: 1.25rem; top: 1.35rem; font-size: 1.9rem; }
.callout .label { display: block; font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .3rem; }
@media (max-width: 560px) { .callout { padding: 3.75rem 1.1rem 1.1rem; } .callout .ico { top: 1rem; left: 1.1rem; } }
.callout.why { border-left: 14px solid var(--yellow); }
.callout.ask { border-left: 14px solid var(--blue); background: var(--surface-2); }
.callout.note { border-left: 14px solid var(--red); }
.callout.skill { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.callout.skill a { color: var(--yellow); }
.callout.skill code { background: rgba(255,255,255,.12); color: inherit; }

.code { margin: 2rem 0 2.25rem; border: var(--rule-w) solid var(--rule); background: var(--code-bg); color: var(--code-ink); width: min(100%, 52rem); }
.code .bar { display: flex; align-items: center; justify-content: space-between; border-bottom: var(--rule-w) solid var(--rule); background: var(--ground); color: var(--ink); }
.code .lang { display: flex; align-items: center; gap: .55rem; font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; padding: 0 1rem; }
.code .lang::before { content: ""; width: .9rem; height: .9rem; background: var(--yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.copy-btn { min-height: 44px; min-width: 6rem; border: 0; border-left: var(--rule-w) solid var(--rule); background: var(--surface); color: var(--ink); font: 600 1rem var(--font-body); cursor: pointer; padding: 0 1rem; text-transform: lowercase; }
.copy-btn:hover { background: var(--yellow); color: #141414; }
.copy-btn.done { background: var(--blue); color: #fff; }
.code pre { margin: 0; padding: 1.25rem 1.25rem; overflow-x: auto; font-size: .95rem; line-height: 1.6; tab-size: 2; }
.tk-k { color: #ff8a78; }
.tk-s { color: #f2c94c; }
.tk-c { color: #a8a293; font-style: italic; }
.tk-t { color: #9dbcff; }

.article-end { border-top: var(--bar) solid var(--rule); padding-top: 2rem; margin-top: 3rem; display: flex; flex-direction: column; gap: 1.75rem; max-width: 44rem; }
.share { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.share b { font-family: var(--font-mono); font-weight: 400; text-transform: uppercase; letter-spacing: .1em; font-size: .875rem; margin-right: .5rem; }

.newsletter { background: var(--blue); color: #fff; border: var(--bar) solid var(--rule); position: relative; overflow: hidden; }
.newsletter .inner { padding: clamp(1.75rem, 4vw, 3rem); position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; }
.newsletter h2 { font-size: clamp(2rem, 4vw, 3rem); text-transform: lowercase; }
.newsletter p { margin: .6rem 0 0; font-size: 1.1875rem; }
.newsletter form { display: flex; flex-direction: column; gap: .75rem; }
.newsletter .fieldrow { display: flex; gap: 0; }
.newsletter input[type="email"] { flex: 1; min-width: 0; min-height: 56px; padding: 0 1rem; font: 500 1.125rem var(--font-body); border: var(--rule-w) solid #141414; background: #fbf8f1; color: #141414; }
.newsletter input::placeholder { color: #5f5a50; }
.newsletter button { min-height: 56px; padding: 0 1.4rem; border: var(--rule-w) solid #141414; border-left: 0; background: var(--yellow); color: #141414; font: 700 1.0625rem var(--font-body); cursor: pointer; text-transform: lowercase; }
.newsletter button:hover { background: var(--red); color: #fff; }
.newsletter button[aria-busy="true"] { opacity: .8; cursor: progress; }
.newsletter .msg { min-height: 1.5em; font-weight: 600; margin: 0; }
.newsletter .deco { position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--yellow); opacity: .9; }
.newsletter label.check { display: flex; gap: .6rem; align-items: flex-start; font-size: 1rem; }
.newsletter label.check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--yellow); }
.newsletter a { color: #fff; }
@media (max-width: 820px) { .newsletter .inner { grid-template-columns: 1fr; } }

/* ---------- patterns ---------- */
.threeways { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--rule-w) solid var(--rule); }
.threeways > div { padding: 1.75rem; background: var(--surface); }
.threeways > div + div { border-left: var(--rule-w) solid var(--rule); }
.threeways h3 { font-size: 1.75rem; display: flex; gap: .6rem; align-items: center; text-transform: lowercase; margin-bottom: .5rem; }
.threeways h3 .shape { font-size: 1rem; }
.threeways p { margin: 0; color: var(--ink-soft); }
.threeways-foot { border: var(--rule-w) solid var(--rule); border-top: 0; padding: 1.25rem 1.75rem; background: var(--ink); color: var(--ground); margin: 0; }
@media (max-width: 820px) { .threeways { grid-template-columns: 1fr; } .threeways > div + div { border-left: 0; border-top: var(--rule-w) solid var(--rule); } }

.filters { display: flex; flex-direction: column; gap: 1rem; margin: 2.5rem 0 1.5rem; }
.search { display: flex; border: var(--rule-w) solid var(--rule); background: var(--surface); }
.search label { display: grid; place-items: center; padding: 0 1rem; background: var(--ink); color: var(--ground); font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 1.125rem var(--font-body); padding: 0 1rem; min-height: 56px; }
.search input::placeholder { color: var(--ink-soft); }
.search input:focus-visible { outline-offset: -4px; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { min-height: 44px; padding: 0 1rem; border: var(--rule-w) solid var(--rule); background: var(--surface); color: var(--ink); font: 600 1rem var(--font-body); cursor: pointer; display: inline-flex; gap: .5rem; align-items: center; text-transform: lowercase; }
.pill .shape { font-size: .7rem; }
.pill:hover { background: var(--surface-2); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.pill[aria-pressed="true"] .shape.half, .pill[aria-pressed="true"] .shape.ring { background: var(--ground); border-color: var(--ground); }
.resultbar { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; border-top: var(--bar) solid var(--rule); padding-top: .9rem; margin-bottom: 1.5rem; }
.resultbar .count { font-weight: 700; font-size: 1.25rem; }
.resultbar select { min-height: 44px; border: var(--rule-w) solid var(--rule); background: var(--surface); color: var(--ink); font: 500 1rem var(--font-body); padding: 0 .75rem; }
.linkbtn { background: none; border: 0; color: var(--blue-text); font: 600 1rem var(--font-body); text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 .5rem; }

.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--rule-w) solid var(--rule); border-left: var(--rule-w) solid var(--rule); }
@media (max-width: 1080px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pgrid { grid-template-columns: 1fr; } }
.pcard { border-right: var(--rule-w) solid var(--rule); border-bottom: var(--rule-w) solid var(--rule); background: var(--surface); position: relative; display: flex; flex-direction: column; }
.pcard[hidden] { display: none; }
.pcard:hover { background: var(--surface-2); }
.pcard .thumb { aspect-ratio: 16 / 9; border-bottom: var(--rule-w) solid var(--rule); position: relative; overflow: hidden; }
.pcard .thumb svg { width: 100%; height: 100%; display: block; }
.pcard .body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.pcard .top { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.pcard h2 { font-size: 1.5rem; letter-spacing: -.015em; }
.pcard h2 a { text-decoration: none; }
.pcard h2 a::after { content: ""; position: absolute; inset: 0; }
.pcard p { margin: 0; color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.5; }
.pcard .good { font-size: 1rem; }
.badge { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; padding: .15rem .5rem; font-weight: 500; }
.badge.new { background: var(--red); color: #fff; }
.badge.upd { background: var(--yellow); color: #141414; }
.empty { border: var(--rule-w) dashed var(--rule); padding: 3rem 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.empty[hidden] { display: none; }
.empty h2 { font-size: 2rem; text-transform: lowercase; }
.empty p { margin: 0; color: var(--ink-soft); }
.empty .shapes { display: flex; gap: 1rem; font-size: 2.5rem; opacity: .9; }
.empty .shapes .shape { background: transparent; border: 4px solid var(--ink); }
.empty .shapes .shape.triangle { background: var(--ink); }

/* pattern detail */
.back { display: inline-flex; gap: .5rem; align-items: center; font-weight: 700; text-decoration: none; min-height: 44px; text-transform: lowercase; }
.pd-head { display: grid; grid-template-columns: 1fr 22rem; gap: 3rem; align-items: start; }
.pd-head h1 { font-size: clamp(3rem, 7vw, 6rem); line-height: .9; letter-spacing: -.045em; text-transform: lowercase; margin: .75rem 0 1.25rem; }
.pd-head .lede { font-size: 1.3125rem; line-height: 1.5; margin: 0; max-width: 58ch; }
.reach { border: var(--rule-w) solid var(--rule); background: var(--surface); }
.reach h2 { font-family: var(--font-mono); font-weight: 500; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; padding: .8rem 1rem; border-bottom: var(--rule-w) solid var(--rule); background: var(--yellow); color: #141414; }
.reach ul { list-style: none; margin: 0; padding: 0; }
.reach li { padding: .7rem 1rem; display: flex; gap: .7rem; align-items: baseline; }
.reach li + li { border-top: 2px solid var(--rule); }
.reach li::before { content: ""; width: .6rem; height: .6rem; background: var(--red); flex: none; transform: translateY(-.1rem); }
.pd-dates { display: flex; gap: 1.5rem; flex-wrap: wrap; }
@media (max-width: 900px) { .pd-head { grid-template-columns: 1fr; gap: 1.5rem; } }

.panes { border: var(--bar) solid var(--rule); margin-top: 3rem; background: var(--surface); }
.panes .tabbar { display: flex; flex-wrap: wrap; justify-content: space-between; border-bottom: var(--bar) solid var(--rule); background: var(--ground); }
.panes [role="tablist"] { display: flex; flex-wrap: wrap; }
.panes [role="tab"] { min-height: 52px; padding: 0 1.25rem; border: 0; border-right: var(--rule-w) solid var(--rule); background: transparent; color: var(--ink); font: 700 1.0625rem var(--font-body); cursor: pointer; text-transform: lowercase; display: inline-flex; align-items: center; gap: .5rem; }
.panes [role="tab"] .shape { font-size: .7rem; }
.panes [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--ground); }
.panes [role="tab"]:hover:not([aria-selected="true"]) { background: var(--surface-2); }
.panes .tools { display: flex; }
.panes .tools button { min-height: 52px; border: 0; border-left: var(--rule-w) solid var(--rule); background: var(--surface); color: var(--ink); font: 600 1rem var(--font-body); padding: 0 1.1rem; cursor: pointer; text-transform: lowercase; }
.panes .tools button:hover { background: var(--yellow); color: #141414; }
.panes .tools button.done { background: var(--blue); color: #fff; }
.panes .tools button[hidden] { display: none; }
.pane { padding: clamp(1rem, 3vw, 2rem); }
.pane[hidden] { display: none; }
.pane pre { margin: 0; background: var(--code-bg); color: var(--code-ink); padding: 1.25rem; overflow-x: auto; font-size: .95rem; line-height: 1.6; border: var(--rule-w) solid var(--rule); }
.pane .note { border-left: 10px solid var(--blue); padding: .75rem 1rem; background: var(--surface-2); margin: 0 0 1rem; }
.pane.prompt-pane { max-width: 70ch; }
.pane.prompt-pane p { margin: 0 0 1.1rem; }
.pane.prompt-pane h3 { font-size: 1.375rem; margin: 1.75rem 0 .6rem; text-transform: lowercase; }
@media (max-width: 640px) {
  .panes .tabbar { flex-direction: column; }
  .panes [role="tablist"] { display: grid; grid-template-columns: repeat(2, 1fr); }
  .panes [role="tab"] { border-bottom: var(--rule-w) solid var(--rule); }
  .panes .tools button { flex: 1; border-left: 0; border-right: var(--rule-w) solid var(--rule); }
}

/* the live demo: hairline stat strip — in this site's primary palette */
.stage { background: var(--ground); border: var(--rule-w) solid var(--rule); padding: clamp(1rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 1rem; }
.stage .cap { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.hss-strip { display: grid; gap: 3px; background: var(--rule); border: 3px solid var(--rule); grid-template-columns: 1fr; }
@container (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
.stage { container-type: inline-size; }
@container (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 42rem) { .hss-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hss-strip.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@container (min-width: 21rem) and (max-width: 41.99rem) { .hss-strip.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hss-tile { background: var(--surface); padding: .85rem 1rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; text-align: left; color: var(--ink); border: 0; font: inherit; }
.hss-tile .l { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); overflow-wrap: anywhere; }
.hss-tile .f { font-size: 1.75rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hss-tile .f .dim { color: var(--ink-soft); font-weight: 400; }
.hss-tile .u { font-size: .9375rem; color: var(--ink-soft); }
button.hss-tile { cursor: pointer; min-height: 44px; }
button.hss-tile:hover { background: var(--surface-2); }
button.hss-tile[aria-pressed="true"] { background: var(--yellow); color: #141414; }
button.hss-tile[aria-pressed="true"] .l, button.hss-tile[aria-pressed="true"] .u { color: #141414; }
button.hss-tile:focus-visible { outline-offset: -5px; }
.hss-list { list-style: none; margin: 0; padding: 0; border: 3px solid var(--rule); background: var(--surface); }
.hss-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; font-size: 1rem; }
.hss-list li + li { border-top: 2px solid var(--rule); }
.hss-list li[hidden] { display: none; }
.hss-list .st { font-family: var(--font-mono); font-size: .875rem; white-space: nowrap; }
.hss-status { margin: 0; font-weight: 600; font-size: 1rem; }

/* svg fills driven by theme tokens */
.f-r { fill: var(--red); } .f-b { fill: var(--blue); } .f-y { fill: var(--yellow); } .f-k { fill: var(--ink); } .f-g { fill: var(--surface-2); } .f-s { fill: var(--surface); }
.s-k { stroke: var(--ink); }

/* ---------- footer ---------- */
.site-foot { background: #141414; color: #f4eee2; border-top: var(--bar) solid var(--rule); position: relative; overflow: hidden; }
.site-foot .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 2.5rem; padding-top: 4rem; padding-bottom: 2rem; position: relative; z-index: 1; }
.site-foot h2 { font-family: var(--font-mono); font-weight: 500; font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; color: var(--yellow); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li a { display: inline-flex; min-height: 40px; align-items: center; text-decoration: none; font-weight: 500; }
.site-foot a:hover { color: var(--yellow); }
.site-foot .blurb { font-size: 1.1875rem; max-width: 26ch; margin: 1rem 0 0; color: #d9d2c3; }
.site-foot .brand small { color: #b9b3a6; }
.site-foot form { display: flex; flex-wrap: wrap; margin-top: .75rem; }
.site-foot form .msg { flex-basis: 100%; }
.site-foot input { flex: 1; min-width: 0; min-height: 50px; padding: 0 .9rem; border: 3px solid #f4eee2; background: #1f1f1f; color: #f4eee2; font: 500 1.0625rem var(--font-body); }
.site-foot input::placeholder { color: #a8a293; }
.site-foot button { min-height: 50px; padding: 0 1.1rem; border: 3px solid #f4eee2; border-left: 0; background: var(--red); color: #fff; font: 700 1rem var(--font-body); cursor: pointer; text-transform: lowercase; }
.site-foot button:hover { background: var(--yellow); color: #141414; }
.site-foot .msg { min-height: 1.5em; margin: .5rem 0 0; font-size: 1rem; }
.site-foot .bottom { grid-column: 1 / -1; border-top: 3px solid #f4eee2; padding-top: 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-family: var(--font-mono); font-size: .875rem; color: #b9b3a6; }
.site-foot .bigshapes { position: absolute; right: -40px; bottom: -40px; display: flex; align-items: flex-end; gap: 0; opacity: .95; z-index: 0; pointer-events: none; }
.site-foot .bigshapes i { display: block; }
.site-foot .bigshapes .c { width: 180px; height: 180px; border-radius: 50%; background: var(--blue); }
.site-foot .bigshapes .s { width: 120px; height: 120px; background: var(--red); }
.site-foot .bigshapes .t { width: 150px; height: 130px; background: var(--yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
@media (max-width: 960px) {
  .site-foot .wrap { grid-template-columns: 1fr 1fr; }
  .site-foot .bigshapes { opacity: .35; }
}
@media (max-width: 560px) { .site-foot .wrap { grid-template-columns: 1fr; } }

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

/* UI pattern library article */
.article .prose-fig { margin: 2rem 0; border: var(--rule-w) solid var(--rule); box-shadow: 6px 6px 0 var(--rule); }
.article .prose-fig img { width: 100%; height: auto; display: block; }
.article .callout p + p { margin-top: .8rem; }
.article .live-pattern a.btn { white-space: normal; text-decoration: none; color: var(--ink); line-height: 1.3; }
.article p code { overflow-wrap: anywhere; }
.article ul li { position: relative; padding: .3rem 0 .3rem 2.5rem; }
.article ul li::before { content: ""; position: absolute; left: .4rem; top: .85rem; width: .7rem; height: .7rem; background: var(--red); }
.article ul li:nth-child(3n+2)::before { background: var(--blue); border-radius: 50%; }
.article ul li:nth-child(3n)::before { background: var(--yellow); }
