/* ==========================================================================
   Akileas — Neo-Classical Edition
   --------------------------------------------------------------------------
   Type system : Cormorant Garamond (display) · EB Garamond (text)
                 Cinzel (Roman inscriptional caps) · GFS Didot (polytonic Greek)
                 JetBrains Mono (code & telemetry)
   Palette     : iron-gall ink · aged parchment · gold leaf ·
                 manuscript ultramarine · verdigris · terracotta
   Ornament    : meander friezes, double rules, Aldine fleurons, drop caps,
                 gold corner brackets, engraved label plates
   ========================================================================== */

:root {
  color-scheme: light;

  /* — Parchment & ink ————————————————————————————————— */
  --bg: #f1e6cf;
  --bg-deep: #e7d8b9;
  --surface: #ece0c6;
  --surface-raised: #e2d3b2;
  --surface-soft: #f8f1e0;
  --surface-page: #fdf8ec;

  --line-hair: #e2d4b6;
  --line: #d2c099;
  --line-bright: #bda87c;

  --text: #241d12;
  --muted: #5f5138;
  --subtle: #7d6d50;

  /* — Pigments ——————————————————————————————————————— */
  --gold: #a5813a;
  --gold-bright: #cfa94f;
  --gold-pale: #e6d3a0;
  --gold-deep: #7a5c1f;

  --ultramarine: #2b4d7d;
  --ultramarine-deep: #1b3355;
  --blue-soft: #4a76a8;

  --verdigris: #4d6b4a;
  --terracotta: #9c4230;

  /* — Legacy aliases (kept so all existing markup keeps working) ————— */
  --blue: var(--ultramarine);
  --blue-strong: var(--ultramarine-deep);
  --amber: var(--gold);
  --green: var(--verdigris);

  /* — Typography stacks ——————————————————————————————— */
  --font-display: "Cormorant Garamond", "EB Garamond", Garamond, "Adobe Garamond Pro",
    Georgia, "Times New Roman", serif;
  --font-body: "EB Garamond", "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif;
  --font-inscription: "Cinzel", "Trajan Pro", "Optima", "Palatino Linotype", Georgia, serif;
  --font-greek: "GFS Didot", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* — Geometry: classical frames are near-square ————————————————— */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;

  --shell: min(1180px, calc(100% - 40px));

  /* — Ornament assets ————————————————————————————————— */
  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='11' viewBox='0 0 20 11'%3E%3Cpath d='M0 10.2H19V1.2H7.2V7.4H13.6V3.6H10.2' fill='none' stroke='%23a5813a' stroke-width='1.1' stroke-linecap='square'/%3E%3C/svg%3E");
  --divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='10' viewBox='0 0 280 10'%3E%3Cpath d='M0 5h112' stroke='%23a5813a' stroke-width='1' opacity='.45'/%3E%3Cpath d='M168 5h112' stroke='%23a5813a' stroke-width='1' opacity='.45'/%3E%3Cpath d='M140 0.8L144.2 5L140 9.2L135.8 5Z' fill='%23a5813a'/%3E%3Ccircle cx='124' cy='5' r='1.4' fill='%23a5813a' opacity='.8'/%3E%3Ccircle cx='156' cy='5' r='1.4' fill='%23a5813a' opacity='.8'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");

  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

/* — CJK locales ——————————————————————————————————————————
   Latin characters keep the Garamond faces; Chinese and Japanese fall through
   to a matching serif (Song / Mincho) instead of whatever the OS picks.
   CJK also reads better with a little more leading.                        */

.lang-zh {
  --font-body: "EB Garamond", "Noto Serif SC", "Cormorant Garamond", Garamond, Georgia, serif;
  --font-display: "Cormorant Garamond", "Noto Serif SC", "EB Garamond", Garamond, Georgia, serif;
  --font-inscription: "Cinzel", "Noto Serif SC", Georgia, serif;
}

.lang-ja {
  --font-body: "EB Garamond", "Noto Serif JP", "Cormorant Garamond", Garamond, Georgia, serif;
  --font-display: "Cormorant Garamond", "Noto Serif JP", "EB Garamond", Garamond, Georgia, serif;
  --font-inscription: "Cinzel", "Noto Serif JP", Georgia, serif;
}

.lang-zh,
.lang-ja {
  line-height: 1.82;
}

.lang-zh .site-header nav > a,
.lang-ja .site-header nav > a {
  letter-spacing: 0.08em;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.72;
  letter-spacing: 0.004em;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(255, 251, 240, 0.85), transparent 62%),
    radial-gradient(circle at 86% 12%, rgba(165, 129, 58, 0.13), transparent 34rem),
    radial-gradient(circle at 10% 44%, rgba(43, 77, 125, 0.10), transparent 32rem),
    linear-gradient(180deg, #f4ead6 0%, #efe3c9 46%, #e9dabb 100%);
}

/* Paper grain */
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: 0.038;
  content: "";
  pointer-events: none;
}

/* Vignette — the light falling off an old page */
body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 118% 88% at 50% 44%, transparent 52%, rgba(88, 66, 28, 0.15) 100%);
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(165, 129, 58, 0.26);
  color: var(--ultramarine-deep);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Primitives
   -------------------------------------------------------------------------- */

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 18px;
  transform: translateY(-160%);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--ultramarine-deep);
  color: var(--surface-soft);
  font-family: var(--font-inscription);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Ornamental section divider: ——— ❦ ——— */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 42px;
  color: var(--gold);
  font-size: 1.05rem;
  line-height: 1;
}

.ornament::before,
.ornament::after {
  width: min(190px, 26vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(165, 129, 58, 0.6), transparent);
  content: "";
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-bright);
  background: linear-gradient(180deg, rgba(248, 241, 226, 0.97), rgba(240, 231, 210, 0.93));
  backdrop-filter: blur(16px) saturate(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 253, 246, 0.8), 0 10px 26px rgba(80, 58, 24, 0.08);
}

/* Meander frieze along the base of the header */
.site-header::after {
  position: absolute;
  inset: auto 0 1px 0;
  height: 9px;
  background-image: var(--meander);
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto 7px;
  opacity: 0.5;
  content: "";
  pointer-events: none;
}

.nav-shell,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-shell {
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
}

.brand img {
  filter: drop-shadow(0 4px 10px rgba(100, 70, 30, 0.18));
}

