/* Argon Cloud console. Tokens first; dark mode redefines them. */
:root {
  --paper: #f5f5fa;
  --surface: #ffffff;
  --ink: #1a1830;
  --muted: #5f5b78;
  --rule: #e1dfee;
  --argon: #5140d8;
  --argon-ink: #ffffff;
  --glow: #b9b0ff;
  --glow-soft: #efedff;
  --pass: #1f8a5b;
  --warn: #a8670f;
  --fail: #b3261e;
  --code: #f0eff8;
  --focus: #5140d8;
  --radius-s: 6px;
  --radius-m: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13112a;
    --surface: #1b1935;
    --ink: #ecebf6;
    --muted: #a7a3c4;
    --rule: #2d2a4d;
    --argon: #9488ff;
    --argon-ink: #13112a;
    --glow: #6f62e6;
    --glow-soft: #24204a;
    --pass: #4cc48d;
    --warn: #e9b252;
    --fail: #ff8a7d;
    --code: #221f40;
    --focus: #b9b0ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #13112a; --surface: #1b1935; --ink: #ecebf6; --muted: #a7a3c4; --rule: #2d2a4d;
  --argon: #9488ff; --argon-ink: #13112a; --glow: #6f62e6; --glow-soft: #24204a;
  --pass: #4cc48d; --warn: #e9b252; --fail: #ff8a7d; --code: #221f40; --focus: #b9b0ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--argon); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86em; }
pre { background: var(--code); padding: 0.75rem 0.9rem; border-radius: var(--radius-s); overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 0.5rem 0; }
h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.25rem; font-weight: 700; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 2rem 0 0.5rem; font-weight: 650; }
h3 { font-size: 1rem; margin: 1.25rem 0 0.4rem; font-weight: 650; }
p { margin: 0.4rem 0 0.8rem; max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* Frame */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1.25rem; border-bottom: 1px solid var(--rule); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
#nav { display: flex; align-items: center; gap: 1rem; font-size: 0.92rem; flex-wrap: wrap; justify-content: flex-end; }
#nav a { color: var(--ink); text-decoration: none; }
#nav a:hover { color: var(--argon); }
main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 1.75rem 1rem 4rem; }
.foot { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; padding: 1rem; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--rule); }
.foot a { color: var(--muted); }

/* Controls */
button, .button {
  font: inherit; font-size: 0.93rem; cursor: pointer; border-radius: var(--radius-s); padding: 0.45rem 0.85rem;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.35rem; line-height: 1.3;
}
button:hover, .button:hover { border-color: var(--argon); }
button.primary, .button.primary { background: var(--argon); color: var(--argon-ink); border-color: var(--argon); font-weight: 600; }
button.danger { color: var(--fail); }
button.quiet { border-color: transparent; background: transparent; color: var(--argon); padding-left: 0.3rem; padding-right: 0.3rem; }
button:disabled { opacity: 0.55; cursor: progress; }
input, select, textarea {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-s); padding: 0.45rem 0.6rem; width: 100%;
}
textarea { min-height: 4.5rem; font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; }
label { display: block; font-weight: 600; margin: 0.8rem 0 0.3rem; font-size: 0.93rem; }
label.check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 0.3rem; }
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 11rem; }
.mt { margin-top: 0.75rem; }
.narrow { width: 5.5rem; }

/* Panels: one surface style, used where content is a unit */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 1rem 1.15rem; margin: 0.9rem 0; }
.notice { border-left: 3px solid var(--argon); padding: 0.6rem 0.85rem; background: var(--glow-soft); border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 0.8rem 0; }
.notice.error { border-left-color: var(--fail); }
.notice.warn { border-left-color: var(--warn); }

/* Project header and tabs */
.projhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; color: var(--muted); }
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.on { background: var(--pass); }
.tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--rule); margin: 1.1rem 0 1.4rem; overflow-x: auto; }
.tabs a { padding: 0.55rem 0.8rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: 0.95rem; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--argon); font-weight: 600; }
.count { display: inline-block; min-width: 1.3rem; padding: 0 0.35rem; margin-left: 0.3rem; border-radius: 999px; background: var(--argon); color: var(--argon-ink); font-size: 0.75rem; text-align: center; font-weight: 700; }

/* Badges: lowercase words, colour carries state */
.badge { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.05rem 0.5rem; border-radius: 999px; border: 1px solid currentColor; height: fit-content; white-space: nowrap; }
.pass { color: var(--pass); } .warn { color: var(--warn); } .fail { color: var(--fail); } .skip { color: var(--muted); }

/* Check report */
.checks { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.checks li { border-top: 1px solid var(--rule); padding: 0.65rem 0; display: grid; grid-template-columns: 3.6rem 1fr; gap: 0.25rem 0.8rem; }
.checks li:first-child { border-top: 0; }
.fix { grid-column: 2; background: var(--code); border-radius: var(--radius-s); padding: 0.45rem 0.65rem; font-size: 0.9rem; }

/* Wizard: a real sequence, so it is numbered */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.4rem 2.6rem; border-left: 1px solid var(--rule); margin-left: 0.85rem; }
.steps > li:last-child { border-left-color: transparent; }
.steps > li::before {
  content: counter(step); position: absolute; left: -0.85rem; top: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--argon); color: var(--argon); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem;
}
.steps > li.done::before { content: "✓"; background: var(--argon); color: var(--argon-ink); }
.steps h3 { margin-top: 0.15rem; }

