@charset "UTF-8";

/* ============================================================
   FilialConnect — Main Stylesheet
   Design system, components, layout, animations, responsive
   ============================================================ */

/* -------------------------------------------
   CSS Custom Properties (Design Tokens)
   ------------------------------------------- */
:root {
  /* Color Tokens */
  --color-primary: #2B5797;
  --color-primary-light: #4A7BC8;
  --color-primary-dark: #1A3A6E;
  --color-primary-subtle: #E8EFF8;
  /* Text-on-surface variants (dark mode brightens these; backgrounds keep brand hue) */
  --color-primary-text: #2B5797;
  --color-primary-text-deep: #1A3A6E;
  --color-accent-text: #A85212;
  --color-accent: #E8833A;
  --color-accent-light: #F5B880;
  --color-accent-dark: #A85212;
  --color-accent-subtle: #FFF3E8;
  /* Foreground for anything painted on --color-accent. Deliberately absent from the
     dark block: --color-text flips there, and three elements on brand orange were
     failing WCAG because each re-pinned it by hand and one was forgotten. */
  --color-on-accent: #1A1A2E;
  /* Decorative watermark (404 code). Kept above 3:1 against both page backgrounds so
     axe stops scoring it 0; opacity is not used because it composites against whatever
     is behind it, which no static check can resolve. */
  --color-watermark: #7A8296;
  --color-bg: #FAF8F5;
  --color-bg-alt: #F3EFE9;
  --color-surface: #FFFFFF;
  --color-surface-hover: #F8F6F3;
  --color-text: #1A1A2E;
  --color-text-secondary: #5A5A6E;
  --color-text-muted: #676777;
  --color-border: #E0DCD5;
  --color-border-light: #F0EDE8;
  --color-success: #2D8B4E;
  --color-success-bg: #EDF7F1;
  --color-warning: #D4820A;
  --color-warning-bg: #FFF8ED;
  --color-danger: #C0392B;
  --color-danger-bg: #FDEDEC;
  /* Text on top of the matching -bg tint. The brand colour above is a fill (dots, borders);
     using it as foreground text on its own tint measured 3.90:1 (success) and 2.84:1
     (warning) in the light palette — axe failed the status badge and the 0.95 category
     floor absorbed it. Same mistake shape as --color-on-accent one round earlier. */
  --color-success-text: #1F7A3F;
  --color-warning-text: #8A5A00;
  --color-danger-text: #A93226;
  --color-shadow: rgba(26, 26, 46, 0.08);
  --color-shadow-strong: rgba(26, 26, 46, 0.15);

  /* Typography */
  --font-display: Georgia, 'Noto Serif SC', STSong, SimSun, serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', Consolas, monospace;

  /* Fluid Type Scale */
  /* A11y floor: 16px minimum for secondary text, 18px for anything a reader
     must actually follow (guides, steps, form hints). */
  --text-xs: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-sm: clamp(1.125rem, 1.05rem + 0.35vw, 1.1875rem);
  --text-base: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  --text-lg: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.3rem + 0.7vw, 1.875rem);
  --text-2xl: clamp(1.75rem, 1.5rem + 0.8vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.7rem + 1vw, 2.75rem);
  --text-hero: clamp(2.5rem, 2rem + 1.5vw, 3.75rem);

  /* Spacing Scale */
  --space-xs: clamp(0.25rem, 0.2rem + 0.2vw, 0.5rem);
  --space-sm: clamp(0.5rem, 0.4rem + 0.3vw, 0.75rem);
  --space-md: clamp(0.75rem, 0.6rem + 0.4vw, 1rem);
  --space-lg: clamp(1rem, 0.8rem + 0.6vw, 1.5rem);
  --space-xl: clamp(1.5rem, 1.2rem + 0.8vw, 2rem);
  --space-2xl: clamp(2rem, 1.6rem + 1vw, 3rem);
  --space-3xl: clamp(2.5rem, 2rem + 1.5vw, 4rem);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --nav-height: 4.5rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px var(--color-shadow);
  --shadow-md: 0 4px 12px var(--color-shadow);
  --shadow-lg: 0 8px 30px var(--color-shadow);
  --shadow-xl: 0 12px 48px var(--color-shadow-strong);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --duration-glacial: 800ms;

  /* Focus Ring */
  --focus-ring: 0 0 0 3px var(--color-accent-light);
}


