/* ==========================================================================
   RayShield — marketing site
   Tokens follow Brief v1.2 Section 5, with the palette re-anchored to
   black / white / #00bfa6 per client direction.
   ========================================================================== */

/* Self-hosted variable webfonts — Section 7.2 forbids a third-party CDN in production.
   One file per family per subset: all three weights are the same variable font. */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Grounds */
  --ink:           #000000;   /* dark ground — argument sections */
  --ink-raised:    #0B0B0B;   /* raised surfaces on dark */
  --paper:         #FFFFFF;   /* light ground — explanation sections */
  --paper-raised:  #FAFAFA;   /* raised surfaces on light */

  /* Text */
  --text-hi:       #FFFFFF;   /* body text on dark */
  --text-lo:       #8A8A8A;   /* secondary text on dark */
  --ink-text:      #0A0A0A;   /* body text on light */
  --ink-lo:        #5E5E5E;   /* secondary text on light (7.0:1 on white) */

  /* Accent — used with restraint. Signals RayShield intervention only. */
  --accent:        #00BFA6;   /* on dark ground: 9.1:1 */
  --accent-ink:    #00806E;   /* accent as text on white: 4.9:1 */
  --accent-wash:   rgba(0, 191, 166, 0.07);
  --accent-edge:   rgba(0, 191, 166, 0.35);

  /* Verdicts — DENY carries the accent because DENY is where the product acts.
     ALLOW is deliberately colourless. Flip these two lines to invert. */
  --verdict-deny:  var(--accent);
  --verdict-allow: var(--text-lo);

  /* Hairlines */
  --line:          #232323;
  --line-light:    #E4E4E4;

  /* Type */
  --display: "Instrument Sans", "Söhne Breit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body:    "Inter", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:    "JetBrains Mono", "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --col:      1180px;
  --prose:    68ch;
  --pad-y:    120px;
  --radius:   2px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1.15em; max-width: var(--prose); }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

::selection { background: var(--accent); color: #000; }

/* Focus — visible, never removed (7.3) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #000;
  padding: 12px 18px; z-index: 999;
  font-family: var(--mono); font-size: 13px;
}
.skip:focus { left: 12px; top: 12px; }

/* --------------------------------------------------------------------------
   Structural primitives
   -------------------------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 28px; }
.wrap--narrow { max-width: 780px; }

.band { padding: var(--pad-y) 0; }
.band--dark  { background: var(--ink);   color: var(--text-hi); }
.band--light { background: var(--paper); color: var(--ink-text); }
.band--raised{ background: var(--paper-raised); color: var(--ink-text); }
.band--tight { padding: 76px 0; }

.band--dark  h1, .band--dark  h2, .band--dark  h3 { color: var(--text-hi); }
.band--dark  + .band--dark { padding-top: 0; }

/* Eyebrow / label — mono, uppercase, tracked. Section 5.3. */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-lo);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--accent-ink);
  flex: none;
}
.band--dark .eyebrow { color: var(--text-lo); }
.band--dark .eyebrow::before { background: var(--accent); }

.lede {
  font-size: 1.06rem;
  color: var(--ink-lo);
  max-width: var(--prose);
  margin-top: 22px;
}
.band--dark .lede { color: var(--text-lo); }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-raised);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 1px 5px;
  color: var(--ink-text);
  white-space: nowrap;
}
.band--dark code { background: var(--ink-raised); border-color: var(--line); color: var(--text-hi); }

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 15px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.btn--primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.btn--primary:hover { background: #00D6BA; }

.btn--ghost {
  background: transparent;
  color: var(--text-hi);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.band--light .btn--ghost { color: var(--ink-text); border-color: var(--line-light); }
.band--light .btn--ghost:hover { border-color: var(--accent-ink); color: var(--accent-ink); }

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

.site-head {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.site-head__in {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--text-hi);
  font-family: var(--display);
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
}
/* Logo mark: a sealed square with a single scan line through it (imaging, 5.1) */
.brand__mark { width: 15px; height: 15px; flex: none; display: block; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-lo);
  text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-hi); }
