/**
 * Sovereign Terminal — investor protection.
 * Front-page "Red Flags of Fraud" section and the /types-of-fraud/ guide.
 * Markup: inc/fraud.php, page-types-of-fraud.php. Behaviour: assets/js/fraud.js.
 *
 * Red is used sparingly — only for the flags themselves. Everything else stays
 * in the theme's ink and gold.
 */

:root {
  --flag-red: #a33f31;
  --flag-red-bright: #e2675a;
}

/* ══ Shared bits ═════════════════════════════════════════════════════════════ */
.flags__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

/* Pulsing red beacon */
.flags__siren {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--flag-red-bright);
}

.flags__siren::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--flag-red-bright);
  animation: flags-siren 1.8s ease-out infinite;
}

@keyframes flags-siren {
  from { transform: scale(0.6); opacity: 1; }
  to { transform: scale(2.2); opacity: 0; }
}

.flags__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-full);
  background: linear-gradient(160deg, #f3dfa6, var(--gold-bright) 45%, var(--gold));
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(176, 141, 63, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flags__cta svg {
  transition: transform 0.2s ease;
}

.flags__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(176, 141, 63, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.flags__cta:hover svg {
  transform: translateX(3px);
}

.flags__cta:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* ══ Front page: Red Flags of Fraud ══════════════════════════════════════════ */
.flags {
  position: relative;
  overflow: hidden;
  background: var(--deep);
}

.flags__fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 55% at 85% 20%, rgba(163, 63, 49, 0.22), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(176, 141, 63, 0.12), transparent 70%);
}

.flags__fx::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(227, 201, 131, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227, 201, 131, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 80% at 30% 40%, #000 10%, transparent 75%);
  mask-image: radial-gradient(70% 80% at 30% 40%, #000 10%, transparent 75%);
}

/* Content sits above the flag */
.flags .container {
  position: relative;
  z-index: 1;
}

.flags__top {
  max-width: 640px;
  margin-bottom: var(--space-10);
}

.flags__title {
  margin-bottom: var(--space-5);
  font-family: var(--font-headline);
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--base);
}

.flags__title em {
  font-weight: 500;
  background: linear-gradient(100deg, #f3dfa6, var(--gold-bright) 45%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.flags__intro {
  max-width: 56ch;
  margin-bottom: var(--space-8);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(252, 250, 246, 0.7);
}

/* The flag: the full height of the section, planted at the bottom edge on the
   right, behind the cards. Width follows the artwork's aspect ratio. */
.flags__art {
  position: absolute;
  z-index: 0;
  /* Lifted 15px off the bottom edge and set further right, towards the edge */
  top: calc(var(--space-12) - 15px);
  bottom: 15px;
  right: calc(max(2%, (100vw - 1440px) / 2) - 80px);
  aspect-ratio: 260 / 300;
  pointer-events: none;
}

.flags__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.flags__shadow {
  fill: rgba(0, 0, 0, 0.45);
}

.flags__sheen {
  fill: rgba(255, 255, 255, 0.07);
  transform: translate(0, 6px);
}

.flags__cloth {
  transform-box: view-box;
  transform-origin: 69px 36px;
  filter: drop-shadow(0 10px 18px rgba(163, 63, 49, 0.45));
  transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}

/* Lowered until the section enters, then hoisted up the pole */
.flags.is-armed .flags__cloth {
  transform: translateY(160px) scale(0.9);
}

.flags.is-armed.is-in .flags__cloth {
  transform: none;
}

/* Copy entrance */
.flags.is-armed .flags__copy > * {
  opacity: 0;
  transform: translateY(16px);
}

.flags.is-in .flags__copy > * {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.flags.is-in .flags__copy > :nth-child(2) { transition-delay: 0.08s; }
.flags.is-in .flags__copy > :nth-child(3) { transition-delay: 0.16s; }
.flags.is-in .flags__copy > :nth-child(4) { transition-delay: 0.24s; }

/* Cards */
.flags__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.flag-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 104px;
  overflow: hidden;
  border: 1px solid rgba(227, 201, 131, 0.16);
  border-radius: var(--radius-lg);
  /* Near-opaque ink with blur: the flag reads through, the text stays crisp */
  background: linear-gradient(120deg, rgba(38, 33, 27, 0.82), rgba(20, 18, 16, 0.78));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease,
    background-color 0.35s ease;
}

.flags.is-armed .flag-card {
  opacity: 0;
  transform: translateY(28px);
}

.flags.is-in .flag-card {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s ease calc(0.3s + var(--i) * 0.09s),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) calc(0.3s + var(--i) * 0.09s),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.flag-card__num {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #f3dfa6, var(--gold-bright) 50%, var(--gold));
  color: var(--ink);
  transition: background-color 0.35s ease;
}

/* Red layer that wipes up over the gold when the card is flagged */
.flag-card__num::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--flag-red-bright), var(--flag-red) 60%, #6e2318);
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.flag-card__digit,
.flag-card__icon {
  position: relative;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.flag-card__digit {
  font-family: var(--font-headline);
  font-size: 2rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1;
}

.flag-card__icon {
  position: absolute;
  width: 26px;
  height: 26px;
  color: #fff;
  opacity: 0;
  transform: translateY(24px) rotate(-12deg);
}

.flag-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-6);
}

