/* Is It Dodgy? — large, calm, high-contrast, mobile-first. */
:root {
  color-scheme: light;
  --ink: #14233a;
  --muted: #3f4f66;
  --bg: #faf7f1;
  --surface: #ffffff;
  --line: #d9d2c3;
  --brand: #12355b;
  --brand-dark: #0b2440;
  --wattle: #f5b700;
  --wattle-dark: #d99f00;
  --focus: #ffd34d;

  --dodgy-bg: #fde8e6;
  --dodgy-line: #b3261e;
  --dodgy-ink: #6f140e;
  --sus-bg: #fff2cc;
  --sus-line: #a86200;
  --sus-ink: #573300;
  --ok-bg: #e4f3e8;
  --ok-line: #1c7a35;
  --ok-ink: #0c4a1d;

  --radius: 14px;
  --gutter: 1rem;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.25rem; /* 20px */
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; outline: none; }
img, svg { max-width: 100%; }

.wrap { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

a { color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); text-decoration-thickness: 3px; }

/* Visible focus everywhere */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--focus);
  border-radius: 6px;
}

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

.skip-link {
  position: absolute; left: 0.5rem; top: -4rem;
  background: var(--wattle); color: var(--ink);
  padding: 0.75rem 1rem; font-weight: 700; z-index: 10; border-radius: 8px;
}
.skip-link:focus { top: 0.5rem; }