.nav a[aria-current="page"] { box-shadow: 0 6px 0 -5px var(--accent); }
.nav .btn { padding: 10px 16px; }

.nav__toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text-hi); font-family: var(--mono); font-size: 12px;
  padding: 8px 12px; cursor: pointer;
}

.site-foot { background: var(--ink); color: var(--text-lo); padding: 64px 0 40px; }
.site-foot a { color: var(--text-lo); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid var(--line);
}
.foot-grid h4 {
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-hi); margin: 0 0 16px;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 9px; font-size: 14px; }
.foot-note {
  padding-top: 24px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.04em; display: flex; flex-wrap: wrap; gap: 18px;
  justify-content: space-between;
}
.foot-flag { color: #4A4A4A; }

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

.hero { background: var(--ink); color: var(--text-hi); padding: 108px 0 116px; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 64px;
  align-items: start;
}
.hero h1 { max-width: 13ch; }
.hero__sub { color: var(--text-lo); font-size: 1.1rem; margin-top: 26px; max-width: 46ch; }
.hero__sub b { color: var(--text-hi); font-weight: 400; }

/* --------------------------------------------------------------------------
   Signature element — the verdict trace (Section 6)
   -------------------------------------------------------------------------- */

.trace {
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
}
.trace__chrome {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-lo);
}
.trace__live { display: inline-flex; align-items: center; gap: 8px; }
.trace__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.trace__lines { list-style: none; margin: 0; padding: 10px 0; }

.trace__line {
  display: grid;
  grid-template-columns: 92px 44px minmax(0, 1fr) 58px;
  gap: 12px;
  align-items: baseline;
  padding: 5px 16px 5px 13px;
  border-left: 3px solid transparent;
  white-space: nowrap;
}
.trace__line .t   { color: #4E4E4E; }
.trace__line .op  { color: var(--text-lo); }
.trace__line .arg { color: var(--text-hi); overflow: hidden; text-overflow: ellipsis; }
.trace__line .v   { text-align: right; letter-spacing: 0.06em; font-size: 11px; }

.trace__line[data-verdict="allow"] .v { color: var(--verdict-allow); }
.trace__line[data-verdict="deny"] {
  border-left-color: var(--accent);
  background: var(--accent-wash);
}
.trace__line[data-verdict="deny"] .v { color: var(--verdict-deny); font-weight: 600; }

.trace__foot {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  font-size: 11.5px;
  color: var(--text-lo);
  display: grid; gap: 5px;
}
.trace__detection { color: var(--accent); opacity: 0.72; }
.trace__detection b { font-weight: 600; letter-spacing: 0.04em; }

/* JS typing state — only applied when motion is allowed */
.trace.is-typing .trace__line,
.trace.is-typing .trace__foot > * { opacity: 0; }
.trace.is-typing .trace__line.is-in,
.trace.is-typing .trace__foot > .is-in { opacity: 1; transition: opacity 90ms linear; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .trace__dot { animation: none; }
  .trace.is-typing .trace__line,
  .trace.is-typing .trace__foot > * { opacity: 1; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 52px; background: var(--line-light); border: 1px solid var(--line-light); }
.card { background: var(--paper); padding: 30px 26px 34px; }
.card h3 { margin-bottom: 12px; }
.card p { font-size: 15.5px; color: var(--ink-lo); margin: 0; }
.card__idx {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--accent-ink); display: block; margin-bottom: 18px;
}

/* Two-pillar block (dark) */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 52px; }
.pillar { background: var(--ink); padding: 38px 34px 40px; }
.pillar > p { color: var(--text-lo); font-size: 15.5px; margin-bottom: 26px; }
.pillar h3 { margin-bottom: 14px; }
.pillar--link { display: block; text-decoration: none; color: inherit; transition: background 0.15s; }
.pillar--link:hover { background: #111; }
.pillar--link .link-arrow { display: block; margin-top: 22px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.05em; color: var(--accent-ink); }
.pillar--link:hover .link-arrow { color: var(--accent); }
.caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.caps li {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  color: var(--text-hi);
  padding-left: 18px; position: relative;
}
.caps li::before {
  content: "·"; position: absolute; left: 2px; top: -1px;
  color: var(--accent); font-size: 17px;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap { margin-top: 44px; overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data {
  width: 100%; border-collapse: collapse;
  font-size: 14.5px;
  min-width: 620px;
}
table.data th, table.data td {
  text-align: left; padding: 15px 16px;
  border-bottom: 1px solid var(--line-light);
  vertical-align: top;
}
table.data thead th {
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-lo);
  border-bottom: 1px solid #C9C9C9;
}
table.data tbody th { font-weight: 400; color: var(--ink-text); }
table.data td { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.03em; color: var(--ink-lo); }
table.data td.yes { color: var(--accent-ink); font-weight: 600; }
table.data .col-us { background: var(--accent-wash); }
table.data thead th.col-us { color: var(--accent-ink); }
.table-note {
  font-size: 14px; color: var(--ink-lo); margin-top: 18px;
  border-left: 2px solid var(--accent-edge); padding-left: 16px;
  max-width: var(--prose);
}

/* Two-column prose + artefact */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; margin-top: 48px; }
.split--wide-left { grid-template-columns: 1.15fr 1fr; }

.points { display: grid; gap: 30px; margin-top: 34px; }
.point h3 { margin-bottom: 9px; }
.point p { font-size: 15.5px; color: var(--ink-lo); margin: 0; }

.closing {
  margin-top: 38px; padding-top: 24px;
  border-top: 1px solid var(--line-light);
  font-size: 1.05rem; max-width: var(--prose);
}

/* Code panel — static sibling of the trace */
.code {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.code__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-lo);
}
.code pre {
  margin: 0; padding: 20px 16px;
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
  color: var(--text-hi);
  overflow-x: auto;
}
.code .c { color: #5A5A5A; }
.code .k { color: var(--accent); }
.code .s { color: var(--text-hi); }

/* Three-across text blocks */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; margin-top: 52px; }
.trio h3 { margin-bottom: 12px; }
.trio p { font-size: 15px; color: var(--ink-lo); margin: 0; }
.trio__tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-ink);
  display: block; margin-bottom: 16px;
}