.flag-card__title {
  font-family: var(--font-headline);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--base);
}

.flag-card__text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(252, 250, 246, 0.6);
}

/* Detector sweep */
.flag-card__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(226, 103, 90, 0.16) 45%, rgba(226, 103, 90, 0.04) 60%, transparent);
  transform: translateX(-100%);
}

/* ── Flagged state ── */
.flag-card.is-flagged {
  border-color: rgba(226, 103, 90, 0.55);
  box-shadow: 0 0 0 1px rgba(226, 103, 90, 0.18), 0 18px 40px rgba(110, 35, 24, 0.35);
}

.flag-card.is-flagged .flag-card__num::before {
  transform: none;
}

.flag-card.is-flagged .flag-card__digit {
  opacity: 0;
  transform: translateY(-24px);
}

.flag-card.is-flagged .flag-card__icon {
  opacity: 1;
  transform: none;
  animation: flags-wave 1.2s ease-in-out 0.35s;
}

.flag-card.is-flagged .flag-card__scan {
  animation: flags-sweep 1.1s cubic-bezier(0.3, 0.6, 0.3, 1);
}

@keyframes flags-sweep {
  to { transform: translateX(100%); }
}

@keyframes flags-wave {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  60% { transform: rotate(6deg); }
}

/* ══ /types-of-fraud/ ════════════════════════════════════════════════════════ */
.fraud-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--space-16) + 40px) 0 var(--space-12);
  background: var(--deep);
}

.fraud-hero__fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 70% at 90% 0%, rgba(163, 63, 49, 0.25), transparent 70%),
    radial-gradient(50% 80% at 10% 100%, rgba(176, 141, 63, 0.16), transparent 70%);
}

.fraud-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-10);
}

.fraud-hero__title {
  margin-bottom: var(--space-4);
  font-family: var(--font-headline);
  font-size: var(--text-display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--base);
}

.fraud-hero__lead {
  max-width: 60ch;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(252, 250, 246, 0.72);
}

.fraud-hero__stats {
  display: flex;
  gap: var(--space-4);
  margin: 0;
}

.fraud-hero__stats > div {
  min-width: 140px;
  padding: var(--space-4) var(--space-5);
  border: 1px solid rgba(227, 201, 131, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(252, 250, 246, 0.04);
}

.fraud-hero__stats dt {
  margin-bottom: var(--space-1);
  font-family: var(--font-label);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(252, 250, 246, 0.55);
}

.fraud-hero__stats dd {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 2.5rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1;
  color: var(--gold-bright);
}

/* Guide layout */
.fraud-guide {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: var(--space-12);
  padding-block: var(--space-16);
}

.fraud-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: var(--space-5);
  border: 1px solid var(--gold-hairline);
  border-radius: var(--radius-lg);
  background: var(--elevated);
  box-shadow: var(--shadow-sm);
}

