/* Witnyx website. Colours and fonts come from assets/tokens.css (synced from brand/).
   Direction, "the evidence ledger": the site reads like a record. Ruled ink panels, a dated timeline,
   findings shown the way the command-line tool prints them, and one stamped seal in the hero.
   Everything is in this file: the Content-Security-Policy allows no inline style. */

:root {
  --wx-deep: #07131F;          /* terminal and inputs on ink */
  --wx-line: #22374D;          /* rules on ink */
  --wx-cyan-bright: #5CC8E2;   /* cyan text on ink */
  --wx-on-ink: #C3CED8;
  --wx-on-ink-muted: #9AAABA;
  --wx-ruling: rgba(92, 200, 226, 0.07);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--rl-bg); color: var(--rl-text);
  font: 400 var(--rl-size-sm)/1.65 var(--rl-font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--rl-cyan-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--rl-cyan); outline-offset: 2px; border-radius: 4px; }
code { font-family: var(--rl-font-mono); font-size: 0.92em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }
.icon { width: 16px; height: 16px; flex: none; fill: currentColor; }
.icon-line { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }

.skip { position: absolute; left: 16px; top: -48px; background: var(--rl-cyan); color: var(--rl-ink); padding: 8px 12px; border-radius: var(--rl-radius); z-index: 20; font-weight: 600; }
.skip:focus { top: 12px; }

/* Header: an ink bar in both colour modes, continuous with the hero */
.site-header { position: sticky; top: 0; z-index: 10; color: var(--rl-paper); background: rgba(11, 27, 43, 0.88); border-bottom: 1px solid var(--wx-line); -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-header { background: var(--rl-ink); } }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.site-header .brand img { height: 26px; width: auto; }
.site-header nav { display: flex; align-items: center; gap: 24px; font-size: var(--rl-size-xs); }
.site-header nav a:not(.btn) { display: inline-flex; align-items: center; gap: 7px; color: var(--wx-on-ink-muted); text-decoration: none; }
.site-header nav a:not(.btn):hover, .site-header nav a[aria-current="page"] { color: var(--rl-paper); }
@media (max-width: 760px) {
  .site-header nav { gap: 16px; }
  .site-header nav a:not(.btn):not(.nav-gh) { display: none; }
  .nav-gh .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-gh .icon { width: 20px; height: 20px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--rl-radius); font: 600 var(--rl-size-sm)/1 var(--rl-font-sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color 0.15s, border-color 0.15s; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--rl-cyan); color: var(--rl-ink); }
