:root {
  --orange-50: #fff7f0;
  --orange-100: #ffe9d6;
  --orange-200: #ffd1ad;
  --orange-300: #ffb27a;
  --orange-400: #ff8f4d;
  --orange-500: #ff6b35;
  --orange-600: #e8551f;
  --orange-700: #c04113;
  --amber-300: #ffc46b;
  --amber-400: #ffa726;
  --coral-400: #ff8a65;
  --ink-900: #1a1208;
  --ink-800: #2a1e10;
  --ink-700: #3c2c1a;
  --ink-600: #5a4630;
  --ink-500: #7a6448;
  --ink-400: #9c8768;
  --ink-300: #c4b39a;
  --ink-200: #e6dccd;
  --ink-100: #f5efe6;
  --white: #ffffff;
  --bg: #fffaf5;
  --bg-soft: #fff3e0;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.55);
  --text: var(--ink-800);
  --text-soft: var(--ink-500);
  --text-muted: var(--ink-400);
  --border: rgba(196, 179, 154, 0.45);
  --shadow-sm: 0 2px 8px rgba(90, 70, 48, 0.06);
  --shadow-md: 0 8px 24px rgba(90, 70, 48, 0.1);
  --shadow-lg: 0 18px 48px rgba(90, 70, 48, 0.14);
  --shadow-orange: 0 10px 30px rgba(255, 107, 53, 0.28);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --grad-hero: linear-gradient(135deg, #ff8f4d 0%, #ff6b35 45%, #ffa726 100%);
  --grad-accent: linear-gradient(135deg, #ff6b35 0%, #ffa726 100%);
  --grad-soft: linear-gradient(160deg, #fff7f0 0%, #ffe9d6 100%);
  --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  --header-h: 72px;
  --content-max: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120d08;
    --bg-soft: #1c140c;
    --surface: #1f1710;
    --surface-glass: rgba(38, 28, 18, 0.72);
    --surface-glass-border: rgba(255, 178, 122, 0.16);
    --text: #f3e9dc;
    --text-soft: #c3b29c;
    --text-muted: #9c8768;
    --border: rgba(255, 178, 122, 0.16);
    --ink-100: #2a1e10;
    --ink-200: #3c2c1a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
    --grad-soft: linear-gradient(160deg, #1c140c 0%, #2a1e10 100%);
    --grad-glass: linear-gradient(135deg, rgba(56, 40, 24, 0.72), rgba(30, 22, 14, 0.55));
  }
}

html[data-theme="dark"] {
  --bg: #120d08;
  --bg-soft: #1c140c;
  --surface: #1f1710;
  --surface-glass: rgba(38, 28, 18, 0.72);
  --surface-glass-border: rgba(255, 178, 122, 0.16);
  --text: #f3e9dc;
  --text-soft: #c3b29c;
  --text-muted: #9c8768;
  --border: rgba(255, 178, 122, 0.16);
  --ink-100: #2a1e10;
  --ink-200: #3c2c1a;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --grad-soft: linear-gradient(160deg, #1c140c 0%, #2a1e10 100%);
  --grad-glass: linear-gradient(135deg, rgba(56, 40, 24, 0.72), rgba(30, 22, 14, 0.55));
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 8% 4%, rgba(255, 167, 38, 0.1), transparent 42%),
    radial-gradient(circle at 92% 12%, rgba(255, 107, 53, 0.09), transparent 40%);
  background-attachment: fixed;
  -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(--orange-600);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--orange-500);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.35;
  color: var(--text);
  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.8vw, 1.3rem);
}

p {
  margin: 0 0 1em;
}

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

li {
  margin-bottom: 0.4em;
}

strong {
  color: var(--orange-600);
  font-weight: 700;
}

blockquote {
  margin: 0 0 1em;
  padding: 1em 1.2em;
  border-left: 4px solid var(--orange-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--surface-glass-border);
  border-right: 1px solid var(--surface-glass-border);
  border-bottom: 1px solid var(--surface-glass-border);
  box-shadow: var(--shadow-sm);
}

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

blockquote p::before {
  content: "“";
  color: var(--orange-400);
  font-weight: 700;
}

blockquote p::after {
  content: "”";
  color: var(--orange-400);
  font-weight: 700;
}

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