.brand span {
  font-family: var(--font-inscription);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-header nav,
footer nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-header nav a,
footer nav a,
.text-link {
  transition: color 180ms ease;
}

.site-header nav a {
  position: relative;
  padding-bottom: 4px;
  color: var(--muted);
  font-family: var(--font-inscription);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-header nav a::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 1px;
  background: var(--gold);
  content: "";
  transition: left 220ms ease, right 220ms ease;
}

.site-header nav a:hover,
footer nav a:hover,
.text-link:hover {
  color: var(--ultramarine-deep);
}

.site-header nav a:hover::after {
  right: 0;
  left: 0;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(350px, 0.85fr);
  gap: 72px;
  align-items: center;
  min-height: 700px;
  padding-block: 88px 100px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 22px;
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-kicker::before {
  width: 34px;
  height: 1px;
  flex-shrink: 0;
  background: linear-gradient(90deg, transparent, var(--gold));
  content: "";
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.9;
}

/* gold lozenge in place of the old status dot */
.eyebrow span {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(165, 129, 58, 0.16);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  max-width: 800px;
  font-family: var(--font-display);
  font-size: clamp(3.3rem, 7vw, 6rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.018em;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(255, 253, 246, 0.55);
}

h1 em {
  background: linear-gradient(
    98deg,
    #52400f 0%,
    #7d5c14 20%,
    #9a7520 40%,
    #6b4c0f 62%,
    #46320a 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-style: italic;
  font-weight: 500;
}

.hero-lede {
  max-width: 680px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 1.5vw, 1.28rem);
  line-height: 1.8;
}

/* Illuminated drop cap */
.dropcap::first-letter {
  float: left;
  padding: 0.12em 0.14em 0 0;
  font-family: var(--font-display);
  font-size: 4.3rem;
  font-weight: 600;
  line-height: 0.78;
  color: var(--ultramarine-deep);
  text-shadow: 0 1px 0 rgba(255, 253, 246, 0.7);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

/* — Buttons: engraved plaques ——————————————————————————— */

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-inscription);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease,
    box-shadow 170ms ease, color 170ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: rgba(207, 169, 79, 0.55);
  background: linear-gradient(180deg, #35598c, #1d3557);
  color: #f7eeda;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 1px rgba(207, 169, 79, 0.28), 0 10px 24px rgba(27, 51, 85, 0.28);
}

.button-primary:hover {
  background: linear-gradient(180deg, #3f6699, #234070);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 0 0 1px rgba(230, 211, 160, 0.5), 0 16px 32px rgba(27, 51, 85, 0.34);
}

.button-secondary {
  border-color: var(--line-bright);
  background: linear-gradient(180deg, rgba(253, 249, 240, 0.95), rgba(240, 231, 211, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 253, 245, 0.75), 0 4px 12px rgba(80, 58, 24, 0.07);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, #fdf9ef, #f0e5cc);
  color: var(--gold-deep);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 245, 0.85), 0 10px 22px rgba(80, 58, 24, 0.13);
}

.button-store {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 26px;
  border: 1px solid rgba(207, 169, 79, 0.45);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #1668ad, #0d4b83);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 1px rgba(207, 169, 79, 0.22), 0 10px 24px rgba(13, 75, 131, 0.26);
  color: #ffffff !important;
  font-family: var(--font-inscription);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: transform 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.button-store:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #1a79c6, #12609e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 0 0 1px rgba(230, 211, 160, 0.45), 0 16px 32px rgba(13, 75, 131, 0.32);
  color: #ffffff !important;
}

.btn-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: currentColor;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
  color: var(--subtle);
  font-family: var(--font-inscription);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.platforms span::before {
  margin-right: 9px;
  color: var(--gold);
  content: "✦";
}

/* — Hero emblem ————————————————————————————————————— */

.hero-mark {
  position: relative;
  display: grid;
  min-height: 500px;
  place-items: center;
}

.hero-mark::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(430px, 92%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(165, 129, 58, 0.45);
  border-radius: 50%;
  box-shadow: 0 0 0 9px rgba(165, 129, 58, 0.07),
    inset 0 0 0 6px rgba(255, 252, 242, 0.4);
  content: "";
}

.hero-mark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(520px, 106%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(165, 129, 58, 0.3);
  border-radius: 50%;
  content: "";
}

.hero-mark > img {
  position: relative;
  z-index: 1;
  width: min(360px, 84%);
  height: auto;
  filter: drop-shadow(0 32px 46px rgba(90, 70, 40, 0.26));
  animation: float 8s ease-in-out infinite;
}

.mark-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 380px;
  height: 380px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(43, 77, 125, 0.2),
    rgba(165, 129, 58, 0.16) 45%,
    transparent 70%
  );
  filter: blur(18px);
}

/* Engraved label plates */
.metric-card {
  position: absolute;
  z-index: 2;
  min-width: 168px;
  padding: 14px 20px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  outline: 1px solid rgba(165, 129, 58, 0.28);
  outline-offset: 3px;
  background: linear-gradient(180deg, rgba(253, 249, 239, 0.97), rgba(243, 234, 214, 0.94));
  box-shadow: 0 16px 34px rgba(80, 58, 24, 0.14);
  backdrop-filter: blur(12px);
}

.metric-card small,
.metric-card strong {
  display: block;
}

.metric-card small {
  margin-bottom: 3px;
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.25;
}

.metric-top {
  top: 78px;
  right: -10px;
}

.metric-bottom {
  bottom: 58px;
  left: -18px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

/* --------------------------------------------------------------------------
   Vision / Philosophy
   -------------------------------------------------------------------------- */

.vision-section {
  position: relative;
  padding-block: 92px 100px;
  border-top: 3px double var(--line-bright);
  border-bottom: 3px double var(--line-bright);
  background: linear-gradient(180deg, rgba(236, 224, 198, 0.7), rgba(245, 238, 221, 0.85));
}

.vision-quote {
  position: relative;
  margin-top: 38px;
  padding: 48px 52px 44px 92px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.3);
  outline-offset: 5px;
  background: linear-gradient(142deg, rgba(253, 249, 239, 0.96), rgba(239, 229, 207, 0.9));
  box-shadow: 0 18px 44px rgba(80, 58, 24, 0.1);
}

.vision-quote::before {
  position: absolute;
  top: 4px;
  left: 28px;
  color: rgba(165, 129, 58, 0.34);
  font-family: var(--font-display);
  font-size: 7.4rem;
  line-height: 1;
  content: "\201C";
}

.homeric-verse {
  margin: 0 0 20px;
  padding: 0;
  color: var(--ultramarine-deep);
  font-family: var(--font-greek);
  font-size: 1.26rem;
  font-style: normal;
  line-height: 1.95;
  letter-spacing: 0.012em;
}

.verse-translation {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.78;
}

.vision-quote cite {
  display: block;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-inscription);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Product showcase
   -------------------------------------------------------------------------- */

.product-stage {
  padding-block: 104px 124px;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 70px;
  align-items: end;
  margin-bottom: 48px;
}

.section-intro h2,
.workflow h2,
.privacy-band h2,
.final-cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.1vw, 3.9rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(255, 253, 246, 0.5);
}

.section-intro > p,
.privacy-inner > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.74;
}