.btn-primary:hover { background: #3BB7D5; }
.btn-secondary { background: transparent; color: inherit; border-color: currentColor; }
.btn-secondary:hover { background: rgba(127, 127, 127, 0.14); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: var(--rl-size-xs); }

/* Ruled ink panels (the hero and the early-access box): faint ledger lines that fade out */
.ruled { position: relative; isolation: isolate; overflow: hidden; }
.ruled::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--wx-ruling) 31px 32px);
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 100%); mask-image: linear-gradient(to bottom, #000 25%, transparent 100%); }

/* Hero: ink in both modes */
.hero { background: var(--rl-ink); color: var(--rl-paper); border-bottom: 1px solid var(--wx-line); }
.hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; width: 760px; height: 760px; right: -220px; top: 50%; transform: translateY(-50%); background: radial-gradient(closest-side, rgba(26, 166, 200, 0.22), rgba(26, 166, 200, 0) 100%); }
.hero .wrap { display: grid; gap: 56px; padding-top: 72px; padding-bottom: 88px; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1fr 1.05fr; gap: 64px; padding-top: 104px; padding-bottom: 120px; } }
.eyebrow { color: var(--wx-cyan-bright); font: 500 var(--rl-size-xs)/1.4 var(--rl-font-mono); margin: 0 0 18px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; margin: 0 0 24px; text-wrap: balance; }
.hero .lede { color: var(--wx-on-ink); font-size: var(--rl-size-base); margin: 0 0 32px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .note { color: var(--wx-on-ink-muted); font-size: var(--rl-size-xs); margin: 20px 0 0; }
.hero .note + .note { margin-top: 6px; }
.hero .note a { color: var(--wx-cyan-bright); }

/* The record: the terminal output, stamped */
.record { position: relative; margin: 0; min-width: 0; padding: 0 18px 60px 0; }
.terminal { background: var(--wx-deep); border: 1px solid var(--wx-line); border-radius: var(--rl-radius-lg); overflow: hidden; min-width: 0; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7); }
.terminal .bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--wx-line); }
.terminal .bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--wx-line); }
.terminal pre { margin: 0; padding: 18px 20px 24px; overflow-x: auto; color: #E8EDF1; font: 400 13px/1.75 var(--rl-font-mono); }
@media (min-width: 1100px) { .terminal pre { font-size: 14px; } }
.t-mu { color: var(--wx-on-ink-muted); } .t-ex { color: #F97066; font-weight: 500; } .t-cy { color: var(--wx-cyan-bright); } .t-ok { color: #47CD89; }

.seal { position: absolute; right: -4px; bottom: -8px; width: 136px; height: 136px; color: var(--wx-cyan-bright); transform: rotate(-12deg); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5)); animation: stamp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.8s both; }
@media (max-width: 520px) { .record { padding-bottom: 48px; } .seal { width: 108px; height: 108px; } }
.seal-disc { fill: var(--rl-ink); }
.seal-ring { fill: none; stroke: currentColor; stroke-width: 2; }
.seal-ring-fine { stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.7; }
.seal-text { fill: currentColor; font: 500 10.5px var(--rl-font-mono); }
.seal-wave { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.seal-dot { fill: currentColor; }
@keyframes stamp {
  from { opacity: 0; transform: rotate(-34deg) scale(1.8); }
  60% { opacity: 1; }
  to { opacity: 1; transform: rotate(-12deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .seal { animation: none; } }

/* Timeline: the two dates of the Act on one rail, with today between them */
.timeline { padding: 36px 0 44px; border-bottom: 1px solid var(--rl-border); }
.timeline .lead-in { color: var(--rl-text-muted); font-size: var(--rl-size-xs); margin: 0 0 22px; }
.rail { --p: 0; position: relative; list-style: none; margin: 0; padding: 0 0 0 30px; display: grid; gap: 22px; }
.rail::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--rl-border); }
.rail li { position: relative; }
.rail .stop::before { content: ""; position: absolute; left: -30px; top: 3px; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 4px var(--rl-bg); }
.rail .stop-done::before { background: var(--rl-cyan); }
.rail .stop-done::after { content: ""; position: absolute; left: -24px; top: 10px; bottom: -22px; width: 2px; background: var(--rl-cyan); }
.rail .stop-ahead::before { background: var(--rl-bg); border: 2px solid var(--rl-text-muted); }
.rail .date { display: block; font-weight: 600; font-size: var(--rl-size-base); font-variant-numeric: tabular-nums; line-height: 1.3; }
.rail .state { display: inline-block; margin-left: 8px; font: 500 12px/1 var(--rl-font-mono); color: var(--rl-cyan-text); vertical-align: 2px; }
.rail .stop p { margin: 4px 0 0; color: var(--rl-text-muted); max-width: 30em; }
.rail .now { font: 500 var(--rl-size-xs)/1.4 var(--rl-font-mono); color: var(--rl-cyan-text); }
.rail .now::before { content: ""; position: absolute; left: -27px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--rl-cyan); }
@media (min-width: 760px) {
  .rail { grid-template-columns: 1fr 1fr; gap: 48px; padding: 52px 0 0; }
  .rail::before { left: 7px; right: 7px; top: 37px; bottom: auto; width: auto; height: 2px; }
  .rail.has-now::after { content: ""; position: absolute; left: 7px; top: 37px; height: 2px; width: calc((100% - 14px) * var(--p)); background: var(--rl-cyan); }
  .rail .stop::before { left: 0; top: -22px; }
  .rail .stop-done::after { content: none; }
  .rail .stop-ahead { text-align: right; }
  .rail .stop-ahead::before { left: auto; right: 0; }
  .rail .stop-ahead p { margin-left: auto; }
  .rail .now { position: absolute; top: 0; left: calc(7px + (100% - 14px) * var(--p)); transform: translateX(-50%); white-space: nowrap; }
  .rail .now::before { left: 50%; top: 32px; width: 12px; height: 12px; transform: translateX(-50%); box-shadow: 0 0 0 3px var(--rl-bg), 0 0 0 5px rgba(26, 166, 200, 0.35); }
}

/* Sections */
section.block { padding: 88px 0; }
section.block + section.block { border-top: 1px solid var(--rl-border); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, var(--rl-size-2xl)); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 12px; text-wrap: balance; }
.section-head p { color: var(--rl-text-muted); font-size: var(--rl-size-base); margin: 0; }
.kicker { color: var(--rl-cyan-text); font: 500 var(--rl-size-xs)/1.4 var(--rl-font-mono); margin: 0 0 12px; }