/* Closing offer block */
.offer { text-align: center; max-width: 640px; margin: 0 auto; }
.offer h2 { margin-bottom: 24px; }
.offer p { color: var(--text-lo); margin-left: auto; margin-right: auto; }
.offer .btns { justify-content: center; }
.offer__foot {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--text-lo); margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Long-form doc page (platform, compliance)
   -------------------------------------------------------------------------- */

.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 64px; align-items: start; }
.doc__nav { position: sticky; top: 92px; }
.doc__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.doc__nav a {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-lo); text-decoration: none;
  display: block; padding-left: 12px; border-left: 1px solid var(--line-light);
}
.doc__nav a:hover, .doc__nav a.is-active { color: var(--accent-ink); border-left-color: var(--accent-ink); }

.doc__body > section { padding-bottom: 12px; }
.doc__body h2 {
  margin-top: 72px; padding-top: 28px;
  border-top: 1px solid var(--line-light);
}
.doc__body > section:first-child h2 { margin-top: 0; border-top: 0; padding-top: 0; }
.doc__body h3 { margin-top: 38px; margin-bottom: 10px; }
.doc__body p { font-size: 16.5px; }

ul.plain { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 13px; max-width: var(--prose); }
ul.plain li { padding-left: 20px; position: relative; font-size: 15.5px; color: var(--ink-lo); }
ul.plain li::before { content: "·"; position: absolute; left: 4px; top: -2px; color: var(--accent-ink); font-size: 18px; }
ul.plain li b { color: var(--ink-text); font-weight: 600; }

