/* PicGuard panel.
   Look: an inspection checkpoint — ink, cool paper, hazard yellow for the one
   thing to do next, and a stamped verdict. Green and red are reserved for
   verdicts and never used as decoration. */

:root {
  --ink: #1b1a22;
  --ink-2: #2b2a36;
  --ink-soft: #a9acb8;
  --paper: #eceef2;
  --surface: #ffffff;
  --line: #d6dae2;
  --line-soft: #e6e9ee;
  --text: #1b1a22;
  --muted: #586070;
  --hazard: #ffc400;
  --hazard-deep: #e2ac00;
  --pass: #16794a;
  --pass-bg: #e7f4ec;
  --block: #c2362b;
  --block-bg: #fbeae8;
  --warn-bg: #fff6d6;
  --series-1: #2a78d6;   /* allowed */
  --series-2: #eb6834;   /* blocked */
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 15px/1.55 var(--body);
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-stretch: 112%; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
:focus-visible { outline: 3px solid var(--hazard); outline-offset: 2px; }

.stripe {
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 9px, var(--ink) 9px 18px);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--ink); color: #f2f2f5;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { padding: 20px 20px 16px; }
.brand-name { font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; text-decoration: none; display: block; }
.brand-sub { color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; }
.nav { padding: 14px 10px; flex: 1; }
.nav-title { color: var(--ink-soft); font-size: 12.5px; padding: 12px 12px 6px; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 6px; text-decoration: none;
  color: #e4e5ea; border-left: 3px solid transparent;
}
.nav a:hover { background: var(--ink-2); }
.nav a.on { background: var(--ink-2); border-left-color: var(--hazard); color: #fff; font-weight: 600; }
.side-foot { padding: 14px 20px 18px; border-top: 1px solid #34333f; font-size: 13px; }
.side-foot .who { color: var(--ink-soft); word-break: break-all; margin-bottom: 8px; }
.linklike { background: none; border: 0; padding: 0; color: #fff; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.main { padding: 30px 36px 60px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 68ch; }

.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.sheet + .sheet { margin-top: 18px; }
.part { padding: 22px 24px; }
.part + .part { border-top: 1px solid var(--line-soft); }
.part > h2 { margin-bottom: 4px; }
.part > .lead { color: var(--muted); margin-bottom: 16px; max-width: 72ch; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.split > .part + .part { border-top: 0; border-left: 1px solid var(--line-soft); }

/* ── Figures (not cards: one row, divided by hairlines) ─────────────────── */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.figure { padding: 20px 24px; border-left: 1px solid var(--line-soft); }
.figure:first-child { border-left: 0; }
.figure .n { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.figure .l { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.figure .s { color: var(--muted); font-size: 12.5px; }

/* ── Buttons and forms ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 14.5px/1 var(--body); padding: 11px 16px; border-radius: 7px;
  border: 1px solid var(--ink); background: var(--surface); color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: #f4f5f7; }
.btn.primary { background: var(--hazard); border-color: var(--hazard-deep); }
.btn.primary:hover { background: var(--hazard-deep); }
.btn.danger { border-color: var(--block); color: var(--block); }
.btn.danger:hover { background: var(--block-bg); }
.btn.small { padding: 7px 11px; font-size: 13.5px; }

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 5px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 7px;
  border: 1px solid #b9bfca; background: #fff; color: var(--text);
}
input[type=file] { font: inherit; }
.field { margin-bottom: 16px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin-bottom: 10px; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--ink); }
.check small { display: block; color: var(--muted); font-weight: 400; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 180px; }

/* ── Messages ───────────────────────────────────────────────────────────── */
.note { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.note.ok { background: var(--pass-bg); border-color: #b9dcc7; }
.note.error { background: var(--block-bg); border-color: #efc0bb; }
.note.warn { background: var(--warn-bg); border-color: #ecd67e; }
.note b { font-weight: 650; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; white-space: nowrap; }
table.prose td { white-space: normal; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 34px 24px; color: var(--muted); }
.empty b { color: var(--text); display: block; font-size: 16px; margin-bottom: 4px; }

/* Verdict marks: shape + word, never colour alone. */
.verdict { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }
.verdict::before { content: ""; width: 10px; height: 10px; flex: none; }
.verdict.pass { color: var(--pass); }
.verdict.pass::before { border-radius: 50%; background: var(--pass); }
.verdict.stop { color: var(--block); }
.verdict.stop::before { background: var(--block); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #eef0f4; font-size: 12.5px; font-weight: 600; }
.tag.off { background: var(--block-bg); color: var(--block); }
.tag.admin { background: var(--hazard); }

/* Score meter */
.meter { display: grid; grid-template-columns: 170px minmax(0, 1fr) 52px; gap: 12px; align-items: center; padding: 9px 0; }
.meter .bar { position: relative; height: 12px; border-radius: 3px; background: #e9ecf1; }
.meter .fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--ink); }
.meter.over .fill { background: var(--block); }
.meter .limit { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); }
.meter .limit::after { content: "limit"; position: absolute; top: -17px; left: -13px; font-size: 11px; color: var(--muted); }
.meter .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.meter.off { opacity: .5; }

/* The stamp: the one loud thing on the page. */
.stamp {
  display: inline-block; padding: 10px 20px 8px; border: 4px double currentColor; border-radius: 6px;
  font-family: var(--display); font-stretch: 122%; font-weight: 800; font-size: 30px; letter-spacing: .06em;
  transform: rotate(-4deg); text-transform: uppercase;
}
.stamp.pass { color: var(--pass); }
.stamp.stop { color: var(--block); }
@media (prefers-reduced-motion: no-preference) {
  .stamp { animation: stamp .28s cubic-bezier(.2, 1.4, .4, 1) both; }
  @keyframes stamp { from { transform: rotate(-4deg) scale(1.5); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
}

/* Quota bar */
.quota { height: 10px; border-radius: 3px; background: #e9ecf1; overflow: hidden; margin: 10px 0 6px; }
.quota span { display: block; height: 100%; background: var(--ink); }
.quota.high span { background: var(--block); }

/* Code */
pre { background: var(--ink); color: #eceef4; padding: 16px 18px; border-radius: 8px; overflow-x: auto; line-height: 1.6; margin: 0; }
pre .k { color: var(--hazard); }
pre .c { color: #8f93a3; }
.keybox { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 8px; }
.keybox code { flex: 1; word-break: break-all; font-size: 14px; }
.keybox .btn { border-color: #fff; }
.row-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.row-actions form { margin: 0; }

/* ── Charts ─────────────────────────────────────────────────────────────── */
.chart { position: relative; max-width: 760px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 12px var(--body); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(27, 26, 34, .05); }
.legend { display: flex; gap: 18px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.tip {
  position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px;
  border-radius: 6px; font-size: 12.5px; line-height: 1.5; white-space: nowrap; transform: translate(-50%, -100%);
  display: none; z-index: 5;
}
.tip b { display: block; font-weight: 600; }
.hbar { display: grid; grid-template-columns: 170px minmax(0, 1fr) 56px; gap: 12px; align-items: center; padding: 7px 0; }
.hbar .track { height: 14px; }
.hbar .track span { display: block; height: 100%; min-width: 2px; background: var(--series-2); border-radius: 0 4px 4px 0; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
details.data { margin-top: 12px; }
details.data summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* ── Public pages ───────────────────────────────────────────────────────── */
.pub-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; background: var(--ink); color: #fff; }
.pub-top .brand-name { font-size: 22px; }
.pub-top .btn { border-color: #fff; background: transparent; color: #fff; }
.pub-top .btn.primary { background: var(--hazard); color: var(--ink); border-color: var(--hazard); }
.hero { background: var(--ink); color: #fff; padding: 46px 32px 64px; }
.hero-in { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 54px); font-stretch: 118%; font-weight: 800; letter-spacing: -0.025em; }
.hero p { color: #c9ccd6; font-size: 17px; margin: 18px 0 26px; max-width: 46ch; }
.exchange { background: #121118; border: 1px solid #34333f; border-radius: 10px; overflow: hidden; }
.exchange .bar { padding: 9px 16px; font-size: 12.5px; color: var(--ink-soft); border-bottom: 1px solid #34333f; }
.exchange pre { background: transparent; border-radius: 0; }
.exchange .verdict-line { padding: 12px 18px 16px; border-top: 1px solid #34333f; }
.exchange .stamp { font-size: 20px; padding: 6px 14px 4px; border-width: 3px; color: #ff7468; }
.band { max-width: 1120px; margin: 0 auto; padding: 48px 32px; }
.catches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.catches div { padding: 24px 24px 26px; border-left: 1px solid var(--line); }
.catches div:first-child { border-left: 0; padding-left: 0; }
.catches p { color: var(--muted); margin-top: 8px; }
.auth { max-width: 430px; margin: 56px auto; padding: 0 20px; }
.auth h1 { margin-bottom: 6px; }
.auth .lead { color: var(--muted); margin-bottom: 20px; }
.auth .alt { margin-top: 16px; color: var(--muted); }
.foot { color: var(--muted); font-size: 13px; padding: 24px 32px 40px; max-width: 1120px; margin: 0 auto; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px; }
  .nav-title { width: 100%; padding: 8px 8px 2px; }
  .nav a { border-left: 0; border-bottom: 3px solid transparent; }
  .nav a.on { border-bottom-color: var(--hazard); }
  .main { padding: 22px 16px 48px; }
  .split, .hero-in, .catches { grid-template-columns: 1fr; }
  .split > .part + .part { border-left: 0; border-top: 1px solid var(--line-soft); }
  .catches div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .catches div:first-child { border-top: 0; }
  .figure { border-left: 0; border-top: 1px solid var(--line-soft); }
  .meter, .hbar { grid-template-columns: 110px minmax(0, 1fr) 46px; }
  .hero { padding: 32px 20px 44px; }
  .band { padding: 36px 20px; }
  .pub-top { padding: 14px 20px; gap: 12px; }
  .pub-top .row { flex-wrap: nowrap; }
  /* The hero right below carries the same "Create account" button. */
  .pub-top .btn.primary { display: none; }
}