.fraud-toc__label {
  display: block;
  margin-bottom: var(--space-3);
  padding-inline: var(--space-3);
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.fraud-toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fraud-toc__link {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-body);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fraud-toc__link:hover {
  background: var(--sunken);
  color: var(--ink);
}

.fraud-toc__link[aria-current="true"] {
  border-left-color: var(--gold);
  background: var(--gold-wash);
  color: var(--ink);
  font-weight: 600;
}

.fraud-toc__num {
  flex-shrink: 0;
  font-family: var(--font-headline);
  font-style: italic;
  color: var(--gold);
}

/* Articles */
.fraud-intro {
  margin-bottom: var(--space-12);
}

.fraud-type {
  scroll-margin-top: 110px;
  padding-bottom: var(--space-12);
  margin-bottom: var(--space-12);
  border-bottom: 1px solid var(--gold-hairline-strong);
}

.fraud-type__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.fraud-type__num {
  font-family: var(--font-headline);
  font-size: 3.25rem;
  font-style: italic;
  font-weight: 500;
  line-height: 0.9;
  color: var(--gold);
}

.fraud-type__title {
  margin-bottom: var(--space-2);
  font-family: var(--font-headline);
  font-size: var(--text-headline-lg);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.fraud-type__summary {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--gold-deep);
}

.fraud-type__top {
  display: inline-block;
  margin-top: var(--space-6);
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.fraud-type__top:hover {
  color: var(--gold-deep);
}

/* Prose */
.fraud-prose {
  max-width: 72ch;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-body);
}

.fraud-prose > * + * {
  margin-top: var(--space-4);
}

.fraud-prose h3 {
  margin-top: var(--space-8);
  font-family: var(--font-headline);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.fraud-prose h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: var(--space-3);
  background: var(--gold);
}

.fraud-prose strong {
  color: var(--ink);
}

.fraud-prose ul,
.fraud-prose ol {
  padding: 0;
  list-style: none;
}

.fraud-prose li {
  position: relative;
  padding-left: var(--space-8);
}

.fraud-prose li + li {
  margin-top: var(--space-3);
}

.fraud-prose ul > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.fraud-prose ol {
  counter-reset: fraud;
}

.fraud-prose ol > li {
  counter-increment: fraud;
}

.fraud-prose ol > li::before {
  content: counter(fraud);
  position: absolute;
  left: 0;
  top: 0.15em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--gold-bright);
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 700;
}

.fraud-callout {
  padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--gold-wash);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-body);
}

/* Recap */
.fraud-recap {
  position: relative;
  overflow: hidden;
  padding: var(--space-10);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(163, 63, 49, 0.28), transparent 70%),
    var(--deep);
}

.fraud-recap__title {
  margin-bottom: var(--space-6);
  font-family: var(--font-headline);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--base);
}

.fraud-recap__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-8);
  margin: 0 0 var(--space-8);
  padding: 0;
  list-style: none;
}

.fraud-recap__list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9375rem;
  color: rgba(252, 250, 246, 0.82);
}

.fraud-recap__list span {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--flag-red);
  color: #fff;
  font-family: var(--font-headline);
  font-style: italic;
  font-weight: 600;
}

.fraud-recap__note {
  max-width: 60ch;
  margin-bottom: var(--space-6);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(252, 250, 246, 0.65);
}

/* Video embeds (how-to-avoid-fraud) */
.fraud-video {
  margin-inline: 0;
}

.fraud-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--deep);
  box-shadow: var(--shadow-md);
}

.fraud-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.fraud-video figcaption {
  margin-top: var(--space-3);
  font-family: var(--font-headline);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--ink);
}

.fraud-prose .fraud-video + .fraud-video {
  margin-top: var(--space-8);
}

/* Checklist: tick boxes instead of diamonds */
.fraud-prose .fraud-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.fraud-prose .fraud-checklist li {
  margin: 0;
  padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 30px);
  border: 1px solid var(--gold-hairline-strong);
  border-radius: var(--radius-md);
  background: var(--elevated);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Box and tick sit on the first line of text, not the card's middle */
.fraud-prose .fraud-checklist li::before {
  left: var(--space-4);
  top: calc(var(--space-3) + 3px);
  width: 18px;
  height: 18px;
  border: 2px solid var(--flag-red);
  border-radius: 4px;
  background: transparent;
  transform: none;
}

