/* [BRAND] Feed Checker styles. Plain CSS, no framework. Simple transitions only. */

/* ---------------------------------------------------------------------------------------------
   Design tokens
   ------------------------------------------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --bg-subtle: #f6f8fa;
  --surface: #ffffff;
  --border: #dde3ea;
  --border-strong: #c3ccd6;
  --text: #17212b;
  --text-muted: #55636f;
  --accent: #0f766e;
  --accent-hover: #0b5f58;
  --accent-soft: #e6f4f2;
  --on-accent: #ffffff;
  --error: #b42318;
  --error-soft: #fef1f0;
  --warning: #93370d;
  --warning-soft: #fff6e5;
  --warning-border: #f5c46b;
  --success: #067647;
  --success-soft: #ecfdf3;
  --focus: #2563eb;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f151b;
    --bg-subtle: #151d25;
    --surface: #18212a;
    --border: #2a3641;
    --border-strong: #3a4855;
    --text: #e6edf3;
    --text-muted: #9aa8b5;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-soft: #11302d;
    --on-accent: #062a26;
    --error: #ff8a80;
    --error-soft: #3a1714;
    --warning: #fbbf5a;
    --warning-soft: #33250d;
    --warning-border: #6b4b12;
    --success: #4ade80;
    --success-soft: #0f2e1d;
    --focus: #60a5fa;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

/* ---------------------------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); font-weight: 750; }
h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
code { font-family: var(--mono); font-size: 0.9em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--accent); color: var(--on-accent);
  padding: 8px 12px; border-radius: var(--radius); z-index: 10;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; color: var(--on-accent); }

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

.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------------------------------------
   Header and footer
   ------------------------------------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.15rem; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark rect { fill: var(--accent); }
.brand-mark path { fill: none; stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-weight: 550; }
.site-nav a:hover { color: var(--text); }
@media (max-width: 479px) { .hide-sm { display: none; } }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-subtle); padding: 32px 0; margin-top: 48px; }
.footer-inner { display: grid; gap: 8px; }
.footer-nav { display: flex; gap: 20px; margin-bottom: 4px; }
.footer-nav a { color: var(--text-muted); font-weight: 550; text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
.footer-note { margin: 0; color: var(--text-muted); font-size: 0.875rem; }

/* ---------------------------------------------------------------------------------------------
   Buttons and form controls
   ------------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

.link-button {
  background: none; border: 0; padding: 0; font: inherit; color: var(--accent);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.link-button:hover { color: var(--accent-hover); }
.link-button:disabled { color: var(--text-muted); cursor: not-allowed; }

.field-error { color: var(--error); font-size: 0.9rem; margin: 8px 0 0; }

/* ---------------------------------------------------------------------------------------------
   Hero and checker
   ------------------------------------------------------------------------------------------- */
.hero { padding: 40px 0 32px; background: linear-gradient(180deg, var(--bg-subtle), var(--bg)); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 64px 0 56px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
}
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 34em; }
.trust-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.trust-list li { display: flex; align-items: center; gap: 10px; font-weight: 550; }
.trust-list .icon { color: var(--success); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.checker { padding: 20px; }
@media (min-width: 640px) { .checker { padding: 24px; } }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; min-height: 168px; padding: 24px 16px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--bg-subtle); cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone.has-file { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.dropzone.is-disabled { cursor: not-allowed; opacity: 0.7; }
.dropzone-icon { width: 36px; height: 36px; fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dropzone-title { font-weight: 650; overflow-wrap: anywhere; }
.dropzone-hint { color: var(--text-muted); font-size: 0.9rem; }
.fake-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.channels { border: 0; padding: 0; margin: 20px 0; min-width: 0; }
.channels legend { font-weight: 650; margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text-muted); font-weight: 550; font-size: 0.95rem;
  cursor: pointer; user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip span::before {
  content: ""; width: 16px; height: 16px; flex: none;
  border: 1.5px solid var(--border-strong); border-radius: 4px; background: var(--surface);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.chip input:checked + span::before {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip input:disabled + span { cursor: not-allowed; opacity: 0.6; }

.progress { margin-top: 16px; }
.progress-label { margin: 0 0 8px; font-weight: 550; font-size: 0.95rem; }
.progress-track { height: 8px; border-radius: 999px; background: var(--bg-subtle); border: 1px solid var(--border); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.2s ease; }

.sample-line { margin: 16px 0 0; text-align: center; color: var(--text-muted); font-size: 0.95rem; }

/* ---------------------------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------------------------- */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-subtle); }

.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 20px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-bottom: 12px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 750;
}
.step p { color: var(--text-muted); margin: 0; }

.check-list { padding: 0; margin: 24px 0 0; list-style: none; display: grid; gap: 14px; }
@media (min-width: 760px) { .check-list { grid-template-columns: 1fr 1fr; gap: 16px 40px; } }
.check-list li { padding-left: 28px; position: relative; color: var(--text-muted); }
.check-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.35em; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
}
.check-list strong { color: var(--text); }

.faq { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 650; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--text-muted);
}
.faq[open] summary::after { content: "\2212"; }
.faq p { color: var(--text-muted); margin: 0 0 16px; }

/* ---------------------------------------------------------------------------------------------
   Report
   ------------------------------------------------------------------------------------------- */