/* -------------------------------------------
   Reset & Base
   ------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* WCAG 2.4.11 focus-not-obscured: anchored/focused elements land below the sticky header */
  scroll-padding-top: calc(var(--nav-height) + var(--space-md));
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}


/* -------------------------------------------
   Focus Styles
   ------------------------------------------- */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}


/* -------------------------------------------
   Typography
   ------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary-text-deep);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

/* Screen-reader-only text (keeps visible label and accessible name consistent) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Heading-level fixes preserve original visual sizes */
.trust-item h3 { font-size: var(--text-lg); }
.step-card h3 { font-size: var(--text-lg); }
.fraud-detail-inner h2 { font-size: var(--text-lg); }
.tutorial-card-body h2 { font-size: var(--text-xl); }
.step-title { font-size: var(--text-lg); }
.guide-card h2 { font-size: var(--text-xl); }
.feature-item h3 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-primary-text);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out-quart);
}

a:hover {
  color: var(--color-accent);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}


/* -------------------------------------------
   Skip Link
   ------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 9999;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: top var(--duration-fast) var(--ease-out-quart);
}

.skip-link:focus {
  top: var(--space-sm);
}


/* -------------------------------------------
   Navigation
   ------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  min-height: var(--nav-height);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo {
  width: 42px;
  height: 42px;
}

.nav-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary-text-deep);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
}

.nav-links a {
  display: block;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--duration-base) var(--ease-out-quart);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary-text);
  background: var(--color-primary-subtle);
}

.nav-cta {
  background: var(--color-accent) !important;
  color: var(--color-on-accent) !important;
  font-weight: 700 !important;
}

.nav-cta:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-out-quart),
              opacity var(--duration-fast) var(--ease-out-quart);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}


/* -------------------------------------------
   Language Toggle
   ------------------------------------------- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  min-height: 40px;
  min-width: 72px;
  transition: all var(--duration-base) var(--ease-out-quart);
  flex-shrink: 0;
}

.lang-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-text);
  background: var(--color-primary-subtle);
}

.lang-toggle:active {
  transform: scale(0.96);
}

.lang-toggle-label {
  letter-spacing: 0.05em;
}


/* -------------------------------------------
   Breadcrumb
   ------------------------------------------- */
.breadcrumb {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg) 0;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumb .separator {
  color: var(--color-border);
}

.breadcrumb .current {
  color: var(--color-text-secondary);
  font-weight: 500;
}


/* -------------------------------------------
   Hero Section
   ------------------------------------------- */
.hero {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-primary-subtle) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.6;
}

.hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-lg);
  opacity: 0;
  animation: fadeSlideUp var(--duration-glacial) var(--ease-out-expo) forwards;
}

.hero h1 {
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeSlideUp var(--duration-glacial) var(--ease-out-expo) 0.15s forwards;
}

.hero p {
  font-size: var(--text-lg);
  max-width: 640px;
  margin: 0 auto var(--space-xl);
  opacity: 0;
  animation: fadeSlideUp var(--duration-glacial) var(--ease-out-expo) 0.3s forwards;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp var(--duration-glacial) var(--ease-out-expo) 0.45s forwards;
}


