/* networking theme. All colors and fonts live in the variables below. */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap");

:root {
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-head: "Manrope", "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;

  --bg: #f3f7f1;
  --surface: #ffffff;
  --surface-2: #eef4ea;
  --text: #141c16;
  --muted: #5c675f;
  --border: #e1e9dc;
  --accent: #4a9e22;          /* brand green */
  --accent-hover: #3f8a1c;
  --accent-text: #ffffff;
  --accent-soft: #e4f1db;     /* icon squares, active menu pill */
  --accent-ink: #3d8a18;      /* green text on light */
  --dark: #1b231e;            /* hero blocks */
  --dark-2: #5b615c;
  --on-dark: #f2f5f1;
  --on-dark-muted: #c3cbc4;
  --header-bg: rgba(246, 250, 244, .92);

  --ok: #3d8a18;
  --ok-soft: #e4f1db;
  --warn: #9a6400;
  --warn-soft: #fbf0d9;
  --error: #c4363c;
  --error-soft: #fbe7e8;

  --radius: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 28, 22, .04), 0 10px 30px rgba(20, 28, 22, .05);
  --shadow-btn: 0 10px 24px rgba(74, 158, 34, .28);
}

:root[data-theme="dark"] {
  --bg: #0f1411;
  --surface: #171e19;
  --surface-2: #1f2821;
  --text: #e9efe8;
  --muted: #9aa69c;
  --border: #29332b;
  --accent: #5bb52e;
  --accent-hover: #6cc63d;
  --accent-soft: #223a18;
  --accent-ink: #7fd14f;
  --dark: #0a0e0b;
  --dark-2: #2b322d;
  --header-bg: rgba(15, 20, 17, .92);
  --ok: #7fd14f;
  --ok-soft: #1f3317;
  --warn: #f0b24a;
  --warn-soft: #33270f;
  --error: #ff7076;
  --error-soft: #3a181a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  --shadow-btn: 0 10px 24px rgba(91, 181, 46, .2);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--font-mono); font-size: 13px; }
h1, h2, h3, .brand-word, .stat .value { font-family: var(--font-head); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: var(--header-bg); backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(20, 28, 22, .06); }
.top-inner { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.ring { width: 42px; height: 42px; border-radius: 50%; border: 6px solid var(--accent); flex: none; }
.brand-word { font-size: 23px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.brand-word b { color: var(--accent); font-weight: 800; }
.brand-sub { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 3px; font-family: var(--font); letter-spacing: 0; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; justify-content: center; }
.nav a { color: var(--text); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); }
.who { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-left: auto; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:focus { outline: none; }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

main { max-width: 1280px; margin: 0 auto; padding: 28px 16px 56px; }
.eyebrow { color: var(--accent-ink); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
h1 { font-size: 36px; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 8px; font-weight: 800; }
h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 800; }
.lead { color: var(--muted); margin: 0 0 24px; max-width: 760px; font-size: 16px; }

/* blocks */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.hero { background: radial-gradient(120% 140% at 75% 30%, var(--dark-2) 0%, var(--dark) 60%); color: var(--on-dark);
  border-radius: var(--radius); padding: 36px 40px; margin-bottom: 20px; box-shadow: var(--shadow); }
.hero h1 { color: var(--on-dark); }
.hero .lead { color: var(--on-dark-muted); margin-bottom: 0; }
.chip { display: inline-block; border: 1px solid rgba(91, 181, 46, .55); color: var(--accent-ink); background: rgba(74, 158, 34, .08);
  border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700; margin-bottom: 14px; }
.hero .chip { color: #7fd14f; }
.grid { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 22px 26px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat .value { font-size: 44px; font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.stat .label { color: var(--muted); font-size: 14px; font-weight: 500; margin-top: 6px; }
.icon-sq { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 180px; }
.row > .narrow { flex: 0 0 auto; }
.split { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } h1 { font-size: 28px; } .hero { padding: 26px 22px; } }
.item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.item:last-child { border-bottom: 0; }

/* forms */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; margin: 0; }
.field { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 14px; border: 1px solid transparent;
  border-radius: 999px; padding: 10px 20px; cursor: pointer; background: var(--accent); color: var(--accent-text); white-space: nowrap; box-shadow: var(--shadow-btn); }
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.dark { background: var(--dark); color: var(--on-dark); box-shadow: none; }
.btn.danger { background: var(--error); box-shadow: none; }
.btn.small { padding: 6px 13px; font-size: 13px; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
form.inline { display: inline; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
td.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 28px; }

/* badges and messages */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 1px solid var(--border); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.error { background: var(--error-soft); color: var(--error); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.flash { border-radius: var(--radius-md); padding: 13px 18px; margin-bottom: 20px; font-weight: 600; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--error-soft); color: var(--error); }
.key-box { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius-md); padding: 18px 22px; margin-bottom: 20px; }
.key-box code { display: block; font-size: 15px; padding: 10px 14px; margin: 8px 0; background: var(--surface); border-radius: var(--radius-sm); word-break: break-all; user-select: all; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 14px; }

/* login */
.login { max-width: 980px; margin: 6vh auto; padding: 0 16px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.login .hero { margin: 0; display: flex; flex-direction: column; justify-content: center; }
.login .hero .big { font-family: var(--font-head); font-size: 64px; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 0 0 14px; }
.login .card { margin: 0; align-self: center; }
@media (max-width: 800px) { .login { grid-template-columns: 1fr; } .login .hero .big { font-size: 44px; } }

/* version badge and release notes */
.build-badge { position: fixed; right: 16px; bottom: 14px; z-index: 20; font: 600 12px/1 var(--font); color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; cursor: pointer; box-shadow: var(--shadow); }
.build-badge:hover { color: var(--accent-ink); border-color: var(--accent); }
.build-badge .mono { font-size: 11.5px; }
dialog.notes { width: min(720px, calc(100vw - 32px)); max-height: 80vh; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); padding: 24px 28px; box-shadow: var(--shadow); }
dialog.notes::backdrop { background: rgba(10, 14, 11, .45); }
.notes-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 8px; }
.release { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.release h3 { font-size: 18px; margin: 0 0 4px; }
.release h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin: 14px 0 4px; }
.release ul { margin: 0; padding-left: 20px; }
.release li { margin: 4px 0; }

/* console */
.results { max-height: 440px; overflow-y: auto; }
.log { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.total { font-family: var(--font-head); font-size: 22px; font-weight: 800; }
