/* The owner's codes page — NUKE GG's identity (CLAUDE.md §4): red only on buttons you press, gold for what's picked, dark
   warm cards with one thin line, Baloo Bhaijaan 2 for words, Rajdhani for numbers. Nothing moves while nothing happens. */
:root {
  --bg: #0e0a0a;
  --card: #181112;
  --card2: #211819;
  --well: #120d0d;
  --line: rgba(255, 201, 60, 0.09);
  --line2: rgba(255, 255, 255, 0.08);
  --text: #fff;
  --dim: rgba(255, 255, 255, 0.58);
  --dim2: rgba(255, 255, 255, 0.38);
  --red: #ed2124;
  --red2: #ff3a3d;
  --flame: #ff8a1f;
  --gold: #ffc93c;
  --green: #4ade80;
  --stone: #2a2122;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "Baloo Bhaijaan 2", system-ui, sans-serif; line-height: 1.75; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.num { font-family: Rajdhani, system-ui, sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* frame: the side menu on wide screens, a row of tabs on a phone */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-inline-end: 1px solid var(--line); background: #110c0c; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 18px; }
.brand img { width: 38px; height: 38px; }
.brand b { font-size: 18px; font-weight: 800; line-height: 1.2; }
.brand small { display: block; color: var(--dim); font-size: 12px; font-weight: 600; }
.tab { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; color: var(--dim); font-weight: 700; font-size: 15px; text-align: start; border: 1px solid transparent; }
.tab:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.tab.on { background: var(--stone); color: #fff; border-color: rgba(255, 201, 60, 0.55); }
.tab svg { width: 18px; height: 18px; flex: none; }
.side .grow { flex: 1; }
.who { margin: 0 8px; font-size: 12px; color: var(--dim2); word-break: break-all; }
main { min-width: 0; padding: 28px clamp(16px, 4vw, 56px) 60px; }
.page { max-width: 1180px; margin: 0 auto; }
h1 { font-size: 30px; font-weight: 800; margin: 0; line-height: 1.4; }
.sub { margin: 4px 0 22px; font-size: 14px; color: var(--dim); max-width: 80ch; }
h2 { font-size: 20px; font-weight: 800; margin: 0 0 10px; }

@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; z-index: 5; height: auto; flex-direction: row; overflow-x: auto; padding: 10px; border-inline-end: 0; border-bottom: 1px solid var(--line); gap: 6px; }
  .brand { margin: 0 4px 0 8px; }
  .brand div, .who, .side .grow { display: none; }
  .tab { flex: none; height: 40px; padding: 0 12px; font-size: 14px; }
  main { padding-top: 20px; }
  h1 { font-size: 24px; }
}

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.stat .n { font-size: 40px; line-height: 1.1; }
.stat .l { color: var(--dim); font-size: 14px; font-weight: 600; }
.stat .s { color: var(--dim2); font-size: 12.5px; }
.gap { height: 16px; }

/* buttons: red = the action you press; stone = calm */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 14px; font-weight: 800; font-size: 15px; white-space: nowrap; border: 1px solid var(--line2); background: var(--stone); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35); transition: transform 0.12s, background 0.2s; }
.btn:hover { background: #352a2b; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: var(--red2); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn.big { height: 52px; padding: 0 26px; font-size: 17px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.link { color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* the master switch */
.master { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; justify-content: space-between; }
.master .state { font-size: 38px; font-weight: 800; line-height: 1.3; }
.master .state.on { color: var(--gold); }
.master .state.off { color: var(--dim); }
.ask { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--well); border: 1px solid rgba(255, 201, 60, 0.35); }
.ask p { margin: 0 0 10px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* fields: deep wells */
label.f { display: block; }
label.f span { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
label.f small { display: block; color: var(--dim2); font-size: 12.5px; margin-top: 2px; }
.in { height: 44px; width: 100%; border-radius: 14px; border: 1px solid var(--line2); background: var(--well); padding: 0 14px; box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.35); }
.in:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
textarea.in { height: auto; min-height: 220px; padding: 12px 14px; resize: vertical; }
.err { color: #ff8a8a; font-size: 13px; font-weight: 700; }
.ok { color: var(--green); font-weight: 700; }

/* chips: stone pills, picked = gold outline */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--stone); border: 1px solid var(--line2); color: var(--dim); font-weight: 700; font-size: 14px; }
.chip.on { color: #fff; border-color: rgba(255, 201, 60, 0.7); }
.chip:hover { color: #fff; }

/* the codes list: one row card each (a table on wide screens, stacked on a phone) */
.list { display: flex; flex-direction: column; gap: 8px; }
.code { display: grid; grid-template-columns: minmax(210px, 1.3fr) 0.6fr 0.9fr 1.5fr 0.9fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.code.head { background: none; border: 0; padding: 0 16px; color: var(--dim2); font-size: 12.5px; font-weight: 700; }
.code .c { font-size: 17px; letter-spacing: 0.04em; white-space: nowrap; }
.code .m { color: var(--dim); font-size: 13px; }
.code .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pill { display: inline-block; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; border: 1px solid; line-height: 24px; white-space: nowrap; }
.pill.green { color: var(--green); border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.08); }
.pill.gold { color: var(--gold); border-color: rgba(255, 201, 60, 0.4); background: rgba(255, 201, 60, 0.08); }
.pill.red { color: #ff8a8a; border-color: rgba(237, 33, 36, 0.45); background: rgba(237, 33, 36, 0.1); }
.pill.dim { color: var(--dim); border-color: var(--line2); }
.flag { color: var(--flame); font-weight: 800; font-size: 12.5px; }
@media (max-width: 980px) {
  .code { grid-template-columns: 1fr 1fr; }
  .code.head { display: none; }
  .code .acts { grid-column: 1 / -1; justify-content: flex-start; }
}

.made { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .made { grid-template-columns: minmax(0, 1fr); } }
.checks { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--well); border: 1px solid var(--line2); font-weight: 600; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.drow { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.log { display: flex; flex-direction: column; gap: 6px; }
.log div { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.log .t { color: var(--dim2); min-width: 92px; }
.toast { position: fixed; inset-inline: 0; bottom: 18px; margin: 0 auto; width: fit-content; max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 14px; background: var(--card2); border: 1px solid rgba(255, 201, 60, 0.45); font-weight: 700; z-index: 20; }
.toast.bad { border-color: rgba(237, 33, 36, 0.6); }
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.door { width: min(440px, 100%); text-align: center; }
.door img { width: 84px; height: 84px; }
.empty { padding: 34px; text-align: center; color: var(--dim); }
.demo { position: fixed; top: 10px; inset-inline-end: 12px; z-index: 30; padding: 2px 10px; border-radius: 999px; background: rgba(255, 138, 31, 0.15); border: 1px solid rgba(255, 138, 31, 0.5); color: var(--flame); font-size: 12px; font-weight: 800; }
@media (max-width: 820px) { .demo { top: auto; bottom: 10px; } }
