/* =========================================================================
   NeuraxHost CyberScan — design system
   A compliance/audit-report aesthetic: cool paper tones, institutional navy,
   a single restrained maple-red accent for risk signalling. Deliberately not
   the warm-cream/terracotta or dark-mode-neon SaaS defaults.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #f5f8fb;
  --surface: #ffffff;
  --ink: #16202c;
  --ink-soft: #4b5765;
  --navy: #004c89;
  --navy-deep: #00396b;
  --maple: #b3001b;
  --maple-deep: #8c0115;
  --slate: #64748b;
  --line: #dfe6ee;
  --line-soft: #eef2f7;

  --sev-critical: #b3001b;
  --sev-high: #c1622b;
  --sev-medium: #b98900;
  --sev-low: #004c89;
  --sev-info: #7a8290;
  --sev-clean: #1f8a4c;

  --serif: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(0, 76, 137, 0.06), 0 8px 24px rgba(0, 76, 137, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0 0 0.5em; color: var(--navy-deep); }
p { margin: 0 0 1em; max-width: 62ch; }
:focus-visible { outline: 2px solid var(--maple); outline-offset: 2px; }
button { font-family: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--maple); color: #fff; }
.btn-primary:hover { background: var(--maple-deep); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); padding: 8px 4px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Top nav (landing) ---------- */
.site-nav {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky; top: 0; z-index: 20;
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img.logo { height: 34px; width: auto; display: block; }
.brand .word { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--navy-deep); }
.brand .word small { font-family: var(--sans); font-weight: 500; color: var(--slate); font-size: 0.75rem; display: block; margin-top: 1px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--navy); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.05rem); letter-spacing: -0.01em; max-width: 15ch; }
.hero .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; margin: 28px 0 30px; flex-wrap: wrap; }
.trust-line { display: flex; flex-wrap: wrap; gap: 22px; color: var(--slate); font-size: 0.88rem; }
.trust-line span { display: flex; align-items: center; gap: 8px; }
.trust-line .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sev-clean); flex: none; }

