/* ==========================================================================
   burnbox design system
   Everything is a token. New features consume these; they never invent
   their own colours or spacing. That is what makes this survive v2 and v3
   without a redesign.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* surfaces */
  --bg:            #fbfbfa;
  --bg-elevated:   #ffffff;
  --bg-subtle:     #f3f3f1;
  --bg-inset:      #eeeeeb;

  /* lines */
  --border:        #e5e5e1;
  --border-strong: #d2d2cd;

  /* text */
  --text:          #191918;
  --text-muted:    #66665f;
  --text-faint:    #91918a;

  /* the ember — used sparingly, it is the only loud colour */
  --accent:        #c2410c;
  --accent-hover:  #9a3412;
  --accent-soft:   #fdf1ea;
  --accent-line:   #f2d5c4;

  /* semantic */
  --ok:            #15803d;
  --ok-soft:       #eefaf1;
  --ok-line:       #cbead6;
  --warn:          #a16207;
  --warn-soft:     #fefbe8;
  --warn-line:     #eee3b8;
  --danger:        #b91c1c;
  --danger-soft:   #fdf2f2;
  --danger-line:   #f2d0d0;

  /* shape */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;

  /* type */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* depth */
  --shadow-sm: 0 1px 2px rgba(20, 20, 18, .04), 0 1px 3px rgba(20, 20, 18, .05);
  --shadow:    0 2px 4px rgba(20, 20, 18, .03), 0 8px 24px rgba(20, 20, 18, .07);

  --maxw: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0e0e0d;
    --bg-elevated:   #171715;
    --bg-subtle:     #1d1d1a;
    --bg-inset:      #232320;

    --border:        #2a2a26;
    --border-strong: #3b3b35;

    --text:          #ededea;
    --text-muted:    #a0a099;
    --text-faint:    #73736c;

    --accent:        #fb923c;
    --accent-hover:  #fdba74;
    --accent-soft:   #241610;
    --accent-line:   #3d2618;

    --ok:            #4ade80;
    --ok-soft:       #0f1d14;
    --ok-line:       #1d3327;
    --warn:          #fbbf24;
    --warn-soft:     #1f1a09;
    --warn-line:     #3a2f11;
    --danger:        #f87171;
    --danger-soft:   #221010;
    --danger-line:   #3d1d1d;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow:    0 2px 4px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .45);
  }
}

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 2rem; font-weight: 680; }
h2 { font-size: 1.2rem; font-weight: 640; }
h3 { font-size: .95rem; font-weight: 620; }
p  { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

code, .mono { font-family: var(--mono); font-size: .875em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 660;
  letter-spacing: -0.02em;
  color: var(--text);
  font-size: 1.02rem;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand .flame { color: var(--accent); font-size: 1.1rem; line-height: 1; }

.header-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: .875rem;
}
.header-links a { color: var(--text-muted); }
.header-links a:hover { color: var(--text); text-decoration: none; }

main { padding: 2.5rem 0 1rem; }

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 3rem;
  color: var(--text-faint);
  font-size: .82rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  justify-content: space-between;
}

section + section { margin-top: 3rem; }

.section-title {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: 1rem;
}
.section-title .eyebrow {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-faint);
  font-weight: 600;
}

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

.hero { text-align: center; margin-bottom: 2rem; }
.hero h1 { font-size: clamp(1.85rem, 5vw, 2.6rem); }
.hero .lede {
  margin: .85rem auto 0;
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 1.03rem;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem;
  margin-top: 1.25rem;
}

/* --------------------------------------------------------------------------
   pills / badges
   -------------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: .765rem;
  font-weight: 500;
  white-space: nowrap;
}
.pill .dot { width: .4rem; height: .4rem; border-radius: 999px; background: var(--ok); }

.badge {
  display: inline-block;
  padding: .12rem .45rem;
  border-radius: var(--r-sm);
  font-size: .68rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid transparent;
}
.badge-planned { background: var(--bg-inset); color: var(--text-faint); border-color: var(--border); }
.badge-live    { background: var(--ok-soft);  color: var(--ok);         border-color: var(--ok-line); }
.badge-next    { background: var(--accent-soft); color: var(--accent);  border-color: var(--accent-line); }

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

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.card-flat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   form
   -------------------------------------------------------------------------- */

