/* ZeroRISC — shared styles
   Tweakable via CSS vars set on :root by the Tweaks panel. */

:root {
  /* palette (tweakable) */
  --bg: #FAFAF7;
  --bg-warm: #F3EFE6;
  --bg-elev: #FFFFFF;
  --ink: #0B0D10;
  --ink-2: #2A2F36;
  --ink-3: #5A6068;
  --ink-4: #8B9098;
  --rule: #E6E2D7;
  --rule-2: #D6D2C7;

  --brand-deep: #1A3FA8;
  --brand-mid:  #2157D6;
  --brand-cyan: #00C8D6;
  --brand-ink:  #0D1B3D;

  /* semantic */
  --surface: var(--bg);
  --surface-alt: var(--bg-warm);
  --text: var(--ink);
  --muted: var(--ink-3);
  --accent: var(--brand-mid);

  /* type (tweakable) */
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* scale */
  --maxw: 1200px;
  --maxw-text: 720px;
  --radius: 14px;
  --radius-sm: 8px;

  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.lede a, p.lede a {
  color: var(--brand-mid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.lede a:hover { color: var(--brand-deep); }
p { margin: 0 0 1rem; text-wrap: pretty; }

/* ============ Typography ============ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 5vw, 4.25rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; }
h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.15; }
h4 { font-size: 1.125rem; line-height: 1.3; }

.mono { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px; background: currentColor; opacity: 0.6;
}

.lede {
  font-size: clamp(1.1rem, 1.3vw, 1.22rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 620px;
  font-weight: 400;
}

.center { text-align: center; }
.centered { margin-left: auto; margin-right: auto; }

/* ============ Layout ============ */
.inner { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.inner-narrow { max-width: 920px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

section { padding: clamp(64px, 10vw, 140px) 0; position: relative; }
section.tight { padding: clamp(40px, 6vw, 72px) 0; }
section.alt { background: var(--surface-alt); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.nav .brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: auto; display: block; }
.brand-logo--footer {
  height: auto;
}
.nav .links { display: flex; gap: 4px; }
.nav .links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.93rem; color: var(--ink-2);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav .links a:hover { background: rgba(13, 27, 61, 0.06); color: var(--ink); }
.nav .links a.active { color: var(--ink); font-weight: 500; }
.nav .links a .nav-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -4px;
  margin-right: 6px;
}

/* dropdowns */
.nav .links .nav-dropdown { position: relative; }
.nav .links .nav-trigger {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  font: inherit; font-size: 0.93rem; color: var(--ink-2);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav .links .nav-trigger:hover,
.nav .links .nav-dropdown.open .nav-trigger {
  background: rgba(13, 27, 61, 0.06); color: var(--ink);
}
.nav .links .nav-trigger.active { color: var(--ink); font-weight: 500; }
.nav .links .nav-trigger .caret {
  transition: transform 0.2s ease;
  opacity: 0.6;
}
.nav .links .nav-dropdown.open .nav-trigger .caret { transform: rotate(180deg); opacity: 1; }

.nav .links .nav-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 280px;
  background: var(--bg-elev, #fff);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 32px -16px rgba(13, 27, 61, 0.18), 0 4px 12px -8px rgba(13, 27, 61, 0.1);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; pointer-events: none; transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 60;
}
.nav .links .nav-dropdown.open .nav-panel { opacity: 1; pointer-events: auto; transform: translateY(0); }
/* hover-bridge: invisible strip between trigger and panel so the cursor
   doesn't fall into the gap and close the menu */
.nav .links .nav-dropdown.open::before {
  content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 8px;
}

.nav .links .nav-panel a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink); font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.12s ease;
}
.nav .links .nav-panel a:hover { background: color-mix(in oklab, var(--brand-deep) 6%, transparent); }
.nav .links .nav-panel a.active { background: color-mix(in oklab, var(--brand-deep) 8%, transparent); }
.nav .links .nav-panel a strong { font-weight: 600; font-size: 0.95rem; }
.nav .links .nav-panel a span { color: var(--ink-3); font-size: 0.82rem; }
.nav .right { display: flex; gap: 10px; align-items: center; }
@media (max-width: 820px) {
  .nav .links { display: none; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500; font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn .ar { transition: transform 0.2s ease; }
.btn:hover .ar { transform: translateX(3px); }

.btn-primary {
  background: var(--brand-deep);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-mid); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn-ghost:hover { background: #fff; border-color: var(--ink); }

.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover { background: var(--brand-deep); }

.btn-small { padding: 8px 14px; font-size: 0.85rem; }

/* ============ Arc motif (brand) ============ */
.arc-bg {
  position: absolute;
  inset: auto 0 0 0;
  display: flex; justify-content: center;
  pointer-events: none;
  z-index: 0;
}
.arc-bg svg { width: min(720px, 90%); display: block; }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: clamp(80px, 14vw, 180px) 0 clamp(60px, 10vw, 120px);
  text-align: center;
  overflow: hidden;
}
.hero .eyebrow { margin-bottom: 1.5rem; }
.hero h1 { max-width: 16ch; margin-left: auto; margin-right: auto; }
.hero .lede { margin: 1.25rem auto 2rem; text-align: center; }
.hero .hero-actions {
  display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.hero-arc {
  position: absolute;
  top: -40px; left: 50%; transform: translateX(-50%);
  width: min(880px, 110vw);
  z-index: 0; opacity: 1;
  pointer-events: none;
}
.hero-arc svg { width: 100%; display: block; }
.hero > .inner { position: relative; z-index: 1; }

/* product-tinted hero pill */
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: color-mix(in oklab, var(--brand-deep) 10%, transparent);
  color: var(--brand-deep);
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-cyan); }

/* hero pill as a link to the latest post */
a.hero-pill-link {
  text-decoration: none;
  max-width: 100%;
  transition: background-color 0.2s ease, color 0.2s ease;
}
a.hero-pill-link:hover {
  background: color-mix(in oklab, var(--brand-deep) 16%, transparent);
}
.hero-pill .hp-label { font-weight: 600; }
.hero-pill .hp-sep { opacity: 0.55; }
.hero-pill .hp-title {
  font-family: var(--font-body, inherit);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 56ch;
}
.hero-pill .hp-ar { opacity: 0.6; transition: transform 0.2s ease; }
a.hero-pill-link:hover .hp-ar { transform: translateX(2px); opacity: 1; }
@media (max-width: 640px) {
  .hero-pill .hp-title { max-width: 22ch; }
}

/* ============ Section head ============ */
.sect-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 780px; }
.sect-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sect-head.center .lede { margin-left: auto; margin-right: auto; text-align: center; }
.sect-head .eyebrow { margin-bottom: 1rem; }

/* ============ Cards ============ */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--rule-2); }
.card h4 { margin-top: 0.4rem; margin-bottom: 0.4rem; }
.card p { color: var(--ink-3); margin-bottom: 0; font-size: 0.96rem; }
.card .tag {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-4);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============ Tabs (home product switcher) ============ */
.tabs {
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elev);
  overflow: hidden;
}
.tab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in oklab, var(--bg-warm) 70%, white);
}
.tab-btn {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  padding: 22px 24px;
  text-align: left;
  font-family: var(--font-body);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
  transition: background 0.15s ease;
}
.tab-btn:last-child { border-right: 0; }
.tab-btn:hover { background: color-mix(in oklab, var(--bg) 60%, white); }
.tab-btn .tab-idx {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-4);
}
.tab-btn .tab-name {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink-3);
}
.tab-btn.active { background: var(--bg-elev); }
.tab-btn.active .tab-name { color: var(--ink); }
.tab-btn.active::after {
  content: ""; position: absolute; inset: auto 0 -1px 0;
  height: 2px; background: var(--brand-deep);
}
@media (max-width: 720px) {
  .tab-bar { grid-template-columns: 1fr; }
  .tab-btn { border-right: 0; border-bottom: 1px solid var(--rule); }
  .tab-btn:last-child { border-bottom: 0; }
}

