@import url("/static/fonts/fonts.css");

:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --ink: #17150f;
  --body: #2f2b23;
  --muted: #6b655a;
  --faint: #8b8577;
  --line: #e4ded1;
  --line-soft: #efeae0;
  --accent: #2b4fae;
  --accent-hover: #1e3a85;
  --fail: #b8321f;
  --fail-soft: rgba(184, 50, 31, 0.10);
  --warn: #a8720f;
  --warn-soft: rgba(168, 114, 15, 0.12);
  --info: #4a6c8c;
  --info-soft: rgba(74, 108, 140, 0.12);
  --pass: #2f7a4e;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 72px);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 5vw, 64px); }
h2 { font-size: 30px; }
h3 { font-size: 26px; }
p { margin: 0; text-wrap: pretty; }
code { font-family: var(--mono); font-size: 0.85em; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; font-family: var(--serif); font-size: 20px; padding: 22px 0 10px; }
th, td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--faint); font-weight: 500; font-size: 13px; }
.table-wrap { overflow-x: auto; }
[x-cloak] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); font-size: 13px; }

/* chrome */
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 20px var(--gutter); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.logo { width: 30px; height: 30px; display: block; }
.site-header nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.site-header nav a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.container { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter) 64px; }
.site-footer { max-width: 1440px; margin: 0 auto; padding: 24px var(--gutter) 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }

