:root {
  --brand: #2f6b4f;
  --brand-deep: #1f4d3a;
  --brand-light: #3f8a63;
  --accent: #f2c94c;
  --accent-warm: #e07a3f;
  --bg: #f6f8f5;
  --bg-alt: #ffffff;
  --bg-soft: #eef3ee;
  --text: #1d2b22;
  --text-soft: #4a5a4f;
  --text-muted: #6f7f74;
  --border: #d9e3da;
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.55);
  --glass-bg: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.35);
  --shadow-sm: 0 2px 8px rgba(31, 77, 58, 0.06);
  --shadow-md: 0 8px 28px rgba(31, 77, 58, 0.10);
  --shadow-lg: 0 18px 48px rgba(31, 77, 58, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --header-h: 72px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-hero: linear-gradient(135deg, #1f4d3a 0%, #2f6b4f 45%, #3f8a63 100%);
  --grad-accent: linear-gradient(120deg, #f2c94c 0%, #e07a3f 100%);
}

html[data-theme="dark"] {
  --bg: #101713;
  --bg-alt: #16201a;
  --bg-soft: #1b2620;
  --text: #e8f0ea;
  --text-soft: #b8c7bd;
  --text-muted: #8ea396;
  --border: #2a3a31;
  --card-bg: rgba(28, 40, 33, 0.66);
  --card-border: rgba(120, 160, 135, 0.18);
  --glass-bg: rgba(24, 36, 29, 0.55);
  --glass-border: rgba(120, 160, 135, 0.22);
  --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 18px 48px rgba(0, 0, 0, 0.55);
  --grad-hero: linear-gradient(135deg, #0d1913 0%, #1f4d3a 55%, #2f6b4f 100%);
}

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

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

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(63, 138, 99, 0.10), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(242, 201, 76, 0.08), transparent 40%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

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

html[data-theme="dark"] a {
  color: var(--brand-light);
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus-visible {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

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

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

li { margin-bottom: 0.4em; color: var(--text-soft); }

blockquote {
  margin: 0 0 1.2em;
  padding: 1.2em 1.4em;
  background: var(--card-bg);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

blockquote p { margin: 0; color: var(--text-soft); font-style: italic; }

time { color: var(--text-muted); font-size: 0.9em; }

address { font-style: normal; }

.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;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(31, 77, 58, 0.08);
  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;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  flex-shrink: 0;
}

.brand:hover { color: var(--brand); }

.brand svg {
  border-radius: 10px;
  transition: transform 0.4s var(--ease);
}

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

.brand-name { letter-spacing: 0.06em; }

#main-nav { flex: 1 1 auto; }

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

#main-nav li { margin: 0; }

#main-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  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(47, 107, 79, 0.12);
  color: var(--brand);
  transform: translateY(-2px);
}

html[data-theme="dark"] #main-nav a:hover,
html[data-theme="dark"] #main-nav a:focus-visible {
  background: rgba(63, 138, 99, 0.22);
  color: var(--accent);
}

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

#search-input {
  width: 170px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
}

#search-input::placeholder { color: var(--text-muted); }

#search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.15);
  width: 210px;
}

#site-search button {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}

#site-search button:hover { background: var(--brand-deep); }
#site-search button:active { transform: scale(0.97); }

#theme-toggle,
#menu-toggle {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

#menu-toggle { display: none; }

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 40px;
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb li { margin: 0; display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: var(--text-muted); opacity: 0.6; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }

#hero {
  position: relative;
  margin: 24px 0 40px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--grad-hero);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(242, 201, 76, 0.35), transparent 65%);
  filter: blur(10px);
  z-index: -1;
  animation: floatGlow 14s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -10%;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(63, 138, 99, 0.55), transparent 65%);
  filter: blur(14px);
  z-index: -1;
  animation: floatGlow 18s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-40px, 30px, 0) scale(1.12); }
}

#hero-title {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
  max-width: 22ch;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.9);
  max-width: 72ch;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

.hero-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 28px 0 32px;
}

.hero-carousel figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.hero-carousel figure:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35);
}

.hero-carousel svg {
  width: 100%;
  height: auto;
  transition: transform 0.6s var(--ease);
}

.hero-carousel figure:hover svg { transform: scale(1.05); }

.hero-carousel figcaption {
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.02em;
}

.stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stats li {
  margin: 0;
  padding: 18px 16px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  text-align: center;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.stats li:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.24);
}

.stats strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

#anchor-nav {
  margin: 0 0 40px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

#anchor-nav h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

#anchor-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#anchor-nav li { margin: 0; }

#anchor-nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--ease);
}

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

section[id] {
  margin: 0 0 44px;
  padding: clamp(22px, 3.5vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s var(--ease);
}

section[id]:hover { box-shadow: var(--shadow-md); }

section[id] > h2 {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 22px;
}

section[id] > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--grad-accent);
  transition: width 0.5s var(--ease);
}

section[id]:hover > h2::after { width: 120px; }