.tab-panel {
  padding: 44px 40px;
  display: none;
  animation: panelIn 0.35s ease;
}
.tab-panel.active { display: block; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-panel .tp-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px;
  align-items: center;
}
@media (max-width: 880px) { .tab-panel .tp-grid { grid-template-columns: 1fr; gap: 28px; } .tab-panel { padding: 28px 22px; } }
.tab-panel h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 0.75rem;
}
.tab-panel .tp-bullets {
  margin: 1.25rem 0 1.75rem; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}
.tab-panel .tp-bullets li {
  display: flex; gap: 10px; align-items: flex-start;
  color: var(--ink-2); font-size: 0.97rem;
}
.tab-panel .tp-bullets li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-deep); flex-shrink: 0; margin-top: 8px;
}

/* sub-product chip row (home tab panels) */
.subprod-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 1.25rem 0 0;
}
.subprod {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.subprod:hover {
  border-color: var(--brand-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 34, 88, 0.07);
}
.subprod .mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--brand-deep);
  opacity: 0.75;
}
.subprod strong {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
.subprod span:last-child {
  font-size: 0.85rem;
  color: var(--ink-3);
  line-height: 1.35;
}

/* diagram placeholder panel */
.diagram {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--brand-deep) 4%, white), color-mix(in oklab, var(--brand-cyan) 5%, white));
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