::selection {
  background: var(--orange-200);
  color: var(--ink-900);
}

.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(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--surface-glass-border);
  box-shadow: var(--shadow-sm);
  transition: background 0.4s var(--ease), box-shadow 0.3s var(--ease);
}

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

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

.brand svg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: var(--shadow-orange);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-10deg) scale(1.06);
  box-shadow: 0 12px 34px rgba(255, 107, 53, 0.4);
}

.brand-name {
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

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

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

#main-nav li {
  margin: 0;
}

#main-nav a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a:hover,
#main-nav a:focus-visible {
  color: var(--orange-600);
  background: rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

#site-header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#site-header form[role="search"]:focus-within {
  border-color: var(--orange-400);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.14);
}

#site-search {
  width: 180px;
  padding: 9px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

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

#site-header form[role="search"] button {
  padding: 9px 16px;
  border: 0;
  background: var(--grad-accent);
  color: var(--white);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.25s var(--ease), letter-spacing 0.25s var(--ease);
}

#site-header form[role="search"] button:hover {
  filter: brightness(1.08);
  letter-spacing: 0.06em;
}

#theme-toggle,
#menu-toggle {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-glass);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  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);
}

#theme-toggle:hover,
#menu-toggle:hover {
  background: var(--grad-accent);
  border-color: transparent;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-orange);
}

#menu-toggle {
  display: none;
}

main {
  display: block;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 20px 64px;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 22px;
  padding: 10px 16px;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--ink-300);
}

main > nav[aria-label="面包屑导航"] li[aria-current="page"] {
  color: var(--orange-600);
  font-weight: 600;
}

main section {
  margin-bottom: 28px;
  padding: clamp(20px, 3.2vw, 36px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  will-change: opacity, transform;
}

main section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

main section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 143, 77, 0.4);
}

main section > h2 {
  position: relative;
  padding-left: 18px;
  margin-bottom: 1em;
}

main section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: var(--radius-pill);
  background: var(--grad-accent);
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.45);
}

#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4.5vw, 56px);
  background: var(--grad-hero);
  border: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-orange);
  color: var(--white);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 62%);
  border-radius: 50%;
  z-index: -1;
  animation: heroFloat 14s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -12%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 243, 224, 0.32), transparent 65%);
  border-radius: 50%;
  z-index: -1;
  animation: heroFloat 18s ease-in-out infinite alternate-reverse;
}

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

#hero h1 {
  color: var(--white);
  text-shadow: 0 2px 18px rgba(120, 45, 10, 0.28);
  max-width: 22em;
}

#hero > p {
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  text-shadow: 0 1px 10px rgba(120, 45, 10, 0.2);
}

#hero figure {
  margin: 26px 0 0;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 18px 40px rgba(120, 45, 10, 0.22);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero figure:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 26px 56px rgba(120, 45, 10, 0.3);
}

#hero figure svg {
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

#hero figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
}

main section h3 {
  margin-top: 1.4em;
  color: var(--text);
}

main section h3:first-of-type {
  margin-top: 0.6em;
}

main section > h3::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-top: 8px;
  border-radius: var(--radius-pill);
  background: var(--grad-accent);
  opacity: 0.75;
}

#brand ul,
#products ul,
#solutions ul,
#howto ul {
  padding: 18px 22px 18px 40px;
  border-radius: var(--radius-md);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  list-style: none;
  padding-left: 22px;
}

#brand ul li,
#products ul li,
#solutions ul li,
#howto ul li {
  position: relative;
  padding-left: 22px;
}

#brand ul li::before,
#products ul li::before,
#solutions ul li::before,
#howto ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.16);
}

#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
  display: grid;
  gap: 12px;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  margin: 0;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  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: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad-accent);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-orange);
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: rgba(255, 143, 77, 0.45);
  box-shadow: var(--shadow-md);
}

#cases blockquote {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#cases blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

#news ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

#news li {
  margin: 0;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--surface-glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#news li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 143, 77, 0.45);
}

#news h3 {
  margin: 0 0 6px;
}

#news h3 a {
  color: var(--text);
  transition: color 0.25s var(--ease);
}