/* Classical rule-and-lozenge finial beneath every section introduction */
.section-intro::after {
  grid-column: 1 / -1;
  height: 12px;
  margin-top: 34px;
  background-image: var(--divider);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 280px 10px;
  content: "";
}

.product-intro {
  margin-bottom: 36px;
}

.app-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.3);
  outline-offset: 5px;
  background: var(--surface);
  box-shadow: 0 36px 80px rgba(80, 58, 24, 0.16), 0 0 0 1px rgba(255, 253, 246, 0.5) inset;
}

.window-bar {
  display: flex;
  height: 46px;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
}

.window-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c2b189;
}

.window-bar span:first-child {
  background: #c8695a;
}
.window-bar span:nth-child(2) {
  background: #cda45a;
}
.window-bar span:nth-child(3) {
  background: #6f9159;
}

.window-bar strong {
  margin-left: 10px;
  color: var(--muted);
  font-family: var(--font-inscription);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.app-frame img {
  width: 100%;
  height: auto;
}

.app-frame figcaption {
  padding: 15px 22px;
  border-top: 1px solid var(--line-hair);
  color: var(--subtle);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-style: italic;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.feature-section {
  position: relative;
  padding-block: 124px;
  border-block: 3px double var(--line-bright);
  background: linear-gradient(180deg, var(--surface), var(--bg));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  padding: 38px 38px 124px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.24);
  outline-offset: -7px;
  background: linear-gradient(160deg, rgba(253, 249, 240, 0.96), rgba(240, 231, 211, 0.92));
  box-shadow: 0 12px 30px rgba(80, 58, 24, 0.07);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

/* gold corner brackets — an engraved plate */
.feature-card::before,
.feature-card::after {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0.55;
  content: "";
  transition: opacity 220ms ease;
}

.feature-card::before {
  top: 9px;
  left: 9px;
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
}

.feature-card::after {
  right: 9px;
  bottom: 9px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(165, 129, 58, 0.55);
  box-shadow: 0 20px 42px rgba(80, 58, 24, 0.14);
}

.feature-card:hover::before,
.feature-card:hover::after {
  opacity: 1;
}

.feature-wide {
  grid-column: span 2;
  min-height: 380px;
  padding-bottom: 154px;
}

.feature-number {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 30px;
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.feature-number::after {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(165, 129, 58, 0.5), transparent);
  content: "";
}

.feature-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.feature-card > p:not(.feature-number) {
  max-width: 620px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.72;
}

/* — Micro previews ——————————————————————————————————— */

.mini-editor {
  position: absolute;
  right: 36px;
  bottom: 34px;
  left: 36px;
  display: grid;
  gap: 13px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  box-shadow: 0 5px 16px rgba(80, 58, 24, 0.07);
}

.mini-editor .source {
  color: var(--ultramarine);
}
.mini-editor .source b {
  color: var(--text);
}
.mini-editor .rendered {
  color: var(--muted);
}
.mini-editor .caret {
  position: absolute;
  top: 18px;
  left: 48px;
  width: 1px;
  height: 18px;
  background: var(--ultramarine-deep);
}

.formula {
  position: absolute;
  right: 32px;
  bottom: 26px;
  color: rgba(43, 77, 125, 0.8);
  font-family: var(--font-display);
  font-size: 3.3rem;
  font-style: italic;
  line-height: 1;
}

.tab-demo {
  position: absolute;
  right: 30px;
  bottom: 28px;
  left: 30px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
}

.tab-demo span {
  padding: 9px 15px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.tab-demo span:first-child {
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 700;
}

.local-badge {
  position: absolute;
  right: 30px;
  bottom: 27px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid rgba(77, 107, 74, 0.36);
  border-radius: var(--radius-sm);
  background: rgba(77, 107, 74, 0.1);
  color: var(--verdigris);
  font-family: var(--font-inscription);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.local-badge span {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--verdigris);
}

code {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-raised);
  color: var(--ultramarine-deep);
  font-family: var(--font-mono);
  font-size: 0.82em;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.badge-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-right: 6px;
  vertical-align: -2px;
}

.diagnostic {
  position: absolute;
  right: 36px;
  bottom: 34px;
  left: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 19px;
  border: 1px solid rgba(165, 129, 58, 0.42);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
  box-shadow: 0 5px 16px rgba(80, 58, 24, 0.06);
}

.diagnostic-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  transform: rotate(45deg);
  background: var(--gold);
}

.diagnostic div {
  display: grid;
  flex: 1;
}

.diagnostic strong {
  color: var(--text);
  font-size: 0.84rem;
}
.diagnostic small {
  color: var(--subtle);
  font-size: 0.76rem;
  font-style: italic;
}
.diagnostic button {
  padding: 6px 15px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-family: var(--font-inscription);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.diagnostic button:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

/* — More micro previews ——————————————————————————————— */

.mini-alert {
  position: absolute;
  right: 34px;
  bottom: 28px;
  left: 34px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 19px;
  border: 1px solid rgba(77, 107, 74, 0.34);
  border-left: 4px solid var(--verdigris);
  border-radius: var(--radius-sm);
  background: rgba(253, 250, 242, 0.97);
  box-shadow: 0 7px 20px rgba(80, 58, 24, 0.06);
}

.mini-alert-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #3d5c3a;
  font-family: var(--font-inscription);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mini-alert-dot {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--verdigris);
}

.mini-alert p {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}

.mini-table-demo {
  position: absolute;
  right: 30px;
  bottom: 24px;
  left: 30px;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
  box-shadow: 0 7px 18px rgba(80, 58, 24, 0.06);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.mini-table-row {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 0.8fr;
  align-items: center;
  padding: 8px 13px;
  border-bottom: 1px solid var(--line-hair);
}

.mini-table-row:last-child {
  border-bottom: none;
}

.mini-table-head {
  background: var(--surface-raised);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
}

.col-left {
  text-align: left;
}
.col-center {
  text-align: center;
}
.col-right {
  text-align: right;
}

.mini-table-row .active-cell {
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(43, 77, 125, 0.12);
  color: var(--ultramarine-deep);
  font-weight: 700;
}

.badge-status {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid rgba(77, 107, 74, 0.28);
  border-radius: 2px;
  background: rgba(77, 107, 74, 0.1);
  color: var(--verdigris);
  font-family: var(--font-inscription);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mini-timemachine {
  position: absolute;
  right: 30px;
  bottom: 22px;
  left: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
  box-shadow: 0 7px 18px rgba(80, 58, 24, 0.06);
}

.tm-node {
  display: flex;
  align-items: center;
  gap: 13px;
}

.tm-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  transform: rotate(45deg);
  background: var(--line-bright);
}

.tm-node.tm-active .tm-dot {
  background: var(--ultramarine-deep);
}

.tm-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.tm-info strong {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.tm-info small {
  color: var(--subtle);
  font-size: 0.78rem;
  font-style: italic;
}

.tm-action {
  padding: 3px 10px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ultramarine-deep);
  font-family: var(--font-inscription);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.mini-stats {
  position: absolute;
  right: 30px;
  bottom: 24px;
  left: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
  box-shadow: 0 7px 18px rgba(80, 58, 24, 0.06);
  font-family: var(--font-mono);
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  font-size: 0.72rem;
}

.stat-k {
  color: var(--subtle);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-v {
  color: var(--text);
  font-weight: 700;
}

.stat-badge-simd {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid rgba(165, 129, 58, 0.35);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(43, 77, 125, 0.12), rgba(165, 129, 58, 0.14));
  color: var(--ultramarine-deep);
  font-size: 0.68rem;
  font-weight: 800;
}

.theme-badge-demo {
  position: absolute;
  right: 30px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
  color: var(--text);
  font-family: var(--font-inscription);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 5px 14px rgba(80, 58, 24, 0.07);
}

.theme-chip-dark {
  border-color: #3b3b3b;
  background: #1e1e1e;
  color: #ececec;
}

.theme-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.theme-chip-dot.parchment {
  border: 1px solid #c9b182;
  background: #eddcb8;
}

.theme-chip-dot.dark {
  background: #61afef;
  box-shadow: 0 0 6px rgba(97, 175, 239, 0.7);
}

/* --------------------------------------------------------------------------
   Technical specifications
   -------------------------------------------------------------------------- */

.specs-section {
  padding-block: 104px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 50px;
}

.spec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.2);
  outline-offset: -6px;
  background: linear-gradient(160deg, rgba(253, 249, 240, 0.94), rgba(242, 234, 216, 0.9));
  box-shadow: 0 9px 26px rgba(80, 58, 24, 0.05);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.spec-card:hover {
  transform: translateY(-3px);
  border-color: rgba(165, 129, 58, 0.5);
  box-shadow: 0 18px 38px rgba(80, 58, 24, 0.12);
}

.spec-icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(165, 129, 58, 0.4);
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(43, 77, 125, 0.1), rgba(165, 129, 58, 0.13));
  box-shadow: inset 0 0 0 3px rgba(255, 252, 243, 0.6);
  color: var(--ultramarine-deep);
}

