/* =========================================================
   AIX Standard — site styles
   Standards-body authority + developer-product clarity
   ========================================================= */

:root {
  /* palette */
  --ink:        #0E1320;   /* dark base */
  --ink-2:      #161D2E;   /* dark surface */
  --ink-3:      #232B40;
  --rule:       #DDDAD0;   /* paper rule */
  --rule-dark:  #2C3450;   /* dark rule */
  --paper:      #FAFAF7;   /* page background */
  --paper-2:    #F3F1E8;   /* alt paper */
  --text:       #0E1320;
  --text-soft:  #4A5168;
  --text-faint: #8A8F9F;
  --text-light: #F4F3EE;
  --text-light-soft: #B7BCCB;

  --accent:     #1E48FF;   /* AIX brand blue — Montserrat ExtraLight wordmark */
  --accent-2:   #0030D9;
  --accent-tint:#E3EAFF;
  --clay:       #C9622E;   /* warm code accent */
  --green:      #157A53;
  --red:        #B5392C;

  /* type */
  --font-display: 'Montserrat', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-sans:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* spacing */
  --container: 1200px;
  --pad: clamp(1.75rem, 4vw, 2.25rem);  /* 28px floor on mobile so the logo + body content breathe */

  /* radius / shadow */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-1: 0 1px 0 rgba(14,19,32,.05), 0 1px 2px rgba(14,19,32,.05);
  --shadow-2: 0 10px 24px -10px rgba(14,19,32,.18), 0 2px 6px rgba(14,19,32,.06);

  /* logo sizing */
  --logo-size-header:   clamp(2.5rem, 6vw, 4.5rem);
  --logo-size-hero:     clamp(4rem, 12vw, 9rem);
  --logo-size-footer:   clamp(2rem, 4vw, 3rem);
  --logo-size-scrolled: 2.1rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01','cv11';
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--text-light);
  padding: .6rem 1rem; border-radius: 0 0 var(--r-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

code, pre { font-family: var(--font-mono); }
code {
  font-size: 0.875em;
  background: rgba(14,19,32,.06);
  padding: .12em .38em;
  border-radius: 4px;
  color: inherit;
  /* allow long unbreakable tokens (e.g. {component}_{objectType}_{identifier}_{property})
     to wrap so they don't blow out narrow grid items on mobile */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.section-dark code { background: rgba(255,255,255,.08); color: var(--text-light); }
/* preserve the original behavior inside <pre> blocks — those use overflow-x: auto for scroll */
.code-card pre code,
pre code {
  overflow-wrap: normal;
  word-break: normal;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,247,.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: padding .25s ease, background .25s ease;
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  /* vertical only — horizontal padding comes from .container's --pad */
  padding-top: clamp(.75rem, 1.5vw, 1.5rem);
  padding-bottom: clamp(.75rem, 1.5vw, 1.5rem);
}
.brand {
  display: inline-flex; align-items: baseline; gap: .85rem;
  color: var(--accent);
  text-decoration: none;
  line-height: 1;
}
.brand:hover { color: var(--accent-2); }
.brand-text { display: inline-flex; align-items: baseline; gap: .85rem; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--logo-size-header);
  letter-spacing: .02em;
  color: var(--accent);
  line-height: 1;
  transition: font-size .25s ease;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1vw, 13px);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
  align-self: center;
  transition: opacity .2s ease;
}

/* compact-on-scroll: shrinks the wordmark so the header doesn't dominate after the user scrolls past the brand statement */
.site-header.is-scrolled .brand-name {
  font-size: var(--logo-size-scrolled);
}
.site-header.is-scrolled .brand-sub {
  display: none;
}
.site-header.is-scrolled .header-row {
  padding-top: .6rem;
  padding-bottom: .6rem;
}

.site-nav {
  display: flex; align-items: center; gap: 1.5rem;
  font-size: 14px;
}
.site-nav a {
  color: var(--text-soft);
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--ink);
  padding: .42rem .75rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }
.closing-cta-mail {
  margin-top: 1.25rem;
  font-size: .9rem;
  color: var(--text-soft);
}
.closing-cta-mail a { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  margin: 4px 0; border-radius: 2px; transition: transform .2s, opacity .2s;
}
.mobile-nav {
  display: none;
  border-top: 1px solid var(--rule);
  padding: .5rem var(--pad) 1rem;
  background: var(--paper);
}
.mobile-nav a {
  display: block;
  padding: .75rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-weight: 500;
}
.mobile-nav a:last-child { border-bottom: 0; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(26,79,255,.06), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(14,19,32,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14,19,32,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.badge-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.badge {
  display: inline-flex; align-items: center;
  padding: .3rem .65rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--text-light);
  border-radius: 999px;
}
.badge.subtle {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--rule);
}
.badge-link {
  text-decoration: none;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.badge-link:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(30,72,255,.4);
}
.badge-link > span[aria-hidden] {
  margin-left: .35rem;
  transition: transform .15s ease;
  display: inline-block;
}
.badge-link:hover > span[aria-hidden] {
  transform: translateX(2px);
}
/* hero brand showpiece — Montserrat ExtraLight wordmark, the page's primary visual */
.hero-brand {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--logo-size-hero);
  color: var(--accent);
  letter-spacing: .02em;
  line-height: .9;
  margin: 0 0 1.5rem;
  display: block;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.015em;
  font-weight: 400;
  margin: 0 0 1.25rem;
  max-width: 28ch;
  color: var(--ink);
}
.accent-word { color: var(--ink); }   /* drop the secondary accent — the AIX wordmark owns the accent now */
.hero-lede {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-soft);
  max-width: 64ch;
  margin: 0 0 1.75rem;
  line-height: 1.6;
}
.hero-ctas {
  display: flex; gap: .75rem; flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600;
  font-size: 15px;
  padding: .85rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: var(--text-light);
}
.btn-primary:hover { background: var(--accent); color: var(--text-light); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--text-light); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  list-style: none;
  padding: 1.5rem 0 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  gap: 1rem;
}
.hero-stats li {
  display: flex; flex-direction: column;
  padding-top: 1.25rem;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1;
}
.stat-label {
  margin-top: .35rem;
  color: var(--text-soft);
  font-size: 13px;
}

/* ---------- strip ---------- */
.strip {
  background: var(--ink);
  color: var(--text-light);
  border-top: 1px solid var(--rule-dark);
  border-bottom: 1px solid var(--rule-dark);
}
.strip-text {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  padding: 1.5rem 0;
  margin: 0;
  color: var(--text-light-soft);
  max-width: 90ch;
}
.strip-text strong { color: var(--text-light); font-weight: 600; }

/* ---------- generic section ---------- */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-bottom: 1px solid var(--rule);
}
.section-dark {
  background: var(--ink);
  color: var(--text-light);
  border-bottom: 1px solid var(--rule-dark);
}
.section-paper { background: var(--paper-2); }
.section .eyebrow,
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1rem;
}
.eyebrow.light { color: var(--text-light-soft); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.012em;
  font-weight: 400;
  margin: 0 0 1.25rem;
  color: var(--ink);
  max-width: 24ch;
}
.section-title.light { color: var(--text-light); }
.section-sub {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 64ch;
}
.section-sub.light { color: var(--text-light-soft); }
.section-header { margin-bottom: 2.5rem; max-width: 70ch; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header.center .section-title { margin-left: auto; margin-right: auto; }
.section-header.center .section-sub { margin-left: auto; margin-right: auto; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.col-narrow .section-title { max-width: 20ch; }
.lead {
  font-size: 1.1rem;
  color: var(--text-soft);
  margin: 0 0 1.5rem;
  line-height: 1.6;
  max-width: 64ch;
}
.lead.light { color: var(--text-light-soft); }

/* ---------- problem list ---------- */
.problem-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 0;
}
.problem-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}
.problem-list li:last-child { border-bottom: 1px solid var(--rule); }
.problem-list .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  margin-top: .55rem;
}
.problem-list strong { color: var(--ink); font-weight: 600; }