/* Report-card mockup used in hero and as the visual language of real reports */
.report-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.report-card .rc-head {
  background: var(--navy-deep);
  color: #fff;
  padding: 18px 22px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.report-card .rc-head .rc-title { font-family: var(--serif); font-size: 1.05rem; }
.report-card .rc-head .rc-meta { font-family: var(--mono); font-size: 0.78rem; color: #c7d0de; }
.report-card .rc-body { padding: 18px 22px; }
.rc-score-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.rc-score-row .rc-score { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: var(--maple); }
.rc-score-row .rc-score-label { color: var(--slate); font-size: 0.85rem; }
.rc-finding { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.rc-finding:last-child { border-bottom: none; }
.rc-finding .rc-f-text .rc-f-title { font-weight: 600; font-size: 0.92rem; }
.rc-finding .rc-f-text .rc-f-cat { color: var(--slate); font-size: 0.78rem; }

/* ---------- Severity tags (shared with dashboard) ---------- */
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.tag-critical { background: rgba(166,25,46,0.12); color: var(--sev-critical); }
.tag-high { background: rgba(193,98,43,0.13); color: var(--sev-high); }
.tag-medium { background: rgba(185,137,0,0.14); color: var(--sev-medium); }
.tag-low { background: rgba(62,107,138,0.13); color: var(--sev-low); }
.tag-info { background: rgba(122,130,144,0.14); color: var(--sev-info); }
.tag-clean { background: rgba(47,122,77,0.13); color: var(--sev-clean); }

/* ---------- Generic sections ---------- */
section { padding: 72px 0; }
.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.section-head p { color: var(--ink-soft); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.check-item { border-top: 1px solid var(--line); padding: 20px 0; }
.check-item h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.check-item p { color: var(--ink-soft); font-size: 0.94rem; margin: 0; }

.step { display: flex; gap: 18px; }
.step .step-num { font-family: var(--serif); font-size: 1.6rem; color: var(--maple); font-weight: 700; flex: none; width: 44px; }
.step h3 { font-size: 1.05rem; margin-bottom: 4px; }
.step p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Compliance section ---------- */
.compliance-panel {
  background: var(--navy-deep);
  color: #eef1f5;
  border-radius: var(--radius);
  padding: 40px;
}
.compliance-panel h2 { color: #fff; }
.compliance-panel p { color: #c7d0de; }
.law-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.law-card { border: 1px solid rgba(255,255,255,0.14); padding: 20px; border-radius: var(--radius); }
.law-card .law-name { font-family: var(--mono); font-size: 0.78rem; color: #f0c8ce; text-transform: none; margin-bottom: 8px; }
.law-card h4 { color: #fff; font-family: var(--sans); font-size: 1rem; margin: 0 0 8px; }
.law-card p { color: #c7d0de; font-size: 0.88rem; margin: 0; }
.legal-note { font-size: 0.82rem; color: #9fadc2; margin-top: 26px; border-top: 1px solid rgba(255,255,255,0.14); padding-top: 18px; }

/* ---------- Pricing ---------- */
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--maple); box-shadow: var(--shadow-card); }
.price-card .price-name { font-weight: 700; font-size: 0.85rem; color: var(--slate); text-transform: none; }
.price-card .price-amount { font-family: var(--serif); font-size: 2.2rem; margin: 10px 0 4px; color: var(--navy-deep); }
.price-card .price-amount span { font-size: 0.95rem; color: var(--slate); font-family: var(--sans); }
.price-card ul { list-style: none; padding: 0; margin: 20px 0 26px; }
.price-card li { padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 0.92rem; color: var(--ink-soft); }
.price-card li:first-child { border-top: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--slate); font-size: 0.85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer a { text-decoration: none; color: var(--slate); }
.site-footer a:hover { color: var(--navy); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* =========================================================================
   Dashboard app (app.html)
   ========================================================================= */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.app-sidebar {
  background: var(--surface);
  color: var(--ink-soft);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex; flex-direction: column; gap: 26px;
}
.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav button {
  all: unset; cursor: pointer;
  padding: 10px 12px; border-radius: var(--radius);
  font-size: 0.92rem; color: var(--ink-soft); font-weight: 500;
}
.app-nav button:hover { background: var(--paper); color: var(--navy); }
.app-nav button.active { background: rgba(0,76,137,0.1); color: var(--navy); font-weight: 600; }
.app-account { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; font-size: 0.82rem; color: var(--slate); }
.app-account strong { color: var(--ink); }
.app-account button { all: unset; cursor: pointer; color: var(--maple); font-weight: 600; font-size: 0.82rem; margin-top: 8px; }

.app-main { padding: 34px 40px; max-width: 980px; }
.app-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; gap: 20px; flex-wrap: wrap; }
.app-header h1 { font-size: 1.6rem; margin-bottom: 4px; }
.app-header p { color: var(--slate); margin: 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-card); }
.panel + .panel { margin-top: 20px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.field input, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--radius); font-family: var(--sans); font-size: 0.95rem;
  background: var(--surface); color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--navy); }
.field-hint { font-size: 0.78rem; color: var(--slate); margin-top: 4px; }
.form-error { background: rgba(166,25,46,0.08); color: var(--maple-deep); border: 1px solid rgba(166,25,46,0.25); padding: 10px 13px; border-radius: var(--radius); font-size: 0.88rem; margin-bottom: 16px; }
.form-note { font-size: 0.88rem; color: var(--slate); margin-top: 14px; }
.form-note a { color: var(--navy); font-weight: 600; }

.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .brand { justify-content: center; margin-bottom: 26px; }
.auth-card h1 { font-size: 1.35rem; text-align: center; }
.auth-card > p.lede { text-align: center; color: var(--slate); font-size: 0.92rem; margin-bottom: 22px; }

table.history { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.history th { text-align: left; font-size: 0.76rem; text-transform: none; color: var(--slate); font-weight: 600; padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
table.history td { padding: 13px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.history tr:hover td { background: var(--paper); cursor: pointer; }
.url-cell { font-family: var(--mono); font-size: 0.86rem; word-break: break-all; }

.finding-row { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.finding-row .f-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--paper); }
.finding-row .f-head .f-title { font-weight: 600; font-size: 0.95rem; flex: 1; }
.finding-row .f-body { padding: 16px; border-top: 1px solid var(--line-soft); }
.finding-row .f-body p { margin: 0 0 10px; font-size: 0.92rem; color: var(--ink-soft); }
.finding-row .f-body .f-label { font-size: 0.72rem; font-weight: 700; color: var(--slate); margin-bottom: 4px; }
.finding-row .f-evidence { background: var(--navy-deep); color: #dbe2ee; font-family: var(--mono); font-size: 0.8rem; padding: 12px; border-radius: var(--radius); overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

.score-hero { display: flex; align-items: center; gap: 24px; }
.score-hero .score-num { font-family: var(--serif); font-size: 3.2rem; font-weight: 700; }
.score-hero .score-meta h2 { font-size: 1.15rem; margin-bottom: 2px; }
.score-hero .score-meta p { margin: 0; color: var(--slate); font-size: 0.88rem; }

/* Letter grade badge: a stamped-document circle, consistent with the
   audit-report visual language used throughout the report. */
.grade-badge {
  flex: none;
  width: 68px; height: 68px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 2rem;
  border: 3px solid currentColor;
}
.grade-badge.grade-clean { color: var(--sev-clean); }
.grade-badge.grade-low { color: var(--sev-low); }
.grade-badge.grade-medium { color: var(--sev-medium); }
.grade-badge.grade-high { color: var(--sev-high); }
.grade-badge.grade-critical { color: var(--sev-critical); }
.grade-badge.grade-info { color: var(--sev-info); }

.grade-mini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  font-family: var(--serif); font-weight: 700; font-size: 0.85rem;
  border: 2px solid currentColor;
}
.grade-mini.grade-clean { color: var(--sev-clean); }
.grade-mini.grade-low { color: var(--sev-low); }
.grade-mini.grade-medium { color: var(--sev-medium); }
.grade-mini.grade-high { color: var(--sev-high); }
.grade-mini.grade-critical { color: var(--sev-critical); }

/* "How to improve your grade" action plan */
.action-plan { border-left: 3px solid var(--maple); }
.action-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.action-item:first-of-type { border-top: none; }
.action-item-title { font-weight: 600; font-size: 0.94rem; margin-bottom: 3px; }
.action-item-fix { font-size: 0.88rem; color: var(--ink-soft); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--slate); }
.empty-state h3 { color: var(--navy-deep); margin-bottom: 8px; }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
.btn-secondary .spinner, .btn-ghost .spinner { border-color: rgba(27,44,79,0.25); border-top-color: var(--navy); }
@keyframes spin { to { transform: rotate(360deg); } }

.guide-block { margin-bottom: 30px; }
.guide-block h3 { font-size: 1.05rem; }
.guide-block p { color: var(--ink-soft); font-size: 0.94rem; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .grid-3, .grid-2, .law-grid { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { flex-direction: row; overflow-x: auto; align-items: center; }
  .app-nav { flex-direction: row; }
  .app-account { display: none; }
  .app-main { padding: 24px 18px; }
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