/* ============ Stats band ============ */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stats .stat {
  padding: 32px 24px;
  border-right: 1px solid var(--rule);
}
.stats .stat:last-child { border-right: 0; }
.stats .num {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em; color: var(--ink); margin-bottom: 4px;
}
.stats .lbl { color: var(--ink-3); font-size: 0.88rem; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:nth-child(2) { border-right: 0; }
}

/* ============ Logo row ============ */
.logos-row {
  display: flex; flex-wrap: wrap; gap: 28px 48px;
  justify-content: center; align-items: center;
  opacity: 0.85;
}
.logos-row .ln {
  font-family: var(--font-display);
  color: var(--ink-3);
  font-size: 1.05rem; letter-spacing: -0.01em; font-weight: 500;
}

/* ============ Feature rows (alternating) ============ */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 72px;
  align-items: center; margin-bottom: clamp(56px, 8vw, 100px);
}
.feature:last-child { margin-bottom: 0; }
.feature.flip > div:first-child { order: 2; }
@media (max-width: 880px) { .feature, .feature.flip { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip > div:first-child { order: 0; }
}
.feature h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.feature p { color: var(--ink-2); }

/* ============ Spec list ============ */
.spec-list {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--rule);
}
.spec-list li {
  display: grid; grid-template-columns: 160px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  gap: 18px;
}
.spec-list li .k {
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.spec-list li .v { color: var(--ink-2); }

/* ============ Chips ============ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--rule);
  font-size: 0.82rem; color: var(--ink-2);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* ============ Product placeholder (render boxes) ============ */
.placeholder {
  border: 1px dashed var(--rule-2);
  background:
    repeating-linear-gradient(135deg,
      transparent 0 10px,
      color-mix(in oklab, var(--brand-deep) 3%, transparent) 10px 11px);
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-3);
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-align: center; padding: 24px;
  aspect-ratio: 4 / 3;
}
.placeholder .ph-note { font-size: 0.72rem; color: var(--ink-4); margin-top: 6px; text-transform: none; letter-spacing: 0.02em; font-family: var(--font-body);}

