:root {
  --field: #0f1a2e;
  --field-deep: #0a1322;
  --panel: #15223b;
  --panel-2: #1b2b49;
  --line: #27395c;
  --line-soft: #1f2f4e;
  --cobalt: #4f8cff;
  --cobalt-deep: #2f6be6;
  --cobalt-dim: rgba(79, 140, 255, 0.14);
  --verify: #3ddc97;
  --text: #e9eefb;
  --muted: #93a3c4;
  --paper: #f6f8fc;
  --paper-ink: #1a2238;
  --paper-rule: #c9d2e4;
  --measure: 64ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--field);
  background-image:
    linear-gradient(rgba(79, 140, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 140, 255, 0.045) 1px, transparent 1px),
    radial-gradient(900px 500px at 85% -5%, rgba(79, 140, 255, 0.18), transparent 70%),
    linear-gradient(180deg, var(--field-deep), var(--field) 30%);
  background-size: 48px 48px, 48px 48px, auto, auto;
  min-height: 100vh;
}

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; }
h2 { font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; margin: 0 0 0.75rem; max-width: 26ch; }
h3 { font-weight: 600; font-size: 1.15rem; line-height: 1.3; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
code { font-family: var(--mono); }

.skip { position: absolute; left: -999px; top: 0; background: var(--cobalt); color: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.button:hover { background: var(--panel-2); border-color: var(--cobalt); }
.button.primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.button.primary:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); }
.button.small { padding: 0.55rem 0.95rem; font-size: 0.9rem; }

/* Masthead */
.masthead {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}
.wordmark b { font-weight: 700; color: var(--cobalt); }
.wordmark .mark { width: 28px; height: 28px; color: var(--cobalt); }
.menu { display: flex; gap: 1.4rem; margin-left: auto; }
.menu a { text-decoration: none; color: var(--muted); font-weight: 500; }
.menu a:hover { color: var(--text); }

/* Hero */
.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  max-width: 20ch;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: var(--measure); margin-bottom: 1.5rem; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.fine { color: var(--muted); font-size: 0.95rem; max-width: 56ch; margin: 0; }
.fine a { color: var(--text); text-underline-offset: 3px; }

/* The instrument: certificate + readout */
.instrument { margin: 0; display: grid; gap: 0; min-width: 0; }
.certificate {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 10px 10px 0 0;
  padding: 1.5rem 1.6rem 1.3rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  border-bottom: 1px dashed var(--paper-rule);
}
.cert-head { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; color: #55607a; margin-bottom: 1.1rem; }
.cert-serial { font-family: var(--mono); }
.cert-name { font-family: var(--display); font-size: 1.7rem; font-weight: 600; margin: 0 0 0.35rem; letter-spacing: -0.01em; }
.cert-course { margin: 0 0 1.2rem; font-size: 0.98rem; color: #333d55; max-width: 40ch; }
.cert-course em { font-style: normal; font-weight: 600; color: var(--paper-ink); }
.cert-foot { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.82rem; color: #55607a; flex-wrap: wrap; }

.readout {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 1.1rem 1.4rem 1.2rem;
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}
.readout-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem; align-items: baseline; min-width: 0; }
.readout .k { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.readout .v { min-width: 0; }
.readout .mono, .readout .hash { font-family: var(--mono); font-size: 0.88rem; }
.readout .hash { word-break: break-all; line-height: 1.45; color: var(--text); }
.readout .ok { color: var(--verify); font-weight: 600; display: inline-flex; align-items: center; gap: 0.45rem; }
.readout .ok .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--verify); box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.18); }
.readout figcaption { color: var(--muted); font-size: 0.82rem; margin-top: 0.3rem; line-height: 1.45; }

.fingerprint { display: grid; grid-template-columns: repeat(32, 1fr); gap: 2px; height: 14px; margin: 0.15rem 0 0.3rem; }
.fingerprint i { display: block; background: var(--cobalt); border-radius: 2px; }

/* Sections */
.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
  border-top: 1px solid var(--line-soft);
}
.section-head { margin-bottom: 2rem; }
.section-head p { color: var(--muted); max-width: var(--measure); font-size: 1.1rem; margin: 0; }

.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.columns p { color: var(--muted); margin: 0; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: none; }
.steps li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line-soft);
}
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps .n {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--cobalt);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cobalt-dim);
}
.steps p { color: var(--muted); margin: 0; max-width: var(--measure); }

/* Demo */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.demo-input { display: grid; gap: 0.9rem; }
.drop {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  text-align: center;
  padding: 2rem 1.25rem;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop:hover, .drop.over { border-color: var(--cobalt); background: var(--panel-2); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.drop-title { font-family: var(--display); font-weight: 600; }
.drop-sub { color: var(--muted); font-size: 0.9rem; }
.or { text-align: center; color: var(--muted); font-size: 0.9rem; }
.field { display: grid; gap: 0.4rem; }
.field span { color: var(--muted); font-size: 0.9rem; }
.field textarea {
  width: 100%;
  resize: vertical;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
}
.field textarea::placeholder { color: #5f6f90; }
.demo-readout { border-top: 1px solid var(--line); border-radius: 10px; }
.demo-note { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0.75rem; }
.demo-readout .button { justify-self: start; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; margin: 0 0 2.5rem; }
.facts > div { border-left: 2px solid var(--cobalt); padding-left: 1.1rem; }
.facts dt { font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin-bottom: 0.3rem; }
.facts dd { margin: 0; color: var(--muted); }
.independence {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  max-width: 72ch;
}
.independence p { margin: 0; color: var(--muted); }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem 2.5rem; }
.features p { color: var(--muted); margin: 0; }
.status-line { margin: 2.5rem 0 0; padding: 1rem 1.25rem; border-left: 2px solid var(--verify); background: var(--panel); color: var(--text); max-width: 72ch; }

/* FAQ */
.faq { max-width: 76ch; display: grid; gap: 0; }
.faq details { border-top: 1px solid var(--line-soft); padding: 0.4rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.08rem;
  padding: 0.75rem 2.2rem 0.75rem 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 0.65rem;
  font-family: var(--mono);
  color: var(--cobalt);
  font-size: 1.2rem;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 1rem; max-width: var(--measure); }

/* Contact */
.contact { padding-bottom: clamp(3rem, 7vw, 5rem); }
.contact p { color: var(--muted); max-width: var(--measure); font-size: 1.1rem; margin-bottom: 1.5rem; }

/* Colophon */
.colophon {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}
.colophon p { margin: 0 0 0.35rem; max-width: 60ch; }
.colophon a { color: var(--text); text-underline-offset: 3px; }
.colophon nav { display: grid; gap: 0.35rem; align-content: start; }
.colophon nav a { color: var(--muted); text-decoration: none; }
.colophon nav a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .columns, .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .masthead { gap: 0.75rem 1.25rem; }
  .menu { margin-left: 0; width: 100%; order: 3; gap: 1.1rem; flex-wrap: wrap; }
  .masthead .button { margin-left: auto; }
  .columns, .features, .facts, .demo { grid-template-columns: 1fr; }
  .readout-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .steps li { grid-template-columns: 2.8rem 1fr; gap: 0.75rem; }
  .steps .n { width: 2.2rem; height: 2.2rem; font-size: 0.95rem; }
  .cert-name { font-size: 1.4rem; }
}
