:root {
  color-scheme: light dark;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --text: #16201d;
  --muted: #5b6b66;
  --line: #d8e2df;
  --accent: #087f5b;
  --accent-strong: #056246;
  --danger: #b42318;
  --shadow: 0 18px 50px rgb(20 50 40 / 9%);
}

:root[data-theme="dark"] {
  --bg: #0e1513;
  --surface: #17201d;
  --text: #eff8f4;
  --muted: #a5b9b2;
  --line: #32443e;
  --accent: #42d3a1;
  --accent-strong: #2bb587;
  --danger: #ff776d;
  --shadow: 0 18px 50px rgb(0 0 0 / 30%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1513;
    --surface: #17201d;
    --text: #eff8f4;
    --muted: #a5b9b2;
    --line: #32443e;
    --accent: #42d3a1;
    --accent-strong: #2bb587;
    --danger: #ff776d;
    --shadow: 0 18px 50px rgb(0 0 0 / 30%);
  }
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34rem), var(--bg); }
a { color: inherit; }
.topbar { min-height: 4.5rem; padding: 1rem clamp(1rem, 5vw, 4rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); }
.brand { color: var(--accent); font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; text-decoration: none; }
.account, .row, .copy-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.shell { width: min(72rem, calc(100% - 2rem)); margin: clamp(2rem, 7vw, 6rem) auto; }
.shell.narrow { width: min(46rem, calc(100% - 2rem)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; padding: clamp(1.4rem, 4vw, 2.6rem); box-shadow: var(--shadow); }
.hero { max-width: 48rem; }
.hero h1, .card h1 { font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.055em; line-height: 1.02; margin: .25rem 0 1rem; }
.card h2 { margin-top: 0; }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
label { display: block; margin: 1.2rem 0 .45rem; font-weight: 700; }
.theme-control { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .85rem; }
textarea, input, select { width: 100%; border: 1px solid var(--line); border-radius: .65rem; padding: .75rem .85rem; background: var(--bg); color: var(--text); font: inherit; }
textarea { resize: vertical; min-height: 8rem; }
.theme-control select, .inline input { width: auto; }
.inline { margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: .7rem; padding: .72rem 1rem; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--accent); color: #04120d; margin-top: 1rem; }
:root[data-theme="light"] .button.primary { color: white; }
.button.secondary { border-color: var(--line); background: var(--surface); color: var(--text); }
.button.ghost { border-color: var(--line); background: transparent; color: var(--text); }
.button.danger { background: var(--danger); color: white; }
.button.wide { width: 100%; margin-top: 1.25rem; }
.result { margin-top: 1.25rem; }
.success-panel { border: 1px solid var(--accent); border-radius: .8rem; padding: 1rem; }
.copy-row input { flex: 1; min-width: 12rem; }
.secret-output { display: block; width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--accent); border-radius: .8rem; padding: 1rem; background: var(--bg); font: 600 1rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; }
.error { color: var(--danger); font-weight: 700; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

@media (max-width: 760px) {
  .trust-grid { grid-template-columns: 1fr; }
  .topbar, .account { align-items: flex-start; }
  .topbar { flex-direction: column; }
}