.fraud-prose .fraud-checklist li::after {
  content: "";
  position: absolute;
  left: calc(var(--space-4) + 6px);
  top: calc(var(--space-3) + 5px);
  width: 6px;
  height: 10px;
  border: solid var(--flag-red);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Companion guide card */
.fraud-next {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "eyebrow arrow"
    "title arrow"
    "text arrow";
  align-items: center;
  gap: var(--space-1) var(--space-6);
  margin-top: var(--space-10);
  padding: var(--space-8) var(--space-10);
  overflow: hidden;
  border: 1px solid var(--gold-hairline-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(227, 201, 131, 0.45), transparent 60%),
    linear-gradient(120deg, var(--gold-wash), #fbf6ea);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.fraud-next:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.fraud-next__eyebrow {
  grid-area: eyebrow;
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.fraud-next__title {
  grid-area: title;
  font-family: var(--font-headline);
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.fraud-next__text {
  grid-area: text;
  max-width: 60ch;
  font-size: 0.9375rem;
  color: var(--ink-body);
}

.fraud-next__arrow {
  grid-area: arrow;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--gold-bright);
  transition: transform 0.25s ease;
}

.fraud-next:hover .fraud-next__arrow {
  transform: translateX(4px);
}

.fraud-next:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.fraud-recap + .fraud-next {
  margin-top: var(--space-6);
}

.fraud-source {
  margin-top: var(--space-6);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ══ Responsive ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .flags__art {
    right: -6%;
    opacity: 0.85;
  }

  .fraud-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
  }

  /* Index becomes a sticky horizontal strip under the header */
  .fraud-guide {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
    padding-top: 0;
  }

  .fraud-toc {
    top: 58px;
    z-index: 5;
    max-height: none;
    margin-inline: calc(var(--space-8) * -1);
    padding: var(--space-3) 0;
    border: 0;
    border-bottom: 1px solid var(--gold-hairline);
    border-radius: 0;
    background: rgba(252, 250, 246, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: none;
  }

  .fraud-toc__label {
    display: none;
  }

  .fraud-toc__list {
    flex-direction: row;
    gap: var(--space-2);
    padding-inline: var(--space-8);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .fraud-toc__list::-webkit-scrollbar {
    display: none;
  }

  .fraud-toc__link {
    white-space: nowrap;
    border: 1px solid var(--gold-hairline-strong);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
  }

  .fraud-toc__link[aria-current="true"] {
    border-color: var(--gold);
  }

  .fraud-type {
    scroll-margin-top: 130px;
  }
}

@media (max-width: 768px) {
  /* Single column of cards leaves no room beside them: the flag moves up into
     the top-right corner behind the heading, fainter, cloth bleeding off-edge. */
  .flags__art {
    top: var(--space-4);
    bottom: auto;
    height: 300px;
    right: -90px;
    opacity: 0.4;
  }

  .flags__grid,
  .fraud-recap__list,
  .fraud-prose .fraud-checklist {
    grid-template-columns: minmax(0, 1fr);
  }

  .fraud-next {
    padding: var(--space-6);
  }

  .fraud-next__arrow {
    width: 44px;
    height: 44px;
  }

  .fraud-toc {
    margin-inline: calc(var(--space-5) * -1);
  }

  .fraud-toc__list {
    padding-inline: var(--space-5);
  }
}

@media (max-width: 560px) {
  .flag-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .flag-card__body {
    padding: var(--space-4);
  }

  .fraud-hero__stats > div {
    min-width: 0;
    flex: 1;
  }

  .fraud-type__head {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }

  .fraud-type__num {
    font-size: 2.5rem;
  }

  .fraud-recap {
    padding: var(--space-6) var(--space-5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .flags__siren::after,
  .flag-card.is-flagged .flag-card__icon,
  .flag-card.is-flagged .flag-card__scan {
    animation: none !important;
  }

  .flags__cloth,
  .flag-card,
  .flags.is-in .flag-card,
  .flags.is-in .flags__copy > * {
    transition: none !important;
  }
}