/* Ledger: one ruled panel split into entries, instead of loose cards */
.ledger { display: grid; gap: 1px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; background: var(--rl-border); border: 1px solid var(--rl-border); border-radius: var(--rl-radius-lg); overflow: hidden; }
@media (min-width: 640px) { .ledger { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .ledger { grid-template-columns: repeat(4, 1fr); } .ledger.ledger-3 { grid-template-columns: repeat(3, 1fr); } }
.ledger > * { background: var(--rl-surface); padding: 28px 24px 30px; }
.ledger h3 { font-size: var(--rl-size-base); font-weight: 600; line-height: 1.35; margin: 14px 0 8px; }
.ledger-3 h3 { margin-top: 0; }
.ledger p { color: var(--rl-text-muted); margin: 0; font-size: 15px; }
.entry-fail { box-shadow: inset 0 3px 0 var(--rl-exploited); }
.status { margin: 0; font: 500 12px/1.2 var(--rl-font-mono); color: var(--rl-text-muted); }
.ledger .status { font-size: 12px; }
.status b { font-weight: 500; margin-right: 6px; }
.status-fail b { color: var(--rl-exploited); } .status-warn b { color: var(--rl-warn); }

/* Cards: only for what is still in development, drawn as dashed outlines */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { border: 1px dashed var(--rl-border); border-radius: var(--rl-radius-lg); padding: 24px; }
@media (prefers-color-scheme: light) { .card { border-color: #B9C5CF; } }
.card h3 { font-size: var(--rl-size-base); font-weight: 600; line-height: 1.35; margin: 14px 0 8px; }
.card p { color: var(--rl-text-muted); margin: 0; font-size: 15px; }
.tag { display: inline-block; font: 500 12px/1 var(--rl-font-mono); padding: 5px 8px; border-radius: 6px; border: 1px solid currentColor; }
.tag-ex { color: var(--rl-exploited); } .tag-warn { color: var(--rl-warn); } .tag-dev { color: var(--rl-cyan-text); }

/* Steps: a real sequence, so numbered and joined */
.steps { display: grid; gap: 32px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 60px; min-height: 40px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--rl-ink); color: var(--rl-paper); font: 600 var(--rl-size-xs)/1 var(--rl-font-mono); box-shadow: inset 0 0 0 2px var(--rl-cyan); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 48px; bottom: -24px; width: 2px; background: var(--rl-border); }
.steps h3 { font-size: var(--rl-size-base); font-weight: 600; margin: 8px 0 8px; }
.steps p { color: var(--rl-text-muted); margin: 0; font-size: 15px; }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { padding-left: 0; padding-top: 60px; }
  .steps li:not(:last-child)::after { left: 52px; right: -20px; top: 19px; bottom: auto; width: auto; height: 2px; background: linear-gradient(to right, var(--rl-cyan), var(--rl-border)); }
  .steps h3 { margin-top: 0; }
}
.privacy-note { margin-top: 32px; padding: 16px 20px; border-left: 3px solid var(--rl-cyan); background: var(--rl-surface); color: var(--rl-text); font-size: 15px; }

/* Trust row */
.trust { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); list-style: none; margin: 0; padding: 0; }
.trust li { border-top: 2px solid var(--rl-cyan); padding-top: 16px; }
.trust strong { display: block; font-weight: 600; margin-bottom: 4px; }
.trust span { color: var(--rl-text-muted); font-size: 15px; }

/* Open source: the two ways in */
.source { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .source { grid-template-columns: 1fr 1fr; gap: 64px; } }
.source h2 { font-size: clamp(1.75rem, 3.4vw, var(--rl-size-2xl)); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 12px; text-wrap: balance; }
.source p { color: var(--rl-text-muted); font-size: var(--rl-size-base); margin: 0; }
.source-links { display: grid; gap: 12px; }
.link-card { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; align-items: center; padding: 20px 22px; background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-radius-lg); color: var(--rl-text); text-decoration: none; transition: border-color 0.15s; }
.link-card:hover { border-color: var(--rl-cyan); }
.link-card .icon { width: 28px; height: 28px; grid-row: span 2; }
.link-card strong { font-weight: 600; }
.link-card span { grid-column: 2; color: var(--rl-text-muted); font-size: var(--rl-size-xs); }

