/* Feedwerk — one hand-written stylesheet, no framework, no CDN.
   Dark, high-contrast, and built so the raw-vs-rendered comparison is the
   loudest thing on the page. */

:root {
  --bg: #0e1116;
  --bg-alt: #141922;
  --panel: #1b2230;
  --line: #2a3446;
  --text: #e8edf5;
  --muted: #97a3b6;
  --accent: #4fd1a5;
  --accent-dark: #1f8f6c;
  --danger: #ff6b6b;
  --danger-dim: #3a1f26;
  --warn: #ffb454;
  --ok: #4fd1a5;
  --radius: 12px;
  --wrap: 1140px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7fe3c1; }

code, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: rgba(255,255,255,0.07); padding: 0.12em 0.4em; border-radius: 5px; }
pre { background: #0a0d12; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow-x: auto; }
pre code { background: none; padding: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- Header / footer ----------------------------------------------- */

.site-header { border-bottom: 1px solid var(--line); background: rgba(14,17,22,0.9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-weight: 650; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { color: var(--accent); margin-right: 4px; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a { font-size: 0.92rem; color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }

/* Language switcher. A form, because picking a language has to stick in a
   cookie — styled down to look like the pair of links it behaves as. */
.lang-switch { display: flex; align-items: center; gap: 2px; margin: 0; }
.lang-option {
  font: inherit; font-size: 0.8rem; letter-spacing: 0.06em; font-weight: 600;
  background: none; border: 1px solid transparent; color: var(--muted);
  padding: 3px 7px; border-radius: 6px; cursor: pointer;
}
.lang-option:hover { color: var(--text); border-color: var(--line); }
.lang-option.is-current { color: var(--accent); border-color: var(--line); background: var(--panel); cursor: default; }

.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 32px 0 48px; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-start; }
.footer-note { max-width: 60ch; margin: 0; }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }

.flash { margin: 20px 0 0; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); font-size: 0.95rem; }
.flash-success { border-color: var(--accent-dark); background: rgba(79,209,165,0.1); }
.flash-error { border-color: #6b2b34; background: rgba(255,107,107,0.1); }

/* --- Hero ------------------------------------------------------------ */

.hero { padding: 72px 0 56px; background:
  radial-gradient(900px 380px at 15% -10%, rgba(79,209,165,0.16), transparent 70%),
  radial-gradient(700px 300px at 95% 0%, rgba(90,140,255,0.10), transparent 70%); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.hero h1 { max-width: 18ch; }
.lede { font-size: 1.15rem; color: #c3cdda; max-width: 62ch; }
.section-lede { color: var(--muted); max-width: 68ch; }

.audit-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0 10px; max-width: 620px; }
.audit-form input[type=text] {
  flex: 1 1 300px; min-width: 0; padding: 15px 18px; font-size: 1.02rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); font-family: var(--sans);
}
.audit-form input[type=text]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.audit-form button, .lead-form button {
  padding: 15px 26px; font-size: 1.02rem; font-weight: 650; cursor: pointer;
  background: var(--accent); color: #06211a; border: 0; border-radius: var(--radius);
  font-family: var(--sans);
}
.audit-form button:hover, .lead-form button:hover { background: #7fe3c1; }
.form-hint { color: var(--muted); font-size: 0.88rem; max-width: 60ch; }
.form-error { color: var(--danger); font-size: 0.92rem; }

/* Static export: no server to POST to, so the form becomes a mailto CTA. */
.static-cta { margin: 28px 0 10px; }
.cta-button {
  display: inline-block; padding: 15px 28px; font-size: 1.02rem; font-weight: 650;
  background: var(--accent); color: #06211a; border-radius: var(--radius); text-decoration: none;
}
.cta-button:hover { background: #7fe3c1; color: #06211a; }
.static-cta-note { color: var(--muted); font-size: 0.95rem; max-width: 60ch; }

/* --- The side-by-side pitch ------------------------------------------ */

.split { padding: 56px 0; border-top: 1px solid var(--line); }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 30px 0 18px; }
@media (max-width: 860px) { .split-grid { grid-template-columns: 1fr; } }

.pane { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.pane figcaption { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pane-badge { font-weight: 650; font-size: 0.95rem; }
.pane-sub { font-size: 0.8rem; color: var(--muted); }
.pane-human figcaption { border-bottom-color: var(--accent-dark); }
.pane-human .pane-badge { color: var(--accent); }
.pane-bot figcaption { border-bottom-color: #6b2b34; }
.pane-bot .pane-badge { color: var(--danger); }

.pdp { padding: 18px; }
.pdp-media {
  height: 128px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(135deg, #2c3546, #3d4a63); color: #93a1b8; font-size: 0.8rem;
}
.pdp-media.empty { background: repeating-linear-gradient(45deg, #171c25, #171c25 8px, #131820 8px, #131820 16px); border: 1px dashed #35405400; }
.pdp-media.empty .pdp-media-label { font-family: var(--mono); font-size: 0.7rem; color: #55617a; }
.pdp-brand { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.pdp-title { font-size: 1.08rem; margin-bottom: 10px; }
.pdp-price { font-size: 1.9rem; font-weight: 700; margin: 0 0 8px; color: #fff; }
.pdp-stock { font-size: 0.92rem; margin-bottom: 8px; }
.pdp-stock.in-stock { color: var(--accent); }
.pdp-rating { font-size: 0.9rem; color: var(--warn); margin-bottom: 14px; }
.pdp-meta { list-style: none; padding: 0; margin: 0 0 16px; font-size: 0.86rem; border-top: 1px solid var(--line); }
.pdp-meta li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.pdp-meta li span { color: var(--muted); }
.pdp-cta { width: 100%; padding: 12px; border: 0; border-radius: 8px; background: var(--accent); color: #06211a; font-weight: 650; font-size: 0.95rem; opacity: 0.9; }

.pdp-raw .missing { color: var(--danger); font-weight: 600; }
.pdp-raw .missing s { color: #7d4b52; text-decoration-thickness: 2px; }
.pdp-raw .pdp-price.missing { font-size: 1.35rem; }
.pdp-raw .pdp-meta li s { color: #7d4b52; }
.pdp-code { margin: 0; font-size: 0.74rem; line-height: 1.5; color: #8a99b3; background: #0a0d12; }

.split-caption { color: var(--muted); font-size: 0.95rem; max-width: 68ch; }

/* --- Proof block ----------------------------------------------------- */

.proof { padding: 56px 0; border-top: 1px solid var(--line); background: var(--bg-alt); }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 26px; }
.proof-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.proof-card .stat { font-size: 2.3rem; font-weight: 700; color: var(--accent); margin: 0 0 6px; letter-spacing: -0.03em; }
.proof-card h3 { font-size: 1rem; margin-bottom: 10px; }
.proof-card p { font-size: 0.92rem; color: #bdc7d6; }
.proof-card .source { font-size: 0.76rem; color: var(--muted); margin: 0; }

.honesty { padding: 56px 0; border-top: 1px solid var(--line); }
.honesty p { max-width: 72ch; color: #bdc7d6; }

.cta-bottom { padding: 56px 0; border-top: 1px solid var(--line); background: var(--bg-alt); }

/* --- Analysis page --------------------------------------------------- */

.analysis { padding: 64px 0; }
.progress { margin: 32px 0; }
.progress-bar { height: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent)); transition: width 0.5s ease; }
.progress-step { margin: 14px 0 0; font-size: 1.05rem; font-weight: 600; }
.progress-percent { margin: 2px 0 0; color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.steps { color: var(--muted); font-size: 0.94rem; padding-left: 1.2em; }
.steps li { margin-bottom: 6px; }
.error-box { border: 1px solid #6b2b34; background: rgba(255,107,107,0.08); border-radius: var(--radius); padding: 14px 16px; font-size: 0.92rem; }

/* --- Report ---------------------------------------------------------- */

.report-hero { padding: 56px 0 44px; border-bottom: 1px solid var(--line); }
.report-hero.band-critical { background: radial-gradient(900px 340px at 20% -20%, rgba(255,107,107,0.20), transparent 70%); }
.report-hero.band-poor { background: radial-gradient(900px 340px at 20% -20%, rgba(255,180,84,0.18), transparent 70%); }
.report-hero.band-ok { background: radial-gradient(900px 340px at 20% -20%, rgba(90,160,255,0.16), transparent 70%); }
.report-hero.band-good { background: radial-gradient(900px 340px at 20% -20%, rgba(79,209,165,0.18), transparent 70%); }

.score-block { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; margin: 24px 0 30px; }
.score-dial {
  flex: 0 0 auto; display: grid; place-items: center; width: 168px; height: 168px;
  border-radius: 50%; border: 3px solid var(--line); background: var(--panel);
  padding: 12px; text-align: center;
}
.band-critical .score-dial { border-color: var(--danger); }
.band-poor .score-dial { border-color: var(--warn); }
.band-ok .score-dial { border-color: #5aa0ff; }
.band-good .score-dial { border-color: var(--accent); }
.score-value { font-size: 3.1rem; font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.score-max { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.score-band { font-size: 0.9rem; font-weight: 650; margin-top: 6px; }
.band-critical .score-band { color: var(--danger); }
.band-poor .score-band { color: var(--warn); }
.band-ok .score-band { color: #5aa0ff; }
.band-good .score-band { color: var(--accent); }

.headline { flex: 1 1 340px; font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-weight: 600; line-height: 1.4; margin: 0; max-width: 34ch; }

.hero-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 0; }
.hero-facts > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.hero-facts dt { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.hero-facts dd { margin: 5px 0 0; font-size: 1.1rem; font-weight: 650; }

.section { padding: 52px 0; border-bottom: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }
.subhead { margin-top: 34px; }

.subscores { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0 16px; }
.subscore { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.subscore-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.subscore-value { font-size: 2rem; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.03em; }
.subscore-value span { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.subscore-note { font-size: 0.84rem; color: var(--muted); margin: 0; }
.band-legend { color: var(--muted); font-size: 0.86rem; }

/* Recommendations */
.recs { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.rec { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.rec-critical { border-left-color: var(--danger); }
.rec-high { border-left-color: var(--warn); }
.rec-medium { border-left-color: #5aa0ff; }
.rec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.rec-head h3 { margin: 0; }
.rec-severity { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.rec-critical .rec-severity { background: rgba(255,107,107,0.16); color: var(--danger); }
.rec-high .rec-severity { background: rgba(255,180,84,0.16); color: var(--warn); }
.rec-medium .rec-severity { background: rgba(90,160,255,0.16); color: #5aa0ff; }
.rec p { font-size: 0.95rem; color: #c6d0de; margin-bottom: 0; }
.rec-effort { font-size: 0.82rem !important; color: var(--muted) !important; margin-top: 10px !important; }

/* Field tables */
.gap-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 20px 0; font-size: 0.92rem; color: var(--muted); }
.gap-chip { background: var(--danger-dim); color: #ffb3b3; border: 1px solid #6b2b34; border-radius: 99px; padding: 3px 11px; font-size: 0.82rem; font-weight: 600; }

.page-block { margin-top: 30px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.page-url { margin: 0; padding: 14px 18px 4px; font-size: 0.95rem; font-weight: 600; word-break: break-all; }
.page-url a { color: var(--text); }
.page-meta { padding: 0 18px 12px; margin: 0; font-size: 0.8rem; color: var(--muted); font-family: var(--mono); }
.table-scroll { overflow-x: auto; }

.field-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 640px; }
.field-table thead th { text-align: left; padding: 10px 14px; background: #131923; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); vertical-align: top; }
.field-table .th-sub { display: block; text-transform: none; letter-spacing: 0; font-size: 0.72rem; font-weight: 400; color: #6f7c92; margin-top: 2px; }
.field-table tbody th { text-align: left; font-weight: 500; }
.field-table td, .field-table tbody th { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.field-table tbody tr:last-child td, .field-table tbody tr:last-child th { border-bottom: 0; }
.cell-flag { text-align: center; width: 110px; }
.cell-source { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.cell-preview { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; word-break: break-word; }
.row-gap { background: rgba(255,107,107,0.08); }
.row-gap th { font-weight: 650; }

.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--danger); font-weight: 700; }
.neutral { color: var(--muted); }

.page-list { list-style: none; padding: 0; margin: 16px 0 0; font-size: 0.9rem; }
.page-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.page-type { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; }
.page-list .page-meta { padding: 0; }

.empty-state { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--radius); padding: 20px; margin-top: 22px; max-width: 72ch; }

/* robots matrix */
.robots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 26px; }
@media (max-width: 940px) { .robots-grid { grid-template-columns: 1fr; } }
.robots-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--panel); }
.robots-retrieval { border-color: var(--accent-dark); box-shadow: inset 0 2px 0 0 var(--accent); }
.robots-training { opacity: 0.86; }
.robots-col h3 { margin-bottom: 6px; }
.robots-note { font-size: 0.86rem; color: var(--muted); }
.robots-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.robots-table thead th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); }
.robots-table td, .robots-table tbody th { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 400; }
.robots-table code { font-size: 0.82rem; }
.robots-table .rule { display: block; font-size: 0.72rem; color: #6f7c92; font-family: var(--mono); margin-top: 3px; word-break: break-word; }
.row-blocked { background: rgba(255,107,107,0.09); }
.tag-info { display: inline-block; margin-left: 6px; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 7px; }

/* Site checks */
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.check { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 18px; background: var(--panel); }
.check-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.check-mark { font-weight: 700; width: 1em; }
.check-ok .check-mark { color: var(--ok); }
.check-bad .check-mark { color: var(--danger); }
.check-neutral .check-mark { color: var(--muted); }
.check-label { font-weight: 600; }
.check-value { color: var(--muted); font-family: var(--mono); font-size: 0.84rem; }
.check-detail { margin: 8px 0 0; font-size: 0.9rem; color: #bdc7d6; max-width: 76ch; }
.check-bad { border-left: 4px solid var(--danger); }
.check-llms { border-left: 4px solid #5aa0ff; }

/* Email gate */
.section-mail { background: var(--bg-alt); }
.lead-form { margin-top: 22px; max-width: 560px; }
.lead-form .field { margin-bottom: 16px; }
.lead-form label { display: block; font-size: 0.9rem; margin-bottom: 6px; }
.lead-form input[type=email] {
  width: 100%; padding: 13px 16px; font-size: 1rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-family: var(--sans);
}
.lead-form input[type=email]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-check label { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: #bdc7d6; line-height: 1.5; }
.field-check input { margin-top: 3px; flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--accent); }

.section-method p { color: #bdc7d6; font-size: 0.95rem; }

/* Prose pages */
.prose h2 { margin-top: 1.8em; font-size: 1.25rem; }
.prose p, .prose li { color: #c6d0de; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