/* The memorable element: sandboxes as element tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 0.9rem; margin: 0.8rem 0; }
.tile {
  position: relative; background: var(--surface); border: 1.5px solid var(--argon); border-radius: var(--radius-s);
  padding: 2rem 0.9rem 0.8rem; min-height: 9.5rem; display: flex; flex-direction: column; gap: 0.3rem;
}
.tile.expiring { border-color: var(--warn); }
.tile.critical { border-color: var(--fail); }
.tile .z { position: absolute; top: 0.45rem; left: 0.65rem; font-size: 0.8rem; color: var(--argon); font-weight: 700; font-variant-numeric: tabular-nums; }
.tile .src { position: absolute; top: 0.45rem; right: 0.65rem; font-size: 0.78rem; color: var(--muted); }
.tile .sym { font-size: 1.45rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; word-break: break-all; }
.tile .who { font-size: 0.84rem; color: var(--muted); }
.tile .exp { margin-top: auto; padding-top: 0.5rem; border-top: 1px solid var(--rule); font-size: 0.84rem; display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.tile .actions { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.4rem; }
.tile .actions button { font-size: 0.84rem; padding: 0.3rem 0.55rem; }
.tile.new { border-style: dashed; border-color: var(--glow); align-items: flex-start; justify-content: center; }

/* Lists (reviews, activity, keys): rows, not cards */
.list { border-top: 1px solid var(--rule); margin: 0.6rem 0; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; padding: 0.75rem 0.1rem; border-bottom: 1px solid var(--rule); align-items: center; }
.item .title { font-weight: 600; }
.item .meta { color: var(--muted); font-size: 0.88rem; }
.item .side { display: flex; gap: 0.4rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem 0.4rem; border-top: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-weight: 600; border-top: 0; }
.table-wrap { overflow-x: auto; }

/* Home */
.home { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5rem; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 0.3rem 0; }
.checklist li { display: flex; gap: 0.6rem; align-items: center; padding: 0.35rem 0; }
.checklist .box { width: 1.1rem; height: 1.1rem; border-radius: 4px; border: 1.5px solid var(--rule); display: inline-grid; place-items: center; font-size: 0.75rem; flex: none; }
.checklist .done .box { background: var(--pass); border-color: var(--pass); color: #fff; }
.checklist .done span:last-child { color: var(--muted); text-decoration: line-through; }
.meters { display: grid; gap: 0.7rem; }
.meter .label { display: flex; justify-content: space-between; font-size: 0.88rem; }
.meter .bar { height: 0.45rem; background: var(--rule); border-radius: 999px; overflow: hidden; margin-top: 0.25rem; }
.meter .fill { height: 100%; background: var(--argon); border-radius: 999px; }
.meter .fill.warn { background: var(--warn); }
.meter .fill.fail { background: var(--fail); }
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }

/* Inner tabs (connect panel) */
.subtabs { display: flex; gap: 0.25rem; flex-wrap: wrap; margin: 0.5rem 0; }
.subtabs button { font-size: 0.85rem; padding: 0.3rem 0.65rem; }
.subtabs button[aria-pressed="true"] { background: var(--glow-soft); border-color: var(--argon); color: var(--argon); font-weight: 600; }
.secret { display: flex; gap: 0.5rem; align-items: center; }
.secret code { flex: 1; overflow-x: auto; white-space: nowrap; background: var(--code); padding: 0.4rem 0.55rem; border-radius: var(--radius-s); }

/* Review page */
.summary { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 0.6rem 0 1rem; }
.summary div { min-width: 6rem; }
.summary .n { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.02em; display: block; }
.change { border-top: 1px solid var(--rule); padding: 0.7rem 0; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.cmp pre { margin: 0.3rem 0; }
.cmp .before { border-left: 3px solid var(--fail); }
.cmp .after { border-left: 3px solid var(--pass); }

/* Landing */
.hero { padding: 3.5rem 0 2rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; max-width: 16ch; }
.hero p { font-size: 1.1rem; color: var(--muted); }
.hero .demo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 1.5rem 0 2.5rem; }
.uses h3 { margin-top: 0; }
.how { border-top: 1px solid var(--rule); padding-top: 1rem; }
.how ol { padding-left: 1.2rem; }
.how li { margin: 0.35rem 0; max-width: 70ch; }

dialog { border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); max-width: 34rem; width: calc(100% - 2rem); padding: 1.2rem; }
dialog::backdrop { background: rgb(19 17 42 / 0.45); }

@media (max-width: 760px) {
  .home, .hero, .uses, .cmp { grid-template-columns: 1fr; }
  .checks li { grid-template-columns: 1fr; }
  .fix { grid-column: 1; }
  .item { grid-template-columns: 1fr; }
  .item .side { justify-content: flex-start; }
  .top { padding: 0.6rem 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .tile.fresh { animation: settle 420ms ease-out; }
  @keyframes settle { from { box-shadow: 0 0 0 6px var(--glow); } to { box-shadow: 0 0 0 0 transparent; } }
}
.fields { margin: 0.35rem 0 0.2rem; padding-left: 1.1rem; font-size: 0.9rem; }
.fields li { margin: 0.1rem 0; }
