/* ============================================================
   航空护士学校 (www.xhhx.com.cn) — Aerospace Medical Design System
   Zero external CDN dependencies | 375px mobile-first safe
   ============================================================ */

:root {
  --navy-950: #071a33;
  --navy-900: #0b2545;
  --navy-800: #134074;
  --navy-700: #1d4e89;
  --sky-600: #0284c7;
  --sky-500: #0ea5e9;
  --sky-100: #e0f2fe;
  --sky-50: #f0f9ff;
  --amber-600: #d95d0a;
  --amber-500: #ea6a12;
  --amber-100: #ffedd5;
  --emerald-600: #059669;
  --emerald-100: #d1fae5;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 10px 30px rgba(11, 37, 69, 0.09);
  --shadow-lg: 0 20px 48px rgba(7, 26, 51, 0.16);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--slate-900);
  background: var(--slate-50);
  overflow-x: clip;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy-700);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

a:hover {
  color: var(--amber-500);
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.3;
  color: var(--navy-900);
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: var(--white);
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header & Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: 0 2px 12px rgba(11, 37, 69, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.brand-meta {
  display: none;
  flex-direction: column;
  line-height: 1.2;
}

.brand-meta strong {
  font-size: 15px;
  color: var(--navy-900);
}

.brand-meta small {
  font-size: 11px;
  color: var(--slate-500);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding: 8px 13px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--slate-700);
  border-radius: 9px;
  white-space: nowrap;
}

.nav-list a:hover {
  color: var(--navy-900);
  background: var(--sky-50);
}

.nav-list a.is-active {
  color: var(--white);
  background: var(--navy-900);
}

/* ---------- Announcement Banner ---------- */
.announce-bar {
  background: linear-gradient(90deg, var(--navy-950) 0%, var(--navy-800) 60%, #0d4b7c 100%);
  color: var(--white);
  border-bottom: 2px solid var(--amber-500);
}

.announce-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.announce-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--amber-500);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.announce-text {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: #f8fafc;
  flex: 1;
  min-width: 160px;
}

.announce-cta {
  color: #7dd3fc;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.announce-cta:hover {
  color: #fdba74;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}

.btn-primary {
  background: var(--amber-500);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(234, 106, 18, 0.28);
}
.btn-primary:hover {
  background: var(--amber-600);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-navy {
  background: var(--navy-900);
  color: var(--white);
}
.btn-navy:hover {
  background: var(--navy-800);
  color: var(--white);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--navy-900);
  border-color: var(--slate-300);
}
.btn-outline:hover {
  border-color: var(--navy-700);
  color: var(--navy-700);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-navy { background: #e2e8f0; color: var(--navy-900); }
.badge-sky { background: var(--sky-100); color: #0369a1; }
.badge-amber { background: var(--amber-100); color: #9a3412; }
.badge-emerald { background: var(--emerald-100); color: #065f46; }

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 48%, #103b66 100%);
  color: var(--white);
  padding: 56px 0 64px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 38px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.22;
  margin-bottom: 16px;
}

.hero h1 span {
  color: #38bdf8;
}

.hero-lead {
  color: #cbd5e1;
  font-size: 16.5px;
  line-height: 1.75;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.stat-item strong {
  display: block;
  font-size: 22px;
  color: var(--white);
  font-family: var(--font-mono);
}

.stat-item span {
  font-size: 12.5px;
  color: #94a3b8;
}

.hero-visual {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* ---------- Page Banner (Subpages) ---------- */
.page-banner {
  background: linear-gradient(125deg, var(--navy-950) 0%, var(--navy-800) 100%);
  color: var(--white);
  padding: 42px 0;
}

.page-banner h1 {
  color: var(--white);
  font-size: clamp(24px, 3.2vw, 36px);
  margin-bottom: 10px;
}

.page-banner p {
  color: #cbd5e1;
  max-width: 760px;
  margin: 0;
  font-size: 15.5px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 12px;
}

.breadcrumb a {
  color: #7dd3fc;
}

/* ---------- Sections & Cards ---------- */
.section {
  padding: 56px 0;
}

.section-white {
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-kicker {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-600);
  margin-bottom: 6px;
}

.section-head h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  margin: 0;
}

.section-sub {
  color: var(--slate-600);
  max-width: 680px;
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 15px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 14px;
}
.icon-sky { background: var(--sky-100); color: var(--sky-600); }
.icon-amber { background: var(--amber-100); color: var(--amber-600); }
.icon-navy { background: #dbeafe; color: var(--navy-800); }
.icon-emerald { background: var(--emerald-100); color: var(--emerald-600); }

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.card p {
  font-size: 14.5px;
  color: var(--slate-600);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 14.5px;
  color: var(--slate-700);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--emerald-600);
  font-weight: 800;
}

/* ---------- Article Cards ---------- */
.article-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-thumb {
  display: block;
  aspect-ratio: 600 / 340;
  overflow: hidden;
  background: var(--navy-900);
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--slate-500);
  margin-bottom: 10px;
}

.article-card h3 {
  font-size: 17px;
  line-height: 1.42;
  margin-bottom: 10px;
}

.article-card h3 a {
  color: var(--navy-900);
}

.article-card h3 a:hover {
  color: var(--sky-600);
}

.article-excerpt {
  font-size: 14px;
  color: var(--slate-600);
  margin-bottom: 16px;
  flex: 1;
}

.article-readmore {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sky-600);
}

/* ---------- Interactive Tool Panels ---------- */
.tool-panel {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate-700);
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 9px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--slate-900);
  background: var(--white);
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--sky-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.result-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 20px;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.metric-tile {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 12px 14px;
}

.metric-tile span {
  display: block;
  font-size: 12px;
  color: var(--slate-500);
}

.metric-tile strong {
  font-size: 20px;
  font-family: var(--font-mono);
  color: var(--navy-900);
}

.alert-box {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.65;
  border-left: 4px solid var(--sky-600);
  background: var(--sky-50);
  color: var(--navy-900);
}

.alert-warn {
  border-left-color: var(--amber-500);
  background: #fff7ed;
  color: #7c2d12;
}

.alert-ok {
  border-left-color: var(--emerald-600);
  background: #ecfdf5;
  color: #064e3b;
}

/* ---------- Tables ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--white);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 580px;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
}

.data-table th {
  background: var(--navy-900);
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--sky-50);
}

/* ---------- Article Detail ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  align-items: start;
}

.article-main {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 34px 36px;
  box-shadow: var(--shadow-sm);
}

.article-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--slate-500);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--slate-200);
}

.article-summary-box {
  background: var(--sky-50);
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 15px;
  color: var(--navy-900);
}

.prose h2 {
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--amber-500);
  scroll-margin-top: 96px;
}

.prose h3 {
  font-size: 18px;
  margin-top: 22px;
  margin-bottom: 10px;
}

.prose p {
  margin-bottom: 16px;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.85;
}

.prose ul, .prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--slate-700);
}

.prose li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.prose blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--slate-50);
  border-left: 4px solid var(--navy-700);
  border-radius: 0 10px 10px 0;
  color: var(--slate-700);
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--slate-200);
}

.toc-list, .side-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li, .side-links li {
  margin-bottom: 9px;
  font-size: 14px;
  line-height: 1.45;
}

.article-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--slate-200);
}

.pager-link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: var(--slate-50);
}

.pager-link span {
  display: block;
  font-size: 12px;
  color: var(--slate-500);
  margin-bottom: 4px;
}

.pager-link strong {
  font-size: 14.5px;
  color: var(--navy-900);
}

/* ---------- Filters, Search & Pagination ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--slate-700);
  font-size: 13.5px;
  font-weight: 600;
}

.cat-pill.is-active,
.cat-pill:hover {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.search-form {
  display: flex;
  gap: 8px;
  max-width: 100%;
}

.search-form input {
  width: 240px;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--slate-300);
  font-size: 14px;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--slate-700);
  font-size: 14px;
  font-weight: 600;
}

.page-btn.is-active {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

/* ---------- FAQ Details ---------- */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 16px 20px;
}

.faq-item summary {
  font-weight: 700;
  color: var(--navy-900);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--sky-600);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin-top: 12px;
  margin-bottom: 0;
  color: var(--slate-600);
  font-size: 14.5px;
}

/* ---------- Checklist Planner ---------- */
.cert-list {
  display: grid;
  gap: 10px;
}

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: var(--slate-50);
  cursor: pointer;
}

.cert-item input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: #cbd5e1;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr;
  gap: 30px;
  padding-top: 48px;
  padding-bottom: 38px;
}