.detections {
  margin-top: 22px; border: 1px solid var(--line-light); border-radius: var(--radius);
  background: var(--paper-raised);
  font-family: var(--mono); font-size: 12.5px;
}
.detections div {
  display: grid; grid-template-columns: 175px minmax(0, 1fr);
  gap: 14px; padding: 11px 16px;
  border-bottom: 1px solid var(--line-light);
}
.detections div:last-child { border-bottom: 0; }
.detections b { color: var(--accent-ink); font-weight: 600; letter-spacing: 0.03em; }
.detections span { color: var(--ink-lo); }

/* Status pills for the OS matrix */
.pill {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 4px 9px; border-radius: var(--radius);
  display: inline-block; white-space: nowrap;
}
.pill--live    { background: var(--accent); color: #000; font-weight: 600; }
.pill--pending { background: transparent; color: var(--ink-lo); border: 1px dashed #B9B9B9; }

.faq { display: grid; gap: 0; margin-top: 26px; border-top: 1px solid var(--line-light); }
.faq details { border-bottom: 1px solid var(--line-light); }
.faq summary {
  cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent-ink); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 22px; font-size: 15.5px; color: var(--ink-lo); }

/* --------------------------------------------------------------------------
   Forms (Section 4.6 / 7.5)
   -------------------------------------------------------------------------- */

.form { margin-top: 40px; max-width: 620px; }
.field { margin-bottom: 24px; }
.field label {
  display: block;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-lo); margin-bottom: 9px;
}
.field label .opt { color: #A0A0A0; text-transform: none; letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--body); font-size: 16px;
  padding: 13px 14px; border: 1px solid #C9C9C9; border-radius: var(--radius);
  background: var(--paper); color: var(--ink-text);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-ink); }
.field .hint { font-size: 13.5px; color: var(--ink-lo); margin: 8px 0 0; }
.field .hint[data-state="warn"] { color: var(--accent-ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-done {
  border: 1px solid var(--accent-edge); border-left: 3px solid var(--accent);
  background: var(--accent-wash);
  padding: 28px; border-radius: var(--radius); max-width: 620px; margin-top: 40px;
}
.form-done h3 { margin-bottom: 10px; }
.form-done p { font-size: 15.5px; color: var(--ink-lo); margin: 0; }

.aside-box {
  border: 1px solid var(--line-light); background: var(--paper-raised);
  padding: 26px; border-radius: var(--radius);
}
.aside-box h3 { margin-bottom: 14px; }
.aside-box ul.plain li { font-size: 14.5px; }

/* Draft / decision flags — visible only because this is a build preview */
.flag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em;
  color: var(--accent-ink); border: 1px dashed var(--accent-edge);
  padding: 3px 8px; border-radius: var(--radius); display: inline-block;
  background: var(--accent-wash);
}

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

@media (max-width: 1000px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .trio { grid-template-columns: 1fr; gap: 34px; }
  .doc { grid-template-columns: 1fr; gap: 34px; }
  .doc__nav { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 46px; }
  .hero h1 { max-width: 18ch; }
}

@media (max-width: 820px) {
  :root { --pad-y: 72px; }
  body { font-size: 16px; }
  .split, .split--wide-left { grid-template-columns: 1fr; gap: 36px; }
  .pillars { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav__toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 28px 20px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; justify-content: center; }
  .hero { padding: 64px 0 76px; }
  .detections div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .wrap { padding: 0 20px; }
  .trace { font-size: 11.5px; }
  .trace__line { grid-template-columns: 60px 36px minmax(0, 1fr) 46px; gap: 8px; padding-left: 10px; padding-right: 12px; }
  .trace__line .t { font-size: 10.5px; }
  /* Mobile shows the last five lines only (Section 6) */
  .trace__line:nth-child(1), .trace__line:nth-child(2) { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .trace__line .t { display: none; }
  .trace__line { grid-template-columns: 34px minmax(0, 1fr) 44px; }
}

/* ==========================================================================
   Blog — index and post pages (server-rendered from /api/blog)
   ========================================================================== */

.post-list { list-style: none; margin: 44px 0 0; padding: 0; }

.post-item { padding: 30px 0; border-top: 1px solid var(--line-light); max-width: var(--prose); }
.post-item:last-child { border-bottom: 1px solid var(--line-light); }

.post-item__date {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-lo);
}
.post-item__title { font-family: var(--display); font-size: 25px; line-height: 1.25; margin-top: 12px; }
.post-item__title a { color: inherit; text-decoration: none; }
.post-item__title a:hover { color: var(--accent-ink); }
.post-item__excerpt { margin-top: 12px; color: var(--ink-lo); }

.post-byline {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-lo); margin-top: 14px;
}