.field { display: block; }

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .4rem;
}
.field-label .label { font-size: .875rem; font-weight: 600; }

textarea, input[type="text"] {
  display: block;
  width: 100%;
  font-family: var(--mono);
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: .8rem .9rem;
  resize: vertical;
  transition: border-color .12s ease, background .12s ease;
}
textarea { min-height: 8.5rem; }
textarea::placeholder, input::placeholder { color: var(--text-faint); font-family: var(--font); }
textarea:focus, input:focus {
  background: var(--bg-elevated);
  border-color: var(--accent);
  outline: none;
}
textarea.over { border-color: var(--danger); }

.counter {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.counter.near { color: var(--warn); }
.counter.over { color: var(--danger); font-weight: 600; }

.meter {
  height: 3px;
  background: var(--bg-inset);
  border-radius: 999px;
  overflow: hidden;
  margin-top: .5rem;
}
.meter > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--text-faint);
  border-radius: 999px;
  transition: width .15s ease, background .15s ease;
}
.meter.near > span { background: var(--warn); }
.meter.over > span { background: var(--danger); }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.1rem;
}

/* settings row — v2.4's expiry picker replaces the static item here */
.settings {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.setting {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .6rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-subtle);
  font-size: .78rem;
  color: var(--text-muted);
}
.setting strong { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------------------
   buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 580;
  line-height: 1;
  padding: .68rem 1.15rem;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #1a0f07; } }

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-subtle); }

.btn-ghost { background: transparent; color: var(--text-muted); padding: .4rem .6rem; }
.btn-ghost:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text); }

.btn-lg { font-size: .98rem; padding: .85rem 1.5rem; }
.btn-sm { font-size: .78rem; padding: .4rem .65rem; border-radius: var(--r-sm); }

/* --------------------------------------------------------------------------
   secret / link output
   -------------------------------------------------------------------------- */

.output { margin-top: 1.5rem; }

.link-block { margin-top: 1rem; }
.link-block:first-child { margin-top: 0; }

.link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}
.link-head .label {
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .01em;
}
.link-head .label .qualifier { color: var(--text-faint); font-weight: 500; }

.link-box {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .6rem .7rem;
}
.link-box .value {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.5;
  word-break: break-all;
  color: var(--text);
  align-self: center;
}
.link-box.share { border-color: var(--accent-line); background: var(--accent-soft); }

.hint {
  margin-top: .35rem;
  font-size: .78rem;
  color: var(--text-muted);
}

/* the fragment explainer — the single most convincing thing on the page */
.url-anatomy {
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.9;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .85rem .9rem;
  overflow-x: auto;
  white-space: nowrap;
}
.url-anatomy .seen { color: var(--text-muted); }
.url-anatomy .unseen { color: var(--accent); font-weight: 600; }
.url-anatomy .legend {
  display: flex;
  gap: 1.25rem;
  margin-top: .5rem;
  white-space: normal;
  font-family: var(--font);
  font-size: .74rem;
}
.url-anatomy .legend span { display: inline-flex; align-items: center; gap: .35rem; }
.url-anatomy .legend i { width: .55rem; height: .55rem; border-radius: 2px; font-style: normal; }
.url-anatomy .legend .k-seen   { background: var(--text-faint); }
.url-anatomy .legend .k-unseen { background: var(--accent); }

/* --------------------------------------------------------------------------
   alerts
   -------------------------------------------------------------------------- */

.alert {
  display: flex;
  gap: .65rem;
  padding: .8rem .9rem;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: .875rem;
  color: var(--text-muted);
}
.alert .icon { flex: none; font-size: .95rem; line-height: 1.5; }
.alert strong { color: var(--text); font-weight: 620; }