/* controls */
button, .button { font: inherit; font-size: 16px; font-weight: 600; letter-spacing: 0.01em; height: 48px; padding: 0 22px; border-radius: 6px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .button:hover { background: #2a271f; border-color: #2a271f; color: var(--bg); }
button:disabled { opacity: 0.5; cursor: progress; }
button.secondary, .button.secondary { background: transparent; color: var(--ink); }
button.secondary:hover, .button.secondary:hover { background: var(--line-soft); color: var(--ink); }
button.link { height: auto; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 500; font-size: 15px; text-decoration: underline; text-underline-offset: 2px; }
button.link:hover { background: none; color: var(--accent-hover); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.verdict-fail, .dot.sev-violation { background: var(--fail); }
.dot.verdict-remarks, .dot.sev-warning { background: var(--warn); }
.dot.verdict-pass { background: var(--pass); }
.dot.verdict-unknown, .dot.sev-info { background: var(--info); }
.sev-word { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.sev-word.sev-violation { color: var(--fail); }
.sev-word.sev-warning { color: var(--warn); }
.sev-word.sev-info { color: var(--info); }
.tag { display: inline-block; font-size: 13px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); }
.tag.kind-accept { border-color: var(--pass); color: var(--pass); }
.tag.kind-reject, .tag.kind-reject_necessary { border-color: var(--fail); color: var(--fail); }
.tag.kind-settings, .tag.kind-save { border-color: var(--info); color: var(--info); }
.swatch { display: inline-block; width: 1em; height: 1em; border: 1px solid var(--line); border-radius: 3px; vertical-align: -2px; }

/* front page */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; padding: clamp(48px, 8vw, 96px) 0 64px; align-items: start; }
.hero-main { grid-column: span 7; display: flex; flex-direction: column; gap: 26px; }
.hero-aside { grid-column: 9 / span 4; border-top: 1px solid var(--ink); padding-top: 18px; }
.hero-aside h2 { font-size: 22px; margin-bottom: 8px; }
.lead { font-size: 20px; color: var(--body); max-width: 560px; }
.url-form { display: flex; gap: 10px; max-width: 640px; }
.url-form input { flex: 1; min-width: 0; font: inherit; font-size: 18px; height: 60px; padding: 0 20px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--surface); color: var(--ink); }
.url-form input::placeholder { color: #9b9585; }
.url-form input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.url-form button { height: 60px; padding: 0 28px; font-size: 17px; }
.form-error { color: var(--fail); font-size: 15px; margin-top: 10px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list a { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.recent-list a:hover .site { text-decoration: underline; text-underline-offset: 3px; }
.recent-list .site { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list .when { font-size: 14px; color: var(--faint); white-space: nowrap; }
.steps-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; padding: 48px 0 24px; border-top: 1px solid var(--line); }
.steps-row li { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.steps-row .num { font-family: var(--serif); font-size: 40px; line-height: 1; color: #c9c2b2; }
.steps-row strong { font-size: 17px; }
.steps-row span { font-size: 15px; color: var(--muted); }
@media (max-width: 900px) {
  .hero-main, .hero-aside { grid-column: span 12; }
  .steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .url-form { flex-direction: column; }
}

/* job */
.job { margin-top: 20px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.job-head { display: flex; gap: 14px; align-items: flex-start; }
.job-head p { margin-top: 2px; }
.job-failed { border-color: var(--fail); }
.job-failed form { margin-top: 12px; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.9s linear infinite; flex: none; margin-top: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.step { color: var(--faint); }
.step-current { color: var(--ink); font-weight: 600; }
.step-done { color: var(--pass); }
.step-done::before { content: "✓ "; }

/* report */
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; padding: clamp(32px, 5vw, 56px) 0 28px; border-bottom: 1px solid var(--ink); flex-wrap: wrap; }
.report-head .meta { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.report-head .meta .mono { color: var(--muted); word-break: break-all; }
.verdict { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-bottom: 4px; text-align: right; }
.verdict-label { font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.verdict-fail .verdict-label { color: var(--fail); }
.verdict-remarks .verdict-label { color: var(--warn); }
.verdict-pass .verdict-label { color: var(--pass); }
.verdict-unknown .verdict-label { color: var(--muted); }
.verdict-counts { font-size: 15px; color: var(--muted); }
.notes { list-style: none; padding: 12px 0 0; margin: 0; color: var(--warn); font-size: 15px; }
.report-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; padding-top: 32px; align-items: start; }
@media (max-width: 960px) { .report-grid { grid-template-columns: 1fr; gap: 32px; } .viewer { position: static !important; } }
.findings { display: flex; flex-direction: column; }
.finding { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); transition: background 0.15s; }
.finding:last-child { border-bottom: 1px solid var(--line); }
.finding.is-active { background: var(--surface); box-shadow: 0 0 0 12px var(--surface); }
.finding-key { display: flex; flex-direction: column; gap: 6px; }
.finding-key .mono { font-weight: 500; color: var(--ink); }
.finding-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.finding-body .lawref { font-size: 13px; color: var(--faint); }
.finding-body .saw { font-size: 17px; color: var(--body); }
.evidence { margin: 2px 0 0; padding-left: 18px; font-size: 15px; color: var(--body); }
.evidence li { margin-bottom: 2px; }
.finding details { margin-top: 4px; }
.finding summary { cursor: pointer; font-size: 15px; font-weight: 500; color: var(--accent); list-style: none; }
.finding summary::-webkit-details-marker { display: none; }
.finding summary::after { content: " ↓"; }
.finding details[open] summary::after { content: " ↑"; }
.finding details p { margin-top: 12px; font-size: 16px; color: var(--body); }
.finding-links { display: flex; gap: 20px; margin-top: 6px; }
.empty { padding: 24px 0; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* viewer */
.viewer { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.tabs { display: flex; gap: 4px; }
.tabs button { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 4px; }
.tabs button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs button:disabled { opacity: 0.4; cursor: not-allowed; }
.shot-frame { position: relative; border: 1px solid #d9d2c3; border-radius: 6px; overflow: hidden; background: var(--surface); box-shadow: 0 24px 48px -32px rgba(23, 21, 15, 0.35); }
.shot-frame img { display: block; width: 100%; height: auto; }
.box { position: absolute; border: 2px solid; border-radius: 3px; cursor: pointer; transition: opacity 0.15s, box-shadow 0.15s; }
.box.sev-violation { border-color: var(--fail); background: var(--fail-soft); color: var(--fail); }
.box.sev-warning { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.box.sev-info { border-color: var(--info); background: var(--info-soft); color: var(--info); }
.box.is-active { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 6px currentColor; z-index: 2; }
.box.is-dim { opacity: 0.3; }
.box-label { position: absolute; left: -2px; bottom: 100%; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 3px 3px 0 0; color: #fff; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 0.15s; }
.box.sev-violation .box-label { background: var(--fail); }
.box.sev-warning .box-label { background: var(--warn); }
.box.sev-info .box-label { background: var(--info); }
.box.is-active .box-label, .box:hover .box-label { opacity: 1; }
.viewer .caption { font-size: 13px; color: var(--faint); }

/* tips */
.tips { margin-top: 56px; padding: 32px 36px; background: var(--ink); color: var(--bg); border-radius: 6px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; }
.tips h2 { color: var(--bg); }
.tips p, .tips ol { color: #c9c2b2; font-size: 16px; }
.tips ol { padding-left: 20px; margin: 16px 0 0; }
.tips ol li { margin-bottom: 6px; }
.tips textarea { width: 100%; font: inherit; font-size: 14px; line-height: 1.45; padding: 14px 16px; border: 1px solid #4a463c; border-radius: 6px; background: #221f18; color: var(--bg); resize: vertical; }
.tips .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.tips button, .tips .button { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.tips button:hover, .tips .button:hover { background: #ffffff; border-color: #ffffff; color: var(--ink); }
.tips .button.secondary { background: transparent; color: var(--bg); border-color: #6b655a; }
.tips .button.secondary:hover { background: #2a271f; color: var(--bg); }
.tips a { color: #e9e3d5; }
.tips .small { color: #a8a294; margin-top: 14px; }
@media (max-width: 900px) { .tips { grid-template-columns: 1fr; padding: 24px; } }
.tips-none { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); max-width: 720px; }

/* details */
.details { margin-top: 64px; }
.details h2 { padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.details details { border-bottom: 1px solid var(--line); }
.details summary { cursor: pointer; padding: 18px 0; font-size: 17px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: "+"; color: var(--faint); font-family: var(--mono); }
.details details[open] summary::after { content: "−"; }
.details .body { padding: 0 0 24px; }
.banner-text { margin: 8px 0 20px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--body); font-size: 15px; white-space: pre-wrap; }
tr.class-tracker td:first-child code { color: var(--fail); }
.permalink { margin-top: 48px; font-size: 14px; color: var(--faint); }

/* prose */
.prose { max-width: 760px; padding-top: 48px; }
.prose h1 { margin-bottom: 24px; }
.prose h2 { margin: 40px 0 12px; font-size: 26px; }
.prose p, .prose li { color: var(--body); font-size: 17px; }
.prose blockquote { margin: 16px 0; padding: 16px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-family: var(--serif); font-size: 19px; color: var(--ink); }
.prose table { font-size: 15px; }