/* ---------- anatomy of an AIX message (§ 2) ---------- */
.anatomy {
  background: var(--ink-2);
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.anatomy-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.1rem;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--rule-dark);
  font-family: var(--font-mono);
  font-size: 12px;
}
.anatomy-tag {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 10.5px;
  background: rgba(30,72,255,.18);
  color: #B8C7FF;
}
.anatomy-file { color: var(--text-light-soft); }

.anatomy-meta {
  list-style: none;
  padding: 1rem 1.1rem;
  margin: 0;
  border-bottom: 1px dashed var(--rule-dark);
  display: grid;
  gap: .5rem;
}
.anatomy-meta li {
  display: grid;
  grid-template-columns: 9rem 7rem 1fr;
  gap: 1rem;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 13px;
}
.anatomy-key {
  color: #8AB4FF;
  font-weight: 500;
}
.anatomy-type {
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.anatomy-note {
  color: var(--text-light-soft);
  font-size: 13px;
}
.anatomy-note code,
.anatomy-subnote code {
  font-family: var(--font-mono);
  background: rgba(255,255,255,.07);
  padding: .08em .35em;
  border-radius: 3px;
  font-size: .9em;
  color: var(--text-light);
}

.anatomy-blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule-dark);
}
.anatomy-block {
  background: var(--ink-2);
  padding: 1rem 1.1rem 1.1rem;
}
.anatomy-block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem;
  padding-bottom: .65rem;
  margin-bottom: .65rem;
  border-bottom: 1px solid var(--rule-dark);
}
.anatomy-block-key {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: -.005em;
}
.anatomy-block-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
}
.anatomy-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .35rem;
}
.anatomy-sub li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: .75rem;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.45;
}
.anatomy-subkey {
  color: #8AB4FF;
}
.anatomy-subnote {
  color: var(--text-light-soft);
}
.anatomy-subnote.muted,
.anatomy-sub li .muted { color: var(--text-faint); font-style: italic; }
.anatomy-sub li:has(.muted) {
  grid-template-columns: 1fr;
}

.anatomy-foot {
  padding: .9rem 1.1rem;
  margin: 0;
  border-top: 1px solid var(--rule-dark);
  color: var(--text-light-soft);
  font-size: .9rem;
  background: rgba(0,0,0,.18);
}
.anatomy-foot a { color: #B8C7FF; text-decoration: underline; text-underline-offset: 2px; }
.anatomy-foot a:hover { color: var(--text-light); }

/* ---------- pillars ---------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.pillar {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.75rem 1.5rem;
  position: relative;
  min-width: 0;   /* allow grid item to shrink below content's natural width */
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pillar:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: rgba(14,19,32,.18);
}
.pillar-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: .85rem;
}
.pillar h3 {
  font-size: 1.15rem;
  margin: 0 0 .65rem;
  letter-spacing: -.015em;
  color: var(--ink);
  line-height: 1.25;
}
.pillar p {
  margin: 0 0 1rem;
  color: var(--text-soft);
  font-size: .95rem;
}
.checklist {
  list-style: none; padding: 0; margin: 0;
}
.checklist li {
  font-size: .9rem;
  color: var(--text-soft);
  padding: .35rem 0 .35rem 1.4rem;
  position: relative;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: .82rem;
  width: 14px; height: 2px; background: var(--accent);
  border-radius: 2px;
}
.mode-row {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin: .25rem 0 .85rem;
}
.mode-chip {
  font-family: var(--font-mono);
  font-size: .8rem;
  padding: .25rem .55rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
}
.micro {
  font-size: 12px;
  color: var(--text-faint);
  margin: 0;
}

