:root {
  --brand: #c0392b;
  --brand-dark: #a93226;
  --brand-light: #e74c3c;
  --accent: #e67e22;
  --accent-2: #16a085;
  --accent-3: #8e44ad;
  --ink: #1f2a37;
  --ink-2: #3d4a5c;
  --ink-3: #6b7a8d;
  --bg: #f7f8fa;
  --bg-soft: #ffffff;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --border: rgba(31, 42, 55, 0.1);
  --border-strong: rgba(31, 42, 55, 0.18);
  --shadow-sm: 0 2px 8px rgba(31, 42, 55, 0.06);
  --shadow-md: 0 8px 28px rgba(31, 42, 55, 0.1);
  --shadow-lg: 0 18px 48px rgba(31, 42, 55, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-hero: linear-gradient(135deg, #c0392b 0%, #e74c3c 38%, #e67e22 72%, #f39c12 100%);
  --grad-soft: linear-gradient(135deg, rgba(192, 57, 43, 0.08), rgba(230, 126, 34, 0.08));
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur: blur(16px) saturate(160%);
  color-scheme: light;
}

html[data-theme="dark"] {
  --brand: #e74c3c;
  --brand-dark: #c0392b;
  --brand-light: #ff6b5a;
  --accent: #f39c12;
  --accent-2: #1abc9c;
  --accent-3: #a569bd;
  --ink: #e8edf3;
  --ink-2: #b6c2d1;
  --ink-3: #8a97a8;
  --bg: #10151c;
  --bg-soft: #171e27;
  --bg-elev: rgba(23, 30, 39, 0.72);
  --border: rgba(232, 237, 243, 0.1);
  --border-strong: rgba(232, 237, 243, 0.2);
  --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, #7b1f16 0%, #a93226 38%, #b9620f 72%, #a07508 100%);
  --grad-soft: linear-gradient(135deg, rgba(231, 76, 60, 0.14), rgba(243, 156, 18, 0.12));
  --glass-bg: rgba(23, 30, 39, 0.55);
  --glass-border: rgba(232, 237, 243, 0.14);
  color-scheme: dark;
}

*,
*::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", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(192, 57, 43, 0.07), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(230, 126, 34, 0.07), transparent 55%);
  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), opacity 0.25s var(--ease);
}

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

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

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

h1 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 1.9vw, 1.32rem); }

p {
  margin: 0 0 1em;
  color: var(--ink-2);
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
  color: var(--ink-2);
}

li { margin-bottom: 0.4em; }

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

main {
  display: block;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

main > section,
main > nav {
  margin-bottom: 28px;
  padding: clamp(20px, 3.2vw, 40px);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

main > section:hover,
main > nav:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

main > section > h2:first-child {
  position: relative;
  padding-left: 18px;
  margin-top: 0;
}

main > section > h2:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: var(--radius-pill);
  background: var(--grad-hero);
}

section h3 {
  margin-top: 1.6em;
  padding-bottom: 0.35em;
  border-bottom: 1px dashed var(--border-strong);
}

figure {
  margin: 1.6em 0;
  padding: 16px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

figure svg {
  border-radius: var(--radius-sm);
}

figcaption {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--ink-3);
  text-align: center;
}

/* ============ 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: 0 1px 0 var(--border), var(--shadow-sm);
  transition: background 0.4s var(--ease), box-shadow 0.3s var(--ease);
}

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

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

.brand-logo {
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(192, 57, 43, 0.35);
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand-logo {
  transform: rotate(-12deg) scale(1.06);
}

.brand-name {
  font-size: 1.16rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.brand-domain {
  font-size: 0.72rem;
  color: var(--ink-3);
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
}

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

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

#main-nav li { margin: 0; }

#main-nav a {
  display: inline-block;
  padding: 7px 11px;
  font-size: 0.9rem;
  color: var(--ink-2);
  border-radius: var(--radius-pill);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a:hover {
  color: var(--brand);
  background: rgba(192, 57, 43, 0.09);
  transform: translateY(-1px);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#site-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#site-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.16);
}

#search-input {
  width: 168px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
}

#search-input::placeholder {
  color: var(--ink-3);
}

#site-search button {
  padding: 8px 16px;
  border: 0;
  background: var(--grad-hero);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.25s var(--ease);
}

#site-search button:hover {
  filter: brightness(1.1);
}

#theme-toggle,
#menu-toggle {
  padding: 8px 14px;
  font-size: 0.84rem;
  font-family: inherit;
  color: var(--ink-2);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s var(--ease);
}

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

#menu-toggle {
  display: none;
}

/* ============ Hero ============ */
#hero {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin-bottom: 28px;
}