.footer-logo-wrap {
  display: inline-block;
  background: var(--white);
  padding: 8px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.75;
  color: #94a3b8;
}

.footer-col h3 {
  color: var(--white);
  font-size: 15.5px;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 9px;
  font-size: 14px;
}

.footer-col a {
  color: #94a3b8;
}

.footer-col a:hover {
  color: #38bdf8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0;
  font-size: 13px;
  color: #94a3b8;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
}

.footer-links a {
  color: #94a3b8;
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1040px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 76px;
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-md);
    padding: 14px 20px 20px;
  }
  .primary-nav.is-open { display: block; }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nav-list a {
    display: block;
    padding: 10px 14px;
  }
  .tool-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 15px; }
  .header-inner { min-height: 66px; }
  .primary-nav { top: 66px; }
  .brand-logo { height: 42px; }
  .hero { padding: 34px 0 42px; }
  .section { padding: 38px 0; }
  .grid-4, .grid-3, .grid-2, .form-grid, .article-pager, .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .stat-item strong { font-size: 18px; }
  .stat-item span { font-size: 11px; }
  .article-main { padding: 22px 18px; }
  .tool-panel { padding: 18px 16px; }
  .search-form { width: 100%; }
  .search-form input { flex: 1; width: auto; min-width: 0; }
}