.spec-icon .icon {
  width: 20px;
  height: 20px;
}

.spec-card h3 {
  margin: 0 0 11px;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}

.spec-card p {
  flex: 1;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.spec-tags span {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

/* --------------------------------------------------------------------------
   Architecture
   -------------------------------------------------------------------------- */

.arch-section {
  padding-block: 124px;
  border-block: 3px double var(--line-bright);
  background:
    radial-gradient(circle at 18% 12%, rgba(43, 77, 125, 0.07), transparent 32rem),
    radial-gradient(circle at 82% 88%, rgba(165, 129, 58, 0.08), transparent 30rem),
    linear-gradient(180deg, var(--surface), var(--bg));
}

.arch-hotpath {
  display: grid;
  gap: 24px;
  margin-top: 54px;
}

.hotpath-track {
  padding: 34px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(252, 248, 238, 0.9);
  box-shadow: 0 11px 32px rgba(80, 58, 24, 0.06);
  transition: border-color 220ms ease;
}

.hotpath-ui {
  border-left: 4px solid var(--verdigris);
}

.hotpath-worker {
  border-left: 4px solid var(--ultramarine);
}

.track-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.track-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px;
  border-radius: var(--radius-sm);
  font-family: var(--font-inscription);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge-fast {
  border: 1px solid rgba(77, 107, 74, 0.3);
  background: rgba(77, 107, 74, 0.1);
  color: var(--verdigris);
}

.badge-worker {
  border: 1px solid rgba(43, 77, 125, 0.3);
  background: rgba(43, 77, 125, 0.1);
  color: var(--ultramarine-deep);
}

.track-header strong {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-style: italic;
  font-weight: 500;
}

.track-steps {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.step-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(80, 58, 24, 0.04);
}

.step-num {
  margin-bottom: 7px;
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.step-card strong {
  margin-bottom: 5px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
}

.step-card small {
  color: var(--subtle);
  font-size: 0.82rem;
  line-height: 1.45;
}

.step-arrow {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.step-highlight {
  border-color: rgba(77, 107, 74, 0.45);
  background: linear-gradient(140deg, rgba(77, 107, 74, 0.09), rgba(252, 248, 238, 0.95));
}

.step-highlight-worker {
  border-color: rgba(43, 77, 125, 0.45);
  background: linear-gradient(140deg, rgba(43, 77, 125, 0.09), rgba(252, 248, 238, 0.95));
}

.arch-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 38px;
}

.pillar-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.2);
  outline-offset: -6px;
  background: linear-gradient(160deg, rgba(253, 249, 240, 0.94), rgba(242, 234, 216, 0.9));
  box-shadow: 0 11px 30px rgba(80, 58, 24, 0.05);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(80, 58, 24, 0.12);
}

.pillar-icon {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid rgba(165, 129, 58, 0.4);
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(43, 77, 125, 0.1), rgba(165, 129, 58, 0.13));
  box-shadow: inset 0 0 0 3px rgba(255, 252, 243, 0.6);
  color: var(--ultramarine-deep);
}