section[id] h3 {
  margin-top: 1.6em;
  padding-left: 14px;
  border-left: 4px solid var(--brand-light);
  color: var(--text);
}

#hero { backdrop-filter: none; -webkit-backdrop-filter: none; }

#hero:hover { box-shadow: var(--shadow-lg); }

section[id] article {
  margin: 0 0 20px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

section[id] article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-light);
}

section[id] article h3 { margin-top: 0; border-left: none; padding-left: 0; }

section[id] article a {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand);
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

section[id] article a::after { content: " →"; transition: transform 0.25s var(--ease); display: inline-block; }

section[id] article a:hover { border-color: var(--accent-warm); }

section[id] article a:hover::after { transform: translateX(4px); }

section[id] article a:focus-visible { border-color: var(--accent); }

#articles > section[id] {
  margin: 24px 0 0;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#articles > section[id]:hover { box-shadow: var(--shadow-sm); }

#articles > section[id] > h2 {
  font-size: 1.25rem;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

#articles > section[id] > h2::after { width: 44px; height: 3px; }

#articles > section[id]:hover > h2::after { width: 80px; }

#articles > section[id] p:last-child { margin-bottom: 0; }

details {
  margin: 0 0 14px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

details:hover { border-color: var(--brand-light); box-shadow: var(--shadow-sm); }

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

summary {
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

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

summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  line-height: 24px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--bg-soft);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

details[open] summary { background: var(--bg-soft); color: var(--brand); }

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

details > p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.94rem;
  color: var(--text-soft);
  animation: reveal 0.4s var(--ease);
}

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

#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 60px;
  margin-bottom: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-accent);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
}

#contact address {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

#contact address p {
  margin: 0;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact address p:hover {
  transform: translateY(-3px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
}

#sitemap ul,
#friend-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

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

#legal h3 { margin-top: 1.4em; }

#author-info {
  background: linear-gradient(135deg, rgba(47, 107, 79, 0.08), rgba(242, 201, 76, 0.08));
}

html[data-theme="dark"] #author-info {
  background: linear-gradient(135deg, rgba(63, 138, 99, 0.14), rgba(242, 201, 76, 0.06));
}

#site-footer {
  margin-top: 20px;
  padding: 40px 20px 56px;
  text-align: center;
  color: var(--text-soft);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  position: relative;
}

#site-footer p {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

#site-footer a { color: var(--text-soft); font-weight: 500; }
#site-footer a:hover { color: var(--brand); }

#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  padding: 12px 18px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s, background 0.25s var(--ease);
}

#back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

#back-to-top:hover {
  background: var(--accent-warm);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

#back-to-top:active { transform: translateY(0) scale(0.97); }

.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .scroll-reveal { opacity: 1; transform: none; }
}

@media (max-width: 1024px) {
  .header-inner { gap: 12px; }
  #search-input { width: 140px; }
  #search-input:focus { width: 170px; }
  #main-nav a { padding: 7px 9px; font-size: 0.86rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }
  #menu-toggle { display: inline-block; order: 5; margin-left: auto; }
  #theme-toggle { order: 4; }
  #main-nav {
    order: 10;
    flex-basis: 100%;
    display: none;
    padding-top: 6px;
    border-top: 1px solid var(--border);
  }
  #main-nav.is-open { display: block; animation: reveal 0.35s var(--ease); }
  #main-nav ul { flex-direction: column; gap: 2px; }
  #main-nav a { display: block; padding: 10px 14px; border-radius: var(--radius-sm); }
  #site-search {
    order: 6;
    flex-basis: 100%;
  }
  #search-input { flex: 1 1 auto; width: auto; }
  #search-input:focus { width: auto; }
  #site-search button { flex-shrink: 0; }
  .hero-carousel { grid-template-columns: 1fr; }
  .hero-carousel figure:hover { transform: translateY(-4px); }
  section[id] { padding: 22px 18px; }
  #anchor-nav { padding: 16px 18px; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  main { padding: 0 14px 30px; }
  #hero { padding: 24px 18px; border-radius: var(--radius-md); }
  #hero-title { max-width: none; }
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .stats li { padding: 14px; }
  #anchor-nav ul { gap: 6px; }
  #anchor-nav a { font-size: 0.8rem; padding: 5px 12px; }
  section[id] { border-radius: var(--radius-md); margin-bottom: 28px; }
  section[id] article { padding: 16px; }
  summary { padding: 14px 44px 14px 16px; font-size: 0.94rem; }
  details > p { padding: 0 16px 16px; }
  #howto ol li { padding: 12px 14px 12px 52px; }
  #howto ol li::before { left: 12px; width: 26px; height: 26px; line-height: 26px; font-size: 0.82rem; }
  #back-to-top { right: 14px; bottom: 14px; padding: 10px 14px; font-size: 0.8rem; }
  #site-footer { padding: 30px 16px 64px; }
}

@media (hover: none) {
  .hero-carousel figure:hover,
  section[id] article:hover,
  .stats li:hover,
  #howto ol li:hover,
  #contact address p:hover {
    transform: none;
  }
}