/* Goodness Quotient console: forest green, white and gold. */
:root {
  --green-950: #0c2a1c;
  --green-900: #113a27;
  --green-800: #15472f;
  --green-700: #195839;
  --green-600: #1f6b47;
  --green-500: #2f8a5c;
  --green-100: #dcefe3;
  --green-50: #eef7f1;
  --gold-600: #a5791f;
  --gold-500: #c4962a;
  --gold-400: #d9ae38;
  --gold-100: #f6ebc8;
  --gold-50: #fbf6e6;
  --ink: #14261c;
  --ink-soft: #3d4f44;
  --muted: #66766c;
  --line: #e3e6df;
  --line-strong: #cfd5cc;
  --canvas: #f7f6f0;
  --surface: #ffffff;
  --danger: #b42318;
  --danger-50: #fdecea;
  --warn: #b45309;
  --warn-50: #fdf3e2;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 40 28 / 6%), 0 1px 3px rgb(16 40 28 / 5%);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--canvas); }
a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; letter-spacing: -0.01em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 20px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, var(--green-800), var(--green-950)); color: #e4efe7; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; color: #fff; font-weight: 700; letter-spacing: 0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--gold-500); color: var(--green-900); display: grid; place-items: center; font: 800 15px/1 var(--font); box-shadow: inset 0 -2px 0 rgb(0 0 0 / 15%); }
.brand small { display: block; font-weight: 500; font-size: 11px; color: #a9c7b4; letter-spacing: 0.08em; text-transform: uppercase; }
.nav { padding: 6px 12px; display: grid; gap: 2px; }
.nav-label { padding: 14px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #88a896; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #d6e6db; font-weight: 500; }
.nav a:hover { background: rgb(255 255 255 / 7%); text-decoration: none; color: #fff; }
.nav a.on { background: rgb(217 174 56 / 16%); color: #fff; box-shadow: inset 3px 0 0 var(--gold-400); }
.nav a.on svg { color: var(--gold-400); }
.side-foot { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid rgb(255 255 255 / 8%); }
.me { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-100); color: var(--green-800); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.me-name { color: #fff; font-weight: 600; line-height: 1.2; }
.me-role { font-size: 11px; color: var(--gold-400); text-transform: capitalize; }
.side-foot form { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: #a9c7b4; font: inherit; cursor: pointer; }
.link-btn:hover { color: #fff; text-decoration: underline; }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: rgb(247 246 240 / 88%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 58px; }
.top .crumbs { color: var(--muted); font-size: 13px; }
.top .env { margin-left: auto; }
.content { padding: 24px 28px 48px; max-width: 1280px; }
.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin-top: 4px; color: var(--muted); max-width: 70ch; }

.menu-toggle { display: none; }
.menu-btn { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 30; transform: translateX(-100%); transition: transform 0.2s; }
  .menu-toggle:checked ~ .shell .side { transform: none; box-shadow: 0 0 0 100vmax rgb(0 0 0 / 35%); }
  .menu-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
  .top { padding: 10px 16px; }
  .content { padding: 18px 16px 40px; }
}

/* ---------------------------------------------------------------- building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-h p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-b { padding: 20px; }
.card-f { padding: 12px 20px; border-top: 1px solid var(--line); background: #fbfbf8; border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5-7 { grid-template-columns: 5fr 7fr; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-5-7, .g3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2 { grid-template-columns: 1fr; } }

.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .label { color: var(--muted); font-weight: 500; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .label svg { color: var(--green-600); background: var(--green-50); border-radius: 8px; padding: 6px; width: 30px; height: 30px; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stat.gold { background: linear-gradient(135deg, var(--green-800), var(--green-600)); color: #fff; border-color: transparent; }
.stat.gold .label, .stat.gold .hint { color: #cfe3d6; }
.stat.gold .label svg { background: rgb(255 255 255 / 12%); color: var(--gold-400); }
.stat.gold .value { color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; font: 500 14px/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--green-600); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--green-700); }
.btn-gold { background: var(--gold-500); color: var(--green-950); }
.btn-gold:hover { background: var(--gold-400); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--canvas); }
.btn-ghost { background: none; color: var(--ink-soft); }
.btn-ghost:hover { background: rgb(0 0 0 / 5%); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.92); }
.btn-danger-soft { background: none; color: var(--danger); }
.btn-danger-soft:hover { background: var(--danger-50); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-green { background: var(--green-50); color: var(--green-700); border-color: var(--green-100); }
.b-gold { background: var(--gold-50); color: var(--gold-600); border-color: var(--gold-100); }
.b-grey { background: #f1f2ef; color: var(--muted); border-color: var(--line); }
.b-red { background: var(--danger-50); color: var(--danger); border-color: #f7c9c4; }
.tier { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tier-Good { background: #fdf3e2; color: #b45309; }
.tier-Great { background: #eef7e1; color: #4d7c0f; }
.tier-Excellent { background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 1px var(--gold-400); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.alert svg { margin-top: 1px; }
.alert-ok { background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }
.alert-err { background: var(--danger-50); color: var(--danger); border: 1px solid #f7c9c4; }
.alert-warn { background: var(--warn-50); color: var(--warn); border: 1px solid #f5dcb0; }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: #fafaf6; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: #fcfcf9; }
.t td.actions { text-align: right; white-space: nowrap; }
.t input[type=number] { width: 96px; text-align: right; }

/* forms */
label.f { display: grid; gap: 6px; font-weight: 500; }
label.f small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; height: 38px; padding: 0 10px; width: 100%; }
textarea { height: auto; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-100); border-color: var(--green-500); }
input[disabled], select[disabled] { background: #f4f5f1; color: var(--muted); }
input.sm { height: 32px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.search { display: flex; gap: 8px; max-width: 520px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: 16px; height: 16px; }

/* tabs & pager */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--green-700); border-color: var(--gold-500); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* charts */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .bar { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--green-500), var(--green-700)); min-height: 2px; position: relative; }
.bars .bar.people { background: linear-gradient(180deg, var(--gold-400), var(--gold-600)); }
.bars .col span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bars .v { font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.meter { height: 10px; border-radius: 99px; background: #eef0ea; overflow: hidden; position: relative; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-500), var(--green-700)); }
.meter .target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--gold-500); }
.share-row { display: grid; grid-template-columns: 130px 1fr 60px; gap: 12px; align-items: center; padding: 6px 0; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.gauge-wrap { text-align: center; }
.gauge-score { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin-top: -8px; }
.gauge-score small { font-size: 15px; color: var(--muted); font-weight: 500; }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 28px; height: 28px; color: var(--line-strong); margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.key-box { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: 10px; border: 1px dashed var(--gold-500); background: var(--gold-50); }
.key-box code { flex: 1; word-break: break-all; font-size: 13px; }
.pill-list { display: flex; gap: 6px; flex-wrap: wrap; }
.code-block { background: var(--green-950); color: #d9eadf; border-radius: 10px; padding: 14px 16px; overflow-x: auto; font: 12.5px/1.6 var(--mono); white-space: pre; }
.code-block .k { color: var(--gold-400); }
.method { display: inline-block; min-width: 54px; text-align: center; padding: 2px 6px; border-radius: 6px; font: 700 11px/1.6 var(--mono); }
.m-get { background: var(--green-50); color: var(--green-700); }
.m-post { background: var(--gold-50); color: var(--gold-600); }
.m-put { background: #eef2ff; color: #3949ab; }
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgb(0 0 0 / 25%); }
dialog::backdrop { background: rgb(12 42 28 / 45%); }
details.inline summary { cursor: pointer; list-style: none; }
details.inline summary::-webkit-details-marker { display: none; }
details.inline[open] > summary { margin-bottom: 10px; }

/* ---------------------------------------------------------------- bare pages (sign-in, verify, errors) */
.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(1200px 500px at 50% -10%, rgb(47 138 92 / 18%), transparent 60%),
  radial-gradient(700px 400px at 100% 110%, rgb(217 174 56 / 16%), transparent 60%), var(--canvas); }
.bare-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 40px rgb(16 40 28 / 10%); overflow: hidden; }
.bare-card.wide { max-width: 560px; }
.bare-top { background: linear-gradient(135deg, var(--green-800), var(--green-600)); color: #fff; padding: 24px 28px; border-bottom: 3px solid var(--gold-500); }
.bare-top .brand { padding: 0; }
.bare-body { padding: 24px 28px 28px; }
.seal { width: 150px; height: 150px; margin: 8px auto 12px; border-radius: 50%; display: grid; place-items: center; text-align: center; color: #fff; background: radial-gradient(circle at 30% 30%, var(--green-600), var(--green-900)); box-shadow: 0 0 0 6px var(--gold-500), 0 0 0 9px var(--gold-100); }
.seal b { display: block; font-size: 52px; line-height: 1; }
.seal span { font-size: 11px; letter-spacing: 0.15em; color: var(--gold-400); }
.cert-name { font: 700 28px/1.2 var(--serif); text-align: center; margin-top: 6px; }
.verified { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; }
.verified.ok { color: var(--green-600); }
.verified.bad { color: var(--danger); }