.pillar-icon .icon {
  width: 22px;
  height: 22px;
}

.pillar-card h3 {
  margin: 0 0 13px;
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}

.pillar-card p {
  flex: 1;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.99rem;
  line-height: 1.72;
}

.pillar-card p strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.pillar-tags span {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ultramarine-deep);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
}

.arch-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 50px;
  padding: 26px 34px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.26);
  outline-offset: 4px;
  background: linear-gradient(135deg, rgba(240, 231, 211, 0.7), rgba(252, 248, 238, 0.9));
}

.arch-action-bar p {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-style: italic;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Privacy band
   -------------------------------------------------------------------------- */

.privacy-band {
  position: relative;
  padding-block: 96px;
  border-block: 3px double var(--line-bright);
  background: linear-gradient(100deg, rgba(43, 77, 125, 0.09), rgba(165, 129, 58, 0.07)),
    var(--surface);
}

.privacy-band::before {
  position: absolute;
  inset: 6px 0 auto 0;
  height: 9px;
  background-image: var(--meander);
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 7px;
  opacity: 0.38;
  content: "";
  pointer-events: none;
}

.privacy-inner {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 100px;
  align-items: center;
}

.privacy-inner .text-link {
  display: inline-block;
  margin-top: 24px;
  border-bottom: 1px solid rgba(165, 129, 58, 0.5);
  color: var(--ultramarine-deep);
  font-family: var(--font-inscription);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.privacy-inner .text-link:hover {
  border-bottom-color: var(--gold);
  color: var(--gold-deep);
}

/* --------------------------------------------------------------------------
   Final call to action
   -------------------------------------------------------------------------- */

.final-cta {
  display: flex;
  min-height: 600px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding-block: 104px;
  text-align: center;
}

.final-cta img {
  margin-bottom: 26px;
  filter: drop-shadow(0 16px 26px rgba(100, 70, 30, 0.2));
}

.final-cta .section-kicker {
  justify-content: center;
}

.final-cta h2 {
  max-width: 760px;
}

.final-cta h2::after {
  display: block;
  width: 300px;
  max-width: 80%;
  height: 10px;
  margin: 28px auto 0;
  background-image: var(--divider);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 300px 10px;
  content: "";
}

.final-cta > p:not(.section-kicker) {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.72;
}

.final-cta .hero-actions {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Footer — the colophon
   -------------------------------------------------------------------------- */

footer {
  position: relative;
  border-top: 3px double var(--gold-deep);
  background: linear-gradient(180deg, #2b2216, #1c1610);
  color: #d6c7a6;
}

footer::before {
  position: absolute;
  inset: 5px 0 auto 0;
  height: 9px;
  background-image: var(--meander);
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 7px;
  opacity: 0.42;
  content: "";
  pointer-events: none;
}

.footer-inner {
  min-height: 118px;
  gap: 28px;
}

footer .brand {
  color: #efe3c8;
}

footer .brand span {
  color: var(--gold-pale);
}

footer nav {
  gap: 26px;
}

footer nav a {
  color: #b09d79;
  font-family: var(--font-inscription);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

footer nav a:hover {
  color: var(--gold-bright);
}

.footer-inner > p {
  flex: 1;
  margin: 0 0 0 14px;
  color: #93815f;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Legal page
   -------------------------------------------------------------------------- */

.legal-page {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(255, 251, 240, 0.85), transparent 62%),
    radial-gradient(circle at 78% 4%, rgba(43, 77, 125, 0.12), transparent 32rem),
    linear-gradient(180deg, #f4ead6 0%, #efe3c9 46%, #e9dabb 100%);
}

.legal-shell {
  padding-top: 152px;
  padding-bottom: 124px;
}

.legal-hero {
  max-width: 940px;
  padding-bottom: 88px;
}

.legal-hero h1 {
  margin-top: 24px;
  font-size: clamp(3.3rem, 7.6vw, 6.5rem);
}

.legal-hero > p:not(.eyebrow) {
  max-width: 740px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.76;
}

.policy-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 50px 0 0;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.26);
  outline-offset: 4px;
  background: var(--line);
}

.policy-meta div {
  padding: 22px 24px;
  background: var(--surface-soft);
}

.policy-meta dt {
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.policy-meta dd {
  margin: 8px 0 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
}

.legal-content {
  max-width: 880px;
  margin-left: auto;
}

.legal-content > section {
  padding: 58px 0;
  border-top: 1px solid var(--line);
}

.legal-content h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 3.9vw, 3.1rem);
  font-weight: 600;
  color: var(--text);
}

.legal-content p:not(.section-kicker) {
  max-width: 780px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.82;
}

.legal-content a:not(.button) {
  border-bottom: 1px solid rgba(165, 129, 58, 0.5);
  color: var(--ultramarine-deep);
  text-underline-offset: 3px;
}

.legal-content a:not(.button):hover {
  border-bottom-color: var(--gold);
  color: var(--gold-deep);
}

.legal-content code {
  padding: 0.15em 0.45em;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-raised);
  color: var(--ultramarine-deep);
}

.privacy-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.privacy-points div {
  position: relative;
  min-height: 190px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.2);
  outline-offset: -6px;
  background: linear-gradient(160deg, rgba(253, 249, 240, 0.94), rgba(242, 234, 216, 0.9));
  box-shadow: 0 6px 18px rgba(80, 58, 24, 0.05);
}

.privacy-points strong,
.privacy-points span {
  display: block;
}

.privacy-points strong {
  margin-bottom: 13px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.privacy-points span {
  color: var(--subtle);
  font-size: 0.96rem;
  line-height: 1.66;
}

.legal-content .contact-card {
  margin-top: 56px;
  padding: 44px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.3);
  outline-offset: 5px;
  background: linear-gradient(150deg, rgba(253, 249, 240, 0.95), rgba(240, 231, 211, 0.9));
  box-shadow: 0 14px 36px rgba(80, 58, 24, 0.09);
}

.contact-card .button {
  margin-top: 30px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 90px;
  }

  .hero-mark {
    min-height: 440px;
  }

  .hero-mark > img {
    width: 320px;
  }

  .metric-top {
    right: 8%;
  }
  .metric-bottom {
    left: 7%;
  }

  .section-intro,
  .privacy-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .specs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .arch-pillars-grid {
    grid-template-columns: 1fr;
  }

  .track-steps {
    flex-wrap: wrap;
  }

  .footer-inner {
    flex-wrap: wrap;
    padding-block: 32px;
  }

  .footer-inner > p {
    order: 3;
    width: 100%;
    flex: auto;
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  :root {
    --shell: min(100% - 28px, 1180px);
  }

  body {
    font-size: 1.04rem;
  }

  .site-header nav > a {
    display: none;
  }

  .site-header nav .lang-switch a,
  .site-header nav .lang-switch .lang-current {
    padding: 4px 6px;
    font-size: 0.54rem;
    letter-spacing: 0.02em;
  }

  .nav-shell {
    min-height: 68px;
  }

  h1 {
    font-size: clamp(2.7rem, 13vw, 4.2rem);
  }

  .hero {
    min-height: auto;
    padding-block: 68px 76px;
  }

  .hero-mark {
    min-height: 350px;
  }

  .hero-mark::after {
    display: none;
  }

  .hero-mark > img {
    width: 240px;
  }

  .dropcap::first-letter {
    font-size: 3.4rem;
  }

  .metric-card {
    min-width: 138px;
    padding: 11px 15px;
  }

  .metric-top {
    top: 40px;
    right: 0;
  }
  .metric-bottom {
    bottom: 34px;
    left: 0;
  }

  .product-stage {
    padding-bottom: 84px;
  }

  .window-bar {
    height: 38px;
  }

  .app-frame figcaption {
    text-align: left;
  }

  .vision-section,
  .feature-section,
  .specs-section,
  .arch-section {
    padding-block: 84px;
  }

  .vision-quote {
    padding: 34px 26px 30px 26px;
  }

  .vision-quote::before {
    display: none;
  }

  .homeric-verse {
    font-size: 1.1rem;
    line-height: 1.85;
  }

  .feature-grid,
  .specs-grid,
  .arch-pillars-grid {
    grid-template-columns: 1fr;
  }

  .track-steps {
    flex-direction: column;
    align-items: stretch;
  }

  .step-arrow {
    align-self: center;
    transform: rotate(90deg);
    margin: 2px 0;
  }

  .hotpath-track {
    padding: 26px 22px;
  }

  .feature-card,
  .feature-wide {
    grid-column: auto;
    min-height: 350px;
    padding: 28px 24px 124px;
  }

  .mini-editor,
  .diagnostic,
  .mini-alert,
  .mini-table-demo,
  .mini-timemachine,
  .mini-stats {
    right: 22px;
    bottom: 22px;
    left: 22px;
  }

  .agent-card {
    min-height: 420px;
  }

  .diagnostic button {
    display: none;
  }

  .privacy-band {
    padding-block: 76px;
  }

  .final-cta {
    min-height: 540px;
  }

  .button,
  .button-store {
    font-size: 0.66rem;
    letter-spacing: 0.11em;
  }

  footer nav {
    width: 100%;
    order: 2;
    flex-wrap: wrap;
    gap: 16px 26px;
  }

  .legal-shell {
    padding-top: 112px;
    padding-bottom: 84px;
  }

  .legal-hero {
    padding-bottom: 52px;
  }

  .policy-meta,
  .privacy-points {
    grid-template-columns: 1fr;
  }

  .privacy-points div {
    min-height: auto;
  }

  .legal-content > section {
    padding-block: 44px;
  }

  .legal-content .contact-card {
    padding: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Documentation / manual
   ========================================================================== */

.site-header nav {
  gap: 24px;
}

/* Language switch — a small segmented plaque, not underlined nav links */
.site-header nav .lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  background: rgba(253, 249, 240, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 245, 0.7);
}

.site-header nav .lang-switch a,
.site-header nav .lang-switch .lang-current {
  padding: 5px 9px;
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--font-inscription);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

.site-header nav .lang-switch a::after {
  display: none;
}

.site-header nav .lang-switch a:hover {
  background: rgba(165, 129, 58, 0.13);
  color: var(--gold-deep);
}

.site-header nav .lang-switch .lang-current {
  background: rgba(165, 129, 58, 0.18);
  color: var(--gold-deep);
  font-weight: 700;
}

/* — Two-column docs shell ——————————————————————————————— */

.docs-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 62px;
  align-items: start;
  padding-block: 58px 116px;
}

.docs-sidebar {
  position: sticky;
  top: 112px;
}

.docs-sidebar-title {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.docs-nav {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 13px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.98rem;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.docs-nav a:hover {
  background: rgba(165, 129, 58, 0.07);
  color: var(--text);
}

.docs-nav a[aria-current="page"] {
  border-left-color: var(--gold);
  background: rgba(165, 129, 58, 0.1);
  color: var(--text);
  font-weight: 600;
}

.docs-nav-num {
  min-width: 1.3em;
  color: var(--gold);
  font-family: var(--font-inscription);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.docs-sidebar-back {
  display: inline-block;
  width: 100%;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-hair);
  color: var(--muted);
  font-family: var(--font-inscription);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.docs-sidebar-back:hover {
  color: var(--gold-deep);
}

/* — Docs body ——————————————————————————————————————— */

.docs-main {
  min-width: 0;
}

.docs-hero {
  margin-bottom: 42px;
  padding-bottom: 34px;
  border-bottom: 3px double var(--line-bright);
}

.docs-hero h1 {
  max-width: 22ch;
  font-size: clamp(2.5rem, 4.8vw, 4rem);
}

.docs-lede {
  max-width: 64ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.76;
}

.doc-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--line-hair);
  scroll-margin-top: 118px;
}

.doc-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.doc-section h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--text);
}

