/* KnownSince — clean, white-first, friendly.
 * Light theme is the default; [data-theme="dark"] opts in via the toggle.
 * Brand green carries the "verified ✓" meaning everywhere. */

:root {
  --bg: #ffffff;
  --surface: #f6f8f7;
  --surface-2: #eef2f0;
  --border: #e3e8e5;
  --ink: #17211c;
  --muted: #5e6b64;
  --brand: #0a7d57;
  --brand-strong: #07603f;
  --brand-soft: #e5f4ed;
  --amber: #9a6a1f;
  --amber-soft: #faf3e3;
  --shadow: 0 1px 2px rgb(23 33 28 / 0.05), 0 8px 24px -12px rgb(23 33 28 / 0.12);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg: #101613;
  --surface: #161e1a;
  --surface-2: #1d2721;
  --border: #29352f;
  --ink: #e9efec;
  --muted: #93a29a;
  --brand: #3cc493;
  --brand-strong: #5fd6ab;
  --brand-soft: #14261e;
  --amber: #d8a44e;
  --amber-soft: #2b2314;
  --shadow: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0; }

/* --- shared header ------------------------------------------------------ */

.site-head {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand .mark { color: var(--brand); flex: none; }
.brand .since { color: var(--brand); }

.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--ink); }

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }

/* --- layout ------------------------------------------------------------- */

.page { max-width: 44rem; margin: 0 auto; padding: 1.5rem 1.25rem 4.5rem; }

/* --- hero --------------------------------------------------------------- */

.hero { text-align: center; padding: 2.25rem 0 2rem; }

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 800;
}
.hero h1 .accent { color: var(--brand); }

.hero .lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 1rem auto 0;
}

/* --- trust strip -------------------------------------------------------- */

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}
.trust li { display: inline-flex; align-items: center; gap: 0.4rem; }
.trust .tick { color: var(--brand); font-weight: 700; }

/* --- stamper card ------------------------------------------------------- */

.stamper {
  margin-top: 2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; background: var(--surface); border-radius: 10px; padding: 0.3rem; width: fit-content; }
.tab {
  font: 600 0.9rem var(--sans);
  padding: 0.4rem 1.1rem;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}
.tab.active { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }

textarea {
  width: 100%;
  resize: vertical;
  font: 1rem/1.55 var(--sans);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.example-row { margin-top: 0.5rem; }
.linkish {
  background: none;
  border: none;
  padding: 0;
  font: 0.85rem var(--sans);
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dropzone {
  display: block;
  border: 1.5px dashed var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 2.4rem 1rem;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--brand); color: var(--brand); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.digest-panel {
  margin-top: 1.1rem;
  background: var(--surface);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.digest-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.digest-caption .hint { font-weight: 400; }
.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font: 0.75rem var(--sans);
  padding: 0.15rem 0.55rem;
  cursor: pointer;
}
.copy-btn:hover { color: var(--ink); border-color: var(--muted); }
.digest {
  display: block;
  font-family: var(--mono);
  font-size: clamp(0.8rem, 2.3vw, 0.95rem);
  color: var(--brand);
  word-break: break-all;
  min-height: 1.5em;
}
.digest.pulse { animation: digest-pulse 350ms ease; }
@keyframes digest-pulse {
  0% { color: var(--ink); }
  100% { color: var(--brand); }
}
@media (prefers-reduced-motion: reduce) {
  .digest.pulse { animation: none; }
}

.turnstile-row { margin-top: 1.1rem; min-height: 65px; }

.stamp-row { display: flex; gap: 0.7rem; margin-top: 1.1rem; flex-wrap: wrap; }
.stamp-row input {
  flex: 1 1 14rem;
  font: 0.95rem var(--sans);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
}
.stamp-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.btn {
  display: inline-block;
  font: 600 1rem var(--sans);
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease;
}
.btn:hover { background: var(--brand-strong); color: #fff; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-quiet { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }

.fineprint { font-size: 0.83rem; color: var(--muted); margin: 0.9rem 0 0; }

/* --- how it works ------------------------------------------------------- */

.how { margin-top: 3.5rem; text-align: center; }
.how h2 { font-size: 1.5rem; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 1.4rem;
  text-align: left;
}
.how-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
}
.how-card .step {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.how-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.how-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.how > p { margin-top: 1.25rem; }

/* --- use cases ---------------------------------------------------------- */

.uses { margin-top: 3rem; text-align: center; }
.uses h2 { font-size: 1.5rem; }
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --- FAQ ---------------------------------------------------------------- */

.faq { margin-top: 3rem; }
.faq h2 { font-size: 1.5rem; text-align: center; margin-bottom: 1.1rem; }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0.25rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style-position: outside;
}
.faq details p { color: var(--muted); margin: 0.6rem 0 0.2rem; font-size: 0.95rem; }

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

.foot {
  margin-top: 3.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* --- certificate page --------------------------------------------------- */

.cert {
  max-width: 44rem;
  margin: 1rem auto 4rem;
  padding: 0 1.25rem;
}

.cert-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2rem 1.75rem;
  box-shadow: var(--shadow);
  position: relative;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
}
.status-banner.confirmed { background: var(--brand-soft); color: var(--brand-strong); }
.status-banner.pending { background: var(--amber-soft); color: var(--amber); }
.status-banner .icon { flex: none; }
.status-banner strong { display: block; font-size: 1rem; }
.status-banner span { font-size: 0.88rem; opacity: 0.9; }

.cert h1 { font-size: clamp(1.5rem, 4.5vw, 2rem); font-weight: 800; margin-bottom: 0.4rem; }
.cert .subtitle { color: var(--muted); margin: 0 0 1.4rem; font-size: 0.95rem; }

.cert-fields { margin: 0; }
.cert-fields div {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding: 0.65rem 0;
}
.cert-fields dt { font-size: 0.85rem; font-weight: 600; color: var(--muted); padding-top: 0.1rem; }
.cert-fields dd { margin: 0; font-size: 0.95rem; }
code.wrap { word-break: break-all; }
code { font-family: var(--mono); font-size: 0.86em; color: var(--brand); }

.ok { color: var(--brand); font-weight: 600; }
.cert-note { color: var(--muted); font-size: 0.92rem; }

.action-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.4rem 0 0; }

.cert-verify { margin-top: 1.75rem; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.cert-verify summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.cert-verify summary:hover { color: var(--ink); }
.cert-verify pre {
  background: var(--surface);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  overflow-x: auto;
  font-size: 0.83rem;
}
.cert-verify ul { font-size: 0.9rem; color: var(--muted); }

.cert-foot { margin-top: 1.5rem; font-size: 0.9rem; text-align: center; color: var(--muted); }

.notfound { text-align: center; padding: 4rem 1rem; }

/* --- learn page --------------------------------------------------------- */

.prose h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); font-weight: 800; margin: 1rem 0 0.5rem; }
.prose h2 { font-size: 1.3rem; margin-top: 2.25rem; margin-bottom: 0.5rem; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); }
.prose .btn { margin-top: 1rem; }

/* --- responsive --------------------------------------------------------- */

@media (max-width: 40rem) {
  .how-grid { grid-template-columns: 1fr; }
  .cert-card { padding: 1.4rem 1.1rem; }
  .cert-fields div { grid-template-columns: 1fr; gap: 0.15rem; }
  .site-nav a.nav-learn { display: none; }
}
