/* Nelson the Geek hub. Front = charcoal + green (matches nelson-the-geek.pages.dev). Backend = same layout, colors inverted (.theme-admin). */
@font-face { font-family: "Montserrat"; src: url("/assets/fonts/montserrat-var.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-400.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #070c0a; --bg-2: #0b1310; --surface: linear-gradient(180deg, rgba(34,52,42,.62), rgba(12,21,17,.72)); --surface-solid: #101a15;
  --ink: #ffffff; --muted: #c9d6cf; --soft: #93a69c;
  --accent: #a6e832; --accent-2: #c4f54a; --on-accent: #0d1a06;
  --line: rgba(255,255,255,.09); --aline: rgba(166,232,50,.30); --aline-2: rgba(166,232,50,.55);
  --glow: inset 0 0 22px rgba(166,232,50,.07), inset 0 1px 0 rgba(255,255,255,.05); --shadow: 0 14px 34px rgba(0,0,0,.45);
  --field: #0b1310; --logo-tile: #ffffff;
  --ok: #a6e832; --warn: #f6c445; --bad: #ff8a8a;
  --head: "Montserrat", system-ui, sans-serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px; --gutter: clamp(14px, 3.2vw, 44px);
}
.theme-admin {
  --bg: #e9f3dc; --bg-2: #dcebc9; --surface: linear-gradient(180deg, #f7fbf1, #eef6e3); --surface-solid: #f7fbf1;
  --ink: #0d1410; --muted: #2b3a31; --soft: #56685d;
  --accent: #141c17; --accent-2: #2a3a30; --on-accent: #c4f54a;
  --line: rgba(13,20,16,.12); --aline: rgba(13,20,16,.28); --aline-2: rgba(13,20,16,.55);
  --glow: inset 0 1px 0 rgba(255,255,255,.7); --shadow: 0 10px 26px rgba(20,40,10,.14);
  --field: #ffffff; --logo-tile: #ffffff;
  --ok: #2f7d12; --warn: #8a5a00; --bad: #b3261e;
}
*, *::before, *::after { box-sizing: border-box; } * { margin: 0; padding: 0; }
body { font-family: var(--sans); line-height: 1.55; color: var(--ink); background: var(--bg); min-height: 100vh; -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; }
a { color: var(--accent); } .theme-admin a { color: var(--ink); text-decoration-color: var(--aline-2); }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.8rem); letter-spacing: -.012em; }
h2 { font-weight: 800; font-size: clamp(1.25rem, 2.1vw, 1.7rem); margin-bottom: .9rem; }
h3 { font-weight: 700; font-size: 1.06rem; }
p { color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.container { width: min(1240px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.hidden { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(7,12,10,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.theme-admin .top { background: rgba(233,243,220,.94); }
.top .container { display: flex; align-items: center; gap: .9rem; min-height: 62px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--accent); object-fit: cover; }
.logo { font-family: var(--head); font-weight: 400; font-size: clamp(1.15rem, 2.2vw, 1.55rem); white-space: nowrap; line-height: 1; color: var(--ink); }
.logo b { font-weight: 800; }
.tag { font-family: var(--head); font-weight: 800; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; padding: .28rem .55rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.top .spacer { flex: 1; }
.who { color: var(--soft); font-size: .9rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 700 .92rem/1 var(--head); padding: .72rem 1.05rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; background: var(--accent); color: var(--on-accent); min-height: 42px; }
.btn:hover { background: var(--accent-2); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--aline); }
.btn.ghost:hover { border-color: var(--aline-2); background: rgba(166,232,50,.08); }
.theme-admin .btn.ghost:hover { background: rgba(13,20,16,.06); }
.btn.small { padding: .5rem .75rem; min-height: 36px; font-size: .84rem; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; pointer-events: none; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(1100px 380px at 78% 0%, rgba(166,232,50,.13), transparent 60%), var(--bg-2); }
.theme-admin .hero { background: radial-gradient(1100px 380px at 78% 0%, rgba(13,20,16,.08), transparent 60%), var(--bg-2); }
.hero .container { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; padding-top: clamp(18px, 3vw, 34px); }
.hero .copy { padding-bottom: clamp(18px, 3vw, 34px); }
.hero .kicker { font: 800 .74rem/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
.hero p.lead { margin-top: .55rem; max-width: 60ch; }
.hero .nelson { height: clamp(150px, 20vw, 250px); width: auto; align-self: end; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
.bubble { display: inline-block; margin-top: .9rem; background: var(--surface-solid); border: 1px solid var(--aline); border-radius: 14px 14px 14px 4px; padding: .6rem .9rem; color: var(--ink); font-size: .95rem; box-shadow: var(--glow); }

/* sections + nav */
main { padding: clamp(18px, 3vw, 34px) 0 60px; }
.section { margin-bottom: clamp(28px, 4vw, 44px); scroll-margin-top: 120px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.section-head h2 { margin: 0; }
.note { font-size: .86rem; color: var(--soft); }
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .55rem 0; scrollbar-width: none; }
.tabs a { flex: none; text-decoration: none; color: var(--muted); font: 700 .86rem/1 var(--head); padding: .55rem .8rem; border-radius: 999px; border: 1px solid var(--line); }
.tabs a:hover, .tabs a.on { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.subnav { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 62px; z-index: 15; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--aline); border-radius: var(--radius); box-shadow: var(--glow); padding: 16px; display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.card-top { display: flex; gap: .85rem; align-items: center; }
.logo-tile { width: 64px; height: 64px; flex: none; border-radius: 14px; background: var(--logo-tile); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.logo-tile img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.logo-tile .mono { font: 800 1.3rem/1 var(--head); color: #0d1410; }
.card h3 { overflow-wrap: anywhere; }
.card .sub { font-size: .88rem; color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font-size: .8rem; padding: .3rem .6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
a.chip:hover { border-color: var(--aline-2); color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; padding: .22rem .55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--soft); white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); border-color: currentColor; } .pill.bad { color: var(--bad); border-color: currentColor; } .pill.warn { color: var(--warn); border-color: currentColor; }
.domain { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: var(--soft); overflow-wrap: anywhere; }
.card .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--aline); border-radius: var(--radius); background: var(--surface); box-shadow: var(--glow); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 800 .72rem/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sample { font: 800 .66rem/1 var(--head); letter-spacing: .1em; padding: .2rem .4rem; border-radius: 4px; background: var(--warn); color: #1a1200; }

/* forms */
label { display: block; font: 700 .78rem/1.3 var(--head); color: var(--soft); margin-bottom: .3rem; letter-spacing: .02em; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--field); border: 1px solid var(--aline); border-radius: 9px; padding: .6rem .7rem; min-height: 42px; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field { margin-bottom: .7rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.check { display: flex; align-items: center; gap: .5rem; font: 600 .9rem/1.3 var(--sans); color: var(--muted); margin: 0; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.msg { font-size: .88rem; min-height: 1.2em; } .msg.ok { color: var(--ok); } .msg.bad { color: var(--bad); }
.blank { color: var(--warn); font-weight: 700; }

/* login */
.login-wrap { min-height: calc(100vh - 62px); display: grid; place-items: center; padding: 24px var(--gutter); }
.login { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--aline); border-radius: 16px; padding: 22px; box-shadow: var(--shadow), var(--glow); }
.login .face { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--accent); object-fit: cover; margin: -70px auto 10px; background: var(--bg-2); }
.login h1 { font-size: 1.6rem; text-align: center; } .login p { text-align: center; margin: .3rem 0 1rem; }
.login .btn { width: 100%; }
.foot { border-top: 1px solid var(--line); padding: 18px 0 28px; color: var(--soft); font-size: .84rem; }
.banner { background: var(--warn); color: #1a1200; font: 700 .82rem/1.35 var(--sans); text-align: center; padding: .45rem var(--gutter); }

@media (max-width: 640px) {
  .hero .container { grid-template-columns: 1fr auto; }
  .hero .nelson { height: 150px; width: auto; }
  .bubble { font-size: .86rem; }
  .who { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .top .container { gap: .5rem; } .tag { font-size: .6rem; }
  th, td { padding: .55rem .55rem; }
  .btn.ghost.hide-sm { display: none; }
}
@media (max-width: 480px) {
  .logo .lg { display: none; }
  .top .btn.small { padding: .45rem .6rem; white-space: nowrap; }
  .brand img { width: 34px; height: 34px; }
}
