/* ============================================================================
   Skill Audit — restyled to the 80x design system (matches 80x.ai/docs).
   Revolut-style monochrome: pure-black dark / paper-white light, ink = accent,
   Inter (body/UI) + General Sans (display), pill buttons, hairline dividers,
   soft-card surfaces, generous whitespace. Severity keeps a restrained,
   desaturated palette — color is functional signal in a scanner, used sparingly
   (dots, thin accents, small badges) rather than heavy fills. Fonts are
   self-hosted; no external requests.
   ========================================================================== */

@font-face {
  font-family: 'General Sans';
  src: url('/sentry/fonts/GeneralSans-Variable.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Variable';
  src: url('/sentry/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens: light is the brand default (matches 80x.ai). Dark is opt-in via
   the theme toggle (<html data-theme="dark">), so the nice dark UI stays a
   click away without being the default. -------------------------------------- */
:root {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f2;
  --edge: #e6e8ec;
  --ink: #14171a;
  --muted: #6b7278;
  --pill-bg: #14171a;
  --pill-ink: #ffffff;

  --crit: #d64545;
  --high: #b9791e;
  --med:  #a6841a;
  --low:  #6b7278;
  --info: #8a9098;
  --ok:   #2f9e52;

  --radius-card: 1rem;
  --radius-block: 0.75rem;
  --radius-pill: 999px;

  --font: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'General Sans', 'Inter Variable', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Dark theme: opt-in, mirrors the original pure-black brand palette */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #000000;
  --surface: #121417;
  --surface-2: #16181c;
  --edge: #212429;
  --ink: #ffffff;
  --muted: #9aa1a9;
  --pill-bg: #ffffff;
  --pill-ink: #0a0c0e;

  --crit: #ff5d5d;
  --high: #f5a04a;
  --med:  #e6c34a;
  --low:  #8b95a1;
  --info: #6b7278;
  --ok:   #4ec66f;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in srgb, var(--ink) 18%, transparent); }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* --- Header: sticky hairline chrome mirroring the 80x.ai studio nav --------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--edge);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar .wrap { display: flex; align-items: center; gap: 22px; height: 56px; padding: 0 20px; }
.wordmark {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.topnav { display: flex; align-items: center; gap: 18px; }
.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 120ms ease;
}
.topnav a:hover { color: var(--ink); }
/* Threat model keeps its place but reads as a distinct, tool-specific link */
.topnav a.nav-sep {
  padding-left: 18px; border-left: 1px solid var(--edge);
  color: var(--ink); font-weight: 550;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--edge); border-radius: var(--radius-pill);
  background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.theme-toggle:hover { border-color: var(--muted); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.theme-toggle svg { width: 16px; height: 16px; }
:root:not([data-theme="dark"]) .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.btn.book { padding: 8px 16px; font-size: 0.8125rem; }

/* Mobile nav: same links in one scrollable row under the bar (mirrors 80x.ai) */
.topnav-mobile { display: none; }
@media (max-width: 860px) {
  .topnav { display: none; }
  .topnav-mobile {
    display: flex; gap: 16px; overflow-x: auto;
    border-top: 1px solid var(--edge); padding: 10px 20px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .topnav-mobile::-webkit-scrollbar { display: none; }
  .topnav-mobile a {
    color: var(--muted); text-decoration: none; font-size: 0.8125rem;
    font-weight: 500; white-space: nowrap;
  }
  .topnav-mobile a.nav-sep { color: var(--ink); font-weight: 550; }
}

/* --- Hero ------------------------------------------------------------------- */
main { padding: 40px 0 10px; }
.hero { margin-bottom: 32px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 650;
  letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem);
  margin: 0;
}
.hero .tagline { margin: 0.4rem 0 0; color: var(--muted); font-size: 1.0625rem; }

/* --- Cards: soft surfaces, no rules --------------------------------------- */
.card { background: var(--surface); border-radius: var(--radius-card); overflow: hidden; }
.input-card { margin-bottom: 24px; }

/* tabs: ink underline for the active tab */
.tabs { display: flex; border-bottom: 1px solid var(--edge); }
.tab {
  flex: none; padding: 14px 20px; background: none; border: none;
  color: var(--muted); font-family: var(--font); font-size: 0.9375rem; font-weight: 550;
  cursor: pointer; border-bottom: 2px solid transparent; transition: color 120ms ease;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.tab-panel { padding: 18px; }
.tab-panel.hidden, .hidden { display: none !important; }

textarea {
  width: 100%; min-height: 260px; resize: vertical;
  background: var(--bg); color: var(--ink); border: 1px solid var(--edge);
  border-radius: var(--radius-block); padding: 14px;
  font-family: var(--mono); font-size: 0.8125rem; line-height: 1.55;
}
textarea:focus { outline: none; border-color: var(--ink); }

/* dropzone */
.dropzone {
  border: 1.5px dashed var(--edge); border-radius: var(--radius-block); padding: 40px 20px;
  text-align: center; transition: border-color .15s, background .15s;
}
.dropzone.drag { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.dropzone p { margin: 6px 0; color: var(--muted); }
.dropzone strong { color: var(--ink); font-weight: 600; }
.file-summary { font-family: var(--mono); font-size: 0.75rem; color: var(--ink); margin-top: 14px !important; }

/* --- Buttons: pills (ink-on-paper primary, outline secondary) --------------- */
.actions { display: flex; align-items: center; gap: 12px; padding: 0 18px 18px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--edge); background: transparent; color: var(--ink);
  padding: 9px 18px; border-radius: var(--radius-pill);
  font-family: var(--font); font-size: 0.9375rem; font-weight: 600; cursor: pointer;
  transition: opacity 120ms ease, border-color 120ms ease, background 120ms ease;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--pill-bg); border-color: var(--pill-bg); color: var(--pill-ink); }
.btn.primary:hover { opacity: 0.85; border-color: var(--pill-bg); }
.btn.accent { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn.accent:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.btn.subtle { background: var(--surface-2); border-color: transparent; margin: 0 4px; }
.btn.subtle:hover { border-color: var(--edge); }
.btn:disabled { opacity: .45; cursor: default; }
.token-input {
  background: var(--bg); color: var(--ink); border: 1px solid var(--edge);
  border-radius: var(--radius-pill); padding: 8px 14px; font-size: 0.8125rem;
  font-family: var(--mono); width: 190px;
}
.token-input:focus { outline: none; border-color: var(--ink); }
.examples { color: var(--muted); font-size: 0.8125rem; margin-left: auto; }
.link {
  background: none; border: none; color: var(--ink); cursor: pointer; font-size: 0.8125rem;
  padding: 0; text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent);
  text-underline-offset: 2px; transition: text-decoration-color 120ms ease;
}
.link:hover { text-decoration-color: var(--ink); }
.status { font-size: 0.8125rem; color: var(--muted); }
.status.err { color: var(--crit); }
.ai-note { padding: 0 18px 16px; margin: 0; font-size: 0.75rem; color: var(--muted); }

/* --- Results ---------------------------------------------------------------- */
.results { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Verdict: surface card with a thin colored accent bar; label in the display face */
.verdict-banner {
  border-radius: var(--radius-card); padding: 20px 22px 20px 24px; margin-bottom: 20px;
  background: var(--surface); border-left: 4px solid var(--edge);
}
.verdict-banner .verdict-label {
  font-family: var(--display); font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em;
}
.verdict-banner .verdict-detail { color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }
.verdict-BLOCK   { border-left-color: var(--crit); } .verdict-BLOCK .verdict-label   { color: var(--crit); }
.verdict-CAUTION { border-left-color: var(--high); } .verdict-CAUTION .verdict-label { color: var(--high); }
.verdict-REVIEW  { border-left-color: var(--med); }  .verdict-REVIEW .verdict-label  { color: var(--med); }
.verdict-LIKELY  { border-left-color: var(--ok); }   .verdict-LIKELY .verdict-label  { color: var(--ok); }

.summary-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: var(--radius-pill); font-size: 0.8125rem; border: 1px solid var(--edge); background: transparent;
}
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.chip .n { font-weight: 700; font-variant-numeric: tabular-nums; }
.chip.zero { opacity: .4; }
.dot.CRITICAL { background: var(--crit); } .dot.HIGH { background: var(--high); }
.dot.MEDIUM { background: var(--med); } .dot.LOW { background: var(--low); } .dot.INFO { background: var(--info); }

.inventory { color: var(--muted); font-size: 0.8125rem; font-family: var(--mono); margin: 0 0 18px; }

/* findings */
.findings { display: flex; flex-direction: column; gap: 10px; }
.finding {
  border-left: 3px solid var(--edge); border-radius: var(--radius-block);
  background: var(--surface); padding: 14px 16px;
}
.finding.sev-CRITICAL { border-left-color: var(--crit); }
.finding.sev-HIGH { border-left-color: var(--high); }
.finding.sev-MEDIUM { border-left-color: var(--med); }
.finding.sev-LOW { border-left-color: var(--low); }
.finding.sev-INFO { border-left-color: var(--info); }
.f-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.f-sev { font-size: 0.6875rem; font-weight: 700; letter-spacing: .05em; padding: 2px 8px; border-radius: var(--radius-pill); }
.f-sev.CRITICAL { background: var(--crit); color: #180404; }
.f-sev.HIGH { background: var(--high); color: #1a0e00; }
.f-sev.MEDIUM { background: var(--med); color: #1a1600; }
.f-sev.LOW { background: var(--low); color: #0b0f14; }
.f-sev.INFO { background: var(--info); color: #0b0f14; }
.f-title { font-weight: 600; font-size: 0.9375rem; }
.f-cat { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--edge); padding: 1px 9px; border-radius: var(--radius-pill); }
.f-where { margin-left: auto; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.f-evidence {
  font-family: var(--mono); font-size: 0.75rem; background: var(--bg); border: 1px solid var(--edge);
  border-radius: 0.5rem; padding: 8px 10px; margin: 10px 0 6px; color: var(--ink);
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.f-why { font-size: 0.875rem; color: var(--muted); }
.no-findings { text-align: center; color: var(--muted); padding: 24px; border: 1px dashed var(--edge); border-radius: var(--radius-block); }

/* --- AI report: docs prose conventions (hairline tables, soft-card code) ----- */
.report-box { margin-top: 24px; border-top: 1px solid var(--edge); padding-top: 20px; }
.report-box h2 { font-family: var(--display); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 14px; }
.report-body { background: var(--surface); border-radius: var(--radius-card); padding: 20px 22px; font-size: 0.9375rem; }
.report-body h1, .report-body h2, .report-body h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
.report-body h1 { font-size: 1.25rem; } .report-body h2 { font-size: 1.05rem; margin-top: 1.5em; } .report-body h3 { font-size: 0.95rem; }
.report-body a {
  color: var(--ink); font-weight: 550; text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 0.2em;
}
.report-body a:hover { text-decoration-color: var(--ink); }
.report-body code { font-family: var(--mono); background: var(--surface-2); padding: 0.15em 0.4em; border-radius: 0.375rem; font-size: 0.8125rem; }
.report-body pre { background: var(--surface-2); border-radius: var(--radius-block); padding: 14px; overflow-x: auto; }
.report-body pre code { background: none; padding: 0; }
.report-body table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 0.875rem; }
.report-body th, .report-body td { border: 0; border-bottom: 1px solid var(--edge); padding: 0.6rem 1rem 0.6rem 0; text-align: left; }
.report-body th { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.report-body blockquote { border-inline-start: 2px solid var(--ink); margin: 10px 0; padding-left: 14px; color: var(--muted); }
.report-body ul, .report-body ol { padding-left: 22px; }

.spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.disclaimer { color: var(--muted); font-size: 0.75rem; margin-top: 24px; line-height: 1.7; }

/* --- Email capture: The 80x Field Notes (posts to the shared /api/waitlist) --- */
.capture { margin: 40px 0 8px; }
.capture-body { padding: 28px 26px; }
.capture-eyebrow {
  font-family: var(--display); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px;
}
.capture-title {
  font-family: var(--display); font-weight: 650; letter-spacing: -0.02em;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); margin: 0 0 8px;
}
.capture-sub { color: var(--muted); font-size: 0.9375rem; margin: 0 0 18px; max-width: 56ch; }
.capture-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.capture-input {
  flex: 1 1 260px; min-width: 0;
  background: var(--bg); color: var(--ink); border: 1px solid var(--edge);
  border-radius: var(--radius-pill); padding: 10px 18px;
  font-family: var(--font); font-size: 0.9375rem;
}
.capture-input:focus { outline: none; border-color: var(--ink); }
.capture-input.err { border-color: var(--crit); }
.capture-form .btn { flex: 0 0 auto; }
.capture-msg { font-size: 0.8125rem; margin: 12px 0 0; min-height: 1em; }
.capture-msg.ok { color: var(--ok); }
.capture-msg.err { color: var(--crit); }
.capture-fine { color: var(--muted); font-size: 0.6875rem; margin: 12px 0 0; }
.capture.done .capture-form, .capture.done .capture-fine { display: none; }
.foot { color: var(--muted); font-size: 0.75rem; padding: 28px 20px 48px; text-align: center; border-top: 1px solid var(--edge); margin-top: 32px; }
