/* cardano.delivery — shared design system ("volt" palette: electric lime + neon mint on ink) */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f3f5ee, #090b07);
  --panel: light-dark(#ffffff, #11140c);
  --panel-2: light-dark(#ecefe4, #0c0f08);
  --border: light-dark(#dbe0cd, #272d1b);
  --text: light-dark(#151a0e, #edf3de);
  --muted: light-dark(#6d7560, #98a285);
  /* accent used as text/borders: readable in both modes */
  --brand: light-dark(#4a7d00, #b8f318);
  --brand-2: light-dark(#00755c, #00e5a8);
  /* raw voltage: always vivid, for buttons/packets (pair with --ink text) */
  --vivid: #b8f318;
  --vivid-2: #00e5a8;
  --ink: #0b0d07;
  --ok: #2f9e44;
  --ok-bg: light-dark(#e9f7ec, #123321);
  --ok-fg: light-dark(#2b8a3e, #69db7c);
  --off-bg: light-dark(#eaede0, #1c2114);
  --off-fg: var(--muted);
  --danger: #e03131;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 8px 24px -12px rgb(30 50 0 / 0.18);
}
/* explicit theme override set by the header toggle (defaults to system) */
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% -5%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
    radial-gradient(700px 350px at 90% -10%, color-mix(in srgb, var(--brand-2) 12%, transparent), transparent 70%);
}

/* header */
header.site {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 0.65rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.brand .mark { width: 34px; height: 34px; color: var(--text); }
.brand .mark svg { display: block; width: 100%; height: 100%; }
.brand small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--muted); letter-spacing: 0; }
.grad {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
nav.site { display: flex; align-items: center; gap: 1.1rem; }
nav.site a { color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
nav.site a:hover { color: var(--text); }
/* buttons in the nav keep their ink-on-voltage text (nav.site a would
   otherwise out-specify .btn and paint it muted) */
nav.site a.btn, nav.site a.btn:hover { color: var(--ink); }

/* theme toggle */
#theme-toggle {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  width: 34px; height: 34px; padding: 0; border-radius: 10px;
  display: grid; place-items: center; font-size: 15px; line-height: 1;
}
#theme-toggle:hover { background: var(--panel-2); filter: none; }

/* small screens */
@media (max-width: 560px) {
  .brand small { display: none; }
  nav.site { gap: 0.6rem; }
  header.site { padding: 0.6rem 0.9rem; }
  button, .btn { padding: 0.55rem 1rem; } /* larger touch targets */
}

/* buttons — raw voltage, ink text */
button, .btn {
  display: inline-block; text-decoration: none; text-align: center;
  font: inherit; font-size: 0.875rem; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; border-radius: 10px; padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--vivid), var(--vivid-2));
  color: var(--ink); transition: filter 0.15s, transform 0.05s, box-shadow 0.15s;
}
button:hover, .btn:hover { filter: brightness(1.06); box-shadow: 0 0 18px color-mix(in srgb, var(--vivid) 45%, transparent); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: default; }
button.ghost, .btn.ghost { background: var(--panel); color: var(--text); border-color: var(--border); }
button.ghost:hover, .btn.ghost:hover { background: var(--panel-2); filter: none; box-shadow: none; }
button.danger-ghost { background: var(--panel); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
button.danger-ghost:hover { background: color-mix(in srgb, var(--danger) 8%, var(--panel)); filter: none; }
button.sm, .btn.sm { font-size: 0.78rem; padding: 0.32rem 0.7rem; border-radius: 8px; }
button.lg, .btn.lg { font-size: 1rem; padding: 0.7rem 1.5rem; border-radius: 12px; }
button.link { background: none; border: none; color: var(--brand); padding: 0; font-weight: 600; }
button.link:hover { text-decoration: underline; filter: none; }

/* forms */
label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin: 0.9rem 0 0.3rem; }
input, select {
  width: 100%; font: inherit; font-size: 0.9rem; color: var(--text);
  padding: 0.55rem 0.75rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

/* misc */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.1rem, 3vw, 1.6rem); margin-bottom: 1.25rem;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
main.site { max-width: 960px; margin: 0 auto; padding: clamp(1rem, 4vw, 2.5rem); }
footer.site { text-align: center; color: var(--muted); font-size: 0.78rem; padding: 2.5rem 1rem; border-top: 1px solid var(--border); margin-top: 3rem; }
footer.site a { color: var(--muted); }
.pill {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 0.18rem 0.55rem; border-radius: 99px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand);
}

/* code blocks */
pre {
  background: light-dark(#0f1420, #0a0d14); color: #dbe3f4;
  border: 1px solid light-dark(#1c2436, #1c2436);
  border-radius: 12px; padding: 1rem 1.2rem; overflow-x: auto;
  font-size: 0.8rem; line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; }
:not(pre) > code {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.08em 0.35em;
}
pre .c { color: #7d8aa5; } /* comment */
pre .k { color: #8ab4ff; } /* key/keyword */
pre .s { color: #7ee0a3; } /* string */
