/* Field guide. Brief: .ui-not-ai/briefs/scam-field-guide-v2.md */
:root {
  --bg: #FFFFFF;
  --ink: #16181D;
  --muted: #5B6270;
  --rule: #E3E5E8;
  --soft: #F5F6F7;
  --signal: #C8281E;
  --ok: #1E7F4F;
  --ok-bg: #E7F4EC;
  --bad-bg: #FBEBE9;
  --edge: #D5D8DD;
  --sans: "Public Sans", "Helvetica Neue", Helvetica, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
/* No rubber-band bounce at the ends of the page, and no sideways pan on phones (overflow-x: clip keeps sticky working). */
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body { overflow-x: clip; overscroll-behavior-y: none; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
code { font: 0.88em/1 var(--mono); background: var(--soft); border: 1px solid var(--rule); border-radius: 3px; padding: 1px 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.pad { padding: 64px 0; }


/* ---------- loading skeleton (index.html, until guide.json loads) ---------- */
.skel { padding-top: 56px; padding-bottom: 80px; }
.skel span { display: block; border-radius: 10px; background: #ECECEC;
  background-image: linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.65) 50%, transparent 100%);
  background-size: 200% 100%; background-repeat: no-repeat; animation: skel 1.2s ease-in-out infinite; }
.skel__h1 { width: 420px; max-width: 80%; height: 64px; }
.skel__p { width: 640px; max-width: 95%; height: 18px; margin-top: 20px; }
.skel__search { width: 700px; max-width: 100%; height: 56px; margin-top: 28px; border-radius: 14px !important; }
.skel__banner { height: 230px; margin-top: 40px; border-radius: 22px !important; }
.skel__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 48px; }
.skel__card { padding: 18px; border: 2px solid #ECECEC; border-radius: 18px; }
.skel__title { width: 70%; height: 20px; margin-bottom: 18px; }
.skel__row { height: 14px; margin: 14px 0; }
.skel__row:nth-child(odd) { width: 85%; }
@keyframes skel { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .skel span { animation: none; } }
@media (max-width: 760px) {
  .skel { padding-top: 32px; }
  .skel__h1 { height: 44px; }
  .skel__banner { height: 300px; }
  .skel__cards { grid-template-columns: 1fr; }
  .skel__card:nth-child(n+2) { display: none; }
}

/* ---------- header ---------- */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.top__nav { display: flex; gap: 24px; font-size: 15px; font-weight: 500; }
.top__nav a { text-decoration: none; color: var(--muted); }
.top__nav a:hover, .top__nav a[aria-current="page"] { color: var(--ink); }
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.mark__icon { flex: none; display: block; }
/* "Rekt" sits on a red badge, like a stamp: the wordmark is the logo. */
.mark__rekt { display: inline-block; margin-left: 2px; padding: 1px 7px 2px; color: #fff; background: var(--signal);
  border-radius: 6px; transform: rotate(-3deg); }

/* ---------- home ---------- */
.home-head { padding: 56px 0 40px; max-width: 700px; }
.home-head h1 { margin: 0; font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.home-head p { margin: 10px 0 24px; font-size: 18px; color: var(--muted); }

.search { position: relative; }
.search input {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  padding: 13px 16px; background: var(--soft); border: 1px solid var(--rule); border-radius: 6px;
}
.search input::placeholder { color: #8A909B; }
.search input:focus { background: var(--bg); border-color: var(--ink); outline: none; }

.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 40px; padding-bottom: 80px; }
.group h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 6px; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 15px; font-weight: 600; line-height: 1.4; }
.links { list-style: none; margin: 0; padding: 0; }
.links a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.links a:hover .links__name, .related .links a:hover { text-decoration: underline; }
.links__n { flex: none; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.group__practice { flex: none; font-size: 13px; font-weight: 500; color: var(--muted); }
.group__practice:hover { color: var(--ink); }
.done { color: var(--ok); font-weight: 700; font-size: 14px; }

/* banner for the mixed quiz, before the lists */
.quiz-banner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 24px;
  margin: 0 0 40px; padding: 28px 32px; background: var(--soft); border-radius: 16px; overflow: hidden; }
.quiz-banner h2 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.quiz-banner p { margin: 8px 0 18px; color: var(--muted); max-width: 30em; }
.quiz-banner__go { display: inline-block; font-weight: 700; text-decoration: none; color: #fff; background: var(--ink);
  border-radius: 10px; padding: 11px 20px; }
.quiz-banner__img { width: 100%; height: auto; max-height: 240px; object-fit: contain; display: block; }

/* search results */
.results { list-style: none; margin: 0; padding: 0 0 80px; max-width: 760px; }
.results a { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.results a:hover b { text-decoration: underline; }
.results b { display: block; font-size: 18px; font-weight: 600; }
.results span { display: block; color: var(--muted); }
.results small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.results__none { padding: 8px 0 80px; color: var(--muted); }

/* ---------- scam page ---------- */
.crumb { padding-top: 28px; font-size: 14px; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--ink); }

.scam-head { padding: 12px 0 32px; border-bottom: 1px solid var(--rule); }
.scam-head > * { max-width: 760px; }
.scam-head h1 { margin: 0; font-size: 36px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.scam-head__hook { margin: 12px 0 0; font-size: 19px; line-height: 1.5; }
.scam-head__facts { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-bottom: 96px; }
.side { padding-top: 36px; font-size: 14px; }
.side__toc { position: sticky; top: 24px; }
.side h2 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--rule); text-decoration: none; color: var(--muted); }
.side a:hover { color: var(--ink); }
.side a[aria-current="true"] { color: var(--ink); border-left-color: var(--ink); font-weight: 600; }

