:root {
  --brand: #c8102e;
  --brand-dark: #a00d24;
  --brand-light: #e8354f;
  --accent: #f5a623;
  --accent-light: #ffc85c;
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --fg: #1a1a1a;
  --fg-soft: #333333;
  --muted: #666666;
  --line: #e5e5e5;
  --card: #f7f7f8;
  --card-hover: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-brand: 0 8px 24px rgba(200, 16, 46, 0.22);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: 16px;
  --grad-brand: linear-gradient(135deg, #c8102e 0%, #e8354f 45%, #f5a623 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(200, 16, 46, 0.08), rgba(245, 166, 35, 0.08));
  --grad-accent: linear-gradient(135deg, #f5a623, #ffc85c);
  --grad-dark: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

body.dark {
  --bg: #0f0f11;
  --bg-alt: #16161a;
  --bg-elevated: rgba(26, 26, 30, 0.72);
  --fg: #ececef;
  --fg-soft: #d4d4d8;
  --muted: #9a9aa2;
  --line: #2a2a30;
  --card: #1a1a1f;
  --card-hover: #212128;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-brand: 0 8px 24px rgba(200, 16, 46, 0.35);
  --glass-bg: rgba(26, 26, 30, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --grad-brand-soft: linear-gradient(135deg, rgba(200, 16, 46, 0.16), rgba(245, 166, 35, 0.12));
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(200, 16, 46, 0.05), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(245, 166, 35, 0.06), transparent 60%);
}

body.dark::before {
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(200, 16, 46, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(245, 166, 35, 0.08), transparent 60%);
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: var(--brand-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

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

button {
  font-family: inherit;
}

::selection {
  background: var(--brand);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--brand), var(--accent));
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-dark);
}

header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

header.site::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-brand);
  opacity: 0.85;
}

.nav-wrap {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  white-space: nowrap;
  transition: transform var(--transition-fast);
}

.logo:hover {
  text-decoration: none;
  transform: scale(1.03);
  color: var(--fg);
}

.logo svg {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: var(--shadow-brand);
  transition: transform var(--transition-slow), box-shadow var(--transition-base);
}

.logo:hover svg {
  transform: rotate(12deg) scale(1.08);
  box-shadow: 0 10px 28px rgba(200, 16, 46, 0.4);
}

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

nav.main a {
  position: relative;
  display: inline-block;
  color: var(--fg-soft);
  font-size: 15px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: color var(--transition-fast), background var(--transition-fast);
}

nav.main a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

nav.main a:hover {
  color: var(--brand);
  text-decoration: none;
  background: var(--grad-brand-soft);
}

nav.main a:hover::after {
  width: 60%;
}

.tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--bg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.search-box input {
  border: 0;
  padding: 7px 14px;
  font-size: 14px;
  outline: none;
  width: 130px;
  background: transparent;
  color: var(--fg);
  transition: width var(--transition-base);
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box input:focus {
  width: 160px;
}

.search-box button {
  border: 0;
  background: var(--grad-brand);
  color: #fff;
  padding: 7px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: filter var(--transition-fast), transform var(--transition-fast);
}

.search-box button:hover {
  filter: brightness(1.1);
}

.search-box button:active {
  transform: scale(0.96);
}

.btn-theme {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--fg);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-theme:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--grad-brand-soft);
  transform: translateY(-1px);
}

.btn-theme:active {
  transform: translateY(0) scale(0.97);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  cursor: pointer;
  color: var(--fg);
  font-size: 14px;
  transition: all var(--transition-fast);
}

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

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

.banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 24px 0;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
  isolation: isolate;
}

.banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.banner::after {
  content: "";
  position: absolute;
  bottom: -60%;
  left: -5%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.slides {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.slide {
  min-width: 100%;
  padding: 60px 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.slide h2 {
  font-size: 32px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  margin: 0;
  padding: 0;
  border: 0;
}

.slide p {
  font-size: 16px;
  max-width: 720px;
  opacity: 0.95;
  color: #fff;
  margin: 0;
  line-height: 1.85;
}

.slide .cta {
  align-self: flex-start;
  background: #fff;
  color: var(--brand);
  padding: 11px 26px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.slide .cta:hover {
  text-decoration: none;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  background: #fff8f0;
}

.slide .cta:active {
  transform: translateY(-1px) scale(0.99);
}

.banner-dots {
  position: absolute;
  bottom: 18px;
  right: 28px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.banner-dots span {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all var(--transition-base);
}

.banner-dots span:hover {
  background: rgba(255, 255, 255, 0.75);
  transform: scale(1.2);
}

.banner-dots span.active {
  background: #fff;
  width: 26px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin: 18px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--muted);
  transition: color var(--transition-fast);
}

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

section.content {
  margin: 40px 0;
}

h1 {
  font-size: 32px;
  line-height: 1.35;
  margin: 12px 0 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, var(--fg) 30%, var(--brand) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--fg);
}

body.dark h1 {
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 25px;
  margin: 34px 0 16px;
  padding-left: 14px;
  border-left: 5px solid var(--brand);
  line-height: 1.4;
  font-weight: 700;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: -5px;
  bottom: -8px;
  width: 48px;
  height: 4px;
  background: var(--grad-accent);
  border-radius: 2px;
  opacity: 0.7;
}

h3 {
  font-size: 19px;
  margin: 24px 0 10px;
  color: var(--fg);
  font-weight: 700;
}

h4 {
  font-size: 16px;
  margin: 16px 0 8px;
  color: var(--fg-soft);
  font-weight: 600;
}

p {
  margin: 10px 0;
  color: var(--fg-soft);
}

.lead {
  font-size: 17px;
  color: var(--fg);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-md);
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  border-top: 1px solid var(--glass-border);
  border-right: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  line-height: 1.85;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 16, 46, 0.25);
  background: var(--card-hover);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--fg-soft);
  font-size: 15px;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card ul li {
  margin: 8px 0;
  padding-left: 18px;
  position: relative;
  font-size: 15px;
}

.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-brand);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.stat {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  border: 1px solid var(--line);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-brand-soft);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.stat:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 16, 46, 0.3);
}

.stat:hover::after {
  opacity: 1;
}

.stat .num {
  font-size: 32px;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand);
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.stat .label {
  font-size: 14px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.articles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.article-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background var(--transition-base);
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition-base);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 16, 46, 0.25);
  background: var(--card-hover);
}

.article-card:hover::before {
  transform: scaleY(1);
}

.article-card .meta {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-card .meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.article-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  transition: color var(--transition-fast);
}

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

.article-card p {
  font-size: 14px;
  color: var(--fg-soft);
  margin: 0;
  line-height: 1.75;
}

.article-card .read {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.article-card .read::after {
  content: "→";
  transition: transform var(--transition-fast);
}

.article-card:hover .read {
  gap: 8px;
}

.article-card:hover .read::after {
  transform: translateX(3px);
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin: 12px 0;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.faq-item:hover {
  border-color: rgba(200, 16, 46, 0.3);
  box-shadow: var(--shadow-sm);
}

.faq-item.open {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 17px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.faq-q:hover {
  background: var(--grad-brand-soft);
  color: var(--brand);
}

.faq-q .icon {
  color: var(--brand);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grad-brand-soft);
  flex-shrink: 0;
  transition: transform var(--transition-base), background var(--transition-fast);
}

.faq-item.open .faq-q .icon {
  transform: rotate(180deg);
  background: var(--grad-brand);
  color: #fff;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-base);
  padding: 0 20px;
}

.faq-a p {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--fg-soft);
  line-height: 1.85;
}

.faq-item.open .faq-a {
  max-height: 600px;
}

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

.howto ol li {
  margin: 12px 0;
  padding: 14px 18px 14px 56px;
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  counter-increment: step;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  color: var(--fg-soft);
}

.howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brand);
}

.howto ol li:hover {
  transform: translateX(4px);
  border-color: rgba(200, 16, 46, 0.3);
  box-shadow: var(--shadow-sm);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.img-wrap {
  margin: 22px 0;
  text-align: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.img-wrap svg {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  transition: transform var(--transition-slow);
}

.img-wrap:hover svg {
  transform: scale(1.015);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  font-size: 15px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
  transition: background var(--transition-fast);
}

th:not(:last-child),
td:not(:last-child) {
  border-right: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--grad-brand-soft);
  color: var(--fg);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
}

tbody tr {
  background: var(--glass-bg);
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--grad-brand-soft);
}

td {
  color: var(--fg-soft);
}

footer.site {
  background: var(--grad-dark);
  color: #ccc;
  margin-top: 60px;
  padding: 48px 20px 24px;
  position: relative;
  overflow: hidden;
}

footer.site::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-brand);
}

footer.site::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 16, 46, 0.15), transparent 70%);
  pointer-events: none;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  position: relative;
  z-index: 1;
}

footer.site h4 {
  color: #fff;
  margin: 0 0 14px;
  font-size: 16px;
  position: relative;
  padding-bottom: 10px;
}

footer.site h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--grad-accent);
}

footer.site a {
  color: #bbb;
  font-size: 14px;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: inline-block;
}

footer.site a:hover {
  color: var(--accent);
  text-decoration: none;
  padding-left: 4px;
}

