:root {
  --bg: #f4f1ea;
  --bg-elevated: #ffffff;
  --bg-soft: #ece7dc;
  --text: #1f2a33;
  --text-soft: #55636e;
  --text-faint: #8a949c;
  --primary: #1a3a5c;
  --primary-soft: #2c5a86;
  --accent: #e8b04b;
  --accent-2: #d97b4f;
  --accent-3: #7fb069;
  --accent-4: #9c89b8;
  --border: rgba(26, 58, 92, 0.14);
  --border-strong: rgba(26, 58, 92, 0.28);
  --shadow-sm: 0 2px 8px rgba(26, 58, 92, 0.08);
  --shadow-md: 0 8px 28px rgba(26, 58, 92, 0.12);
  --shadow-lg: 0 20px 56px rgba(26, 58, 92, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur: saturate(160%) blur(16px);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --maxw: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  --bg: #0f1a24;
  --bg-elevated: #16232f;
  --bg-soft: #1b2a38;
  --text: #e8eef3;
  --text-soft: #a9b8c4;
  --text-faint: #7b8b98;
  --primary: #7fb0dd;
  --primary-soft: #a8cbea;
  --accent: #f0c368;
  --accent-2: #e8966b;
  --accent-3: #9cc98a;
  --accent-4: #b3a3cd;
  --border: rgba(168, 203, 234, 0.16);
  --border-strong: rgba(168, 203, 234, 0.32);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.55);
  --glass-bg: rgba(22, 35, 47, 0.6);
  --glass-border: rgba(168, 203, 234, 0.18);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0f1a24;
    --bg-elevated: #16232f;
    --bg-soft: #1b2a38;
    --text: #e8eef3;
    --text-soft: #a9b8c4;
    --text-faint: #7b8b98;
    --primary: #7fb0dd;
    --primary-soft: #a8cbea;
    --accent: #f0c368;
    --accent-2: #e8966b;
    --accent-3: #9cc98a;
    --accent-4: #b3a3cd;
    --border: rgba(168, 203, 234, 0.16);
    --border-strong: rgba(168, 203, 234, 0.32);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.55);
    --glass-bg: rgba(22, 35, 47, 0.6);
    --glass-border: rgba(168, 203, 234, 0.18);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(232, 176, 75, 0.1), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(44, 90, 134, 0.12), transparent 46%),
    radial-gradient(circle at 50% 100%, rgba(127, 176, 105, 0.08), transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

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

a {
  color: var(--primary-soft);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--accent-2);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

ul,
ol {
  padding-left: 1.35em;
}

li {
  margin: 0.35em 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
  font-weight: 700;
}

h1 { font-size: clamp(1.65rem, 1.2rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.95rem); }
h3 { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem); }
h4 { font-size: 1.05rem; color: var(--text-soft); }

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

.visually-hidden {
  position: absolute !important;
  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;
}

/* ============ HEADER ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  font-weight: 700;
  font-family: var(--font-serif);
  letter-spacing: 0.02em;
}

.brand svg {
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

.brand-text {
  font-size: 1.02rem;
  white-space: nowrap;
}

#main-nav {
  flex: 1 1 auto;
  min-width: 0;
}

#main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#main-nav a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a:hover,
#main-nav a:focus-visible {
  background: rgba(232, 176, 75, 0.16);
  color: var(--primary);
  transform: translateY(-1px);
}

#site-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#site-search input[type="search"] {
  width: 168px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  transition: width 0.35s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#site-search input[type="search"]::placeholder {
  color: var(--text-faint);
}

#site-search input[type="search"]:focus {
  width: 210px;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 176, 75, 0.18);
  outline: none;
}

#site-search button,
#theme-toggle,
#menu-toggle {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#site-search button:hover,
#theme-toggle:hover,
#menu-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

#menu-toggle {
  display: none;
}

/* ============ MAIN LAYOUT ============ */
main {
  display: block;
}

main > section,
main > nav {
  max-width: var(--maxw);
  margin: 0 auto 28px;
  padding: 0 20px;
}

