/* ==========================================================================
   Silent Packet — global stylesheet
   Fonts are self-hosted (no Google Fonts CDN — it logs visitor IPs).
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/ibm-plex-sans-var.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --ink: #0B1420;
  --navy: #1C3D5A;
  --signal: #3E7CB1;
  --line: #D8DEE5;
  --muted: #5B6B7A;
  --radius: 6px;
  /* Functional status colors for tool results only — muted, no alarm-red.
     Each holds ≥4.5:1 contrast on --surface. */
  --ok: #2E6B4F;
  --warn: #8A5A1E;
  --danger: #96323B;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.75rem;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  margin: 0;
}

a { color: var(--signal); }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}

.node {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-nav a {
  font-size: 0.95rem;
  color: var(--navy);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--signal); }
.site-nav a[aria-current="page"] {
  color: var(--signal);
  border-bottom: 2px solid var(--signal);
  padding-bottom: 2px;
}
.nav-cta {
  border: 1px solid var(--navy);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
}

/* Hero */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}
.hero-headline {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 600;
  line-height: 1.28;
  margin-bottom: 1.5rem;
}

/* Redaction-reveal signature element */
.redact {
  position: relative;
  display: inline-grid;
  border: none;
  background: none;
  padding: 0 0.15em;
  cursor: pointer;
  font: inherit;
  vertical-align: baseline;
}
.redact-bar,
.redact-text {
  grid-area: 1 / 1;
}
.redact-bar {
  background: var(--ink);
  border-radius: 3px;
  align-self: stretch;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.redact-text {
  color: var(--signal);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.redact[aria-expanded="true"] .redact-bar { opacity: 0; transform: scaleX(0.02); }
.redact[aria-expanded="true"] .redact-text { opacity: 1; }
@media (hover: hover) {
  .redact:hover .redact-bar { opacity: 0; transform: scaleX(0.02); }
  .redact:hover .redact-text { opacity: 1; }
}
.redact:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--navy);
  max-width: 58ch;
  margin-bottom: 2rem;
}

.join-form {
  display: flex;
  gap: 0.6rem;
  max-width: 420px;
  flex-wrap: wrap;
}
.join-form input {
  flex: 1 1 220px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--ink);
}
.join-form input:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.join-form button {
  padding: 0.75rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.join-form button:hover { background: var(--signal); }
.form-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* Tools */
.tools {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--line);
}
.tools h2 { font-size: 1.6rem; margin-bottom: 1.75rem; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.tool-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  color: inherit;
  text-decoration: none;
}
a.tool-card { transition: border-color 0.2s ease; }
a.tool-card:hover,
a.tool-card:focus-visible { border-color: var(--signal); outline: none; }
a.tool-card:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.tool-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 0.6rem;
}
.tool-card--soon .tool-status { color: var(--muted); }
.tool-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.tool-card p { font-size: 0.92rem; color: var(--navy); margin: 0; }
.tool-card .tool-open {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--signal);
}

/* Why (homepage strip) */
.why {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  border-top: 1px solid var(--line);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}
.why-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--navy);
  margin: 0 0 0.5rem;
}
.why-item p:last-child { margin: 0; font-size: 0.98rem; }
.why-more { margin: 1.75rem 0 0; }

/* ==========================================================================
   Interior pages
   ========================================================================== */

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.page--wide { max-width: 1100px; }

.page-header { margin-bottom: 2.25rem; }
.page-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.9rem;
}
.page-lede {
  font-size: 1.05rem;
  color: var(--navy);
  max-width: 62ch;
  margin: 0;
}

/* Long-form prose (articles, legal pages, /why) */
.prose { font-size: 1rem; }
.prose h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.prose h3 { font-size: 1.08rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--signal); }
.prose strong { font-weight: 600; }
.prose code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.05em 0.35em;
}
.prose blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1.1rem;
  border-left: 3px solid var(--signal);
  color: var(--navy);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--line);
}
.prose th, .prose td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 500;
}
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

.updated-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 2rem;
}