/* ---------- examples (code) ---------- */
.example { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.example:last-child { margin-bottom: 0; }
.example-head { margin-bottom: 1.25rem; max-width: 70ch; }
.example-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .35rem;
}
.example-head h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin: 0;
  letter-spacing: -.015em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
}
.code-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.code-pair.single { grid-template-columns: 1fr; }
.code-card {
  background: var(--ink);
  color: var(--text-light);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--rule-dark);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column;
}
.code-card.good { border-color: rgba(21,122,83,.45); }
.code-card.bad { border-color: rgba(181,57,44,.45); }
.code-card.neutral { border-color: var(--rule-dark); }
.code-card.wide { width: 100%; }

.code-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem .9rem;
  background: var(--ink-2);
  border-bottom: 1px solid var(--rule-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-light-soft);
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 10.5px;
  background: rgba(255,255,255,.08);
  color: var(--text-light);
}
.tag-good { background: rgba(21,122,83,.22); color: #6FE0B4; }
.tag-bad { background: rgba(181,57,44,.22); color: #FFA08F; }
.filename { color: var(--text-light-soft); }

.code-card pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 13px;
  line-height: 1.6;
  color: #E6EAF2;
  background: var(--ink);
  scrollbar-width: thin;
  scrollbar-color: var(--rule-dark) transparent;
  /* keyboard focus for horizontal scroll on mobile/tablet */
  outline: 0;
}
.code-card pre:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.code-card pre::-webkit-scrollbar { height: 6px; }
.code-card pre::-webkit-scrollbar-thumb {
  background: var(--rule-dark);
  border-radius: 3px;
}
.code-card code { background: transparent; padding: 0; color: inherit; font-size: 13px; }
.code-card pre code {
  font-family: var(--font-mono);
}

/* JSON syntax tokens — restrained color set, AA contrast on var(--ink) background */
.tok-key    { color: #8AB4FF; }   /* JSON keys: brand-blue family */
.tok-str    { color: #B7E3A1; }   /* strings: soft green */
.tok-num    { color: #FFC678; }   /* numbers: warm amber */
.tok-bool   { color: #FFB4D8; }   /* true / false: muted pink */
.tok-null   { color: var(--text-faint); font-style: italic; }
.tok-punct  { color: var(--text-light-soft); }
.code-note {
  margin: 0;
  padding: .85rem 1.2rem;
  border-top: 1px solid var(--rule-dark);
  color: var(--text-light-soft);
  font-size: .85rem;
  background: var(--ink-2);
}
.code-card.bad .code-note { color: #FFA08F; }
.code-card.good .code-note { color: #93E5BE; }

/* ---------- why / benefits ---------- */
.benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
}
.benefit {
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  min-width: 0;
}
.benefit h4 {
  margin: 0 0 .35rem;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  color: var(--ink);
  font-weight: 600;
}
.benefit p {
  margin: 0;
  color: var(--text-soft);
  font-size: .95rem;
}

/* ---------- spec section ---------- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-dark);
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.spec-card {
  background: var(--ink);
  padding: 1.5rem;
}
.spec-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-light-soft);
  margin: 0 0 .5rem;
}
.spec-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -.005em;
  margin: 0 0 .25rem;
  color: var(--text-light);
}
.spec-meta {
  font-size: .85rem;
  margin: 0;
  color: var(--text-light-soft);
}

.toc {
  border-top: 1px solid var(--rule-dark);
  padding-top: 2rem;
}
.toc-title {
  font-size: 1.1rem;
  color: var(--text-light);
  margin: 0 0 1rem;
  letter-spacing: -.01em;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.toc-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: .75rem;
  align-items: baseline;
  padding: .85rem 0;
  border-bottom: 1px dashed var(--rule-dark);
  color: var(--text-light-soft);
}
.toc-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
}
.toc-text { font-size: .95rem; color: var(--text-light-soft); }

/* ---------- adopt grid ---------- */
.adopt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.adopt-card {
  display: block;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink);
  min-width: 0;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.adopt-card:hover {
  border-color: var(--ink);
  background: var(--paper);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.adopt-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: .85rem;
}
.adopt-card h3 {
  font-size: 1.2rem;
  margin: 0 0 .5rem;
  letter-spacing: -.015em;
  color: var(--ink);
}
.adopt-card p {
  margin: 0 0 .85rem;
  color: var(--text-soft);
  font-size: .95rem;
}
.adopt-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: .02em;
}

/* ---------- closing ---------- */
.closing { padding-bottom: clamp(4rem, 8vw, 6rem); }
.pullquote {
  margin: 0 0 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 72ch;
}
.pullquote p {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.35;
  letter-spacing: -.005em;
  color: var(--ink);
  margin: 0 0 1rem;
  font-weight: 300;
}
.pullquote footer {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
}
.closing-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  margin: 0 0 1rem;
  letter-spacing: -.012em;
  font-weight: 400;
  color: var(--ink);
}
.closing-cta p {
  color: var(--text-soft);
  margin: 0 0 1.5rem;
  max-width: 60ch;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--text-light-soft);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule-dark);
}
.footer-brand-mark {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: var(--logo-size-footer);
  color: var(--accent);
  letter-spacing: .02em;
  line-height: 1;
  margin: 0 0 1rem;
  display: block;
}
.footer-tag {
  color: var(--text-light);
  font-weight: 600;
  margin: 0 0 .5rem;
  font-size: .95rem;
  letter-spacing: -.01em;
}
.footer-fine {
  color: var(--text-light-soft);
  font-size: .88rem;
  max-width: 42ch;
  margin: 0;
  line-height: 1.55;
}
.footer-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 0 0 .85rem;
}
.footer-list {
  list-style: none; padding: 0; margin: 0;
}
.footer-list li {
  padding: .3rem 0;
  font-size: .9rem;
  color: var(--text-light-soft);
}
.footer-list a {
  color: var(--text-light-soft);
}
.footer-list a:hover { color: var(--text-light); }

/* Ubertrends Network — family site cross-links per family standards § 2 */
.footer-network {
  /* vertical only — horizontal padding comes from .container's --pad
     (don't use padding shorthand here; it zeros the .container horizontal padding) */
  padding-top: 1.75rem;
  padding-bottom: 1rem;
  border-top: 1px solid var(--rule-dark);
}
.footer-network .footer-head {
  margin-bottom: .85rem;
}
.footer-network-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 0;
  font-size: .9rem;
  line-height: 1.5;
}
.footer-network-list li {
  display: inline-flex;
  align-items: center;
}
.footer-network-list li:not(:last-child)::after {
  content: "·";
  margin: 0 .65rem;
  color: var(--text-faint);
}
.footer-network-list a {
  color: var(--text-light-soft);
  transition: color .12s ease;
  text-decoration: none;
}
.footer-network-list a:hover {
  color: var(--text-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding-top: 1.75rem;
  font-size: .82rem;
  color: var(--text-light-soft);
  border-top: 1px solid var(--rule-dark);
}
.footer-bottom a { color: var(--text-light-soft); }
.footer-bottom a:hover { color: var(--text-light); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .toc-list { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .anatomy-blocks { grid-template-columns: 1fr; }
  .anatomy-meta li { grid-template-columns: 7rem 5rem 1fr; }
  .site-nav { gap: 1.1rem; font-size: 13.5px; }
  .brand-sub { display: none; }
}

/* hamburger menu kicks in below 900px so iPad-class tablets get a clean header */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-block; }
  .two-col { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
  .code-pair { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr; }
  .adopt-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 0.5rem 1rem; }
  .brand-sub { display: none; }
  .footer-bottom { font-size: .8rem; }
  /* anatomy: stack everything single-column and tighten the meta row */
  .anatomy-meta li {
    grid-template-columns: 1fr;
    gap: .15rem;
    padding-bottom: .5rem;
    border-bottom: 1px dashed rgba(255,255,255,.06);
  }
  .anatomy-meta li:last-child { border-bottom: 0; padding-bottom: 0; }
  .anatomy-sub li { grid-template-columns: 6rem 1fr; }
  /* code block: hint at horizontal scroll with right-edge fade */
  .code-card pre {
    background:
      linear-gradient(to right, var(--ink) 95%, transparent),
      var(--ink);
  }
}

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