/* Standalone arrow link — the existing rule only covers .pillar--link. */
.link-arrow {
  display: inline-block; margin-top: 22px; font-family: var(--mono);
  font-size: 12.5px; letter-spacing: 0.05em; color: var(--accent-ink); text-decoration: none;
}
.link-arrow:hover { color: var(--accent); }

.prose { max-width: var(--prose); margin-top: 34px; }
.prose > * + * { margin-top: 20px; }
.prose h2 { font-family: var(--display); font-size: 25px; line-height: 1.3; margin-top: 44px; }
.prose h3 { font-family: var(--display); font-size: 19px; line-height: 1.35; margin-top: 34px; }
.prose h4 { font-family: var(--display); font-size: 16px; margin-top: 28px; }
.prose ul { margin-left: 20px; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--accent-ink); }
.prose code {
  font-family: var(--mono); font-size: 0.875em;
  background: var(--paper-raised); border: 1px solid var(--line-light);
  border-radius: var(--radius); padding: 1px 5px;
}
.prose pre {
  background: var(--ink); color: var(--text-hi); padding: 20px 22px;
  border-radius: var(--radius); overflow-x: auto;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 12.5px; }
.prose blockquote {
  border-left: 2px solid var(--accent); background: var(--accent-wash);
  padding: 14px 20px; color: var(--ink-text);
}
.prose blockquote > * + * { margin-top: 12px; }

@media (max-width: 700px) {
  .post-item__title { font-size: 21px; }
  .prose h2 { font-size: 21px; }
}

/* ==========================================================================
   Admin portal (/admin) — internal, not linked from the site
   ========================================================================== */

.admin-tabs { display: flex; gap: 4px; margin-top: 30px; border-bottom: 1px solid var(--line-light); }
.admin-tab {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-lo); padding: 10px 14px; cursor: pointer;
}
.admin-tab:hover { color: var(--ink-text); }
.admin-tab[aria-current="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }

.admin-section { margin-top: 34px; }
.admin-section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 8px;
}
.admin-section__head h2 { font-family: var(--display); font-size: 21px; }

.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn--small { padding: 6px 12px; font-size: 12px; }
.btn--danger { color: #B3261E; border-color: #E6C4C1; }
.btn--danger:hover { background: #FDF3F2; }

.table-scroll { overflow-x: auto; margin-top: 16px; }
.table-scroll .data { min-width: 900px; }

.post-admin-list { list-style: none; margin: 18px 0 0; padding: 0; max-width: 720px; }
.post-admin-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--line-light);
}
.post-admin-item:last-child { border-bottom: 1px solid var(--line-light); }
.post-admin-item__title { font-weight: 500; }
.post-admin-item__meta { font-family: var(--mono); font-size: 11.5px; color: var(--ink-lo); margin-top: 4px; }
.post-admin-item__actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.badge {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--radius); border: 1px solid var(--line-light); color: var(--ink-lo);
}
.badge--draft { /* neutral, inherits .badge */ }
.badge--published { color: var(--accent-ink); border-color: var(--accent-edge); background: var(--accent-wash); }

@media (max-width: 700px) {
  .post-admin-item { flex-direction: column; align-items: flex-start; }
  .admin-tabs { overflow-x: auto; }
}
