/* PORTAL1_20261004 -- app.pandobix.com. The same family as the v3.1 client report (its ink, its type, its blues) so
   an agency's portal and its reports read as one product. No scripts anywhere. Every text/background pair here was
   checked against WCAG 2.1 AA (4.5:1 for text, 3:1 for borders and focus). Fonts are self-hosted (SIL OFL 1.1). */

@font-face { font-family: "Sora"; src: url("/static/fonts/sora-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/static/fonts/sora-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/static/fonts/sora-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #04090F;        /* the report's page */
  --panel: #0A1520;      /* raised surfaces */
  --field: #0E1B27;      /* inputs */
  --line: #1E2F3C;       /* hairlines */
  --edge: #5E7E94;       /* input borders: 3:1 on --field */
  --text: #C9DCE7;       /* body, 12.9:1 */
  --head: #F2FAFE;       /* headings */
  --muted: #94AABA;      /* secondary text, 7.6:1 on --ink, 7.1:1 on --panel */
  --accent: #4ECBFF;     /* links, primary action */
  --accent-hi: #9FE6FF;  /* focus */
  --good: #3FD9A0;
  --warn: #FFC66E;
  --bad: #FF8A93;
  --sans: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); font-size: 1rem; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hi); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: 0.875rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--ink); padding: 8px 14px; z-index: 10; font-weight: 600; }
.skip:focus { left: 12px; top: 12px; }