/* =========================================================
   /spec.html — single-page Draft 2.2 specification
   ========================================================= */

.spec-page {
  --paper-3: #EFEDE2;
  --rule-soft: #E8E5DA;
  --accent-soft: #F0F4FF;
}

/* Sticky breadcrumb */
.spec-breadcrumb {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-faint);
  padding: .55rem 0;
}
.spec-breadcrumb .container {
  display: flex; align-items: center; gap: .75rem;
}
.spec-breadcrumb-text strong {
  color: var(--accent);
  font-weight: 500;
}

/* Two-column shell */
.spec-shell {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
}

.spec-sidebar {
  padding: 2.5rem 1.5rem 4rem 2rem;
  border-right: 1px solid var(--rule-soft);
  position: sticky;
  top: 2.5rem;
  align-self: start;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: var(--paper);
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.spec-sidebar::-webkit-scrollbar { width: 6px; }
.spec-sidebar::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }

.spec-content {
  padding: 3rem clamp(1.75rem, 4vw, 3rem) 6rem;
  max-width: 820px;
  min-width: 0;
}

/* Sidebar TOC */
.spec-toc-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1rem;
}
.spec-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
}
.spec-toc-list ol {
  list-style: none;
  padding: 0 0 0 .85rem;
  margin: .25rem 0 .5rem;
  border-left: 1px solid var(--rule-soft);
}
.spec-toc-list li {
  padding: .1rem 0;
}
.spec-toc-list a {
  color: var(--text-soft);
  text-decoration: none;
  display: block;
  padding: .15rem 0 .15rem .5rem;
  border-left: 2px solid transparent;
  margin-left: -.5rem;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.spec-toc-list a:hover {
  color: var(--accent);
}
.spec-toc-list a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
  background: var(--accent-soft);
}

