/* ScriptTag Audit — Decide design rules: grayscale, 72px header, no footer. */
:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --soft: #efeff1;
  --input-bg: #f6f6f8;
  --border: #e9e9ef;
  --border-focus: #c4c4ce;
  --text: #17171b;
  --text-2: #55555c;
  --text-3: #8a8a93;
  --mask: rgba(22, 22, 27, .44);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #131316; --surface: #1c1c20; --soft: #26262b; --input-bg: #232329;
    --border: #2e2e35; --border-focus: #55555f; --text: #f2f2f4;
    --text-2: #b9b9c0; --text-3: #83838c; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131316; --surface: #1c1c20; --soft: #26262b; --input-bg: #232329;
  --border: #2e2e35; --border-focus: #55555f; --text: #f2f2f4;
  --text-2: #b9b9c0; --text-3: #83838c; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.6px; margin: 0 0 14px; }
h2 { font-size: 24px; line-height: 32px; letter-spacing: -0.6px; margin: 0 0 8px; }
h3 { font-size: 16px; margin: 0; }
p { margin: 0 0 10px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: 72px;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1120px; height: 72px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark { font-size: 27px; font-weight: 650; letter-spacing: -0.6px; text-decoration: none; white-space: nowrap; }
.header-center { flex: 1; display: flex; justify-content: center; }
.segmented { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented .seg {
  padding: 6px 14px; border-radius: 999px; text-decoration: none;
  font-size: 13.5px; color: var(--text-2); white-space: nowrap;
}
.segmented .seg.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.header-right { display: flex; align-items: center; gap: 4px; }
.dropdown { position: relative; }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: none;
  color: var(--text-2); font-size: 13px; padding: 7px 8px; cursor: pointer; border-radius: 8px;
}
.ghost-btn:hover { color: var(--text); }
.ghost-icon { font-size: 13px; }
.chevron { font-size: 11px; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.10); z-index: 60;
}
.dropdown-menu button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 8px 10px; font-size: 13.5px; color: var(--text); border-radius: 8px; cursor: pointer;
}
.dropdown-menu button:hover { background: var(--soft); }

/* Layout */
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hero { padding: 56px 0 8px; max-width: 760px; }
.hero-sub { font-size: 16.5px; color: var(--text-2); margin-bottom: 22px; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.section { padding: 40px 0 8px; }
.section-sub { color: var(--text-2); margin-bottom: 20px; max-width: 680px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.bottom-space { height: 72px; }

/* Buttons & forms */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; height: 44px;
  padding: 11px 16px; border-radius: 11px; border: none; cursor: pointer;
  background: var(--text); color: var(--bg); font-size: 14.5px; font-weight: 550;
  text-decoration: none;
}
.btn-primary:disabled { opacity: .55; cursor: wait; }
.btn-wide { width: 100%; }
.btn-text {
  background: none; border: none; color: var(--text-2); font-size: 14px; cursor: pointer;
  min-height: 32px; padding: 4px 2px; text-decoration: none; display: inline-flex; align-items: center;
}
.btn-text:hover { color: var(--text); }
.form-card { padding: 28px; max-width: 560px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 7px; }
.field input {
  width: 100%; height: 44px; padding: 10px 13px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--input-bg); color: var(--text);
  font-size: 14.5px; outline: none;
}
.field input:focus { border-color: var(--border-focus); background: var(--surface); box-shadow: 0 0 0 3px rgba(140,140,160,.18); }
.privacy-note { font-size: 12.5px; color: var(--text-2); margin-bottom: 16px; }
.form-error {
  border: 1px solid var(--border); background: var(--soft); border-radius: 11px;
  padding: 11px 13px; font-size: 13.5px; margin-bottom: 16px;
}