/* ============ Big CTA ============ */
.cta-block {
  background: var(--ink);
  color: #fff;
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-block h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-block p { color: rgba(255,255,255,0.7); max-width: 560px; margin: 0 auto 1.75rem; }
.cta-block .btn-dark { background: #fff; color: var(--ink); }
.cta-block .btn-dark:hover { background: var(--brand-cyan); color: var(--ink); }
.cta-block .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.2); }
.cta-block .btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }
.cta-block .arc-bg svg path { opacity: 0.18; }

/* ============ Footer ============ */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.72);
  padding: 64px 0 40px;
  font-size: 0.93rem;
}
.footer a { color: rgba(255,255,255,0.72); }
.footer a:hover { color: #fff; }
.footer .foot-grid {
  display: grid; grid-template-columns: 1.3fr repeat(2, 1fr); gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 720px) { .footer .foot-grid { grid-template-columns: 1fr 1fr; } }
.footer .foot-brand { display: flex; flex-direction: column; gap: 14px; }
.footer .foot-social {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}
.footer .foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.72);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.footer .foot-social a:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
}
.footer .foot-brand .tag { color: rgba(255,255,255,0.55); max-width: 280px; font-size: 0.88rem; }
.footer h5 { color: #fff; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-mono); font-weight: 500; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer .foot-legal {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-top: 24px;
  font-size: 0.82rem; color: rgba(255,255,255,0.5);
  font-family: var(--font-mono); letter-spacing: 0.05em;
}

/* ============ Pill / badge ============ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg-elev);
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-cyan); }

/* ============ Role cards (get-started) ============ */
.role-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
  display: flex; flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.role-card:hover { border-color: var(--brand-deep); }
.role-card .rc-tag {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4);
  margin-bottom: 16px;
}
.role-card h3 { margin-top: 0; }
.role-card p { color: var(--ink-3); font-size: 0.94rem; }
.role-card ul { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: flex; flex-direction: column; gap: 8px; }
.role-card ul li { color: var(--ink-2); font-size: 0.9rem; display: flex; gap: 8px; }
.role-card ul li::before { content: "→"; color: var(--brand-mid); }
.role-card .rc-cta {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-mono); font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-deep);
  font-weight: 500;
}

/* ============ Blog list ============ */
.blog-list { display: flex; flex-direction: column; }
.blog-item {
  display: grid; grid-template-columns: 180px 1fr;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
  gap: 24px;
}
.blog-item:first-child { border-top: 1px solid var(--rule); }
.blog-item .meta {
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  display: flex; flex-direction: column; gap: 6px;
}
.blog-item .meta .cat { color: var(--brand-deep); }
.blog-item h3 { font-size: 1.35rem; margin: 0 0 0.5rem; }
.blog-item h3 a:hover { color: var(--brand-deep); }
.blog-item .excerpt { color: var(--ink-3); margin-bottom: 0.75rem; }
.blog-item .read { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-deep); }
@media (max-width: 720px) { .blog-item { grid-template-columns: 1fr; } }

/* ============ Recent writing strip (homepage) ============ */
.recent-all {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand-deep); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding-bottom: 6px;
  white-space: nowrap;
}
.recent-all .ar { transition: transform 0.2s ease; }
.recent-all:hover .ar { transform: translateX(3px); }

.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 920px)  { .recent-grid { grid-template-columns: 1fr 1fr; } }