/* Masthead */
.spec-masthead {
  margin: 0 0 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}
.spec-masthead-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}
.spec-masthead-title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--accent);
  line-height: .95;
  letter-spacing: .01em;
  margin: 0 0 .5rem;
}
.spec-masthead-subtitle {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  color: var(--ink);
  letter-spacing: -.005em;
  margin: 0 0 2rem;
}
.spec-masthead-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  margin: 0 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 13px;
}
.spec-masthead-meta dt {
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10.5px;
  margin: 0;
}
.spec-masthead-meta dd {
  color: var(--text);
  margin: .2rem 0 0;
  font-size: 13px;
}
.spec-masthead-abstract {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 1.5rem 0 0;
  max-width: 56ch;
}
.spec-masthead-actions {
  margin-top: 2rem;
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
}
.spec-action-btn {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  padding: .55rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  transition: border-color .15s ease, background .15s ease;
  cursor: pointer;
}
.spec-action-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.spec-action-btn.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.spec-action-btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Content typography */
.spec-content h1,
.spec-content h2,
.spec-content h3,
.spec-content h4,
.spec-content h5 {
  position: relative;
  font-family: var(--font-display);
  scroll-margin-top: 4.5rem;
}
.spec-content h1 {
  font-size: 2.75rem;
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.15;
  margin: 4rem 0 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--rule);
}
.spec-content h1:first-of-type { margin-top: 0; }
.spec-content h2 {
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1.25;
  margin: 3rem 0 1rem;
  color: var(--ink);
}
.spec-content h3 {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -.005em;
  line-height: 1.3;
  margin: 2.25rem 0 .75rem;
  color: var(--ink);
}
.spec-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.005em;
  margin: 1.5rem 0 .5rem;
  color: var(--text-soft);
}
.spec-content h5 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 .5rem;
  color: var(--text-soft);
}
.heading-anchor {
  opacity: 0;
  margin-left: .5rem;
  color: var(--text-faint);
  text-decoration: none;
  font-weight: 400;
  transition: opacity .15s ease, color .15s ease;
}
.spec-content h1:hover .heading-anchor,
.spec-content h2:hover .heading-anchor,
.spec-content h3:hover .heading-anchor,
.spec-content h4:hover .heading-anchor,
.spec-content h5:hover .heading-anchor {
  opacity: 1;
}
.heading-anchor:hover { color: var(--accent); }

