/* ==========================================================================
   臺中市清水區西寧國民小學 教務處網站 - 設計系統與全站樣式
   風格：溫暖現代校園風（Warm Ivory / Terracotta / Academic Sage）
   ========================================================================== */

:root {
  --bg-page: #FBF8F5;
  --bg-surface: #FFFFFF;
  --bg-tint: #F5EDE8;
  --bg-tint-soft: #FAF5F1;

  --brand-primary: #B8432A;
  --brand-primary-dark: #94321D;
  --brand-primary-soft: #FDF0EC;

  --brand-secondary: #2B615A;
  --brand-secondary-dark: #1E4742;
  --brand-secondary-soft: #ECF4F2;

  --accent-amber: #C9822B;
  --accent-amber-soft: #FDF6EA;

  --text-main: #231F1E;
  --text-secondary: #5A524E;
  --text-muted: #7C736E;

  --border-light: #E8DDD6;
  --border-strong: #D5C5BC;

  --shadow-sm: 0 1px 3px rgba(35, 31, 30, 0.06), 0 1px 2px rgba(35, 31, 30, 0.04);
  --shadow-md: 0 6px 18px rgba(35, 31, 30, 0.07), 0 2px 6px rgba(35, 31, 30, 0.04);
  --shadow-lg: 0 14px 36px rgba(35, 31, 30, 0.11);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --container-max: 1180px;
  --header-height: 70px;
  --font-sans: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Noto Serif TC", "PMingLiU", serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--brand-primary-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(184, 67, 42, 0.35);
  outline-offset: 2px;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--brand-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 2000;
  font-weight: 600;
}
.skip-link:focus {
  top: 16px;
  color: #fff;
}

/* ==========================================================================
   Top Utility Strip & Header Navigation
   ========================================================================== */
.top-strip {
  background: var(--brand-secondary);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.84rem;
  padding: 6px 0;
}
.top-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
}
.top-strip a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.45);
}
.top-strip a:hover {
  text-decoration-color: #fff;
}
.top-strip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-height);
  background: rgba(251, 248, 245, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text-main);
  flex-shrink: 0;
}
.brand:hover {
  color: var(--text-main);
}
.brand-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.brand-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--bg-tint);
  color: var(--brand-primary);
}
.nav-link[aria-current="page"] {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-search-trigger:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}
.kbd-hint {
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-tint);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.btn-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 20px 18px;
  box-shadow: var(--shadow-md);
}
.mobile-nav.is-open {
  display: block;
}
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav .nav-link {
  display: block;
  padding: 10px 14px;
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }
  .btn-menu-toggle {
    display: inline-flex;
  }
  .kbd-hint {
    display: none;
  }
}

/* ==========================================================================
   Hero & Page Banners
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, #FAF3EE 0%, #F4E6DE 55%, #EAF1EF 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 46px 0 50px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 67, 42, 0.08) 0%, rgba(184, 67, 42, 0) 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--brand-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  line-height: 1.28;
  color: var(--text-main);
}
.hero h1 span {
  color: var(--brand-primary);
}

.hero-lead {
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: 1.04rem;
  max-width: 58ch;
}

.hero-search-box {
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  max-width: 560px;
}
.hero-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--text-main);
  min-width: 0;
}
.hero-search-box input:focus {
  outline: none;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.tag-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
}
.tag-chip:hover {
  background: var(--brand-primary-soft);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.hero-spotlight {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
}
.spotlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-primary {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
}
.badge-secondary {
  background: var(--brand-secondary-soft);
  color: var(--brand-secondary);
}
.badge-amber {
  background: var(--accent-amber-soft);
  color: #9A5E14;
}

.spotlight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spotlight-item {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-tint-soft);
  border: 1px solid var(--border-light);
}
.spotlight-item strong {
  display: block;
  font-size: 0.94rem;
  color: var(--text-main);
  margin-bottom: 2px;
}
.spotlight-item span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Subpage Header Banner */
.page-banner {
  background: linear-gradient(120deg, #F8EFEA 0%, #EDF3F1 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 30px 0 28px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.breadcrumb a {
  color: var(--text-secondary);
}
.breadcrumb a:hover {
  color: var(--brand-primary);
}
.page-banner h1 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  color: var(--text-main);
}
.page-banner p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 68ch;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-primary-dark);
  color: #fff;
}
.btn-secondary {
  background: var(--brand-secondary);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--brand-secondary-dark);
  color: #fff;
}
.btn-outline {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-soft);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.84rem;
}

/* ==========================================================================
   Sections, Cards, Grids & Sub-layout
   ========================================================================== */
.section {
  padding: 46px 0;
}
.section-alt {
  background: var(--bg-tint-soft);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}