main > section {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  max-width: none !important;
  margin: 0 0 32px !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background:
    linear-gradient(135deg, #1a3a5c 0%, #2c5a86 42%, #3f6f8f 68%, #d97b4f 100%);
  box-shadow: var(--shadow-lg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(232, 176, 75, 0.42), transparent 38%),
    radial-gradient(circle at 82% 78%, rgba(127, 176, 105, 0.32), transparent 42%),
    radial-gradient(circle at 60% 10%, rgba(255, 255, 255, 0.16), transparent 46%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  pointer-events: none;
  opacity: 0.7;
}

.hero-slides {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 20px 0;
}

.slide {
  display: none;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.slide.active {
  display: block;
  animation: slideFade 0.7s var(--ease);
}

.slide svg {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
}

.slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 14px 20px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: linear-gradient(to top, rgba(10, 22, 34, 0.82), rgba(10, 22, 34, 0));
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

@keyframes slideFade {
  from { opacity: 0; transform: translateY(10px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 20px 46px;
  color: #fff;
}

.hero-content h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  max-width: 22em;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  max-width: 62em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.hero-meta {
  display: inline-block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cta {
  display: inline-block;
  margin-top: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8b04b, #d97b4f);
  color: #1a2a38;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 28px rgba(232, 176, 75, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

.cta:hover,
.cta:focus-visible {
  color: #14212c;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 38px rgba(232, 176, 75, 0.55);
  filter: brightness(1.05);
}

/* ============ BREADCRUMB ============ */
#breadcrumb {
  margin-top: -14px;
  padding-top: 0;
}

#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  list-style: none;
  margin: 0;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  font-size: 0.86rem;
}

#breadcrumb li {
  margin: 0;
  color: var(--text-faint);
}

#breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--text-faint);
  opacity: 0.6;
}

#breadcrumb a {
  color: var(--text-soft);
}

#breadcrumb [aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* ============ ANCHOR NAV ============ */
#anchor-nav {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 60;
  padding-top: 0;
  padding-bottom: 0;
}

#anchor-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

#anchor-nav li {
  margin: 0;
}

#anchor-nav a {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
}

#anchor-nav a:hover,
#anchor-nav a:focus-visible {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ============ SECTION CARDS ============ */
main > section:not(.hero):not(#breadcrumb):not(#anchor-nav):not(#backtop-section) {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px clamp(20px, 3.4vw, 44px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

main > section:not(.hero):not(#breadcrumb):not(#anchor-nav):not(#backtop-section):hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

main > section:not(.hero):not(#breadcrumb):not(#anchor-nav):not(#backtop-section)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 34px;
  right: 34px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent-4));
  opacity: 0.85;
}

main > section h2 {
  position: relative;
  padding-left: 18px;
}

main > section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

main > section h3 {
  margin-top: 1.6em;
  color: var(--primary);
}

html[data-theme="dark"] main > section h3 {
  color: var(--primary-soft);
}

main > section h4 {
  margin-top: 1.4em;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

/* ============ ARTICLES ============ */
#articles article {
  position: relative;
  margin: 0 0 18px;
  padding: 24px clamp(18px, 2.4vw, 30px);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#articles article::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#articles article:hover::after {
  opacity: 1;
}

#articles article h3 {
  margin-top: 0;
  color: var(--text);
}

.article-meta {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--primary);
  background: rgba(232, 176, 75, 0.16);
  border: 1px solid rgba(232, 176, 75, 0.32);
}

html[data-theme="dark"] .article-meta {
  color: var(--accent);
}

.article-summary {
  font-size: 0.95rem;
  color: var(--text-soft);
}

#articles article > a {
  display: inline-block;
  margin-top: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  transition: all 0.3s var(--ease);
}

#articles article > a:hover,
#articles article > a:focus-visible {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateX(3px);
}

/* ============ HOWTO STEPS ============ */
#howto ol {
  counter-reset: howto;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  position: relative;
  counter-increment: howto;
  margin: 0 0 12px;
  padding: 14px 18px 14px 58px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(howto);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a2a38;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(232, 176, 75, 0.35);
}

#howto ol li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ============ FAQ DETAILS ============ */
#faq details {
  margin: 0 0 12px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq details[open] {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-serif);
  color: var(--text);
  list-style: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(232, 176, 75, 0.2);
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.35s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--primary);
  color: #fff;
}

#faq summary:hover {
  color: var(--primary);
  background: rgba(232, 176, 75, 0.08);
}

#faq details > p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.95rem;
  animation: faqOpen 0.4s var(--ease);
}

@keyframes faqOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ NEWS ============ */
.news-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.news-list li {
  position: relative;
  margin: 0 0 10px;
  padding: 14px 18px 14px 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.news-list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(217, 123, 79, 0.18);
}

.news-list li:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
}

.news-list time {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  background: rgba(44, 90, 134, 0.12);
  font-weight: 600;
}