/* -------------------------------------------
   Buttons
   ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-xl);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out-quart);
  min-height: 48px;
  min-width: 48px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--duration-fast) var(--ease-out-quart);
}

.btn:hover::after {
  background: rgba(255, 255, 255, 0.1);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover::after {
  background: rgba(255, 255, 255, 0.12);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover::after {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary-text);
  border: 2px solid var(--color-primary);
}

.btn-outline::after {
  display: none;
}

.btn-outline:hover {
  background: var(--color-primary-subtle);
}

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  min-height: 56px;
  font-size: var(--text-lg);
}

.btn-xl {
  padding: var(--space-lg) var(--space-3xl);
  min-height: 64px;
  font-size: var(--text-xl);
}


/* -------------------------------------------
   Sections & Cards
   ------------------------------------------- */
.section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border-light);
  transition: all var(--duration-base) var(--ease-out-quart);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.card h3 {
  font-size: var(--text-lg);
}

.card p {
  font-size: var(--text-base);
  line-height: 1.6;
}

.card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  color: var(--color-primary-text);
}

.card-link:hover {
  color: var(--color-accent);
}

/* Card Variants */
.card-accent::before { background: var(--color-accent); }
.card-success::before { background: var(--color-success); }
.card-warning::before { background: var(--color-warning); }
.card-danger::before { background: var(--color-danger); }


/* -------------------------------------------
   Feature List
   ------------------------------------------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  list-style: none;
}

.feature-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
}

.feature-item-icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  background: var(--color-primary-subtle);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}


/* -------------------------------------------
   Page Header (Sub-pages)
   ------------------------------------------- */
.page-header {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg) var(--space-xl);
}


/* -------------------------------------------
   Tutorial Filter & Grid
   ------------------------------------------- */
.tutorial-filter {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.filter-tag {
  padding: var(--space-xs) var(--space-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--color-text-secondary);
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: all var(--duration-base) var(--ease-out-quart);
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.tutorial-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  transition: all var(--duration-base) var(--ease-out-quart);
  overflow: hidden;
}

.tutorial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tutorial-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-card-body {
  padding: var(--space-lg);
}

.tutorial-card-tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  background: var(--color-primary-subtle);
  color: var(--color-primary-text);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}

.tag-accent {
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
}


/* -------------------------------------------
   Call Help Section
   ------------------------------------------- */
.call-help-hero {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
}

.call-button {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: var(--text-xl);
  font-weight: 700;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-base) var(--ease-out-quart);
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.call-button::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid var(--color-accent);
  opacity: 0.3;
  animation: pulse-ring 2s var(--ease-out-quart) infinite;
}

.call-button:hover {
  transform: scale(1.05);
}

.call-button svg {
  width: 48px;
  height: 48px;
}

.call-status {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--color-success-bg);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-success);
  display: none;
}

.call-status.visible {
  display: block;
}

.help-form {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-2xl);
}


/* -------------------------------------------
   Form Elements
   ------------------------------------------- */
.form-group {
  margin-bottom: var(--space-lg);
}

label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 600;
  color: var(--color-text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  transition: all var(--duration-base) var(--ease-out-quart);
  min-height: 48px;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-subtle);
  outline: none;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  display: block;
}


/* -------------------------------------------
   Fraud Database
   ------------------------------------------- */
.fraud-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-2xl);
}

.fraud-item {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  transition: box-shadow var(--duration-base) var(--ease-out-quart);
}

.fraud-item:hover {
  box-shadow: var(--shadow-md);
}

.fraud-summary {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  cursor: pointer;
}

