/* DEVRIM Audit — shared styles. Dark theme. */
:root {
  --bg: #07090F;
  --surface: #0C1018;
  --surface-2: #0F1622;
  --border: #1A2535;
  --text: #D0DFF0;
  --muted: #7A8BA0;
  --amber: #E8A020;
  --amber-dim: #b07c1a;
  --high: #C84040;
  --med: #E8A020;
  --low: #506680;
  --ok: #3FB36A;
  --radius: 10px;
  --maxw: 1080px;
  --mono: 'Share Tech Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--amber);
}

.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 9, 15, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.18em;
  color: var(--text);
  text-transform: uppercase;
}
.brand .dot { color: var(--amber); }
.nav a { color: var(--muted); font-size: 14px; margin-left: 22px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.nav-btn {
  color: #1a1205;
  font-family: var(--sans);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 8px 16px;
  font-size: 14px;
}
.nav a.nav-btn:hover { color: #1a1205; }

/* ---------- Hero ---------- */
.hero { padding: clamp(80px, 10vw, 120px) 0 clamp(56px, 7vw, 80px); }
.hero h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.05;
  margin: 14px 0 18px;
  letter-spacing: -0.02em;
  max-width: 760px;
}
.hero p.lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 16px;
}
.hero-sample { margin: 0 0 28px; font-size: 15px; }
.hero-sample a { font-weight: 600; }

/* ---------- Audit form ---------- */
.audit-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 720px;
}
.audit-form .row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.field { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

input[type="url"], input[type="text"], select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 13px 14px;
  font-size: 15px;
  font-family: var(--sans);
  width: 100%;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(232, 160, 32, 0.18);
}
select { appearance: none; cursor: pointer; }

.plan-field { flex: 0 0 200px; }
.plan-static {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 13px 14px;
  font-size: 15px;
  font-family: var(--sans);
}