.report { padding: 40px 0 8px; border-top: 1px solid var(--border); }
.report:focus { outline: none; }
.report-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.report-header h2 { margin: 0 0 4px; }
.report-header h2:focus { outline: none; }
.file-meta { margin: 0; color: var(--text-muted); overflow-wrap: anywhere; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 479px) { .report-actions, .report-actions .btn { width: 100%; } }

.notice {
  display: flex; gap: 12px; padding: 16px; margin: 0 0 16px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-subtle);
}
.notice > .icon { margin-top: 3px; }
.notice-body { min-width: 0; }
.notice-body > :last-child { margin-bottom: 0; }
.notice h3 { margin: 0 0 6px; font-size: 1.05rem; }
.notice p { margin: 0 0 8px; }
.notice ol, .notice ul { margin: 0 0 12px; padding-left: 20px; }
.notice li { margin-bottom: 4px; }
.notice-warning { background: var(--warning-soft); border-color: var(--warning-border); }
.notice-warning > .icon { color: var(--warning); }
.notice-error { background: var(--error-soft); border-color: var(--error); }
.notice-error > .icon { color: var(--error); }
.notice-info > .icon { color: var(--accent); }
.notice-store { padding: 20px; }
.coverage-note { color: var(--text-muted); font-size: 0.925rem; margin: 0 0 24px; display: flex; gap: 8px; align-items: flex-start; }
.coverage-note .icon { margin-top: 3px; }

.tabs {
  /* The divider is an inset shadow, not a border, so tabs don't need a negative margin to sit on it.
     A negative margin made the row 1px taller than its box and showed a vertical scrollbar. */
  display: flex; gap: 4px; box-shadow: inset 0 -1px 0 var(--border);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 48px; padding: 10px 14px;
  background: none; border: 0; border-bottom: 3px solid transparent;
  color: var(--text-muted); font: inherit; font-weight: 650; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab:focus-visible { outline-offset: -3px; }

.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; line-height: 1; white-space: nowrap;
}
.badge-error { background: var(--error-soft); color: var(--error); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge .icon { width: 14px; height: 14px; stroke-width: 3; }

.tab-panel { padding-top: 24px; }
.tab-panel:focus { outline: none; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.stat-label { display: block; color: var(--text-muted); font-size: 0.875rem; font-weight: 550; }
.stat-value { display: block; font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 750; line-height: 1.2; margin-top: 4px; }
.stat-sub { display: block; color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }
.stat-passing .stat-value { color: var(--success); }
.stat-errors .stat-value { color: var(--error); }
.stat-neutral .stat-value { color: var(--text); }
@media (max-width: 479px) {
  .stats { gap: 8px; }
  .stat { padding: 12px 10px; }
}

.groups { display: grid; gap: 12px; }
.group { border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); }
.group-error { border-left-color: var(--error); }
.group-warning { border-left-color: var(--warning-border); }
.group > summary {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer; list-style: none;
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary .chevron { width: 20px; height: 20px; color: var(--text-muted); transition: transform 0.15s ease; }
.group[open] > summary .chevron { transform: rotate(90deg); }
.group-title { font-weight: 650; overflow-wrap: anywhere; }
.group-title .severity { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.group-error .severity { color: var(--error); }
.group-warning .severity { color: var(--warning); }
.group-body { padding: 0 16px 16px; }
.group-body h4 { margin: 12px 0 4px; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.group-body p { margin: 0 0 8px; }
.more-note { color: var(--text-muted); font-size: 0.9rem; margin: 10px 0 0; }

.table-wrap { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.rows-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rows-table th, .rows-table td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.rows-table th { background: var(--bg-subtle); font-weight: 650; white-space: nowrap; }
.rows-table tr:last-child td { border-bottom: 0; }
.rows-table td { overflow-wrap: anywhere; min-width: 80px; }
.rows-table .col-row { white-space: nowrap; min-width: 0; }
.cell-value { font-family: var(--mono); font-size: 0.85rem; }
.cell-suggestion { font-family: var(--mono); font-size: 0.85rem; color: var(--success); font-weight: 600; }
.cell-note { display: block; color: var(--text-muted); font-size: 0.825rem; }
.muted { color: var(--text-muted); }

@media (max-width: 639px) {
  .table-wrap { border: 0; overflow: visible; }
  .rows-table thead { display: none; }
  .rows-table, .rows-table tbody, .rows-table tr, .rows-table td { display: block; width: 100%; }
  .rows-table tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; padding: 4px 0; }
  .rows-table td { display: grid; grid-template-columns: 9em 1fr; gap: 8px; border: 0; padding: 4px 12px; }
  .rows-table td::before { content: attr(data-label); font-weight: 650; color: var(--text-muted); font-family: var(--font); }
}

.empty-state { text-align: center; padding: 32px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty-state .icon { width: 40px; height: 40px; color: var(--success); stroke-width: 2.5; }
.empty-state h3 { margin: 8px 0 4px; }
.empty-state p { color: var(--text-muted); margin: 0 auto; max-width: 36em; }

.panel-footer { margin-top: 20px; color: var(--text-muted); font-size: 0.85rem; }

/* ---------------------------------------------------------------------------------------------
   Text pages (privacy, terms, 404)
   ------------------------------------------------------------------------------------------- */
.page { padding: 40px 0 16px; }
.page h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
.page h2 { font-size: 1.3rem; margin-top: 1.75em; }
.page .updated { color: var(--text-muted); }
.page ul { padding-left: 22px; }
.page li { margin-bottom: 6px; }
.not-found { text-align: center; padding: 72px 0; }
.not-found p { color: var(--text-muted); }