.fraud-level {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.fraud-level.high {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.fraud-level.medium {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.fraud-level.low {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.fraud-title {
  flex: 1;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.fraud-arrow {
  width: 24px;
  height: 24px;
  transition: transform var(--duration-base) var(--ease-out-quart);
  flex-shrink: 0;
}

.fraud-item.open .fraud-arrow {
  transform: rotate(180deg);
}

.fraud-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out-quart);
}

.fraud-item.open .fraud-detail {
  max-height: 2000px;
}

.fraud-detail-inner {
  padding: 0 var(--space-lg) var(--space-lg);
  border-top: 1px solid var(--color-border-light);
  padding-top: var(--space-lg);
}

.fraud-detail-inner h5 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fraud-detail-inner ul,
.fraud-detail-inner ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.fraud-detail-inner li {
  margin-bottom: var(--space-xs);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}


/* -------------------------------------------
   Fraud Banner
   ------------------------------------------- */
.fraud-banner {
  max-width: var(--container-max);
  margin: 0 var(--space-lg) var(--space-xl);
  padding: var(--space-lg);
  background: var(--color-danger-bg);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-danger);
}

.fraud-banner strong {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--text-base);
}


/* -------------------------------------------
   Remote Assist
   ------------------------------------------- */
.remote-demo {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.connection-panel {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--color-border-light);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.connection-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: var(--space-md) var(--space-xl);
  background: var(--color-primary-subtle);
  border-radius: var(--radius-md);
  color: var(--color-primary-text-deep);
}

.connection-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.step-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: var(--space-md);
}


/* -------------------------------------------
   Printable Guides
   ------------------------------------------- */
.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-lg);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-2xl);
}


/* -------------------------------------------
   Step List (Tutorial Detail — Step-by-Step)
   ------------------------------------------- */
.step-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-xl);
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  transition: box-shadow var(--duration-base) var(--ease-out-quart);
}

.step-item:hover {
  box-shadow: var(--shadow-md);
}

.step-list .step-number {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary-text);
  background: var(--color-primary-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  margin-bottom: 0;
  min-width: auto;
  width: auto;
  height: auto;
}

.step-number-value {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-content h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.step-content p {
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: 0;
}

/* -------------------------------------------
   Tutorial Detail Page
   ------------------------------------------- */
.tut-detail {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.tut-detail-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
}

.tut-detail-step {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  transition: box-shadow var(--duration-base) var(--ease-out-quart);
}

.tut-detail-step:hover {
  box-shadow: var(--shadow-md);
}

.tut-detail-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.tut-detail-step-content h4 {
  margin-bottom: var(--space-xs);
}

.tut-detail-step-content p {
  font-size: var(--text-base);
  line-height: 1.7;
}

.tut-detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border-light);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.tut-detail-related {
  padding: var(--space-xl) 0;
}

.tut-detail-related h3 {
  margin-bottom: var(--space-md);
}

.tut-detail-related-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.guide-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 2px dashed var(--color-border);
  transition: all var(--duration-base) var(--ease-out-quart);
}

.guide-card:hover {
  border-color: var(--color-primary);
  border-style: solid;
  box-shadow: var(--shadow-md);
}

.guide-steps {
  list-style: none;
  counter-reset: guide;
}

.guide-steps li {
  counter-increment: guide;
  position: relative;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.guide-steps li::before {
  content: counter(guide);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary-subtle);
  color: var(--color-primary-text);
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.print-btn {
  width: 100%;
  margin-top: var(--space-md);
}


/* -------------------------------------------
   Footer
   ------------------------------------------- */
.site-footer {
  margin-top: auto;
  padding: var(--space-2xl) var(--space-lg);
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.8);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl);
  max-width: var(--container-max);
  margin: 0 auto;
}

.footer-brand h3 {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links h4 {
  color: #fff;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: var(--space-xs);
}

.site-footer a {
  /* The footer sits on --color-primary-dark in both palettes; without this a new footer link
     inherits the global blue and measures 1.55:1 (measured by axe in CI, reproduced by the
     static resolver). Specificity ties .footer-links a, so the rules below still win. */
  color: rgba(255, 255, 255, 0.7);
}

.site-footer a:hover {
  color: var(--color-accent-light);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: var(--color-accent-light);
}

.footer-report {
  margin-top: var(--space-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  text-align: center;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--text-sm);
  margin-bottom: 0;
}


/* -------------------------------------------
   Status Badge
   ------------------------------------------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
}

.status-badge::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-online {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.status-online::before {
  background: var(--color-success);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-offline {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}

.status-offline::before {
  background: var(--color-text-muted);
}


/* -------------------------------------------
   Toast
   ------------------------------------------- */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--color-success);
  z-index: 9999;
  transform: translateY(120%);
  opacity: 0;
  transition: all var(--duration-base) var(--ease-out-quart);
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-error {
  border-left-color: var(--color-danger);
}