#news h3 a:hover {
  color: var(--orange-600);
}

#news li p {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

#news li p:nth-of-type(1) {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 107, 53, 0.12);
  color: var(--orange-600);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  align-items: start;
}

#articles > h2,
#articles > p {
  grid-column: 1 / -1;
}

#articles article {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 143, 77, 0.5);
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.08rem;
}

#articles article h3::after {
  display: none;
}

#articles article p {
  font-size: 0.9rem;
  color: var(--text-soft);
}

#articles article p:nth-of-type(1) {
  font-size: 0.78rem;
  color: var(--text-muted);
}

#articles article p:last-child {
  margin-top: auto;
  margin-bottom: 0;
}

#articles article p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--grad-accent);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), filter 0.3s var(--ease);
}

#articles article p:last-child a::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

#articles article p:last-child a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-orange);
  filter: brightness(1.06);
}

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

#faq details {
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--surface-glass-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq details:hover {
  border-color: rgba(255, 143, 77, 0.4);
  box-shadow: var(--shadow-md);
}

#faq details[open] {
  border-color: rgba(255, 143, 77, 0.55);
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  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%);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.12);
  color: var(--orange-600);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

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

#faq summary:hover {
  color: var(--orange-600);
  background: rgba(255, 107, 53, 0.05);
}

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

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

#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  gap: 10px;
}

#contact li {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact li:hover {
  transform: translateX(5px);
  border-color: rgba(255, 143, 77, 0.45);
}

#sitemap ul,
#links ul {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

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

#sitemap a,
#links a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.9rem;
  text-align: center;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  background: var(--grad-accent);
  border-color: transparent;
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-orange);
}

footer {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto 32px;
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--grad-accent);
}

footer section {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--surface-glass-border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

footer section:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

footer section h2 {
  font-size: 0.98rem;
  margin-bottom: 0.5em;
  color: var(--orange-600);
}

footer section p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text-soft);
}

footer > p {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--grad-accent);
  color: var(--white);
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-orange);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s, box-shadow 0.35s var(--ease), filter 0.35s var(--ease);
}

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

#back-to-top:hover {
  filter: brightness(1.08);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 16px 38px rgba(255, 107, 53, 0.42);
}

@media (max-width: 1080px) {
  #site-search {
    width: 140px;
  }
  #main-nav a {
    padding: 6px 9px;
    font-size: 0.86rem;
  }
}

@media (max-width: 900px) {
  .header-inner {
    gap: 10px;
  }
  #main-nav {
    order: 10;
    flex-basis: 100%;
    display: none;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    animation: navDrop 0.3s var(--ease);
  }
  #main-nav.is-open {
    display: block;
  }
  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  #main-nav a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
  }
  #menu-toggle {
    display: inline-block;
    margin-left: auto;
  }
  #site-header form[role="search"] {
    order: 11;
    flex-basis: 100%;
    margin-top: 4px;
  }
  #site-search {
    flex: 1 1 auto;
    width: 100%;
  }
  @keyframes navDrop {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }
  main {
    padding: 16px 14px 48px;
  }
  main section {
    padding: 20px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
  }
  #hero {
    padding: 26px 18px;
    border-radius: var(--radius-lg);
  }
  #hero figure {
    padding: 10px;
  }
  #articles {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  footer {
    margin: 0 14px 26px;
    padding: 20px 16px;
    gap: 14px;
  }
  #back-to-top {
    right: 14px;
    bottom: 16px;
    width: 46px;
    height: 46px;
    font-size: 0.56rem;
  }
  blockquote {
    padding: 14px 16px;
  }
}

@media (max-width: 420px) {
  .brand-name {
    font-size: 1.02rem;
  }
  .brand svg {
    width: 34px;
    height: 34px;
  }
  #theme-toggle,
  #menu-toggle {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  #articles article {
    padding: 18px;
  }
}

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

@media print {
  #site-header,
  #back-to-top,
  #theme-toggle,
  #menu-toggle,
  #site-header form[role="search"] {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  main section,
  footer,
  blockquote,
  #news li,
  #articles article {
    box-shadow: none;
    border: 1px solid #ccc;
    opacity: 1;
    transform: none;
    page-break-inside: avoid;
  }
}