#hero:hover {
  box-shadow: none !important;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--grad-hero);
  box-shadow: var(--shadow-lg);
  padding: clamp(28px, 5vw, 64px) clamp(22px, 4.5vw, 56px) clamp(56px, 7vw, 72px);
  isolation: isolate;
}

.hero-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(500px 260px at 5% 95%, rgba(255, 255, 255, 0.16), transparent 60%);
  z-index: -1;
  animation: heroGlow 12s ease-in-out infinite alternate;
}

.hero-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: -1;
  opacity: 0.5;
  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%);
}

@keyframes heroGlow {
  from { opacity: 0.85; transform: scale(1); }
  to { opacity: 1; transform: scale(1.06); }
}

.hero-slide {
  display: none;
  animation: slideIn 0.6s var(--ease);
}

.hero-slide[aria-hidden="false"] {
  display: block;
}

.hero-slide h1,
.hero-slide h2 {
  color: #fff;
  margin: 0 0 16px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
  max-width: 900px;
}

.hero-slide h1 {
  font-size: clamp(1.5rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hero-lead,
.hero-slide p {
  color: rgba(255, 255, 255, 0.94);
  max-width: 860px;
  font-size: clamp(0.94rem, 1.4vw, 1.06rem);
  line-height: 1.85;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.16);
}

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

.hero-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 30px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.hero-cta:hover {
  color: var(--brand-dark);
  background: #fff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.slider-controls {
  position: absolute;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 26px);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.slider-controls button {
  padding: 8px 18px;
  font-size: 0.82rem;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.28s var(--ease);
}

.slider-controls button:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}

/* ============ Breadcrumb & Anchor Nav ============ */
#breadcrumb {
  padding: 14px 22px !important;
  background: var(--bg-elev) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-pill) !important;
  font-size: 0.86rem;
}

#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#breadcrumb li {
  margin: 0;
  color: var(--ink-3);
}

#breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--ink-3);
  opacity: 0.6;
}

#breadcrumb a {
  color: var(--ink-2);
}

#breadcrumb a:hover {
  color: var(--brand);
}

#anchor-nav {
  padding: 12px 16px !important;
  background: var(--bg-elev) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md) !important;
}

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

#anchor-nav li { margin: 0; }

#anchor-nav a {
  display: inline-block;
  padding: 5px 13px;
  font-size: 0.82rem;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--ease);
}

#anchor-nav a:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(192, 57, 43, 0.28);
}

/* ============ Cards: Articles / News ============ */
#articles article,
#news article {
  position: relative;
  margin: 0 0 18px;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease), border-color 0.32s var(--ease);
  overflow: hidden;
}

#articles article::before,
#news article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-hero);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

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

#articles article:hover::before,
#news article:hover::before {
  opacity: 1;
}

#articles article h3,
#news article h3 {
  margin: 0 0 6px;
  border: 0;
  padding: 0;
  font-size: 1.1rem;
}

#articles article h3 a,
#news article h3 a {
  color: var(--ink);
}

#articles article h3 a:hover,
#news article h3 a:hover {
  color: var(--brand);
}

#articles time,
#news time {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--ink-3);
  background: var(--grad-soft);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

#articles article > a:last-child {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand);
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s var(--ease), gap 0.25s var(--ease);
}

#articles article > a:last-child::after {
  content: " →";
  transition: transform 0.25s var(--ease);
  display: inline-block;
}

#articles article > a:last-child:hover {
  border-bottom-color: var(--brand);
}

#articles article > a:last-child:hover::after {
  transform: translateX(4px);
}

/* ============ Blockquote / Reviews ============ */
#reviews blockquote {
  position: relative;
  margin: 0 0 18px;
  padding: 22px 24px 18px 56px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#reviews blockquote::before {
  content: "\201C";
  position: absolute;
  left: 16px;
  top: 2px;
  font-size: 3.4rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--brand);
  opacity: 0.35;
}

#reviews blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

#reviews blockquote p {
  font-size: 0.98rem;
  color: var(--ink-2);
  margin-bottom: 10px;
}

#reviews blockquote footer {
  font-size: 0.84rem;
  color: var(--ink-3);
  font-style: normal;
  text-align: right;
}

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

#faq details[open] {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  background: var(--grad-soft);
}

#faq details:hover {
  border-color: var(--border-strong);
}

#faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color 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;
  line-height: 24px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--brand);
  background: rgba(192, 57, 43, 0.1);
  border-radius: 50%;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

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