/* Body */
.spec-content p {
  margin: 0 0 1.15rem;
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.7;
}
.spec-content strong { font-weight: 600; color: var(--ink); }
.spec-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.spec-content ul, .spec-content ol {
  margin: 0 0 1.15rem;
  padding-left: 1.5rem;
  max-width: 68ch;
}
.spec-content li {
  margin: .35rem 0;
  line-height: 1.65;
}

/* Inline code in spec */
.spec-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--paper-2);
  padding: .1em .35em;
  border-radius: 4px;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Fenced code block */
.spec-code {
  margin: 1.5rem 0 2rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ink-2);
  background: var(--ink);
  box-shadow: 0 10px 24px -10px rgba(14,19,32,.18), 0 2px 6px rgba(14,19,32,.06);
}
.spec-code-head {
  padding: .5rem .9rem;
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
}
.spec-code-lang {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-light-soft);
}
.spec-code pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: #E6EAF2;
  background: transparent;
}
.spec-code code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
  overflow-wrap: normal;
  word-break: normal;
}

/* Tables */
.spec-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2.5rem;
  font-size: 14.5px;
  line-height: 1.5;
}
.spec-content thead th {
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: .75rem .85rem;
  border-bottom: 2px solid var(--ink);
  background: var(--paper-2);
}
.spec-content tbody td {
  padding: .75rem .85rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  color: var(--text);
}
.spec-content tbody tr:hover td {
  background: var(--paper-2);
}

/* Blockquote callouts */
.spec-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 6px 6px 0;
  font-size: 14.5px;
  color: var(--text);
}
.spec-content blockquote p { margin: 0 0 .65rem; }
.spec-content blockquote p:last-child { margin-bottom: 0; }
.spec-content blockquote ul { margin: .5rem 0; }

/* Spec section rules */
.spec-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3.5rem 0;
}

/* Collapsible reference tables (e.g. §6.6 Deprecated Keys) */
.spec-collapsible {
  margin: 1.5rem 0;
}
.spec-collapsible > summary {
  cursor: pointer;
  padding: .65rem 1rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--text-soft);
  list-style: none;
  transition: background .15s ease, border-color .15s ease;
}
.spec-collapsible > summary::before {
  content: "▸ ";
  color: var(--accent);
  display: inline-block;
  transition: transform .15s ease;
}
.spec-collapsible[open] > summary::before {
  transform: rotate(90deg);
}
.spec-collapsible > summary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.spec-collapsible > table { margin-top: 1rem; }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(14,19,32,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 55;
  font-size: 18px;
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* Floating mobile TOC button */
.floating-toc-btn {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .65rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(14,19,32,.4);
  display: none;
  z-index: 56;
}
.floating-toc-btn::before {
  content: "≡ ";
}

/* Mobile TOC overlay */
.spec-toc-overlay {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 100;
  padding: 1.5rem 1.75rem 6rem;
  overflow-y: auto;
}
.spec-toc-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.spec-toc-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  padding: .25rem .5rem;
}

