/* Gullible site styles. Tokens and rules: see DESIGN.md. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --surface: #ffffff;
  --fg: #171717;
  --muted: #5f5f5f;
  --line: #dfdfdf;
  --line-strong: #c7c7c7;
  --accent: #3ecf8e;
  --accent-hover: #55dba0;
  --accent-press: #24b47e;
  --accent-fg: #0e7a54;
  --on-accent: #171717;
  --bait: #9a6a00;
  --bait-bg: rgba(154, 106, 0, 0.1);
  --bad: #c8321f;
  --bad-bg: rgba(200, 50, 31, 0.08);
  --code-bg: #1c1c1c;
  --code-fg: #f5f5f5;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --gutter: 24px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d1117;
    --bg-soft: #11161d;
    --surface: #141a22;
    --fg: #f0f6fc;
    --muted: #9fb0c3;
    --line: #2a3342;
    --line-strong: #3a4558;
    --accent: #3ddc97;
    --accent-hover: #62e8ae;
    --accent-press: #2cc384;
    --accent-fg: #3ddc97;
    --on-accent: #0d1117;
    --bait: #f5c451;
    --bait-bg: rgba(245, 196, 81, 0.1);
    --bad: #ff7a6b;
    --bad-bg: rgba(255, 122, 107, 0.1);
    --code-bg: #0a0e13;
    --code-fg: #f0f6fc;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(61, 220, 151, 0.2);
  scroll-padding-top: 80px;
}
@media (pointer: fine) {
  html {
    overscroll-behavior: none;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  text-wrap: balance;
  scroll-margin-top: 80px;
}
h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.3;
}
p {
  margin: 0 0 16px;
}
a {
  color: var(--accent-fg);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--fg);
}
code,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
}
ul {
  padding-left: 1.2em;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
main.container {
  flex: 1 0 auto;
  padding-top: 32px;
  padding-bottom: 80px;
}

/* ---- Header and footer ---- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.brand img {
  display: block;
  height: 36px;
  width: auto;
}
.nav {
  display: flex;
  gap: 8px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.nav a:hover {
  color: var(--fg);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.site-footer .bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 32px;
  padding-bottom: 32px;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--fg);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 500 0.9375rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
.btn-primary:active {
  background: var(--accent-press);
}
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--fg);
  color: var(--fg);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.8125rem;
}

/* ---- Pills ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill-new {
  color: var(--accent-fg);
  border-color: var(--accent);
}
.pill-followed {
  color: var(--bad);
  border-color: var(--bad);
  background: var(--bad-bg);
}
.pill-bait,
.pill-suspect {
  color: var(--bait);
  border-color: var(--bait);
  background: var(--bait-bg);
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card h3 {
  margin-bottom: 8px;
}
.card p:last-child {
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-fg);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Landing ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 32px 0 24px;
}
.hero .lead {
  margin: 20px 0 28px;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}
.start-card {
  margin-top: 28px;
  max-width: 34em;
}
.start-card[hidden] {
  display: none;
}
.code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
  padding: 10px 10px 10px 14px;
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.code code {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: inherit;
}
.code .btn {
  flex: none;
  background: transparent;
  color: var(--code-fg);
  border-color: #3a4558;
}
.code .btn:hover {
  border-color: var(--code-fg);
}
.error {
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--bad);
  border-radius: var(--radius-sm);
  background: var(--bad-bg);
  color: var(--bad);
}
.error[hidden] {
  display: none;
}

.section {
  padding: 64px 0 0;
}
.section > h2 {
  margin-bottom: 12px;
}
.section > .muted {
  max-width: 40em;
  margin-bottom: 32px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-fg);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.legend {
  display: grid;
  gap: 12px;
}
.legend .row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}
.legend .row .pill {
  flex: none;
  min-width: 11.5em;
  justify-content: center;
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.checks li {
  position: relative;
  padding-left: 28px;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.45em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent-fg);
  border-bottom: 2px solid var(--accent-fg);
  transform: rotate(-45deg);
}

/* ---- Score, cells and verdicts ---- */
.score-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 32px;
  align-items: center;
  margin: 24px 0 16px;
}
.score {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.score-num {
  font-size: clamp(3.5rem, 9vw, 6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}
.score-num.is-bad {
  color: var(--bad);
}
.score-of {
  color: var(--muted);
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.score-text p {
  margin: 0 0 4px;
}
.score-text .big {
  font-size: 1.25rem;
  font-weight: 500;
}
.waiting {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}
.cells {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
}
.cell {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--line);
}
.cell.v-followed {
  background: var(--bad);
}
.cell.v-suspect {
  background: var(--bait);
}
.cell.v-not-observed-capable {
  background: var(--line-strong);
}
.url-line {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.verdicts {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.trap-row {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.trap-row[data-verdict="followed"] {
  border-color: var(--bad);
}
.trap-row .head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.trap-row .title {
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}
.trap-row .sev {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.trap-row .explain {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
.trap-row .near {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* ---- Forms and panels on results pages ---- */
.panel {
  margin: 0 0 16px;
}
.panel h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
.field textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: 400 1rem/1.5 var(--font);
  resize: vertical;
}
.outcome {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.hint {
  color: var(--muted);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

/* ---- Text pages ---- */
.prose {
  max-width: 44rem;
  padding-top: 16px;
}
.prose h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 24px;
}
.prose h2 {
  font-size: 1.5rem;
  margin: 40px 0 12px;
}

/* ---- Shared result ---- */
.share-grid {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.share-grid li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}
.share-grid li.v-followed {
  border-color: var(--bad);
}
.share-grid li.v-suspect {
  border-color: var(--bait);
}
.share-grid li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.share-grid li > b {
  flex: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.share-grid li.v-followed > b {
  color: var(--bad);
}
.share-grid li.v-suspect > b {
  color: var(--bait);
}

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .share-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .score-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .trap-row .sev {
    margin-left: 0;
    width: 100%;
  }
  .legend .row .pill {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

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