@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --ink: #0b0d12;
  --surface: #151822;
  --surface-raised: #1b1f2c;
  --line: #262b3a;
  --text: #e7e9ee;
  --muted: #838ba0;
  --ember: #ff5a36;
  --ember-dim: #7a2e1f;
  --cyan: #4fd6c4;
  --danger: #ff5a36;
  --radius: 3px;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
}

body {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  background-color: var(--ink);
  background-attachment: fixed;
  opacity: 1;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 20px 40px;
}

/* --- Brand / nav header --- */

.site-nav {
  width: 100%;
  max-width: 640px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 0;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
}

.brand svg { display: block; }

.brand-name {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-name em {
  font-style: normal;
  color: var(--ember);
}

.nav-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

@media (max-width: 420px) {
  .nav-links { gap: 14px; }
}

.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-color: var(--ember);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px 1px var(--ember);
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--ember), transparent 60%);
}

h1 {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
  line-height: 1.5;
}

textarea {
  width: 100%;
  min-height: 160px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  padding: 14px;
  resize: vertical;
}

textarea:focus, input:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.field-label {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}

.toggle input { accent-color: var(--ember); width: 16px; height: 16px; }

select, input[type="password"], input[type="text"] {
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-family: var(--sans);
  font-size: 14px;
}

.password-field {
  margin-top: 14px;
  display: none;
}

.password-field.active { display: block; }

button.primary {
  width: 100%;
  margin-top: 24px;
  background: var(--ember);
  color: #1a0d08;
  border: none;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 14px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

button.primary:hover { filter: brightness(1.08); }
button.primary:disabled { background: var(--ember-dim); color: var(--muted); cursor: not-allowed; }

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 14px;
  cursor: pointer;
}

button.ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.result {
  margin-top: 24px;
  display: none;
}

.result.active { display: block; }

.link-box {
  display: flex;
  gap: 8px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.link-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 13px;
}

.link-box input:focus { outline: none; }

.notice {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
}

.notice strong { color: var(--text); }

/* --- Burn ring (signature element) --- */

.fuse-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 12px 0 4px;
}

.fuse-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.fuse-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.fuse-ring circle.track { stroke: var(--line); fill: none; stroke-width: 6; }

.fuse-ring circle.progress {
  stroke: var(--ember);
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s linear;
  filter: drop-shadow(0 0 5px rgba(255, 90, 54, 0.55));
}

.fuse-ring .icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 22px;
}

.status-line {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.status-line.burned { color: var(--ember); }

.message-out {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 18px;
}

.error-box {
  border: 1px solid var(--ember-dim);
  background: rgba(255, 90, 54, 0.08);
  color: var(--text);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 14px;
  margin-top: 18px;
}

footer {
  margin-top: 32px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
  text-align: center;
}

footer a { color: var(--cyan); text-decoration: none; }

/* --- About page --- */

.card.wide { max-width: 640px; }

.lede {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 8px;
}

.section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 18px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ember);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.feature-list li::before {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--ember);
}

.feature-list.secure li::before { background: var(--cyan); }

.feature-list strong { color: var(--text); }
.feature-list span { color: var(--muted); }

.tradeoff {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  padding: 14px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tradeoff strong { color: var(--text); }

/* --- QR code --- */

.qr-wrap {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-box {
  background: #ffffff;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: inline-flex;
  line-height: 0;
}

.qr-box svg {
  display: block;
  width: 168px;
  height: 168px;
}

/* --- Stats page --- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}

@media (min-width: 480px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-tile {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
}

.stat-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--cyan);
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.bar-track {
  width: 100%;
  height: 10px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--ember));
  border-radius: 999px;
  transition: width 0.6s ease;
}
