/* ==========================================================================
   Modu LLKR / selfliv.com - Editorial & Information Portal Design System
   Architecture: Unified CSS Tokens + Modular Layout + Modern Card Components
   Theme: B Layout (Search Workspace + Editorial Magazine Portal)
   ========================================================================== */

:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  font-synthesis: none;

  /* Color System */
  --page: #FFF9F4;
  --surface: #FFFEFB;
  --sage: #E8F2E8;
  --peach: #FCE6DB;
  --cream: #FFF4D9;
  --ink: #28333B;
  --muted: #586660;
  --warm: #8C503D;
  --green: #2B635B;
  --green-hover: #204B45;
  --line: #D9DFD5;
  --line-light: #E7E2D8;
  --soft: #F0F5EC;

  /* Elevation & Geometry */
  --radius: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --shadow-sm: 0 2px 8px rgba(40, 51, 59, 0.04);
  --shadow-card: 0 4px 16px rgba(40, 51, 59, 0.06);
  --shadow-panel: 0 12px 35px rgba(40, 51, 59, 0.08);
  --focus-outline: #aa6a0c;

  color: var(--ink);
  background: var(--page);
}

/* Base Resets & Accessibility */
* { box-sizing: border-box; }
body { margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--green); text-underline-offset: 4px; transition: color 0.15s ease; }
a:hover { color: var(--green-hover); }
button, input, select { font: inherit; min-height: 44px; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.5; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus-outline);
  outline-offset: 4px;
}

/* Typography */
h1, h2 { color: var(--green); line-height: 1.35; overflow-wrap: break-word; }
h3 { color: var(--ink); font-size: 1.15rem; line-height: 1.5; }
h1 { font-size: clamp(2rem, 3.4vw, 2.9rem); letter-spacing: -0.055em; margin: 0 0 20px; font-weight: 780; }
h2 { font-size: 1.5rem; letter-spacing: -0.035em; }
p { margin: 0 0 18px; line-height: 1.85; }
.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 32px; }
.skip { position: absolute; left: 16px; top: -100px; padding: 10px 16px; background: #fff; z-index: 100; }
.skip:focus { top: 10px; }
main { min-height: 60vh; }
.eyebrow, .panel-label { font-size: 0.78rem; font-weight: 750; letter-spacing: 0.06em; }
.eyebrow { color: var(--warm); margin: 0 0 16px; }

/* Buttons & Navigation Pills */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  background: var(--green);
  border: 1px solid var(--green);
  color: #fff;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button:hover { background: var(--green-hover); border-color: var(--green-hover); color: #fff; }
.button-outline { background: transparent; color: var(--green); }
.button-outline:hover { background: var(--sage); color: var(--green); }

/* Header & Main Nav */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line-light); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 850;
  letter-spacing: -0.06em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-icon { display: block; flex: none; width: 34px; height: 34px; border-radius: 9px; }
.nav-list { list-style: none; display: flex; gap: 12px; align-items: center; padding: 0; margin: 0; }
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 6px 12px;
  color: #294750;
  font-size: 0.98rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-list a:hover { color: var(--green); background: var(--sage); }
.nav-list a[aria-current=page] { color: var(--green); box-shadow: inset 0 -3px var(--green); }
.menu-toggle { display: none; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 14px; min-height: 44px; color: var(--ink); }