/* Consultancies */
.split { display: grid; gap: 32px; align-items: center; background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-radius-lg); padding: 32px; }
@media (min-width: 860px) { .split { grid-template-columns: 1.4fr 1fr; padding: 48px; } }
.split h2 { font-size: clamp(1.5rem, 3vw, var(--rl-size-xl)); letter-spacing: -0.015em; line-height: 1.2; margin: 0 0 12px; font-weight: 600; }
.split p { color: var(--rl-text-muted); margin: 0 0 12px; }
.split ul { margin: 0; padding-left: 20px; color: var(--rl-text-muted); }
.split .actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* Install */
.code { background: var(--wx-deep); color: #E8EDF1; border: 1px solid var(--wx-line); border-radius: var(--rl-radius-lg); padding: 18px 20px; overflow-x: auto; font: 400 14px/1.7 var(--rl-font-mono); margin: 0 0 16px; }
.install-grid { display: grid; gap: 16px; }
@media (min-width: 860px) { .install-grid { grid-template-columns: 1fr 1fr; } }
.install-grid h3 { font-size: var(--rl-size-sm); font-weight: 600; margin: 0 0 8px; }

/* Early access */
.signup { background: var(--rl-ink); color: var(--rl-paper); border: 1px solid var(--wx-line); border-radius: var(--rl-radius-lg); padding: 40px 24px; display: grid; gap: 32px; }
@media (min-width: 860px) { .signup { grid-template-columns: 1fr 1fr; padding: 56px; align-items: center; } }
.signup h2 { font-size: clamp(1.75rem, 3.4vw, var(--rl-size-2xl)); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; font-weight: 600; }
.signup p { color: var(--wx-on-ink); margin: 0; }
.signup a { color: var(--wx-cyan-bright); }
.signup form { display: grid; gap: 10px; }
.signup label { font-size: var(--rl-size-xs); font-weight: 500; color: #E8EDF1; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field-row input { flex: 1 1 220px; min-height: 44px; padding: 0 14px; border-radius: var(--rl-radius); border: 1px solid #3A5168; background: var(--wx-deep); color: #F5F7F8; font: 400 var(--rl-size-sm) var(--rl-font-sans); }
.field-row input::placeholder { color: #8394A5; }
.field-row .btn { flex: 0 0 auto; }
.signup .small { font-size: var(--rl-size-xs); color: var(--wx-on-ink-muted); }
.form-status { min-height: 1.4em; font-size: var(--rl-size-xs); color: #47CD89; margin: 0; }

/* Footer */
.site-footer { padding: 56px 0 48px; border-top: 1px solid var(--rl-border); color: var(--rl-text-muted); font-size: var(--rl-size-xs); }
.site-footer .wrap { display: grid; gap: 36px; }
.footer-top { display: grid; gap: 32px; }
@media (min-width: 860px) { .footer-top { grid-template-columns: 1fr 1.6fr; } }
.footer-brand img { height: 22px; width: auto; }
.footer-brand p { margin: 14px 0 0; }
.footer-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 28px; }
.footer-col { display: grid; gap: 9px; align-content: start; }
.footer-col p { margin: 0 0 3px; color: var(--rl-text); font-weight: 600; }
.footer-col a { color: var(--rl-text-muted); text-decoration: none; }
.footer-col a:hover { color: var(--rl-text); text-decoration: underline; }
.footer-col a[aria-current="page"] { color: var(--rl-text); }
.disclaimer { margin: 0; padding-top: 20px; border-top: 1px solid var(--rl-border); max-width: none; }

/* Legal pages */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, var(--rl-size-2xl)); letter-spacing: -0.02em; margin: 0 0 8px; font-weight: 600; }
.legal h2 { font-size: var(--rl-size-lg); margin: 40px 0 8px; font-weight: 600; }
.legal p, .legal li { color: var(--rl-text); }
.legal .meta { color: var(--rl-text-muted); margin: 0 0 32px; }
.legal h3 { font-size: var(--rl-size-base); margin: 28px 0 4px; font-weight: 600; }
.legal .draft { margin: 16px 0 8px; padding: 12px 16px; border-left: 3px solid var(--rl-cyan); background: var(--rl-surface); }
.legal .table-wrap { overflow-x: auto; margin: 16px 0 8px; }
.legal table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--rl-size-xs); line-height: 1.5; }
.legal th, .legal td { padding: 10px 12px; border-bottom: 1px solid var(--rl-border); text-align: left; vertical-align: top; color: var(--rl-text); }
.legal thead th { background: var(--rl-surface); border-bottom-width: 2px; }
.legal tbody th { font-weight: 600; }
.todo { background: rgba(253, 176, 34, 0.18); padding: 1px 4px; border-radius: 4px; font-family: var(--rl-font-mono); font-size: 0.88em; }

/* Setup page */
.hero.hero-text .wrap { grid-template-columns: 1fr; }
.hero.hero-text h1 { max-width: 14em; }
.hero.hero-text .lede { max-width: 40em; }
.scope-note { margin-top: 24px; color: var(--rl-text-muted); }
.faq { max-width: 760px; }
.faq h2 { font-size: clamp(1.75rem, 3.4vw, var(--rl-size-2xl)); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 8px; }
.faq h3 { font-size: var(--rl-size-base); font-weight: 600; margin: 32px 0 6px; }
.faq p { color: var(--rl-text-muted); margin: 0; }

/* Once inline style attributes. The Content-Security-Policy allows no inline style, so they live here. */
.split .aside { margin: 0; font-size: var(--rl-size-xs); }
.signup p.talk { margin-top: 12px; }