.body { max-width: 720px; }
.section { padding-top: 36px; scroll-margin-top: 16px; }
.section h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }

.related .links { columns: 2; column-gap: 32px; }
.related .links li { break-inside: avoid; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { position: relative; padding: 8px 0 8px 26px; }
.list--flags li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; background: var(--signal); }
.list--plain li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 10px; height: 2px; background: var(--ink); }
.list--steps { counter-reset: s; }
.list--steps li { counter-increment: s; }
.list--steps li::before { content: counter(s) "."; position: absolute; left: 0; top: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- examples ---------- */
.ex { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ex > li { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.ex__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.ex__summary { margin: 6px 0 0; font-size: 16px; }
.ex__photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ex__photos a { display: block; width: 96px; height: 96px; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.ex__photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex__photos a:hover { border-color: var(--ink); }
.ex__src { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 14px; color: var(--muted); }
.ex__src a { color: var(--ink); }
.more { margin-top: 20px; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--ink); border-radius: 6px; padding: 9px 16px; cursor: pointer; }
.more:hover { background: var(--soft); }

.practice-cta { margin: 36px 0 0; padding: 16px 18px; background: var(--soft); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.practice-cta a { font-weight: 600; }
.practice-cta span { font-size: 14px; color: var(--muted); }

/* ---------- practice index ---------- */
.path-group { max-width: 640px; padding-bottom: 40px; }
.path-group h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin: 0 0 8px; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 15px; font-weight: 600; }
.path-group__n { font-size: 13px; font-weight: 400; color: var(--muted); flex: none; }
.path { list-style: none; margin: 0; padding: 0; }
.path__item { position: relative; }
.path__item:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 46px; bottom: -6px; width: 2px; background: var(--rule); }
.path__item--done:not(:last-child)::after { background: var(--ok); }
.path__item a { display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; text-decoration: none; }
.path__item a:hover .path__name { text-decoration: underline; }
.path__dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--edge); background: var(--bg);
  display: grid; place-items: center; font-size: 15px; font-weight: 700; color: #fff; position: relative; z-index: 1; }
.path__item--done .path__dot { background: var(--ok); border-color: var(--ok); }
.path__item--next .path__dot { border-color: var(--ink); border-width: 3px; }
.path__name { font-weight: 500; }
.path__item--next .path__name { font-weight: 700; }
.path__meta { font-size: 13px; color: var(--muted); text-align: right; }
.path__item--next .path__meta { color: var(--ink); font-weight: 600; }

/* ---------- lesson ---------- */
.in-lesson .top, .in-lesson .foot { display: none; }
/* dvh: the visible height on phones, without the browser bar that hides and shows while you scroll. */
.lesson { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.lesson__top { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 680px; margin: 0 auto; padding: 20px 20px 8px; }
.lesson__x { font-size: 30px; line-height: 1; text-decoration: none; color: var(--muted); padding: 0 4px; }
.lesson__x:hover { color: var(--ink); }
.lesson__bar { flex: 1; height: 14px; border-radius: 7px; background: var(--rule); overflow: hidden; }
.lesson__bar span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 7px; transition: width 300ms ease-out; }
.lesson__body { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 24px 20px 32px; }
.lesson__q { margin: 0 0 18px; font-size: 24px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.lesson__note { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.lesson__note--again { color: var(--signal); }
.lesson__ctx { margin: -8px 0 14px; font-size: 17px; color: #3B414C; }
.lesson__back { flex: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: none;
  border: 1px solid var(--rule); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.lesson__back:hover { color: var(--ink); border-color: var(--edge); }

.msg { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.msg__head { padding: 10px 16px; border-bottom: 1px solid var(--rule); font-size: 15px; color: #3B414C; overflow-wrap: anywhere; }
.msg__body { padding: 8px 6px; }
.msg__line { display: block; width: 100%; margin: 0; padding: 7px 10px; font: inherit; font-size: 16px; color: inherit; text-align: left; background: none; border: 2px solid transparent; border-radius: 8px; }
.msg__line--tap { cursor: pointer; }
.msg__line--tap:hover { background: var(--soft); }
.msg__line[aria-pressed="true"] { border-color: var(--ink); background: var(--soft); }
.msg__line.is-right { border-color: var(--ok); background: var(--ok-bg); }
.msg__line.is-wrong { border-color: var(--signal); background: var(--bad-bg); }
.msg__line:disabled { cursor: default; color: inherit; }
.msg__btn { display: inline-block; padding: 6px 14px; border: 1px solid var(--edge); border-radius: 8px; font-weight: 600; font-size: 15px; background: var(--soft); }

.keys { display: grid; gap: 10px; margin-top: 20px; }
.keys--row { grid-template-columns: 1fr 1fr; }
.key { position: relative; font: inherit; font-weight: 600; font-size: 16px; color: var(--ink); text-align: center;
  padding: 14px 16px 14px 44px; background: var(--bg); border: 2px solid var(--edge); border-bottom-width: 4px; border-radius: 12px; cursor: pointer;
  transition: transform 80ms ease-out, border-color 150ms ease-out; }
.key--left { text-align: left; font-weight: 500; line-height: 1.45; }
.key kbd { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: grid; place-items: center;
  font: 600 12px/1 var(--sans); color: var(--muted); border: 1px solid var(--edge); border-radius: 6px; }
.key:hover { border-color: #B9BEC6; }
.key:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.key[aria-pressed="true"] { border-color: var(--ink); background: var(--soft); }
.key.is-right { border-color: var(--ok); background: var(--ok-bg); }
.key.is-wrong { border-color: var(--signal); background: var(--bad-bg); }
.key:disabled { cursor: default; }

.lesson__foot { position: sticky; bottom: 0; border-top: 1px solid var(--rule); background: var(--bg); }
.lesson__foot-in { max-width: 680px; margin: 0 auto; padding: 16px 20px 20px; }
.go { display: block; width: 100%; font: inherit; font-weight: 700; font-size: 16px; text-align: center; text-decoration: none;
  padding: 13px 18px; color: #fff; background: var(--ink); border: 0; border-bottom: 4px solid #000; border-radius: 12px; cursor: pointer; }
.go:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.go:disabled { background: var(--rule); border-bottom-color: var(--edge); color: #8A909B; cursor: default; }
.go--ok { background: var(--ok); border-bottom-color: #145C38; }
.go--bad { background: var(--signal); border-bottom-color: #8E1A13; }

.verdict { animation: verdict-in 200ms ease-out; }
.verdict--still { animation: none; }
.verdict--ok { background: var(--ok-bg); }
.verdict--bad { background: var(--bad-bg); }
.verdict__title { margin: 0; font-size: 20px; font-weight: 700; }
.verdict--ok .verdict__title { color: var(--ok); }
.verdict--bad .verdict__title { color: var(--signal); }
.verdict__answer { margin: 4px 0 0; font-weight: 600; }
.verdict__why { margin: 4px 0 14px; }
.verdict__from { margin: -8px 0 14px; font-size: 14px; color: var(--muted); }
.verdict__from a { color: inherit; }
.lesson__missed { margin: 20px auto 0; max-width: 30em; text-align: left; }
.lesson__missed p { margin: 0 0 6px; color: var(--ink); font-weight: 600; }
.lesson__missed ul { margin: 0; padding-left: 20px; }
.lesson__missed li { padding: 2px 0; }
@keyframes verdict-in { from { transform: translateY(16px); opacity: 0; } }
/* Wide screens: the button and the verdict sit right under the question, not at the bottom of the window.
   Narrow screens keep them pinned at the bottom, near the thumb. */
@media (min-width: 761px) {
  .lesson { min-height: 0; }
  .lesson__body { flex: none; padding-bottom: 4px; }
  .lesson__foot { position: static; border-top: 0; background: none; }
  .lesson__foot-in { padding: 12px 20px 48px; }
  .verdict { max-width: 680px; margin: 0 auto; padding: 14px 20px 48px; background: none; }
  .verdict .lesson__foot-in { max-width: none; padding: 16px 20px 20px; border-radius: 12px; }
  .verdict--ok .lesson__foot-in { background: var(--ok-bg); }
  .verdict--bad .lesson__foot-in { background: var(--bad-bg); }
}
@media (hover: none) { .key kbd { display: none; } .key { padding-left: 16px; } }
@media (prefers-reduced-motion: reduce) { .verdict { animation: none; } .lesson__bar span { transition: none; } }

.lesson__end { text-align: center; padding-top: 12vh; }
.lesson__end-mark { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%;
  background: var(--ok); }
.lesson__end h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.01em; }
.lesson__end p { margin: 0 auto; max-width: 30em; color: var(--muted); }

/* ---------- photo viewer ---------- */
.lb { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0E0F12; color: #fff; }
.lb::backdrop { background: transparent; }
.lb__bar { display: flex; align-items: center; gap: 20px; height: 56px; padding: 0 20px; font-size: 14px; }
.lb__count { color: #A9AEB8; font-variant-numeric: tabular-nums; margin-right: auto; }
.lb__open { color: #fff; }
.lb__close { font: inherit; font-weight: 600; color: #fff; background: none; border: 1px solid #4A4F59; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.lb__close:hover { border-color: #fff; }
.lb__stage { height: calc(100dvh - 56px); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 12px 24px; }
.lb__stage img { max-width: calc(100% - 120px); max-height: 100%; object-fit: contain; display: block; }
.lb__prev, .lb__next { flex: none; width: 48px; height: 48px; font: 400 32px/1 var(--sans); color: #fff;
  background: none; border: 1px solid #4A4F59; border-radius: 50%; cursor: pointer; }
.lb__prev:hover, .lb__next:hover { border-color: #fff; }
.lb--one .lb__prev, .lb--one .lb__next { visibility: hidden; }
.lb :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 24px 0 48px; }
.foot p { margin: 0; max-width: 720px; font-size: 14px; color: var(--muted); }
.foot .foot__by { font-size: 13px; text-align: right; max-width: none; }

/* ---------- narrower screens ---------- */
@media (max-width: 960px) {
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .home-head { padding: 32px 0 28px; }
  .home-head h1 { font-size: 32px; }
  .groups { grid-template-columns: 1fr; gap: 32px; }
  .scam-head h1 { font-size: 28px; }
  .scam-head__hook { font-size: 17px; }
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side { display: none; }
  .top__nav { gap: 14px; font-size: 13.5px; }
  .top__nav a, .mark__word { white-space: nowrap; }
  .mark__icon { display: none; }
  .lesson__q { font-size: 21px; }
  .path__meta { display: none; }
  .lb__stage img { max-width: 100%; }
  .lb__prev, .lb__next { position: absolute; bottom: 20px; }
  .lb__prev { left: 20px; } .lb__next { right: 20px; }
  .related .links { columns: 1; }
  .quiz-banner { grid-template-columns: 1fr; padding: 22px 20px; gap: 8px; }
  .quiz-banner__img { order: -1; max-height: 160px; }
}