/* Timeline */
.timeline { padding: 10px 22px; }
.tl-row { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tl-row:last-child { border-bottom: none; }
.tl-date { font-weight: 600; white-space: nowrap; min-width: 104px; }
.tl-text { color: var(--text-2); flex: 1; }
.tl-tag { font-size: 11.5px; color: var(--text-3); border: 1px solid var(--border); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.tl-tag-hot { color: var(--text); border-color: var(--border-focus); font-weight: 600; }

/* Steps */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.step { padding: 24px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 650; flex: none;
}
.step p { color: var(--text-2); font-size: 14px; }
.path-chip {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; background: var(--soft); border-radius: 8px; padding: 5px 9px; color: var(--text);
}
.mock { border: 1px solid var(--border); border-radius: 11px; padding: 12px; margin: 10px 0; background: var(--input-bg); }
.mock-bar { display: flex; gap: 5px; margin-bottom: 10px; }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-focus); display: block; }
.mock-body { display: flex; gap: 12px; }
.mock-side { display: flex; flex-direction: column; gap: 7px; width: 56px; }
.mock-side span { height: 8px; border-radius: 4px; background: var(--border); }
.mock-side span.on { background: var(--text-3); }
.mock-main { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mock-line { height: 9px; border-radius: 4px; background: var(--border); }
.mock-line.hl { background: var(--text-3); }
.w40 { width: 40%; } .w60 { width: 60%; } .w80 { width: 80%; }
.mock-line { height: 9px; border-radius: 4px; background: var(--border); margin: 4px 0; }

/* Report */
.report-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-head h2 { margin: 0; }
.sample-badge { font-size: 11.5px; border: 1px solid var(--border-focus); border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat { padding: 20px 22px; display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 28px; font-weight: 650; letter-spacing: -0.5px; }
.stat-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.empty-note { padding: 22px; margin-bottom: 16px; }
.empty-note p { color: var(--text-2); margin: 0; }
.table-wrap { overflow: hidden; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.report-table th {
  text-align: left; font-size: 13px; font-weight: 500; color: var(--text-2);
  padding: 14px 18px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.report-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
.report-table tr:last-child td { border-bottom: none; }
.cell-src { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; max-width: 330px; }
.cell-vendor { color: var(--text-2); font-size: 12.5px; margin-top: 3px; }
.cell-reason { color: var(--text-2); font-size: 12.5px; margin-top: 3px; max-width: 300px; }
.prio { font-weight: 600; white-space: nowrap; }
.prio-note { color: var(--text-2); font-size: 12.5px; margin-top: 3px; max-width: 260px; }
tr.row-blur td { filter: blur(5px); user-select: none; pointer-events: none; }

/* Locked panel — purchase card stays light in both themes (design rules §6). */
.locked-panel { padding: 22px; background: var(--bg); }
.locked-card {
  color-scheme: light; background: #ffffff; color: #17171b; border: 1px solid #e9e9ef;
  border-radius: 20px; padding: 28px; max-width: 420px; margin: 0 auto; text-align: left;
}
.locked-title { font-size: 24px; line-height: 32px; letter-spacing: -0.6px; font-weight: 650; margin: 0 0 6px; }
.locked-text { color: #55555c; margin: 0 0 14px; }
.locked-price { font-size: 22px; font-weight: 650; margin: 0 0 16px; }
.locked-price span { font-size: 13px; color: #55555c; font-weight: 500; }
.locked-card .btn-primary { background: #17171b; color: #ffffff; }
.locked-card .btn-primary.disabled { opacity: .45; pointer-events: none; }
.locked-note { color: #8a8a93; font-size: 12.5px; margin: 10px 0 0; }
.report-actions { display: flex; align-items: center; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.limits-card { padding: 22px; margin-top: 16px; }
.limits-card h3 { margin-bottom: 8px; }
.limits-card ul { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 13.5px; }
.limits-card li { margin: 5px 0; }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price { padding: 24px; }
.price-name { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.price-amount { font-size: 26px; font-weight: 650; letter-spacing: -0.5px; margin-bottom: 8px; }
.price-desc { color: var(--text-2); font-size: 14px; margin: 0; }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; row-gap: 8px; }
  .site-header { height: auto; }
  .header-center { order: 3; flex-basis: 100%; }
  .wordmark { font-size: 23px; }
  .steps, .price-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 36px; }
  h1 { font-size: 27px; }
  .report-table th:nth-child(3), .report-table td:nth-child(3) { display: none; }
  .tl-row { flex-wrap: wrap; gap: 6px 12px; }
}

@media print {
  .site-header, .hero, #guide, #audit, #pricing, .report-actions, .locked-panel { display: none !important; }
  body { background: #fff; }
}