.alert-warn   { background: var(--warn-soft);   border-color: var(--warn-line); }
.alert-warn strong { color: var(--warn); }
.alert-danger { background: var(--danger-soft); border-color: var(--danger-line); }
.alert-danger strong { color: var(--danger); }
.alert-ok     { background: var(--ok-soft);     border-color: var(--ok-line); }
.alert-ok strong { color: var(--ok); }

/* --------------------------------------------------------------------------
   steps
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: .85rem;
}
.step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem;
}
.step .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  margin-bottom: .6rem;
}
.step h3 { margin-bottom: .25rem; }
.step p { font-size: .84rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   honesty table — what the server sees
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .85rem;
}

.list { list-style: none; margin: .5rem 0 0; padding: 0; }
.list li {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  padding: .3rem 0;
  font-size: .855rem;
  color: var(--text-muted);
}
.list li .mark { flex: none; font-weight: 700; line-height: 1.55; }
.list-no  li .mark { color: var(--danger); }
.list-yes li .mark { color: var(--ok); }

/* --------------------------------------------------------------------------
   roadmap
   -------------------------------------------------------------------------- */

.roadmap { display: grid; gap: .5rem; }
.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-elevated);
}
.roadmap-item .body { min-width: 0; }
.roadmap-item h3 { font-size: .875rem; margin-bottom: .15rem; }
.roadmap-item p { font-size: .82rem; color: var(--text-muted); }
.roadmap-item .tag { flex: none; padding-top: .12rem; }

/* --------------------------------------------------------------------------
   faq
   -------------------------------------------------------------------------- */

.faq { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--bg-elevated); }
.faq details + details { border-top: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  padding: .85rem 1rem;
  font-size: .875rem;
  font-weight: 580;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 1rem;
  flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { background: var(--bg-subtle); }
.faq .answer {
  padding: 0 1rem 1rem;
  font-size: .865rem;
  color: var(--text-muted);
}
.faq .answer p + p { margin-top: .6rem; }

/* --------------------------------------------------------------------------
   reveal / creator pages
   -------------------------------------------------------------------------- */

.centered { max-width: 34rem; margin: 0 auto; }

.reveal-stage { text-align: center; padding: .5rem 0 .25rem; }
.reveal-stage .btn { min-width: 14rem; }

.secret-out {
  font-family: var(--mono);
  font-size: .9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: 1rem;
  max-height: 22rem;
  overflow: auto;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.35rem;
  font-weight: 660;
  letter-spacing: -0.02em;
}
.state .indicator { width: .6rem; height: .6rem; border-radius: 999px; flex: none; }
.state-unread .indicator { background: var(--ok); }
.state-unread { color: var(--ok); }
.state-read   .indicator { background: var(--accent); }
.state-read   { color: var(--accent); }
.state-gone   .indicator { background: var(--text-faint); }
.state-gone   { color: var(--text-muted); }

.kv { display: grid; gap: .4rem; margin-top: 1rem; }
.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .84rem;
  padding: .4rem 0;
  border-bottom: 1px dashed var(--border);
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--text-faint); }
.kv-row .v { color: var(--text); font-weight: 550; text-align: right; }

.hidden { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 34rem) {
  main { padding-top: 1.75rem; }
  .card { padding: 1.15rem; border-radius: var(--r); }
  section + section { margin-top: 2.25rem; }
}

/* --------------------------------------------------------------------------
   spacing utilities — exist so the pages carry no inline style attributes,
   which lets the CSP forbid inline styles entirely
   -------------------------------------------------------------------------- */

.mt-sm  { margin-top: .85rem; }
.mt     { margin-top: 1rem; }
.mt-md  { margin-top: 1.25rem; }
.mt-lg  { margin-top: 1.5rem; }
.mb-md  { margin-bottom: 1.25rem; }
.mb-lg  { margin-bottom: 1.5rem; }
.center { text-align: center; }
.fs-90  { font-size: .9rem; }