.doc-section h3 {
  margin: 34px 0 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
}

.doc-section h3:first-child {
  margin-top: 0;
}

.doc-section p {
  max-width: 76ch;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.doc-section p strong {
  color: var(--text);
}

.doc-section a {
  border-bottom: 1px solid rgba(165, 129, 58, 0.5);
  color: var(--ultramarine-deep);
}

.doc-section a:hover {
  border-bottom-color: var(--gold);
  color: var(--gold-deep);
}

.doc-list {
  max-width: 76ch;
  margin: 16px 0 0;
  padding-left: 1.5em;
  color: var(--muted);
  line-height: 1.8;
}

.doc-list li {
  margin-bottom: 9px;
}

.doc-list li::marker {
  color: var(--gold);
  font-family: var(--font-inscription);
}

.doc-section p.doc-note {
  max-width: 76ch;
  margin-top: 16px;
  color: var(--subtle);
  font-size: 0.96rem;
  font-style: italic;
}

/* — Tables ————————————————————————————————————————— */

.table-wrap {
  margin: 28px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-page);
  box-shadow: 0 6px 18px rgba(80, 58, 24, 0.05);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  font-variant-numeric: tabular-nums;
}

.data-table thead th {
  padding: 13px 16px;
  border-bottom: 2px solid var(--gold);
  background: rgba(165, 129, 58, 0.06);
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
}