/* Editorial Hero & Workspace (B Layout) */
.b-hero { background: var(--page); border-bottom: 1px solid var(--line-light); padding-block: 46px; }
.b-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.b-hero-copy h1 {
  font-size: clamp(2.2rem, 3.4vw, 3.2rem);
  max-width: 15ch;
  line-height: 1.28;
  letter-spacing: -0.055em;
  margin-block: 18px 24px;
}
.b-hero-copy h1 span { display: block; color: var(--warm); font-size: 0.77em; margin-top: 12px; font-weight: 650; }
.b-hero-copy>p:not(.eyebrow) { max-width: 44ch; font-size: 1.02rem; line-height: 1.95; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-cta a { gap: 16px; padding-inline: 23px; }
.research-hero { padding-block: clamp(2.5rem, 8vw, 6rem); }
.portal-hero:has(.research-hero) { background: var(--sage); border-bottom: 1px solid var(--line); }
.research-hero h1 { max-width: 19ch; font-size: clamp(2rem, 5.4vw, 3.7rem); line-height: 1.18; }
.research-hero > p:not(.eyebrow) { max-width: 53ch; font-size: clamp(1rem, 2.4vw, 1.22rem); }

/* Discovery Panel in Hero */
.discovery-panel {
  border: 1px solid #D0DCCD;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.discovery-course { padding: 27px 30px 18px; background: var(--sage); }
.panel-label { color: var(--warm); margin-bottom: 8px; }
.discovery-course h2 { font-size: 1.45rem; margin: 0 0 20px; letter-spacing: -0.04em; }
.discovery-fields { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }
.discovery-fields input { font-size: 0.95rem; }
.discovery-course .search-actions { gap: 9px; margin-top: 16px; }
.discovery-course .search-actions button { font-size: 0.9rem; padding: 8px 15px; }
.discovery-course .search-actions>a { font-size: 0.83rem; min-height: 44px; display: inline-flex; align-items: center; margin-left: auto; }
.hero-results { padding: 0; max-height: 360px; overflow: auto; scrollbar-gutter: stable; }
.hero-results .result-status { font-size: 0.8rem; padding: 12px 0 0; min-height: 0; margin: 0; line-height: 1.7; }
.hero-results .result-list { grid-template-columns: 1fr; margin-top: 12px; }
.hero-results .result-list:empty { margin: 0; }
.hero-results .result-card { padding: 18px; border-radius: var(--radius-md); }
.hero-results .result-card h2,
.hero-results .result-card h3 { font-size: 1.05rem; }
.hero-results .pager { gap: 8px; }

.discovery-instructor {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 23px 30px;
  color: var(--green);
  text-decoration: none;
  background: var(--cream);
  border-top: 1px solid var(--line);
  transition: background 0.15s ease;
}
.discovery-instructor>span:nth-child(2) { flex: 1; min-width: 0; }
.discovery-instructor small, .discovery-instructor strong, .discovery-instructor span span { display: block; }
.discovery-instructor small { color: var(--warm); font-size: 0.76rem; font-weight: 700; }
.discovery-instructor strong { font-size: 1.13rem; margin-block: 3px; color: var(--ink); }
.discovery-instructor span span { color: var(--muted); font-size: 0.82rem; }
.discovery-instructor:hover { background: var(--peach); }
.editorial-icon { flex: none; color: var(--green); }

/* Home Jump & Portal Sections */
.home-jump { display: flex; flex-wrap: wrap; gap: 8px 14px; padding-block: 18px; border-bottom: 1px solid var(--line-light); }
.home-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 18px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.home-jump a:hover { background: var(--sage); border-color: #B5C9BD; }

.portal-section { padding-block: 46px; border-bottom: 1px solid var(--line-light); scroll-margin-top: 20px; }
.portal-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.portal-section-heading h2 { margin: 0; font-size: 1.6rem; }
.portal-section-heading>a { font-size: 0.88rem; white-space: nowrap; }
.portal-section-heading .eyebrow { margin-bottom: 6px; color: var(--warm); }
.portal-section>p { max-width: 90ch; }

/* Audience Guide Columns */
.audience-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.audience-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.audience-card-top .section-number { margin: 0; background: transparent; font-size: 0.8rem; color: var(--warm); font-weight: 800; }
.audience-guide { border: 0; border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow-sm); }
.audience-guide.audience-0 { background: var(--peach); }
.audience-guide.audience-1 { background: var(--sage); }
.audience-guide.audience-2 { background: var(--cream); }
.audience-guide h3 { font-size: 1.2rem; line-height: 1.6; margin: 0 0 12px; }
.audience-guide p:not(.section-number) { font-size: 0.9rem; color: var(--muted); }
.audience-guide ul { list-style: none; padding: 0; margin: 0; }
.audience-guide li { border-top: 1px solid rgba(40, 51, 59, 0.1); padding: 9px 0; font-size: 0.86rem; line-height: 1.9; }
.audience-guide li a { font-size: 0.96rem; font-weight: 700; display: inline-block; min-height: 38px; padding-block: 5px; }

/* Editorial Grid */
.portal-section-1 { display: grid; grid-template-columns: 1fr 2fr; column-gap: 38px; }
.portal-section-1>.portal-section-heading { grid-column: 1; grid-row: 1; }
.portal-section-1>p { grid-column: 1; font-size: 0.95rem; color: var(--muted); }
.portal-section-1 .decision-grid { grid-column: 2; grid-row: 1 / span 3; grid-template-columns: 1fr 1fr; gap: 22px; }

.decision-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.decision-grid>div { border-top: 2px solid #D4DDD1; padding: 18px 0 0; }
.decision-grid h3 { font-size: 1.08rem; color: var(--green); margin: 0 0 10px; }
.decision-grid p { font-size: 0.94rem; margin: 0; color: var(--muted); }

.record-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.record-columns>div { border-top: 1px solid #BECEC1; padding: 22px 0; }
.record-columns>div:nth-child(2) { border-top-color: #D2B5A3; }
.record-columns h3 { margin: 0 0 10px; color: var(--warm); }

.portal-section-3>ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  list-style: none;
  counter-reset: steps;
  padding: 0;
  max-width: none;
  margin: 0;
}
.portal-section-3>ol li {
  counter-increment: steps;
  padding: 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 0.93rem;
}
.portal-section-3>ol li:before {
  content: '0' counter(steps);
  display: block;
  font-size: 2rem;
  color: var(--warm);
  line-height: 1.3;
  margin-bottom: 13px;
  font-weight: 600;
}

.portal-section-4 { display: block; }
.portal-section-4>p { max-width: 100%; font-size: 0.95rem; color: var(--muted); }

.portal-section-5 { display: grid; grid-template-columns: 1fr 2fr; gap: 0 38px; }
.portal-section-5>.portal-section-heading { grid-column: 1; }
.portal-section-5>.home-questions { grid-column: 2; grid-row: 1 / span 2; }
.portal-section-5>p { grid-column: 1; font-size: 0.95rem; color: var(--muted); }

.home-questions details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
.home-questions summary { padding: 18px 22px; font-weight: 650; cursor: pointer; min-height: 48px; }
.home-questions details>div { padding: 0 22px 14px; max-width: 90ch; }
.portal-section-6 { border-bottom: 0; padding-bottom: 48px; }

/* Article & Guide Presentation */
.article { padding-block: 44px 64px; }
.article h1 { font-size: clamp(1.85rem, 3.5vw, 2.45rem); margin-bottom: 24px; max-width: 800px; line-height: 1.45; }
.article h2 { margin: 42px 0 15px; border-left: 4px solid #AFC7B1; padding-left: 14px; }
.article h3 { margin: 24px 0 10px; color: var(--warm); }
.article p { line-height: 1.95; }
.article ul, .article ol { padding-left: 24px; margin: 0 0 20px; }
.article > p:not(.privacy-warning):not(.eyebrow):not(.guide-return),
.article > ul:not(.guide-index):not(.site-directory),
.article > ol,
.article > section > p,
.article > section > blockquote,
.article > section > ul:not(.guide-index):not(.site-directory),
.article > section > ol {
  max-width: 800px;
}
.article li { margin-block: 9px; }
.article li>a { display: inline-block; min-height: 40px; padding-block: 4px; }
.article strong { color: var(--ink); }
.article code { font-size: 0.9em; background: var(--cream); color: var(--ink); padding: 2px 5px; border-radius: 4px; }

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  margin-block: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.table-wrap:before {
  content: "표는 좌우로 이동해 전체 내용을 볼 수 있습니다.";
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 9px 14px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.table-wrap.no-scroll-hint:before,
.search-guide-section .table-wrap:before {
  display: none;
}
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.94rem; background: var(--surface); }
.notice-table table { min-width: 0; }
.notice-table caption { padding: 10px 12px; text-align: left; background: var(--surface); }
.table-wrap td, .table-wrap th { border: 1px solid var(--line); padding: 12px 14px; vertical-align: top; text-align: left; }
.table-wrap th { background: var(--sage); color: var(--ink); font-weight: 700; }
.table-wrap tr:nth-child(odd) td { background: #FCFAF2; }

.breadcrumbs { padding-block: 23px 0; font-size: 0.82rem; color: var(--muted); overflow-x: auto; }
.breadcrumbs ol { display: flex; flex-wrap: nowrap; list-style: none; padding: 0; margin: 0; gap: 3px 10px; white-space: nowrap; }
.breadcrumbs li { display: flex; align-items: center; white-space: nowrap; }
.breadcrumbs li+li:before { content: "/"; color: #7a8e85; margin-right: 10px; }
.breadcrumbs a { display: flex; align-items: center; min-height: 44px; }

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 16px 20px;
  margin: -4px 0 26px;
  background: var(--sage);
  border: 1px solid #D5E1D2;
  border-radius: var(--radius-md);
  font-size: 0.83rem;
  color: var(--muted);
}
.guide-index { list-style: none !important; padding: 0 !important; }
.guide-index li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 14px !important;
  background: var(--surface);
}
.guide-index li:nth-child(3n+2) { background: var(--sage); }
.guide-index li:nth-child(3n) { background: var(--cream); }
.guide-index h3 { margin: 0 0 8px; font-size: 1.15rem; }
.guide-index h3 a { display: inline-block; min-height: 44px; padding-block: 6px; }
.guide-index p { margin: 0; color: var(--muted); }
.guide-return { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 32px; }

/* Guide Contextual CTA Card */
.guide-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-block: 36px 20px;
  padding: 24px 28px;
  background: var(--sage);
  border: 1px solid #D0DCCD;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.guide-cta-card .cta-content strong {
  display: block;
  font-size: 1.12rem;
  color: var(--green);
  margin-bottom: 6px;
}
.guide-cta-card .cta-content p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}
.guide-cta-card .button {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Search Page & Modernized Card UI */
.search-heading { padding-block: 36px 22px; max-width: 800px; }
.search-heading .eyebrow { display: inline-block; background: var(--sage); border-radius: var(--radius-pill); padding: 4px 13px; }
.search-heading h1 { font-size: clamp(1.85rem, 3vw, 2.35rem); }
.search-heading p { color: var(--muted); }

.search-panel {
  background: var(--sage);
  border: 1px solid #D2DDCF;
  border-radius: var(--radius);
  padding: 28px;
}
.search-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; }
.field { min-width: 0; }
.field label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 7px; }
.field input, .field select {
  width: 100%;
  border: 1px solid #A8B8AB;
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ink);
  min-height: 48px;
  min-width: 0;
}
.field.field-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.field.field-check input { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--green); }
.field.field-check label { margin-bottom: 0; font-weight: 600; cursor: pointer; }
.search-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.search-actions button[type=reset], .pager button {
  padding: 9px 18px;
  border: 1px solid #acbeb6;
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  min-height: 48px;
}
.search-note { font-size: 0.9rem; color: var(--muted); margin: 20px 0 0; }
.source-scope {
  background: var(--cream);
  border: 1px solid #E7DCBE;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 20px 0;
}
.source-scope h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 1rem;
  color: var(--ink);
}
.source-scope p { margin: 0; }
.source-scope ul { margin: 6px 0 0; padding-left: 20px; }
.source-scope li { margin-block: 4px; line-height: 1.65; }
.source-scope li > a { display: inline; min-height: 0; padding-block: 0; }
.front-source-summary { margin: 0 0 22px; }
.front-source-summary .table-wrap { margin-block: 0; }