/* Spec page responsive */
@media (max-width: 1024px) {
  .spec-shell { grid-template-columns: 1fr; }
  .spec-sidebar {
    display: none;
  }
  .floating-toc-btn { display: block; }
  .spec-content { padding-top: 2rem; }
}
@media (max-width: 760px) {
  .spec-content { padding: 1.5rem 1.5rem 6rem; }
  .spec-masthead-meta { grid-template-columns: 1fr; }
  .spec-content table {
    font-size: 13px;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .spec-content table td { white-space: normal; min-width: 12ch; }
  .spec-breadcrumb { display: none; }
}

/* =========================================================
   /propose.html + /thanks.html — Formspree submission flow
   ========================================================= */

.form-page main { background: var(--paper); }

.form-section {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 6rem);
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.form-header {
  grid-column: 1 / -1;
  max-width: 56ch;
  margin-bottom: 2rem;
}
.form-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.05;
  color: var(--ink);
  margin: .5rem 0 1rem;
}
.form-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0 0 1rem;
}

.thanks-shell {
  max-width: 56ch;
}
.thanks-shell .form-actions {
  margin-top: 2rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* The form */
.propose-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.form-fieldset {
  border: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  margin: 0;
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
}
.form-legend {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 .35rem;
  margin-left: -.35rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}
.form-field:last-of-type { margin-bottom: 0; }
.form-field label {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.005em;
}
.form-hint {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 12.5px;
  margin-left: .25rem;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: .7rem .9rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  width: 100%;
  box-sizing: border-box;
}
.form-field textarea {
  font-family: var(--font-sans);
  resize: vertical;
  min-height: 6.5rem;
}
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%234A5168' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: 0;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(30,72,255,.15);
}

.form-actions {
  margin-top: .75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
}
.form-actions .btn { align-self: flex-start; }
.form-fineprint {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0;
  font-family: var(--font-mono);
}
.form-fineprint code {
  background: transparent;
  padding: 0;
  color: var(--text-soft);
}

/* Honeypot — visually hidden but available to bots */
input[name="_gotcha"] {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Aside */
.form-aside {
  position: sticky;
  top: 4.5rem;
  padding: 1.75rem 1.5rem;
  background: var(--ink-2);
  color: var(--text-light);
  border-radius: 12px;
  border: 1px solid var(--rule-dark);
}
.form-aside-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -.005em;
  color: var(--text-light);
  margin: 0 0 1rem;
}
.form-aside-list {
  list-style: none;
  counter-reset: aside;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-light-soft);
}
.form-aside-list li {
  counter-increment: aside;
  padding: .5rem 0 .5rem 2rem;
  position: relative;
  border-top: 1px solid var(--rule-dark);
}
.form-aside-list li:first-child { border-top: 0; }
.form-aside-list li::before {
  content: counter(aside);
  position: absolute;
  left: 0;
  top: .55rem;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .04em;
}
.form-aside-list strong { color: var(--text-light); font-weight: 600; }
.form-aside-list a { color: #B8C7FF; }
.form-aside-list a:hover { color: var(--text-light); }
.form-aside-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-light-soft);
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-dark);
}
.form-aside-note code {
  background: rgba(255,255,255,.08);
  color: var(--text-light);
  padding: .1em .35em;
  border-radius: 3px;
  font-size: .9em;
}

@media (max-width: 900px) {
  .form-shell { grid-template-columns: 1fr; }
  .form-aside { position: static; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Print stylesheet */
@media print {
  .site-header,
  .spec-sidebar,
  .spec-breadcrumb,
  .back-to-top,
  .floating-toc-btn,
  .spec-toc-overlay,
  .spec-masthead-actions,
  .heading-anchor { display: none !important; }
  .spec-shell { grid-template-columns: 1fr; max-width: none; }
  .spec-content { padding: 0; max-width: none; }
  .spec-code { break-inside: avoid; box-shadow: none; }
  details.spec-collapsible[open] > summary { display: none; }
  details.spec-collapsible > table { display: table !important; margin-top: 0; }
  /* Force-open collapsed details for printing */
  details.spec-collapsible:not([open]) > table { display: table !important; }
  body { font-size: 11pt; line-height: 1.5; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #666; }
  a[href^="#"]::after { content: ""; }
}