.section-header h2 {
  margin: 0;
  font-size: 1.45rem;
  color: var(--text-main);
}
.section-header p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.quick-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
}
.quick-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 12px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
}
.quick-card-icon.is-teal {
  background: var(--brand-secondary-soft);
  color: var(--brand-secondary);
}
.quick-card-icon.is-amber {
  background: var(--accent-amber-soft);
  color: #9A5E14;
}
.quick-card h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  color: var(--text-main);
}
.quick-card p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.quick-card-more {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--brand-primary);
}

/* Subpage Two-column Layout with Sticky Anchor Sidebar */
.doc-layout {
  display: grid;
  grid-template-columns: 245px 1fr;
  gap: 28px;
  padding: 34px 0 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }
}

.doc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 900px) {
  .doc-sidebar {
    position: static;
  }
}
.doc-sidebar-title {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.doc-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.doc-toc a {
  display: block;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}
.doc-toc a:hover,
.doc-toc a.is-active {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  font-weight: 600;
}

.doc-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.doc-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  .doc-block {
    padding: 20px 18px;
  }
}
.doc-block-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}
.doc-block-header h2 {
  margin: 0;
  font-size: 1.32rem;
  color: var(--text-main);
}

/* ==========================================================================
   Callouts, Lists, Tables, Tabs & Accordions
   ========================================================================== */
.callout {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--brand-primary);
  background: var(--brand-primary-soft);
  margin: 14px 0;
  font-size: 0.94rem;
}
.callout.is-teal {
  border-left-color: var(--brand-secondary);
  background: var(--brand-secondary-soft);
}
.callout.is-amber {
  border-left-color: var(--accent-amber);
  background: var(--accent-amber-soft);
}
.callout strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-main);
}

/* File / Resource Links List */
.resource-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.resource-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-tint-soft);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
}
.resource-item a:hover {
  border-color: var(--brand-primary);
  background: var(--bg-surface);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}
.resource-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
}

/* Clean Responsive Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin: 14px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--bg-surface);
}
th,
td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
th {
  background: var(--bg-tint);
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--bg-tint-soft);
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.tab-btn {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-tint-soft);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.tab-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.tab-btn[aria-selected="true"] {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.tab-panel[hidden] {
  display: none;
}

/* Details / Accordion */
details.accordion {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-tint-soft);
  margin: 12px 0;
  overflow: hidden;
}
details.accordion summary {
  padding: 13px 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-main);
}
details.accordion summary::-webkit-details-marker {
  display: none;
}
details.accordion summary::after {
  content: "＋";
  font-size: 1.1rem;
  color: var(--brand-primary);
  font-weight: 700;
}
details.accordion[open] summary {
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-tint);
}
details.accordion[open] summary::after {
  content: "－";
}
.accordion-body {
  padding: 16px 18px;
  background: var(--bg-surface);
  font-size: 0.94rem;
}

/* Checklist */
.checklist {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checklist li label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-tint-soft);
  cursor: pointer;
}
.checklist input[type="checkbox"] {
  margin-top: 4px;
  width: 17px;
  height: 17px;
  accent-color: var(--brand-secondary);
  flex-shrink: 0;
}
.checklist li.is-checked label {
  background: var(--brand-secondary-soft);
  border-color: rgba(43, 97, 90, 0.35);
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Video Embed Container */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #1C1917;
}
.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Timeline (for 學習扶助 etc.) */
.timeline {
  list-style: none;
  margin: 14px 0;
  padding: 0 0 0 18px;
  border-left: 3px solid var(--brand-secondary-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timeline li {
  position: relative;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-tint-soft);
  border: 1px solid var(--border-light);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 18px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--brand-secondary);
  border: 3px solid var(--bg-surface);
}

/* District Filter Input */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.input-control {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-main);
}

/* ==========================================================================
   Search Modal
   ========================================================================== */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 31, 30, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 24px;
}
.search-modal-backdrop[hidden] {
  display: none;
}
.search-modal {
  width: 100%;
  max-width: 680px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}
.search-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
}
.search-modal-head input {
  flex: 1;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  background: transparent;
}
.search-modal-head input:focus {
  outline: none;
}
.search-results {
  padding: 10px 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.search-result-item {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-tint-soft);
  color: var(--text-main);
}
.search-result-item:hover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-soft);
}
.search-result-title {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--brand-primary-dark);
}
.search-result-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #2C2624;
  color: rgba(255, 255, 255, 0.88);
  padding: 42px 0 26px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.site-footer h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #fff;
}
.site-footer p,
.site-footer li {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site-footer a {
  color: #F4C4B8;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-bottom {
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

/* Print Optimization */
@media print {
  .top-strip,
  .site-header,
  .doc-sidebar,
  .btn-search-trigger,
  .site-footer,
  .hero-search-box {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .doc-layout {
    display: block;
    padding: 0;
  }
  .doc-block {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