.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-hair);
  color: var(--muted);
  line-height: 1.6;
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: rgba(165, 129, 58, 0.05);
}

.data-table tbody td:first-child {
  color: var(--text);
  font-weight: 600;
}

/* — Code & tree output ————————————————————————————————— */

.code-block,
.tree-block {
  margin: 26px 0;
  padding: 22px 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fdf9f0, #f7f0de);
  color: #2f2617;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.75;
  tab-size: 2;
}

.tree-block {
  border-left-color: var(--ultramarine);
}

.code-block code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

/* — Callouts ————————————————————————————————————————— */

.callout {
  margin: 26px 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  background: rgba(253, 249, 240, 0.94);
  box-shadow: 0 5px 16px rgba(80, 58, 24, 0.05);
}

.callout-title {
  margin: 0 0 9px;
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.callout p {
  max-width: 76ch;
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.75;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout ul {
  margin: 0 0 10px;
  padding-left: 1.4em;
  color: var(--muted);
  line-height: 1.75;
}

.callout ul:last-child {
  margin-bottom: 0;
}

.callout-note {
  border-left-color: var(--ultramarine);
}
.callout-note .callout-title {
  color: var(--ultramarine-deep);
}

.callout-tip {
  border-left-color: var(--verdigris);
}
.callout-tip .callout-title {
  color: #3d5c3a;
}

.callout-warning {
  border-left-color: var(--gold);
}

.callout-important {
  border-left-color: var(--terracotta);
}
.callout-important .callout-title {
  color: var(--terracotta);
}

/* — Stat plates & cards ————————————————————————————————— */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.stat-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 1px solid rgba(165, 129, 58, 0.2);
  outline-offset: -5px;
  background: linear-gradient(160deg, rgba(253, 249, 240, 0.95), rgba(242, 234, 216, 0.9));
}

.stat-label {
  display: block;
  margin-bottom: 7px;
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
}

.stat-card small {
  display: block;
  margin-top: 5px;
  color: var(--subtle);
  font-size: 0.84rem;
  font-style: italic;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.doc-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.18);
  outline-offset: -6px;
  background: var(--surface-soft);
}

.doc-card h3 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text);
}

.doc-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* — Keyboard keys ————————————————————————————————————— */

kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--line-bright);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fdfaf1, #efe4c9);
  color: var(--ultramarine-deep);
  font-family: var(--font-mono);
  font-size: 0.76em;
  line-height: 1.6;
  white-space: nowrap;
}

/* — Figures & diagrams ———————————————————————————————————
   Diagrams are laid out with plain HTML/CSS rather than a diagramming
   library: text stays crisp at every width, the styling matches the rest of
   the site, and there is no runtime dependency to fail.               */

.diagram {
  margin: 30px 0;
  padding: 28px 26px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.22);
  outline-offset: -7px;
  background: linear-gradient(160deg, rgba(253, 249, 240, 0.95), rgba(242, 234, 216, 0.9));
  box-shadow: 0 8px 22px rgba(80, 58, 24, 0.05);
}

.diagram-title {
  display: block;
  margin: 0 0 24px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line-hair);
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

/* Small numbered/lettered medallion used inside diagram nodes */
.dgm-idx {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border: 1px solid rgba(165, 129, 58, 0.45);
  border-radius: 50%;
  background: rgba(253, 249, 240, 0.8);
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1;
}

/* — Linear flow ————————————————————————————————————————— */

.dgm-flow {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dgm-flow > li {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
}

.dgm-flow > li + li::before {
  position: absolute;
  top: 50%;
  left: -12px;
  width: 12px;
  height: 1px;
  background: rgba(165, 129, 58, 0.6);
  content: "";
}

.dgm-flow > li + li::after {
  position: absolute;
  top: 50%;
  left: -6px;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--gold);
  content: "";
}

.dgm-flow strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}

.dgm-flow small {
  margin-top: 5px;
  color: var(--subtle);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* — Paired lanes (foreground / background) ————————————————— */

.dgm-lanes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.dgm-lane {
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
}

.dgm-lane-now {
  border-left: 4px solid var(--verdigris);
}

.dgm-lane-later {
  border-left: 4px solid var(--ultramarine);
}

.dgm-lane > h4 {
  margin: 0 0 5px;
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dgm-lane > p {
  margin: 0 0 15px;
  color: var(--subtle);
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.55;
}

.dgm-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: dgmstep;
}

.dgm-steps > li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.dgm-steps > li::before {
  position: absolute;
  top: 0.15em;
  left: 0;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(165, 129, 58, 0.45);
  border-radius: 50%;
  color: var(--gold-deep);
  font-family: var(--font-inscription);
  font-size: 0.5rem;
  font-weight: 700;
  content: counter(dgmstep);
  counter-increment: dgmstep;
}

/* — Fan-out / merge ————————————————————————————————————— */

.dgm-split {
  display: grid;
  justify-items: center;
  gap: 0;
}

.dgm-pill {
  padding: 11px 22px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  text-align: center;
}

.dgm-pill-accent {
  border-color: rgba(43, 77, 125, 0.4);
  background: rgba(43, 77, 125, 0.08);
  color: var(--ultramarine-deep);
}

.dgm-pill-source {
  border-color: rgba(165, 129, 58, 0.5);
  background: rgba(165, 129, 58, 0.1);
  color: var(--gold-deep);
}

/* short vertical connector between diagram rows */
.dgm-link {
  position: relative;
  width: 1px;
  height: 22px;
  background: rgba(165, 129, 58, 0.55);
}

.dgm-link::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 5px;
  height: 5px;
  transform: translate(-50%, 50%) rotate(45deg);
  background: var(--gold);
  content: "";
}