/* ============ Three-tier stack diagram (homepage Build subtab) ============ */
.tier-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  font-family: var(--font-mono);
  align-items: stretch;
  justify-content: center;
}
.tier-stack .tier {
  background: linear-gradient(135deg, rgba(0, 200, 214, 0.18), rgba(26, 63, 168, 0.10));
  border: 1px solid rgba(26, 63, 168, 0.4);
  border-radius: 8px;
  padding: 12px 18px;
  letter-spacing: 0.06em;
  min-height: 54px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tier-stack .tier-title {
  font-weight: 600;
  font-size: 12px;
  color: var(--ink);
}
.tier-stack .tier-items {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}
.tier-stack .tier-caption {
  text-align: center;
  color: var(--ink-4);
  font-size: 11px;
  margin-top: 6px;
  letter-spacing: 0.06em;
}

/* ============ History triptych (mission page) ============ */
.history-triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 48px;
}
.history-panel {
  padding: 36px 32px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: transparent;
}
.history-panel:last-child { border-right: none; }
.history-year {
  color: var(--brand-deep);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.history-panel h4 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 4px 0 6px;
}
.history-panel p {
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.55;
  margin: 0;
}
.history-panel p a {
  color: var(--brand-mid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.history-panel p a:hover { color: var(--brand-deep); }
@media (max-width: 920px) {
  .history-triptych { grid-template-columns: 1fr; }
  .history-panel { border-right: none; border-bottom: 1px solid var(--line); }
  .history-panel:last-child { border-bottom: none; }
}
@media (max-width: 620px)  { .recent-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px 24px 22px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
  min-height: 220px;
}
.post-card:hover { border-color: var(--rule-2); transform: translateY(-2px); }
.post-card .meta {
  display: flex; gap: 12px; align-items: center;
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.post-card .meta .cat { color: var(--brand-deep); }
.post-card h3 {
  font-size: 1.08rem;
  line-height: 1.3;
  margin: 0 0 0.55rem;
  text-wrap: pretty;
}
.post-card .excerpt {
  color: var(--ink-3);
  font-size: 0.92rem;
  margin: 0 0 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .read {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-deep);
  display: inline-flex; align-items: center; gap: 6px;
}
.post-card .read .ar { transition: transform 0.2s ease; }
.post-card:hover .read .ar { transform: translateX(3px); }

/* ============ Flow diagram (SVG inline) ============ */
.flow {
  padding: 40px 32px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  position: relative;
}
.flow .node {
  padding: 22px 20px;
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--brand-deep) 3%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--brand-deep) 12%, var(--rule));
  display: flex; flex-direction: column; gap: 8px;
}
.flow .node .k {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-deep);
}
.flow .node h5 { margin: 0; font-size: 1.05rem; font-family: var(--font-display); letter-spacing: -0.01em; }
.flow .node p { margin: 0; font-size: 0.88rem; color: var(--ink-3); }
@media (max-width: 760px) { .flow { grid-template-columns: 1fr; } }

/* ============ Tweaks panel ============ */
#tweaks-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 320px; max-width: calc(100vw - 40px);
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.04);
  font-family: var(--font-body);
  font-size: 0.9rem;
  overflow: hidden;
  display: none;
}
#tweaks-panel.open { display: block; }
#tweaks-panel .tw-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in oklab, var(--bg-warm) 70%, white);
}
#tweaks-panel .tw-head h5 {
  margin: 0; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 0.78rem; color: var(--ink);
}
#tweaks-panel .tw-body { padding: 16px; display: flex; flex-direction: column; gap: 16px; max-height: 60vh; overflow-y: auto; }
#tweaks-panel .tw-row { display: flex; flex-direction: column; gap: 6px; }
#tweaks-panel label {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
#tweaks-panel .swatches { display: flex; gap: 8px; flex-wrap: wrap; }
#tweaks-panel .sw {
  width: 28px; height: 28px; border-radius: 999px;
  border: 2px solid var(--rule); cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
#tweaks-panel .sw:hover { transform: scale(1.08); }
#tweaks-panel .sw.active { border-color: var(--ink); transform: scale(1.08); }
#tweaks-panel select, #tweaks-panel input[type="text"] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--rule);
  border-radius: 8px; background: var(--bg); font-family: inherit; font-size: 0.88rem;
  color: var(--ink);
}
#tweaks-panel .tw-close {
  background: transparent; border: 0; cursor: pointer; color: var(--ink-3);
  font-size: 1.1rem; line-height: 1;
}