/* ---- frame ---------------------------------------------------------------------------------------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; min-height: 68px; }
.mark { color: var(--head); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; text-decoration: none; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 22px; margin: 0; padding: 0; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; padding: 22px 0 20px; border-bottom: 2px solid transparent; display: inline-block; }
.nav a:hover { color: var(--head); }
.nav a[aria-current="page"] { color: var(--head); border-bottom-color: var(--accent); }
.who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.who form { margin: 0; }
main.wrap { padding-top: 44px; padding-bottom: 64px; }
.foot { padding-bottom: 40px; color: var(--muted); font-size: 0.875rem; }
.foot p { border-top: 1px solid var(--line); padding-top: 18px; max-width: none; }

/* ---- type ----------------------------------------------------------------------------------------- */
h1 { color: var(--head); font-size: 2rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { color: var(--head); font-size: 1.25rem; line-height: 1.3; font-weight: 600; margin: 0 0 14px; }
p { margin: 0 0 14px; max-width: 68ch; }
.lead { font-size: 1.125rem; color: var(--text); max-width: 60ch; }

/* ---- notices -------------------------------------------------------------------------------------- */
.notice, .error { border-radius: 8px; padding: 12px 16px; margin: 0 0 24px; max-width: 72ch; }
.notice { background: rgba(78, 203, 255, 0.08); border: 1px solid rgba(78, 203, 255, 0.35); color: var(--head); }
.error { background: rgba(255, 138, 147, 0.08); border: 1px solid rgba(255, 138, 147, 0.45); color: var(--head); }
.error p { margin: 0 0 6px; } .error ul { margin: 0; padding-left: 20px; }

/* ---- forms ---------------------------------------------------------------------------------------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px 26px; margin: 0 0 28px; }
.field { margin: 0 0 18px; }
label, .label { display: block; color: var(--head); font-weight: 600; font-size: 0.9375rem; margin-bottom: 6px; }
.hint { display: block; color: var(--muted); font-size: 0.875rem; font-weight: 400; margin: -2px 0 8px; }
p.hint { margin: 12px 0 20px; }
input, select, textarea { font: inherit; color: var(--head); background: var(--field); border: 1px solid var(--edge); border-radius: 8px; padding: 10px 12px; width: 100%; max-width: 480px; }
textarea { max-width: 640px; min-height: 140px; font-family: var(--mono); font-size: 0.875rem; line-height: 1.7; }
select { appearance: auto; }
input::placeholder, textarea::placeholder { color: #7D93A4; }
input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 10px 0 0; accent-color: var(--accent); flex: none; }
input[type="file"] { padding: 7px 8px; color: var(--text); }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; font-size: 0.875rem; color: var(--accent); background: transparent; border: 1px solid var(--accent); border-radius: 6px; padding: 6px 12px; margin-right: 12px; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: rgba(78, 203, 255, 0.1); }
.check { display: flex; align-items: flex-start; }
.check label { display: inline; font-weight: 400; color: var(--text); margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.row .field { margin-bottom: 0; }
.row.row-start { align-items: flex-start; }
.swatches img { display: block; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--edge); }
.row input, .row select { width: auto; }

button, .button { font: inherit; font-weight: 600; font-size: 0.9375rem; cursor: pointer; border-radius: 8px; padding: 10px 18px; border: 1px solid var(--accent); background: transparent; color: var(--accent); text-decoration: none; display: inline-block; line-height: 1.3; }
button:hover, .button:hover { background: rgba(78, 203, 255, 0.1); color: var(--accent-hi); }
button.primary, .button.primary { background: var(--accent); color: var(--ink); }
button.primary:hover, .button.primary:hover { background: var(--accent-hi); color: var(--ink); }
button.quiet, .button.quiet { border-color: var(--line); color: var(--muted); }
button.quiet:hover, .button.quiet:hover { border-color: var(--edge); color: var(--head); background: transparent; }
.link-button { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { background: none; color: var(--head); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }

/* ---- the report header, shown as the agency's clients will see it -------------------------------- */
.reportbar { background: var(--ink); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 28px; }
.reportbar-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.reportbar-name { display: flex; align-items: center; gap: 14px; }
.reportbar-name img { max-height: 40px; max-width: 180px; background: #fff; border-radius: 4px; padding: 3px; }
.reportbar-chip { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.2em; color: var(--text); }
.reportbar-by { font-size: 0.8125rem; color: var(--muted); }
.reportbar-cta { padding: 16px 24px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.reportbar-cta .q { color: var(--head); font-weight: 600; }
.reportbar-cta .line { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.08em; color: var(--accent-hi); }
.caption { font-size: 0.875rem; color: var(--muted); margin: -18px 0 28px; }
.swatches { display: flex; gap: 10px; align-items: center; font-size: 0.875rem; color: var(--muted); }

/* ---- the pilot path: a real three-step sequence ---------------------------------------------------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 0 32px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.steps li { padding: 16px 20px; border-right: 1px solid var(--line); color: var(--muted); }
.steps li:last-child { border-right: 0; }
.steps .n { font-family: var(--mono); font-size: 0.8125rem; display: block; margin-bottom: 2px; }
.steps .t { font-weight: 600; }
.steps li[aria-current="step"] { background: rgba(78, 203, 255, 0.08); color: var(--head); box-shadow: inset 0 -2px 0 var(--accent); }
.steps li.done { color: var(--text); }
.steps li.done .n::after { content: " done"; color: var(--good); }

/* ---- client list ---------------------------------------------------------------------------------- */
.clients { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--line); }
.client { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 18rem; gap: 10px 28px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.client-name { color: var(--head); font-weight: 600; }
.client-host { display: block; color: var(--muted); }
.client-trade { display: block; color: var(--muted); font-size: 0.875rem; margin-top: 2px; }
.state { display: flex; gap: 10px; align-items: baseline; }
.state .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; transform: translateY(-1px); }
.state.good .dot { background: var(--good); }
.state.warn .dot { background: var(--warn); }
.state.bad .dot { background: var(--bad); }
.state.live .dot { background: var(--accent); }
.state-title { color: var(--head); font-weight: 600; }
.state-detail { display: block; color: var(--muted); font-size: 0.875rem; margin-top: 2px; max-width: 46ch; }
.client .actions { justify-content: flex-end; }
.cityform { margin-top: 12px; }
.cityform .row input { width: 200px; }
.outcome { margin-top: 10px; font-size: 0.875rem; color: var(--muted); }
.outcome .actions { justify-content: flex-start; margin-top: 8px; }
.outcome button { padding: 7px 14px; font-size: 0.875rem; }
.outcome button[aria-pressed="true"] { border-color: var(--good); color: var(--good); background: rgba(63, 217, 160, 0.08); }
.outcome button[aria-pressed="true"]::before { content: "\2713\00a0"; }

/* ---- tables --------------------------------------------------------------------------------------- */
table { border-collapse: collapse; width: 100%; margin: 0 0 28px; }
th, td { text-align: left; vertical-align: top; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); }
thead th { font-size: 0.875rem; color: var(--muted); font-weight: 600; }
tbody th { color: var(--head); font-weight: 600; }

.figure { display: flex; align-items: baseline; gap: 12px; margin: 0 0 28px; }
.figure .num { font-family: var(--mono); font-size: 2.5rem; color: var(--head); line-height: 1; }
.figure .what { color: var(--muted); }

.confirm { max-width: 640px; }
.confirm dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 24px; }
.confirm dt { color: var(--muted); }
.confirm dd { margin: 0; color: var(--head); }

@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .top-row { padding-top: 14px; }
  h1 { font-size: 1.625rem; }
  .who { margin-left: 0; width: 100%; justify-content: space-between; padding-bottom: 10px; }
  .nav a { padding: 10px 0; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: 0; }
  .client { grid-template-columns: 1fr; gap: 12px; }
  .who { white-space: normal; }
  .who .link-button { white-space: nowrap; }
  .client .actions { justify-content: flex-start; }
  .panel { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