/* -------------------------------------------
   Back to Top Button
   ------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  border: none;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  pointer-events: none;
  z-index: 900;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out-quart);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
}


/* -------------------------------------------
   Animations
   ------------------------------------------- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Progressive enhancement: hidden states only apply when JS is available
   (html.js set by inline head script). Without JS content stays visible. */
html.js .animate-in {
  transition: opacity var(--duration-glacial) var(--ease-out-expo),
              transform var(--duration-glacial) var(--ease-out-expo);
}

html.js .animate-in:not(.visible) {
  opacity: 0;
  transform: translateY(24px);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

html.js .stagger-children > * {
  transition: opacity var(--duration-glacial) var(--ease-out-expo),
              transform var(--duration-glacial) var(--ease-out-expo);
}

html.js .stagger-children:not(.visible) > * {
  opacity: 0;
  transform: translateY(24px);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 500ms; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}



/* Full-text search results (Pagefind). Sized for the site's audience: the panel is a
   destination, not a decoration, so it uses body size and a visible focus ring. */
/* "Last updated" stamp on generated tutorial pages. Only secondary-on-base colours, both already
   audited, so the static contrast resolver keeps covering it without a new pairing. */
.page-meta {
  margin: var(--space-md) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.fulltext-results {
  margin: 0 0 var(--space-lg);
  padding: var(--space-lg);
  border-left: 4px solid var(--color-primary);
}

.fulltext-title {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-sm);
}

.fulltext-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-sm);
}

.fulltext-list a {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-primary-text);
  text-decoration: underline;
}

/* ============================================================
   Responsive — Tablet (<1024px)
   ============================================================ */