/* Resources list */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-link {
  display: block;
  padding: 1.4rem 0.25rem;
  text-decoration: none;
  color: inherit;
}
.post-link:hover h2,
.post-link:focus-visible h2 { color: var(--signal); }
.post-link:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.post-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.post-link h2 { font-size: 1.2rem; font-weight: 600; margin: 0 0 0.4rem; transition: color 0.2s ease; }
.post-link p { margin: 0; font-size: 0.95rem; color: var(--navy); }

/* ==========================================================================
   Tool pages
   ========================================================================== */

.tool-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
}

/* The plain-language data-handling statement shown on every tool page */
.data-note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 0;
  font-size: 0.92rem;
  color: var(--navy);
}
.data-note .note-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.4rem;
}
.data-note p { margin: 0 0 0.5rem; }
.data-note p:last-child { margin: 0; }

/* Form building blocks */
.field { margin-bottom: 1.25rem; }
.field > label,
fieldset legend {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
  padding: 0;
}
.field-hint { font-size: 0.83rem; color: var(--muted); margin: 0.3rem 0 0; }

.text-input,
textarea.text-input,
select.text-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
}
textarea.text-input { min-height: 10rem; resize: vertical; line-height: 1.5; }
.text-input:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }

fieldset {
  border: none;
  margin: 0 0 1.25rem;
  padding: 0;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.35rem 0;
  font-size: 0.95rem;
}
.check-row input {
  accent-color: var(--signal);
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.18rem;
  flex-shrink: 0;
}
.check-row input:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.check-row span small { display: block; color: var(--muted); font-size: 0.83rem; }

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border: none;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--signal); }
.btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.btn:disabled { background: var(--muted); cursor: default; }
.btn--secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}
.btn--secondary:hover { background: transparent; color: var(--signal); border-color: var(--signal); }

/* Tool results */
.tool-result { margin-top: 2rem; }
.tool-result[hidden] { display: none; }

.result-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 1.5rem 0 0;
}
.result-status[hidden] { display: none; }

.verdict {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}
.verdict-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  font-weight: 500;
}
.verdict--danger { border-left: 4px solid var(--danger); }
.verdict--danger .verdict-label { color: var(--danger); }
.verdict--warn { border-left: 4px solid var(--warn); }
.verdict--warn .verdict-label { color: var(--warn); }
.verdict--ok { border-left: 4px solid var(--ok); }
.verdict--ok .verdict-label { color: var(--ok); }
.verdict p { margin: 0; }

.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
}
.result-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.result-card .result-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.result-card p { font-size: 0.95rem; margin: 0 0 0.6rem; }
.result-card p:last-child { margin: 0; }
.result-card ul { margin: 0.4rem 0 0; padding-left: 1.3rem; font-size: 0.95rem; }
.result-card li { margin-bottom: 0.35rem; }
.result-card li::marker { color: var(--signal); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 0.75rem; }
.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  background: var(--bg);
}

.result-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }

.error-note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--navy);
  margin-top: 1.5rem;
}
.error-note[hidden] { display: none; }

/* Plan output (hardening generator / de-google planner) */
.plan-stage { margin-bottom: 1.75rem; }
.plan-stage > h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.plan-stage .stage-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 0.6rem;
}
.plan-steps { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.plan-steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}
.plan-steps li strong { display: block; font-weight: 600; margin-bottom: 0.15rem; }
.plan-steps li small { color: var(--muted); display: block; margin-top: 0.3rem; font-size: 0.83rem; }

/* Footer */
.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand p { margin: 0 0 0.6rem; }
.footer-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.footer-link { color: var(--signal); text-decoration: none; font-weight: 500; }
.footer-link:hover { text-decoration: underline; }
.footer-head {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.7rem;
}
.footer-col { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-col a { color: var(--navy); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover, .footer-col a:focus-visible { color: var(--signal); }
.footer-soon { color: var(--muted); font-size: 0.9rem; cursor: default; }
.footer-fine {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* 404 */
.notfound {
  max-width: 640px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
  text-align: left;
}
.notfound h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.notfound p { color: var(--navy); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .site-nav { gap: 1rem; }
  .site-nav a:not(.nav-cta) { display: none; }
}