.result-region { padding-block: 14px 52px; }
.result-status { padding-block: 14px; color: var(--muted); min-height: 50px; }
.result-status.error { color: #a33c26; font-weight: 600; }
.result-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Result Card Modernization */
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  min-width: 0;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.result-card:hover {
  border-color: #B5C9BD;
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.result-card .source-label {
  font-size: 0.82rem;
  color: var(--green);
  background: var(--sage);
  font-weight: 750;
  padding: 3px 10px;
  border-radius: 6px;
  margin: 0;
}
.badge-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.badge-digital { background: #E8EEF5; color: #2D527C; }
.badge-free { background: #E4F4EC; color: #1E664A; }
.badge-registry { background: #F8EDE6; color: #8C503D; }
.badge-period { background: #EEF3ED; color: #2F5C44; }
.badge-today { background: #FDF3DF; color: #8A5200; }
.badge-ended { background: #F1F2F4; color: #4A5158; }
.badge-unknown { background: #F6EFE6; color: #7C4F20; }
.status-expiry-note { display: inline; font-weight: 600; color: var(--muted); }

.result-card h2,
.result-card h3 {
  font-size: 1.18rem;
  line-height: 1.55;
  margin: 0 0 14px;
  color: var(--ink);
}
.result-card dl {
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  font-size: 0.91rem;
  gap: 8px 12px;
  flex-grow: 1;
}
.result-card dt { color: var(--muted); font-weight: 600; }
.result-card dd { margin: 0; color: var(--ink); }

.card-action-row {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-action-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  background: var(--soft);
  color: var(--green);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.card-action-row a:hover {
  background: var(--sage);
  color: var(--green-hover);
}
.result-card .caution {
  font-size: 0.83rem;
  color: var(--muted);
  margin: 12px 0 0;
  padding: 8px 12px;
  background: #FAF8F3;
  border-left: 3px solid #D6CEBE;
  border-radius: 0 6px 6px 0;
  line-height: 1.6;
}

/* Empty State UX */
.empty-state {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 32px;
  text-align: center;
  margin-block: 16px;
}
.empty-icon { font-size: 2.4rem; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.25rem; margin: 0 0 10px; color: var(--green); }
.empty-state p { color: var(--muted); max-width: 48ch; margin: 0 auto 20px; font-size: 0.95rem; }
.empty-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.suggestion-label { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.tag-pill {
  font-size: 0.86rem;
  font-weight: 650;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--ink);
  min-height: 38px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.tag-pill:hover { background: var(--sage); border-color: var(--green); color: var(--green); }
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
}
.empty-actions .guide-link { font-size: 0.92rem; font-weight: 700; color: var(--green); display: inline-flex; align-items: center; min-height: 44px; }

.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 24px; }
.pager[hidden] { display: none; }

/* Search Pre-search Guides & Previews */
.search-guide-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.search-guide-section > p,
.search-guide-section > ol.guide-steps {
  max-width: 800px;
}
.search-guide-section h2 {
  font-size: 1.32rem;
  color: var(--ink);
  margin: 36px 0 16px;
}
.search-guide-section h2:first-of-type {
  margin-top: 0;
}
.search-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.guide-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.guide-box h3 {
  font-size: 1.08rem;
  color: var(--green);
  margin: 0 0 12px;
}
.guide-box p {
  font-size: 0.93rem;
  color: var(--ink);
  line-height: 1.65;
  margin: 0 0 10px;
}
.guide-tip {
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--sage);
  padding: 10px 14px;
  border-radius: 6px;
  line-height: 1.6;
  margin-top: 12px;
}
.guide-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--ink);
}
.guide-steps li {
  margin-bottom: 8px;
}
.preview-intro {
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.preview-card-wrap {
  max-width: 520px;
  margin-bottom: 32px;
}
.related-guides-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.related-guides-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.94rem;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.related-guides-list li a {
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.related-guides-list li span {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid #D2DFD0;
  background: var(--sage);
  padding-block: 38px 26px;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-row { display: flex; justify-content: space-between; gap: 35px; }
.footer-brand { font-size: 1.2rem; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.footer-copy { max-width: 570px; }
.footer-copy p { margin-bottom: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 22px; align-content: start; max-width: 350px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); }
.footer-bottom { font-size: 0.8rem; margin-top: 20px; border-top: 1px solid #CDD9CA; padding-top: 15px; }

/* Tool & Verification Components (Preserved for full compatibility) */
.privacy-warning {
  border-left: 4px solid #a45138;
  background: #fff4ed;
  color: #563427;
  padding: 14px 16px;
  margin-block: 18px;
  font-weight: 600;
}
.privacy-warning[data-risk="true"] { background: #fff0e8; border-color: #9e3222; color: #73281f; }
.tool-status, .tool-disclosure, .related-tool {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--soft);
  margin-block: 25px;
}
.tool-status { border-left: 4px solid var(--green); }
.tool-status:empty { display: none; }
.tool-status[data-type="error"] {
  border-left-color: #a45138;
  background: #fff4ed;
  color: #563427;
  font-weight: 600;
}
.tool-status[data-type="info"] {
  border-left-color: var(--green);
  background: var(--soft);
  color: var(--ink);
}
.field-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 7px;
}
.field-header label { margin-bottom: 0; }
.field-count {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.tool-disclosure h2, .related-tool h2 { margin-top: 0; }
.tool-article fieldset { border: 1px solid var(--line); padding: 20px; margin: 22px 0; min-width: 0; }
.tool-article legend { font-weight: 700; padding-inline: 7px; }
.tool-article .field { margin-bottom: 20px; }
.tool-article textarea {
  width: 100%;
  font: inherit;
  line-height: 1.8;
  min-height: 100px;
  resize: vertical;
  border: 1px solid #acbeb6;
  border-radius: 5px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
}
.tool-article textarea:focus-visible { outline: 3px solid var(--focus-outline); outline-offset: 3px; }
.review-consent label { display: flex; align-items: flex-start; gap: 12px; padding-block: 10px; cursor: pointer; }
.review-consent input { flex: none; min-height: 24px; width: 22px; height: 22px; margin-top: 3px; accent-color: var(--green); }
.review-consent label span { flex: 1; min-width: 0; line-height: 1.7; }
.review-consent label a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.review-consent label a:hover { color: var(--green-hover); }
.input-count { font-size: 0.9rem; text-align: right; color: var(--muted); }
.review-feedback { border-top: 2px solid var(--line); padding-block: 20px; }
.review-feedback h3 { margin-top: 0; }
.review-feedback h4 { font-size: 1rem; margin: 20px 0 8px; }
.review-feedback blockquote { margin: 0; padding: 13px 18px; border-left: 3px solid #8da99a; background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-caution { font-size: 0.9rem; color: var(--muted); }
.review-feedback p, .review-feedback blockquote { max-width: 800px; }
.tool-article button { border: 1px solid #acbeb6; border-radius: 10px; padding: 9px 15px; }
.tool-article .button { border-color: var(--green); }
[data-turnstile] { margin-top: 20px; min-width: 0; min-height: 65px; }
.tool-article [data-review-result]:empty { display: none; }
.tool-article .tool-profile-title { font-size: 1.8rem; max-width: none; white-space: nowrap; }

/* Directory & Examples */
.site-directory { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
.site-directory li { margin: 0; }
.site-directory a { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); font-weight: 650; }
.sitemap-directory>section { margin-top: 28px; }
.sitemap-directory>section h2 { margin-top: 0; }

.example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.example-card { min-width: 0; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.example-card h3 { margin: 0 0 12px; font-size: 1rem; }
.example-card p { margin: 0 0 12px; font-size: 0.92rem; }
.example-card p:last-child { margin-bottom: 0; }
.example-card strong { color: var(--green); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Responsive System */
@media(max-width: 1000px) {
  .b-hero-grid { gap: 32px; }
  .b-hero-copy h1 { font-size: 2.7rem; }
  .discovery-course { padding: 24px; }
  .discovery-instructor { padding: 21px 24px; }
  .nav-list { gap: 10px; }
  .audience-guide { padding: 22px 19px; }
  .portal-section-1, .portal-section-4, .portal-section-5 { column-gap: 25px; }
}

@media(max-width: 900px) {
  .header-row { min-height: 76px; gap: 0; flex-wrap: wrap; }
  .brand { flex: 1; min-width: 0; padding-right: 12px; font-size: 1.25rem; line-height: 1.2; white-space: normal; }
  .brand-icon { flex-shrink: 0; }
  .site-nav { width: 100%; }
  .nav-list { padding: 10px 0 18px; gap: 6px; flex-direction: column; align-items: stretch; }
  .nav-list a { display: flex; padding: 10px 14px; border-radius: 9px; background: var(--sage); white-space: normal; }
  .js .menu-toggle { display: block; }
  .js .nav-list[data-open=false] { display: none; }
}

@media(max-width: 850px) {
  .wrap { padding-inline: 24px; }
  .footer-row { display: block; }
  .footer-links { margin-top: 20px; max-width: none; }
  .nav-list a { font-size: 0.94rem; }
}

@media(max-width: 700px) {
  .b-hero { padding-block: 30px; }
  .b-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .b-hero-copy h1 { font-size: 2.45rem; max-width: none; }
  .b-hero-copy>p:not(.eyebrow) { font-size: 0.95rem; }
  .hero-cta { margin-top: 22px; }
  .hero-cta a { flex: 1; padding-inline: 14px; gap: 14px; }
  .discovery-course { padding: 24px 20px 18px; }
  .discovery-course h2 { font-size: 1.35rem; }
  .discovery-instructor { padding: 20px; }
  .discovery-fields { grid-template-columns: 1fr 1fr; }
  .discovery-fields .field { margin-bottom: 0; }
  .discovery-fields input { font-size: 1rem; }
  .discovery-course .search-actions { flex-wrap: wrap; }
  .discovery-course .search-actions>a { margin-left: 0; }
  .audience-columns { display: grid; grid-template-columns: 1fr; }
  .audience-guide { padding: 24px; }
  .audience-guide+.audience-guide { margin-top: 0; }
  .portal-section-1, .portal-section-4, .portal-section-5 { display: block; }
  .portal-section-1 .decision-grid { grid-template-columns: 1fr; gap: 22px; }
  .portal-section-1 .decision-grid p { font-size: 0.9rem; }
  .record-columns { grid-template-columns: 1fr; gap: 20px; }
  .portal-section-3>ol { grid-template-columns: 1fr; gap: 5px; }
  .portal-section-3>ol li { padding-top: 18px; }
  .portal-section-3>ol li:before { float: left; margin: 0 17px 8px 0; font-size: 1.8rem; }
  .portal-section-4>.table-wrap { margin-block: 24px; }
  .portal-section-5>.home-questions { margin-top: 22px; }
  .guide-cta-card { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px 22px; }
  .guide-cta-card .button { width: 100%; }
  .search-guide-grid { grid-template-columns: 1fr; }
  .related-guides-list li { flex-direction: column; gap: 4px; }
}

@media(max-width: 650px) {
  .wrap { padding-inline: 20px; }
  .nav-list a { font-size: 1rem; }
  .portal-section { padding-block: 32px; }
  .portal-section-heading { display: block; margin-bottom: 18px; }
  .portal-section-heading h2 { font-size: 1.42rem; }
  .portal-section-heading>a { display: inline-block; min-height: 44px; padding-top: 8px; }
  .article { padding-block: 28px 44px; }
  .article h1 { font-size: 1.85rem; }
  .article h2 { font-size: 1.35rem; padding-left: 12px; }
  .article li>a, .table-wrap a { min-height: 44px; }
  .table-wrap table { font-size: 0.94rem; }
  .breadcrumbs { padding-top: 16px; }
  .breadcrumbs ol { font-size: 0.8rem; }
  .guide-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px 16px; }
  .guide-meta .meta-sep { display: none; }
  .guide-index li { padding: 18px 20px; }
  .search-panel { padding: 22px 18px; }
  .search-heading { padding-top: 24px; padding-block: 20px; }
  .search-grid, .result-list { grid-template-columns: 1fr; }
  .search-panel .search-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
  .search-panel .search-actions .button, .search-panel .search-actions button { width: 100%; min-width: 0; }
  .guide-box { padding: 18px 16px; }
  .related-guides-list li a { min-height: 40px; display: inline-flex; align-items: center; }
  .card-action-row a { width: 100%; justify-content: center; }
  .result-card { padding: 22px; }
  .result-card dl { grid-template-columns: 72px minmax(0, 1fr); }
  .site-footer { padding-top: 28px; }
  .home-questions summary { padding: 16px 18px; }
  .home-questions details>div { padding-inline: 18px; }
  .footer-links { gap: 2px 18px; }
  .tool-article fieldset { padding: 15px 12px; }
  .tool-article .search-actions { align-items: stretch; }
  .tool-article .search-actions button { width: 100%; flex: auto; }
  .tool-disclosure { padding: 17px 14px; }
  .tool-article .tool-profile-title { font-size: 1.7rem; white-space: normal; }
  .site-directory, .example-grid { grid-template-columns: 1fr; }
}

@media(max-width: 640px) {
  .table-wrap.table-cards {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .table-wrap.table-cards:before {
    display: none;
  }
  .table-wrap.table-cards > table {
    display: block;
    width: 100%;
    min-width: 0;
    background: transparent;
    border: 0;
  }
  .table-wrap.table-cards caption {
    display: block;
    text-align: left;
    margin-bottom: 10px;
  }
  .table-wrap.table-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .table-wrap.table-cards tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .table-wrap.table-cards tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
  }
  .table-wrap.table-cards tbody tr:nth-child(odd) td {
    background: transparent;
  }
  .table-wrap.table-cards tbody td,
  .table-wrap.table-cards tbody th {
    display: block;
    width: 100%;
    border: 0;
    padding: 11px 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .table-wrap.table-cards tbody th[scope="row"],
  .table-wrap.table-cards tbody td:first-child {
    background: var(--sage);
    color: var(--ink);
    font-weight: 700;
    border-bottom: 1px solid var(--line);
  }
  .table-wrap.table-cards tbody tr:nth-child(odd) td:first-child {
    background: var(--sage);
  }
  .table-wrap.table-cards tbody td:first-child[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 3px;
  }
  .table-wrap.table-cards tbody td + td,
  .table-wrap.table-cards tbody th + td {
    border-top: 1px solid var(--line);
  }
  .table-wrap.table-cards tbody td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 4px;
  }
  .table-wrap.table-cards a {
    min-height: 0;
  }
}

.guide-flow-figure {
  max-width: 800px;
  margin: 26px 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.guide-flow-figure .guide-flow-steps {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.guide-flow-figure .guide-flow-steps > li {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  margin: 0;
  padding: 14px 16px;
  background: var(--sage);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.guide-flow-figure .guide-flow-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -28px;
  top: 50%;
  width: 20px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--green);
  clip-path: polygon(0 40%, 60% 40%, 60% 10%, 100% 50%, 60% 90%, 60% 60%, 0 60%);
  pointer-events: none;
}
.guide-flow-figure figcaption {
  margin: 14px 0 0;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--muted);
}

@media(max-width: 640px) {
  .guide-flow-figure {
    margin: 22px 0;
    padding: 16px;
  }
  .guide-flow-figure .guide-flow-steps {
    flex-direction: column;
    gap: 28px;
  }
  .guide-flow-figure .guide-flow-steps > li {
    width: 100%;
  }
  .guide-flow-figure .guide-flow-steps > li:not(:last-child)::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -21px;
    width: 14px;
    height: 14px;
    transform: translateX(-50%);
    clip-path: polygon(40% 0, 60% 0, 60% 55%, 90% 55%, 50% 100%, 10% 55%, 40% 55%);
  }
}

@media(max-width: 390px) {
  .discovery-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .discovery-fields .field, .discovery-fields input { min-width: 0; }
  .discovery-course .search-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .discovery-course .search-actions button { width: 100%; min-width: 0; white-space: nowrap; padding-inline: 8px; }
  .discovery-course .search-actions>a { grid-column: 1 / -1; justify-content: center; margin: 2px 0 0; padding: 7px 12px; border-top: 1px solid #C7D8C8; text-align: center; }
  .result-card dl { grid-template-columns: 68px minmax(0, 1fr); gap: 6px 8px; }
}

@media(max-width: 350px) {
  .research-hero .hero-cta a { flex-basis: 100%; }
  .wrap { padding-inline: 16px; }
  .b-hero-copy h1 { font-size: 2.1rem; }
  .article h1 { font-size: 1.7rem; }
  .audience-guide { padding: 22px 18px; }
  .guide-meta { grid-template-columns: 1fr; }
  .search-panel { padding-inline: 14px; }
  .home-jump a { padding-inline: 10px; }
  .brand { font-size: 1.2rem; }
  .discovery-fields { grid-template-columns: 1fr; }
  .discovery-course { padding-inline: 16px; }
  .discovery-instructor { gap: 10px; padding-inline: 16px; }
  .discovery-instructor strong { font-size: 1rem; }
}

@media(prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .site-header, .site-footer, .breadcrumbs, .guide-return, .home-jump, .guide-cta-card { display: none; }
  .article { max-width: none; padding: 0; }
  .table-wrap { overflow: visible; border-radius: 0; }
  .table-wrap:before { display: none; }
  .table-wrap table { min-width: 0; font-size: 9pt; }
  .table-wrap td, .table-wrap th { padding: 6px; }
  h2, h3 { break-after: avoid; }
  tr { break-inside: avoid; }
  a { color: inherit; }
  .guide-meta { font-size: 9pt; }
  .b-hero, .audience-guide, .decision-grid>div, .record-columns>div, .guide-meta, .guide-index li { background: white; box-shadow: none; }
  .article h2 { border: 0; padding: 0; }
}