@media (max-width: 1023px) {
  :root {
    --nav-height: 4rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}


/* ============================================================
   Responsive — Mobile (<768px)
   ============================================================ */
@media (max-width: 767px) {
  :root {
    --nav-height: 3.9rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-lg);
    transform: translateX(100%);
    transition: transform var(--duration-base) var(--ease-out-quart);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    padding: var(--space-md);
    text-align: center;
    border-radius: var(--radius-md);
    width: 100%;
  }

  .nav-links .lang-toggle {
    margin-top: var(--space-md);
    align-self: center;
  }

  .hero {
    padding: var(--space-2xl) var(--space-lg);
  }

  .section {
    padding: var(--space-xl) var(--space-lg);
  }

  .page-header {
    padding: var(--space-xl) var(--space-lg) var(--space-md);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-grid {
    grid-template-columns: 1fr;
  }

  .guide-list {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .call-button {
    width: 160px;
    height: 160px;
  }

  .connection-steps {
    grid-template-columns: 1fr;
  }

  .fraud-summary {
    padding: var(--space-md);
  }

  .toast {
    bottom: var(--space-md);
    right: var(--space-md);
    left: var(--space-md);
  }

  .back-to-top {
    bottom: var(--space-md);
    right: var(--space-md);
  }
}


/* ============================================================
   Responsive — Small Mobile (<480px)
   ============================================================ */
@media (max-width: 479px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .tutorial-filter {
    gap: var(--space-xs);
  }

  .filter-tag {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
  }
}


/* ============================================================
   Print Styles
   ============================================================ */
@media print {
  .site-header,
  .site-footer,
  .back-to-top,
  .toast,
  .nav-toggle,
  .breadcrumb,
  .btn,
  .tutorial-filter,
  .nav-links {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 14pt;
  }

  .card,
  .guide-card,
  .fraud-item {
    break-inside: avoid;
    border: 1px solid #ccc;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}


/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================================
   High Contrast (Forced Colors)
   ============================================================ */
@media (forced-colors: active) {
  /* box-shadow focus rings are discarded in forced-colors mode; only the
     system outline survives. */
  :focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }

  .btn {
    border: 2px solid ButtonText;
  }

  .card,
  .fraud-item,
  .guide-card {
    border: 2px solid ButtonText;
  }
}

/* -------------------------------------------
   Suspicious Link Self-Check (D2)
   ------------------------------------------- */
.link-check {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-2xl) auto;
  max-width: var(--container-narrow);
  box-shadow: var(--shadow-sm);
}

.link-check h2 {
  font-size: var(--text-xl);
  color: var(--color-primary-text);
  margin-bottom: var(--space-sm);
}

.link-check-desc {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  margin-bottom: var(--space-lg);
}

.link-check-form {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.link-check-input {
  flex: 1 1 260px;
  min-height: 48px;
  font-size: var(--text-lg);
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
}

.link-check-input:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--color-accent);
}

.link-check-result {
  margin-top: var(--space-md);
  font-size: var(--text-lg);
  font-weight: 700;
}

.link-check-result:empty {
  display: none;
}

.link-check-result.is-bad {
  color: var(--color-danger-text);
  background: var(--color-danger-bg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border-left: 6px solid var(--color-danger);
}

.link-check-result.is-ok {
  color: var(--color-success-text);
  background: var(--color-success-bg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border-left: 6px solid var(--color-success);
}

.link-check-result.is-unknown {
  color: var(--color-warning-text);
  background: var(--color-warning-bg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border-left: 6px solid var(--color-warning);
}

.link-check-note {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* -------------------------------------------
   Tutorial illustrations (D6)
   ------------------------------------------- */
.tut-illustration {
  margin: var(--space-xl) auto;
  max-width: 720px;
  text-align: center;
}

.tut-illustration img {
  width: 100%;
  height: auto;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.tut-illustration figcaption {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* -------------------------------------------
   Dark Mode (token overrides only; light values untouched)
   Contrast (text/surface): #ECEAF2 on #2A3040 11.9:1 · #C6CBD6 8.1:1
   #A5AABC 5.5:1 · #9DC1F0 6.9:1 · #F5B880 8.9:1 · #1A1A2E on #E8833A 6.3:1
   ------------------------------------------- */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --color-primary-text: #9DC1F0;
    --color-primary-text-deep: #B5CDF2;
    --color-primary-subtle: #253147;
    --color-accent-text: #F5B880;
    --color-accent-subtle: #3A2F22;
    --color-bg: #1E222C;
    --color-bg-alt: #262B37;
    --color-surface: #2A3040;
    --color-surface-hover: #313849;
    --color-text: #ECEAF2;
    --color-text-secondary: #C6CBD6;
    --color-text-muted: #A5AABC;
    --color-border: #3E4557;
    --color-border-light: #343B4C;
    --color-success: #5FBF82;
    --color-success-bg: #21382A;
    --color-warning: #E0A34A;
    --color-warning-bg: #3A2F1C;
    --color-danger: #E07B6E;
    --color-danger-bg: #3C2320;
    /* Dark palette already passed these pairs, so the text tokens keep those exact values
       rather than inheriting the light darkening — this block documents the split. */
    --color-success-text: #5FBF82;
    --color-warning-text: #E0A34A;
    --color-danger-text: #E07B6E;
    --color-shadow: rgba(0, 0, 0, 0.4);
    --color-shadow-strong: rgba(0, 0, 0, 0.55);
    --color-watermark: #8FA9CC;
  }

  /* Accent surfaces need no re-pinning here: they read --color-on-accent, which does
     not flip with the theme. Re-pinning per selector is what let the emergency call
     button ship at 2.28:1. */
  /* Sticky header is translucent white paper in light mode; in dark mode it
     has to become dark paper or the brightened nav text lands on white. */
  .site-header {
    background: rgba(30, 34, 44, 0.92);
    border-bottom-color: var(--color-border);
  }

  .nav-a11y {
    border-color: var(--color-border);
  }

  .a11y-btn {
    background: var(--color-surface);
    border-color: var(--color-border);
  }

  /* Recolor hardcoded inline-SVG colors via presentation-attribute selectors */
  [fill="#2B5797"] { fill: #9DC1F0; }
  [stroke="#2B5797"] { stroke: #9DC1F0; }
  [fill="#E8EFF8"] { fill: #253147; }
  [fill="#FFF3E8"] { fill: #3A2F22; }
  [fill="#EDF7F1"] { fill: #21382A; }
  [fill="#2D8B4E"] { fill: #5FBF82; }
  [fill="#D4820A"] { fill: #E0A34A; }
  [fill="#C0392B"] { fill: #E07B6E; }
  /* stroke variants of the same palette were never mapped at all */
  [stroke="#E8833A"] { stroke: #F5B880; }
  [stroke="#D4820A"] { stroke: #E0A34A; }
  [stroke="#2D8B4E"] { stroke: #5FBF82; }
  [stroke="#C0392B"] { stroke: #E07B6E; }
  /* low-opacity white line-art sits on brand-coloured fills; recolor to the
     dark text token so it stays legible when those fills brighten */
  [stroke="#fff"] { stroke: #1A1A2E; }
}


/* ============================================================
   Reading aids (工信部《互联网网站适老化通用设计规范》放大设置要求)
   Root-font scaling: every type/space token is rem-based, so one
   declaration grows text and layout together instead of clipping.
   ============================================================ */
html {
  font-size: 100%;
}

html[data-fontscale="lg"] {
  font-size: 118.75%;
}

html[data-fontscale="xl"] {
  font-size: 137.5%;
}

.nav-a11y {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-left: auto;
  padding-left: var(--space-md);
  border-left: 1px solid var(--color-border-light);
}

.nav-container .nav-links {
  margin-left: var(--space-md);
}

.a11y-btn {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary-text-deep);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.a11y-btn[aria-pressed="true"] {
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.read-btn[aria-pressed="true"]::before {
  content: "\25B6 ";
}

/* ---- Family contact setup (call-help) ---- */
.family-setup {
  max-width: var(--container-narrow);
  margin: var(--space-2xl) auto 0;
  padding: 0 var(--space-lg);
}

.family-form .form-group {
  margin-bottom: var(--space-md);
}

.family-state {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.filter-status {
  min-height: 1.5em;
  font-size: var(--text-sm);
  color: var(--color-accent-text);
}

.link-check-scope {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.call-status.is-warn h2 {
  color: var(--color-danger);
}

/* ---- 404 ---- */
.error-page {
  text-align: center;
}

.error-code {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-watermark);
}

.error-emergency {
  margin-top: var(--space-2xl);
  font-size: var(--text-sm);
  color: var(--color-accent-text);
}

@media screen and (max-width: 767px) {
  /* Reading aids stay reachable on phones — that is where this audience reads.
     The nav row wraps and the a11y bar becomes a full-width second row. */
  .nav-container {
    flex-wrap: wrap;
    row-gap: var(--space-sm);
  }

  .nav-a11y {
    order: 4;
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    justify-content: center;
  }
}

/* ---- Tutorial search ---- */
.tutorial-search {
  max-width: var(--container-narrow);
  margin: 0 auto var(--space-lg);
  padding: 0 var(--space-lg);
}

.tutorial-search-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.tutorial-search-input {
  width: 100%;
  min-height: 48px;
  font-size: var(--text-base);
}

/* Keep scroll-revealed and collapsed content visible on paper. */
@media print {
  .fraud-detail {
    max-height: none !important;
    overflow: visible !important;
  }

  .animate-in {
    opacity: 1 !important;
    transform: none !important;
  }

  .nav-a11y,
  .back-to-top,
  .print-btn {
    display: none !important;
  }
}