/* Header */
.site-header { background: var(--brand); color: #fff; }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem; padding-top: 0.8rem; padding-bottom: 0.8rem;
}
.wordmark {
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.01em;
}
.wordmark:hover { color: #fff; }
.wordmark .q { color: var(--wattle); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin: 0; padding: 0; }
.nav-list a { color: #fff; font-size: 1.1rem; font-weight: 600; }
.nav-list a:hover { color: #fff; }
.site-header :focus-visible { outline-color: #fff; }

/* Hero */
.hero { padding: 1.75rem 0 0.5rem; }
.hero h1 { font-size: 2.3rem; margin-bottom: 0.35em; }
.hero h1 .accent { color: var(--brand); }
.lead { font-size: 1.3rem; color: var(--muted); }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; font-size: 1rem;
  color: var(--brand); margin: 1.5rem 0 0.5rem;
}

/* Panels */
.panel {
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin: 0 0 1.25rem;
}
.panel > :last-child { margin-bottom: 0; }
.center { text-align: center; }

/* Form */
.check-form { margin: 1rem 0 1.5rem; }
.field-label { display: block; font-weight: 700; font-size: 1.3rem; margin-bottom: 0.25rem; }
.hint { color: var(--muted); font-size: 1.125rem; margin: 0 0 0.6rem; }
textarea {
  width: 100%; min-height: 10rem; resize: vertical;
  font: inherit; font-size: 1.2rem; line-height: 1.5; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 0.85rem;
}
textarea:focus-visible { box-shadow: 0 0 0 4px var(--focus); border-radius: 10px; }
.counter { font-size: 1.125rem; color: var(--muted); text-align: right; margin: 0.25rem 0 0; }
.counter.over { color: var(--dodgy-line); font-weight: 700; }

.or { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-weight: 700; margin: 1rem 0; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--line); }

.upload-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.preview {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 0.85rem; padding: 0.75rem; background: #fff; border: 2px dashed var(--line); border-radius: 10px;
}
.preview img { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.preview p { margin: 0; flex: 1; min-width: 10rem; font-size: 1.125rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.5rem; padding: 0.7rem 1.4rem;
  font: inherit; font-size: 1.25rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  border-radius: 12px; border: 3px solid transparent; cursor: pointer;
}
.btn svg { width: 1.4em; height: 1.4em; flex: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-check { background: var(--wattle); color: var(--ink); width: 100%; font-size: 1.55rem; min-height: 4.25rem; margin-top: 1.25rem; border-color: var(--wattle-dark); }
.btn-check:hover { background: var(--wattle-dark); color: var(--ink); }
.btn-secondary { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: #eef3f8; color: var(--brand-dark); }
.btn-small { min-height: 2.9rem; font-size: 1.1rem; padding: 0.5rem 1rem; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.actions { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0; }
.actions .btn { width: 100%; }

/* Examples */
.examples h2 { margin-top: 0.5rem; }
.example-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.example-btn {
  width: 100%; height: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem;
  display: flex; flex-direction: column; gap: 0.15rem;
}
.example-btn:hover { border-color: var(--brand); background: #f3f6fa; }
.example-btn strong { font-size: 1.2rem; color: var(--brand); }
.example-btn span { font-size: 1.125rem; color: var(--muted); }

/* Coming soon */
.coming-soon {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--brand); color: #fff; border-radius: var(--radius); padding: 1.25rem; margin: 2rem 0 1.25rem;
}
.coming-soon svg { width: 2.75rem; height: 2.75rem; flex: none; color: var(--wattle); }
.coming-soon p { margin: 0; }
.coming-soon .tag {
  display: inline-block; background: var(--wattle); color: var(--ink); font-weight: 800; font-size: 0.95rem;
  padding: 0.1rem 0.6rem; border-radius: 999px; margin-bottom: 0.4rem;
}

/* How it works */
.steps-3 { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; counter-reset: s; }
.steps-3 li { counter-increment: s; display: flex; gap: 0.85rem; align-items: flex-start; }
.steps-3 li::before {
  content: counter(s); flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--wattle); color: var(--ink); font-weight: 800; display: grid; place-items: center;
}

/* Alerts */
.alert {
  border-left: 8px solid var(--dodgy-line); background: var(--dodgy-bg); color: var(--dodgy-ink);
  padding: 1rem 1.1rem; border-radius: 10px; margin: 1rem 0; font-weight: 600;
}
.alert:empty { display: none; }

/* Loading */
.loading { text-align: center; padding: 3rem 0; }
.spinner {
  width: 4.5rem; height: 4.5rem; margin: 0 auto 1.25rem; border-radius: 50%;
  border: 8px solid #dde4ee; border-top-color: var(--brand); animation: spin 0.9s linear infinite;
}
.loading .big { font-size: 1.9rem; font-weight: 800; margin-bottom: 0.25rem; }
.loading .sub { color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Verdict card */
.verdict-card {
  border-radius: var(--radius); border: 4px solid; padding: 1.4rem 1.25rem; margin: 1.25rem 0;
}
.verdict-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.verdict-icon { width: 4.5rem; height: 4.5rem; flex: none; }
.verdict-kicker { margin: 0; font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; }
.verdict-label { font-size: 3rem; margin: 0; line-height: 1.05; font-weight: 900; }
.verdict-type { font-weight: 700; font-size: 1.3rem; margin-bottom: 0.4rem; }
.verdict-summary { font-size: 1.3rem; }
.verdict-sure { margin: 0; font-size: 1.15rem; }
.verdict-dodgy { background: var(--dodgy-bg); border-color: var(--dodgy-line); color: var(--dodgy-ink); }
.verdict-dodgy .verdict-icon { color: var(--dodgy-line); }
.verdict-suspicious { background: var(--sus-bg); border-color: var(--sus-line); color: var(--sus-ink); }
.verdict-suspicious .verdict-icon { color: var(--sus-line); }
.verdict-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.verdict-ok .verdict-icon { color: var(--ok-line); }

/* Lists */
.flag-list, .tip-list { list-style: none; padding: 0; margin: 0; }
.flag-list li, .tip-list li { position: relative; padding-left: 2.2rem; margin-bottom: 0.8rem; }
.flag-list li::before {
  content: "!"; position: absolute; left: 0; top: 0.1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--dodgy-line); color: #fff; font-weight: 900; font-size: 1.05rem; display: grid; place-items: center;
}
.flag-list.is-ok li::before { content: "✓"; background: var(--ok-line); }
.tip-list li::before {
  content: ""; position: absolute; left: 0.35rem; top: 0.55rem; width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--wattle);
}
.step-list { margin: 0; padding-left: 1.75rem; }
.step-list li { margin-bottom: 0.8rem; padding-left: 0.3rem; }
.step-list li::marker { font-weight: 800; color: var(--brand); }

.panel-tips { border-color: var(--wattle); background: #fffaf0; }

/* Share */
.share-panel { border-color: var(--brand); }
.share-panel label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.share-panel input[type="text"], .share-panel input[type="url"] {
  width: 100%; font: inherit; font-size: 1.15rem; padding: 0.7rem 0.8rem;
  border: 3px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink);
}
.share-link-row { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.5rem 0 0.75rem; }
.share-buttons { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
.share-buttons .btn { width: 100%; }
.copied { color: var(--ok-ink); font-weight: 700; min-height: 1.5em; margin: 0.25rem 0 0; }

.privacy-note, .small { font-size: 1.125rem; color: var(--muted); }

.alert-headline { font-size: 2rem; }

/* Footer */
.site-footer { background: #ece6da; border-top: 2px solid var(--line); margin-top: 2.5rem; padding: 1.5rem 0 2rem; }
.disclaimer { font-size: 1.15rem; }
.footer-links { font-weight: 600; }

/* About */
.prose h2 { margin-top: 1.75rem; }
.prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.5rem; }
.roadmap { list-style: none; padding: 0 !important; display: grid; gap: 0.75rem; }
.roadmap li { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; margin: 0; }
.roadmap strong { display: block; color: var(--brand); }

[hidden] { display: none !important; }

@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
  h1, .hero h1 { font-size: 2.8rem; }
  .example-grid { grid-template-columns: 1fr 1fr; }
  .actions { flex-direction: row; flex-wrap: wrap; }
  .actions .btn { width: auto; flex: 1; }
  .share-buttons { grid-template-columns: 1fr 1fr; }
  .share-link-row { flex-direction: row; }
  .share-link-row input { flex: 1; }
  .panel { padding: 1.5rem 1.75rem; }
  .verdict-card { padding: 1.75rem; }
  .verdict-label { font-size: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .spinner { border-top-color: var(--brand); border-right-color: var(--brand); }
}

@media (forced-colors: active) {
  .verdict-card, .panel, .btn { border: 2px solid CanvasText; }
}