footer.site ul {
  list-style: none;
  padding: 0;
}

footer.site li {
  margin: 8px 0;
}

footer.site p {
  color: #aaa;
}

.copyright {
  max-width: 1180px;
  margin: 32px auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 13px;
  color: #888;
  text-align: center;
  position: relative;
  z-index: 1;
}

#toTop {
  position: fixed;
  right: 24px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--grad-brand);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: none;
  z-index: 120;
  box-shadow: var(--shadow-brand);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

#toTop:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 30px rgba(200, 16, 46, 0.45);
  filter: brightness(1.1);
}

#toTop:active {
  transform: translateY(-2px) scale(1.02);
}

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

@media (max-width: 1024px) {
  .nav-wrap {
    padding: 10px 16px;
  }
  nav.main a {
    font-size: 14px;
    padding: 5px 9px;
  }
  .slide {
    padding: 50px 32px;
  }
  .slide h2 {
    font-size: 28px;
  }
}

@media (max-width: 900px) {
  .grid.cols-3,
  .grid.cols-2,
  .articles,
  .stats,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  nav.main {
    display: none;
  }
  nav.main.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px;
    box-shadow: var(--shadow-md);
    animation: navSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  nav.main.open ul {
    flex-direction: column;
    gap: 2px;
  }
  nav.main.open a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
  }
  nav.main.open a::after {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .search-box input {
    width: 100px;
  }
  .search-box input:focus {
    width: 120px;
  }
  h1 {
    font-size: 27px;
  }
  h2 {
    font-size: 22px;
  }
  .slide {
    padding: 44px 28px;
  }
  .slide h2 {
    font-size: 25px;
  }
}

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

@media (max-width: 600px) {
  body {
    font-size: 15px;
    line-height: 1.75;
  }
  .nav-wrap {
    padding: 10px 14px;
    gap: 8px;
  }
  .logo {
    font-size: 16px;
  }
  .logo svg {
    width: 30px;
    height: 30px;
  }
  .search-box input {
    width: 0;
    padding: 7px 0;
    opacity: 0;
    pointer-events: none;
  }
  .search-box:focus-within input,
  .search-box input:focus {
    width: 96px;
    padding: 7px 12px;
    opacity: 1;
    pointer-events: auto;
  }
  .btn-theme {
    padding: 6px 10px;
    font-size: 13px;
  }
  .menu-toggle {
    padding: 6px 10px;
    font-size: 13px;
  }
  main {
    padding: 0 14px;
  }
  .banner {
    border-radius: var(--radius-md);
    margin: 16px 0;
  }
  .slide {
    padding: 36px 22px;
    gap: 12px;
  }
  .slide h2 {
    font-size: 22px;
  }
  .slide p {
    font-size: 14px;
  }
  .slide .cta {
    padding: 9px 20px;
    font-size: 14px;
  }
  .banner-dots {
    bottom: 12px;
    right: 18px;
    gap: 6px;
  }
  .banner-dots span {
    width: 8px;
    height: 8px;
  }
  .banner-dots span.active {
    width: 20px;
  }
  .stats,
  .articles,
  .grid.cols-3,
  .grid.cols-2,
  .footer-inner {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 23px;
    line-height: 1.4;
  }
  h2 {
    font-size: 20px;
    padding-left: 11px;
    border-left-width: 4px;
    margin: 28px 0 14px;
  }
  h3 {
    font-size: 17px;
  }
  .lead {
    font-size: 15.5px;
    padding: 16px 18px;
  }
  .card,
  .article-card {
    padding: 18px;
  }
  .stat {
    padding: 18px 12px;
  }
  .stat .num {
    font-size: 27px;
  }
  .faq-q {
    padding: 14px 16px;
    font-size: 15px;
  }
  .faq-a {
    padding: 0 16px;
  }
  .howto ol li {
    padding: 12px 14px 12px 50px;
    font-size: 14.5px;
  }
  .howto ol li::before {
    left: 12px;
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  table {
    font-size: 14px;
  }
  th,
  td {
    padding: 10px 10px;
  }
  footer.site {
    padding: 36px 16px 20px;
    margin-top: 40px;
  }
  #toTop {
    right: 16px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}

@media (max-width: 380px) {
  .logo span {
    display: none;
  }
  .slide h2 {
    font-size: 20px;
  }
  h1 {
    font-size: 21px;
  }
}

@media print {
  header.site,
  footer.site,
  #toTop,
  .banner,
  .tools,
  nav.main {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  .card,
  .article-card,
  .stat,
  .faq-item {
    box-shadow: none;
    border: 1px solid #ccc;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}