#faq summary:hover {
  color: var(--brand);
}

#faq details p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.94rem;
  animation: fadeDown 0.35s var(--ease);
}

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

/* ============ Contact Address ============ */
#contact address {
  font-style: normal;
  margin: 18px 0;
}

#contact address ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

#contact address li {
  margin: 0;
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--ink-2);
  background: var(--bg-elev);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

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

/* ============ Sitemap & Friend Links ============ */
#sitemap ul,
#friend-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

#sitemap a,
#friend-links a {
  display: inline-block;
  padding: 7px 16px;
  font-size: 0.86rem;
  color: var(--ink-2);
  background: var(--bg-elev);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all 0.26s var(--ease);
}

#sitemap a:hover,
#friend-links a:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(192, 57, 43, 0.26);
}

/* ============ Footer ============ */
#site-footer {
  position: relative;
  margin-top: 40px;
  padding: clamp(32px, 5vw, 56px) 20px 40px;
  background: linear-gradient(180deg, transparent, rgba(192, 57, 43, 0.06));
  border-top: 1px solid var(--border);
}

#site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-hero);
}

.footer-info,
.footer-legal {
  max-width: 1180px;
  margin: 0 auto;
}

.footer-info {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.footer-info p {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.footer-info p:first-child {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer-legal h2 {
  font-size: 1rem;
  margin: 22px 0 8px;
  color: var(--ink);
}

.footer-legal h2::before {
  content: "§ ";
  color: var(--brand);
}

.footer-legal p {
  font-size: 0.86rem;
  color: var(--ink-3);
  line-height: 1.85;
}

.footer-legal p:last-child {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-strong);
  text-align: center;
  font-size: 0.82rem;
}

/* ============ Back to Top ============ */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 0;
  color: #fff;
  background: var(--grad-hero);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(192, 57, 43, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), box-shadow 0.3s var(--ease);
}

#back-to-top::before {
  content: "↑";
  font-size: 1.2rem;
  line-height: 46px;
  display: block;
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 14px 32px rgba(192, 57, 43, 0.5);
}

/* ============ Scroll Reveal ============ */
@media (prefers-reduced-motion: no-preference) {
  main > section,
  main > nav,
  #articles article,
  #news article,
  #reviews blockquote {
    animation: revealUp 0.7s var(--ease) both;
  }

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

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .header-inner {
    gap: 12px;
  }

  #main-nav a {
    padding: 6px 9px;
    font-size: 0.85rem;
  }

  #search-input {
    width: 130px;
  }
}

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

  .header-inner {
    flex-wrap: wrap;
    padding: 10px 16px;
  }

  .brand-domain {
    display: none;
  }

  #main-nav {
    order: 4;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease);
    opacity: 0;
  }

  #main-nav.is-open {
    max-height: 520px;
    opacity: 1;
    padding: 8px 0 4px;
  }

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

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

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

  .header-tools {
    gap: 6px;
  }

  #site-search {
    flex: 1 1 auto;
  }

  #search-input {
    width: 100%;
    min-width: 0;
  }

  main {
    padding: 0 14px 48px;
  }

  main > section,
  main > nav {
    border-radius: var(--radius-md);
    padding: 20px 16px;
  }

  .hero-slider {
    padding: 26px 20px 64px;
    border-radius: var(--radius-md);
  }

  .slider-controls {
    left: 20px;
    right: auto;
  }

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

  #reviews blockquote {
    padding: 20px 18px 16px 44px;
  }

  #reviews blockquote::before {
    left: 10px;
    font-size: 2.6rem;
  }

  #faq summary {
    padding: 14px 48px 14px 16px;
    font-size: 0.94rem;
  }

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

  #contact address ul {
    grid-template-columns: 1fr;
  }

  #back-to-top {
    right: 14px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }

  #back-to-top::before {
    line-height: 42px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .brand-name {
    font-size: 1.04rem;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  #theme-toggle,
  #menu-toggle {
    padding: 7px 11px;
    font-size: 0.78rem;
  }

  #site-search button {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .hero-cta {
    padding: 10px 22px;
    font-size: 0.9rem;
  }

  .slider-controls button {
    padding: 7px 14px;
    font-size: 0.78rem;
  }
}

/* ============ Print ============ */
@media print {
  #site-header,
  #back-to-top,
  .slider-controls,
  #site-search,
  #theme-toggle,
  #menu-toggle,
  #anchor-nav,
  #sitemap,
  #friend-links {
    display: none !important;
  }

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

  main > section,
  main > nav {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}