html[data-theme="dark"] .news-list time {
  color: var(--primary-soft);
  background: rgba(168, 203, 234, 0.14);
}

/* ============ CONTACT / ADDRESS ============ */
#contact address {
  font-style: normal;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  margin-bottom: 18px;
}

#contact address p {
  margin: 0 0 8px;
  color: var(--text-soft);
}

#contact address p:last-child {
  margin-bottom: 0;
}

#contact address a {
  font-weight: 600;
}

/* ============ SITEMAP / LINKS ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-soft);
  transition: all 0.28s var(--ease);
}

#sitemap a:hover,
#links a:hover,
#sitemap a:focus-visible,
#links a:focus-visible {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============ LEGAL ============ */
#legal h3 {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ============ BACK TO TOP ============ */
#backtop-section {
  text-align: center;
  padding-top: 4px;
  padding-bottom: 20px;
}

#back-to-top {
  padding: 12px 32px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
}

#back-to-top:hover,
#back-to-top:focus-visible {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ============ FOOTER ============ */
#site-footer {
  margin-top: 12px;
  padding: 40px 20px 32px;
  background: linear-gradient(160deg, #14283c 0%, #1a3a5c 55%, #22496e 100%);
  color: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -12px 40px rgba(26, 58, 92, 0.22);
}

html[data-theme="dark"] #site-footer {
  background: linear-gradient(160deg, #0b141c 0%, #122231 55%, #17293a 100%);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}

#site-footer p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

#site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

#site-footer nav a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

#site-footer nav a:hover,
#site-footer nav a:focus-visible {
  color: #e8b04b;
  border-color: #e8b04b;
}

/* ============ SCROLL ANIMATION ============ */
@media (prefers-reduced-motion: no-preference) {
  main > section:not(.hero) {
    animation: riseIn 0.7s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% entry 28%;
  }

  @supports not (animation-timeline: view()) {
    main > section:not(.hero) {
      animation: none;
      opacity: 1;
      transform: none;
    }
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }

  #main-nav {
    order: 3;
    flex-basis: 100%;
  }

  #main-nav ul {
    justify-content: center;
  }

  #site-search {
    margin-left: auto;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 60px;
  }

  .header-inner {
    align-items: center;
  }

  #main-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    padding-top: 6px;
  }

  #main-nav.open {
    display: block;
    animation: slideFade 0.35s var(--ease);
  }

  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  #main-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
  }

  #menu-toggle {
    display: inline-block;
    order: 5;
  }

  #site-search {
    order: 4;
    flex: 1 1 100%;
  }

  #site-search input[type="search"] {
    flex: 1;
    width: auto;
  }

  #site-search input[type="search"]:focus {
    width: auto;
  }

  #anchor-nav {
    position: static;
    margin-bottom: 20px;
  }

  #anchor-nav ul {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  #anchor-nav li {
    flex: 0 0 auto;
  }

  .hero-slides {
    padding: 14px 14px 0;
  }

  .hero-content {
    padding: 24px 18px 36px;
  }

  .slide-caption {
    font-size: 0.82rem;
    padding: 10px 14px;
  }

  main > section:not(.hero):not(#breadcrumb):not(#anchor-nav):not(#backtop-section) {
    padding: 26px 18px;
    border-radius: var(--radius-md);
  }

  main > section:not(.hero):not(#breadcrumb):not(#anchor-nav):not(#backtop-section)::before {
    left: 18px;
    right: 18px;
  }

  #breadcrumb ol {
    font-size: 0.8rem;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
    line-height: 1.75;
  }

  .brand-text {
    font-size: 0.92rem;
  }

  .hero {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-lead {
    font-size: 0.94rem;
  }

  .cta {
    display: block;
    text-align: center;
    padding: 13px 20px;
  }

  #articles article {
    padding: 18px 16px;
  }

  #faq summary {
    padding: 14px 46px 14px 16px;
    font-size: 0.95rem;
  }

  #faq details > p {
    padding: 0 16px 16px;
  }

  #howto ol li {
    padding: 12px 14px 12px 52px;
  }

  #sitemap a,
  #links a {
    font-size: 0.82rem;
    padding: 6px 12px;
  }

  #site-footer {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 30px 16px 24px;
  }
}

/* ============ MOTION PREFERENCES ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ PRINT ============ */
@media print {
  #site-header,
  #anchor-nav,
  #backtop-section,
  #site-footer,
  .hero-slides {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  main > section {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }
}
</style>