.btn {
  background: var(--amber);
  color: #1a1205;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-size: 15px;
  padding: 14px 22px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:hover { background: #f2af3a; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.full { width: 100%; margin-top: 12px; }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.secondary:hover { border-color: var(--amber); background: transparent; }

.form-msg { margin-top: 12px; font-size: 14px; min-height: 20px; }
.form-msg.error { color: var(--high); }
.form-msg.info { color: var(--muted); }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #1a1205;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.fineprint { font-size: 13px; color: var(--muted); margin-top: 14px; }
.reassure { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.reassure a { font-weight: 600; }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 8vw, 96px) 0; }
section h2 { font-size: 28px; font-weight: 600; margin: 8px 0 28px; letter-spacing: -0.01em; }
section h3 { font-weight: 600; }
/* Alternate surfaces instead of relying on hairline borders. */
#pricing, #what-you-get { background: var(--surface); }

/* ---------- What you get ---------- */
.get-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.get-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.get-card h3 { margin: 0 0 8px; font-size: 17px; }
.get-card p { margin: 0; color: var(--muted); font-size: 15px; }
.get-foot { margin: 26px 0 0; font-size: 15px; color: var(--muted); }
.get-foot a { font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 860px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.faq-item h3 { margin: 0 0 8px; font-size: 17px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.step .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--amber);
  letter-spacing: 0.1em;
}
.step h3 { margin: 10px 0 8px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.step-note { margin-top: 12px !important; font-size: 13px !important; color: var(--low) !important; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr; gap: 18px; max-width: 420px; margin: 0 auto; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
}
.price-card.feature { border-color: var(--amber-dim); }
.price-card .plan-name { font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; font-size: 13px; color: var(--amber); }
.price-card .price { font-size: 38px; margin: 12px 0 4px; }
.price-card .price small { font-size: 16px; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 22px; }
.price-card li { padding: 6px 0; color: var(--muted); font-size: 15px; padding-left: 22px; position: relative; }
.price-card li::before { content: "→"; position: absolute; left: 0; color: var(--amber); }
.price-card .btn { margin-top: auto; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Report page ---------- */
/* Constrain the report reading column for legibility. */
.report-head, #report-body { max-width: 760px; }
.report-head { padding: 40px 0 24px; }
.report-head h1 { font-size: 30px; margin: 6px 0 4px; }
.report-head .target { font-family: var(--mono); font-size: 14px; color: var(--muted); word-break: break-all; }

.state-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  margin: 30px 0;
}
.state-box .spinner { border-top-color: var(--amber); border-color: rgba(232,160,32,0.25); width: 28px; height: 28px; margin: 0 auto 16px; }
.state-box h2 { margin: 0 0 8px; border: none; }
.state-box p { color: var(--muted); margin: 0; }

.notice {
  border-radius: 8px;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 15px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.notice.review { border-color: var(--med); }
.notice.error { border-color: var(--high); }
.notice strong { color: var(--text); }

/* Demo banner — on-theme, amber, prominent. */
.notice.demo {
  background: rgba(232, 160, 32, 0.08);
  border: 1px solid var(--med);
  font-size: 1rem;
  margin: 0 0 24px;
}
.notice.demo .demo-word {
  color: var(--amber);
  font-family: var(--mono);
  letter-spacing: 0.08em;
}

/* Clean-state success message — accessible contrast. */
.clean-state { color: var(--ok); font-weight: 600; }

/* Severity tally chip row. */
.tally { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.tally .pill { font-size: 12px; padding: 4px 10px; }

.confidence-caption { font-size: 12px; margin: 12px 0 0; }

/* confidence meter */
.confidence {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 24px 0;
}
.confidence .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.confidence .pct { font-family: var(--mono); font-size: 22px; color: var(--text); }
.meter { height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--amber-dim), var(--amber)); border-radius: 6px; transition: width 0.5s; }

/* metrics — "What we measured" grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.metric-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}
.metric-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--muted);
}
.metric-dot.good { background: var(--ok); }
.metric-dot.warn { background: var(--med); }
.metric-dot.bad { background: var(--high); }
.metric-dot.info { background: var(--muted); }
.metric-label { flex: 1 1 auto; font-size: 15px; min-width: 0; }
.metric-value {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  text-align: right;
  word-break: break-word;
}

/* findings */
.severity-group { margin: 28px 0; }
.severity-group h3 {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.sev-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sev-high .sev-dot, .pill.high { background: var(--high); }
.sev-med .sev-dot, .pill.med { background: var(--med); }
.sev-low .sev-dot, .pill.low { background: var(--low); }

.finding {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.finding.high { border-left-color: var(--high); }
.finding.med { border-left-color: var(--med); }
.finding.low { border-left-color: var(--low); }
.finding .problem { font-weight: 600; font-size: 16px; margin: 0 0 8px; }
.finding .kv { margin: 6px 0; font-size: 15px; }
.finding .kv .k { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); display: block; margin-bottom: 2px; }
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b0e15;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

/* rewrite */
.rewrite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rewrite-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}
.rewrite-col.after { border-color: var(--amber-dim); }
.rewrite-col h4 { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.rewrite-col.after h4 { color: var(--amber); }
.rewrite-col .copy { white-space: pre-wrap; font-size: 15px; line-height: 1.6; }

/* action plan */
.action-plan { counter-reset: step; padding: 0; list-style: none; margin: 0; }
.action-plan li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px 16px 56px;
  margin-bottom: 12px;
  position: relative;
  font-size: 16px;
}
.action-plan li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  background: var(--amber);
  color: #1a1205;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-actions { margin: 36px 0 60px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .hero { padding: 56px 0 36px; }
  .hero h1 { font-size: 32px; }
  .steps { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .rewrite-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
  .plan-field { flex: 1 1 100%; }
  .nav { display: none; }
  .get-grid { grid-template-columns: 1fr; }
  .faq-list { grid-template-columns: 1fr; }
}

/* ---------- Print (Save as PDF) ---------- */
@media print {
  html, body { background: #fff; color: #111; }
  .site-header, .site-footer, .nav, .report-actions, .notice.demo { display: none !important; }
  a { color: #111; text-decoration: none; }
  .report-head, #report-body { max-width: 100%; }
  .state-box, .finding, .confidence, .rewrite-col, .action-plan li, .notice, .metric-row {
    background: #fff;
    border-color: #ccc;
    color: #111;
  }
  .finding, .severity-group, .rewrite-col, .action-plan li, .confidence, .metric-row { break-inside: avoid; page-break-inside: avoid; }
  .metrics { break-inside: avoid; page-break-inside: avoid; }
  .metric-value { color: #111; }
  .muted, .step p, .finding .kv .k, .confidence-caption { color: #444; }
  .meter > span { background: #888; }
}