.dgm-branches {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 13px;
}

.dgm-branch {
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-page);
}

.dgm-branch > strong {
  display: block;
  margin-bottom: 9px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.dgm-branch > ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dgm-branch > ul > li {
  position: relative;
  padding-left: 15px;
  color: var(--subtle);
  font-size: 0.84rem;
  line-height: 1.55;
}

.dgm-branch > ul > li::before {
  position: absolute;
  top: 0.58em;
  left: 2px;
  width: 4px;
  height: 4px;
  transform: rotate(45deg);
  background: rgba(165, 129, 58, 0.75);
  content: "";
}

/* — Comparison bars ————————————————————————————————————— */

.dgm-bars {
  display: grid;
  gap: 11px;
  margin: 0;
}

.dgm-bar {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  font-size: 0.91rem;
}

.dgm-bar-label {
  color: var(--muted);
}

.dgm-bar-track {
  height: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
}

.dgm-bar-fill {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  background: linear-gradient(90deg, rgba(95, 81, 56, 0.45), rgba(95, 81, 56, 0.25));
}

.dgm-bar-value {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dgm-bar-hero .dgm-bar-label {
  color: var(--text);
  font-weight: 600;
}

.dgm-bar-hero .dgm-bar-fill {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
}

.dgm-bar-hero .dgm-bar-track {
  border-color: rgba(165, 129, 58, 0.5);
}

/* — Diagram responsive ——————————————————————————————————— */

@media (max-width: 820px) {
  .dgm-flow {
    flex-direction: column;
    gap: 22px;
  }

  .dgm-flow > li + li::before {
    top: -22px;
    left: 50%;
    width: 1px;
    height: 22px;
  }

  .dgm-flow > li + li::after {
    top: -16px;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
  }
}

@media (max-width: 700px) {
  .diagram {
    padding: 22px 18px 20px;
  }

  .dgm-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
  }

  .dgm-bar-label {
    grid-column: 1 / -1;
    font-size: 0.86rem;
  }
}

/* — Docs hub extras ————————————————————————————————————— */

.docs-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.docs-toc a {
  display: block;
  height: 100%;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 1px solid rgba(165, 129, 58, 0.18);
  outline-offset: -6px;
  background: linear-gradient(160deg, rgba(253, 249, 240, 0.95), rgba(242, 234, 216, 0.9));
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.docs-toc a:hover {
  transform: translateY(-3px);
  border-color: rgba(165, 129, 58, 0.5);
  box-shadow: 0 16px 34px rgba(80, 58, 24, 0.11);
}

.docs-toc-num {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-family: var(--font-inscription);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.docs-toc strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}

.docs-toc span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

/* — Docs responsive ————————————————————————————————————— */

@media (max-width: 1080px) {
  .site-header nav a.nav-anchor {
    display: none;
  }
}

@media (max-width: 980px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block: 42px 84px;
  }

  .docs-sidebar {
    position: static;
  }

  .docs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .docs-nav a {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(253, 249, 240, 0.7);
    font-size: 0.88rem;
  }

  .docs-nav a[aria-current="page"] {
    border-color: var(--gold);
    background: rgba(165, 129, 58, 0.12);
  }

  .docs-sidebar-back {
    width: auto;
    margin-top: 18px;
  }
}

@media (max-width: 700px) {
  .docs-hero h1 {
    font-size: clamp(2.1rem, 9vw, 3rem);
  }

  .code-block,
  .tree-block {
    padding: 18px 16px;
    font-size: 0.74rem;
  }

  .data-table {
    font-size: 0.86rem;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 10px 12px;
  }

  .stat-card strong {
    font-size: 1.3rem;
  }
}

/* ==========================================================================
   CJK typography
   --------------------------------------------------------------------------
   Chinese and Japanese display type needs a smaller size, looser leading and
   no negative tracking — the Latin defaults crowd the characters. Synthetic
   obliques also look wrong on CJK glyphs, so emphasis falls back to the gold
   accent and weight instead.
   ========================================================================== */

.lang-zh h1,
.lang-ja h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  line-height: 1.26;
  letter-spacing: 0.004em;
}

.lang-zh h2,
.lang-ja h2 {
  line-height: 1.34;
  letter-spacing: 0.004em;
}

.lang-zh .feature-card h3,
.lang-ja .feature-card h3,
.lang-zh .pillar-card h3,
.lang-ja .pillar-card h3,
.lang-zh .spec-card h3,
.lang-ja .spec-card h3,
.lang-zh .doc-card h3,
.lang-ja .doc-card h3,
.lang-zh .docs-toc strong,
.lang-ja .docs-toc strong,
.lang-zh .dgm-flow strong,
.lang-ja .dgm-flow strong,
.lang-zh .dgm-branch > strong,
.lang-ja .dgm-branch > strong {
  line-height: 1.42;
  letter-spacing: 0.002em;
}

.lang-zh h1 em,
.lang-ja h1 em,
.lang-zh .verse-translation,
.lang-ja .verse-translation,
.lang-zh .docs-lede,
.lang-ja .docs-lede,
.lang-zh .app-frame figcaption,
.lang-ja .app-frame figcaption,
.lang-zh .shot figcaption,
.lang-ja .shot figcaption,
.lang-zh .arch-action-bar p,
.lang-ja .arch-action-bar p,
.lang-zh .footer-inner > p,
.lang-ja .footer-inner > p,
.lang-zh .track-header strong,
.lang-ja .track-header strong,
.lang-zh .doc-section p.doc-note,
.lang-ja .doc-section p.doc-note,
.lang-zh .dgm-lane > p,
.lang-ja .dgm-lane > p,
.lang-zh .stat-card small,
.lang-ja .stat-card small,
.lang-zh .tm-info small,
.lang-ja .tm-info small,
.lang-zh .diagnostic small,
.lang-ja .diagnostic small {
  font-style: normal;
}

.lang-zh .section-kicker,
.lang-ja .section-kicker {
  line-height: 1.8;
}
