:root {
  --brand: #ff4d5e;
  --brand-dark: #e63c4d;
  --brand-light: #ff7a88;
  --brand-soft: rgba(255, 77, 94, 0.12);
  --accent: #06d6a0;
  --accent-soft: rgba(6, 214, 160, 0.14);
  --gold: #ffd166;
  --bg: #f7f8fc;
  --bg-alt: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f2f4fa;
  --text: #1b1f2a;
  --text-soft: #4a5164;
  --text-muted: #7a8194;
  --border: rgba(27, 31, 42, 0.08);
  --border-strong: rgba(27, 31, 42, 0.14);
  --shadow-sm: 0 2px 8px rgba(27, 31, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(27, 31, 42, 0.1);
  --shadow-lg: 0 24px 60px rgba(27, 31, 42, 0.16);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 72px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff5c6c;
    --brand-dark: #ff4456;
    --brand-light: #ff8592;
    --brand-soft: rgba(255, 92, 108, 0.18);
    --accent: #2ee6a8;
    --accent-soft: rgba(46, 230, 168, 0.16);
    --gold: #ffd166;
    --bg: #0d1017;
    --bg-alt: #11151f;
    --surface: #171c28;
    --surface-2: #1d2331;
    --text: #eef1f8;
    --text-soft: #c3c9d8;
    --text-muted: #8b93a7;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(23, 28, 40, 0.68);
    --glass-border: rgba(255, 255, 255, 0.1);
  }
}

*,
*::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: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, var(--accent-soft), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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-dark);
}

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

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

h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

h3 {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
}

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

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--brand);
}

blockquote {
  margin: 0 0 1.2em;
  padding: 1.1em 1.4em;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-style: normal;
}

blockquote p {
  margin: 0;
}

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 40px);
  min-height: var(--header-h);
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--text);
  flex-shrink: 0;
}

.brand svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(255, 77, 94, 0.35);
  transition: transform 0.4s var(--ease);
}

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

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

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

#site-header nav li {
  margin: 0;
}

#site-header nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  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);
}

#site-header nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
  transform: translateY(-2px);
}

#site-header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 320px;
  margin-left: auto;
}

#site-header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#site-search {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease);
}

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

#site-search:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

#site-header form[role="search"] button {
  flex-shrink: 0;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 77, 94, 0.32);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    filter 0.25s var(--ease);
}

#site-header form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255, 77, 94, 0.42);
  filter: brightness(1.05);
}

#site-header form[role="search"] button:active {
  transform: translateY(0);
}

/* ============ Main layout ============ */
main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 40px) 64px;
}

main > section,
main > nav {
  margin-bottom: clamp(28px, 4vw, 48px);
}

main > section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.4vw, 40px);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.7s var(--ease) both;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-md);
}

main > section:nth-of-type(1) {
  animation-delay: 0.02s;
}
main > section:nth-of-type(2) {
  animation-delay: 0.06s;
}
main > section:nth-of-type(3) {
  animation-delay: 0.1s;
}
main > section:nth-of-type(4) {
  animation-delay: 0.14s;
}
main > section:nth-of-type(5) {
  animation-delay: 0.18s;
}
main > section:nth-of-type(6) {
  animation-delay: 0.22s;
}

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

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ff4d5e 0%, #ff7a88 38%, #ffb26b 100%);
  border: none;
  color: #fff;
  padding: clamp(28px, 4.5vw, 56px);
  box-shadow: 0 24px 60px rgba(255, 77, 94, 0.32);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 65%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -15%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(6, 214, 160, 0.35), transparent 65%);
  pointer-events: none;
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.14);
  max-width: 900px;
}

#hero > p {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  max-width: 860px;
  line-height: 1.85;
}

#hero .banner {
  margin: 24px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.5s var(--ease);
}

#hero .banner:hover {
  transform: scale(1.012);
}

#hero .banner svg {
  width: 100%;
  height: auto;
  display: block;
}

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

#hero ul li {
  position: relative;
  margin: 0;
  padding: 14px 18px 14px 44px;
  font-size: 0.94rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

#hero ul li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

#hero ul li:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px);
}

/* ============ Breadcrumb ============ */
main > nav[aria-label="面包屑导航"] {
  font-size: 0.88rem;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}

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

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  color: var(--text-muted);
  opacity: 0.6;
}

main > nav[aria-label="面包屑导航"] a {
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

main > nav[aria-label="面包屑导航"] a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

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

/* ============ Section headings ============ */
main > section > h2:first-child {
  position: relative;
  padding-left: 18px;
  margin-bottom: 1.2em;
}

main > section > h2:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--brand-light));
}

/* ============ Products / lists ============ */
#products ul,
#solution ul,
#howto ul,
#howto ol,
#contact ul,
footer ul {
  padding-left: 0;
  list-style: none;
}

#products ul li,
#solution ul li,
#howto ul li,
#howto ol li,
#contact ul li,
footer ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.7em;
}

#products ul li::before,
#solution ul li::before,
#howto ul li::before,
#contact ul li::before,
footer ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 0 0 3px var(--brand-soft);
}

#howto ol {
  counter-reset: step;
}

#howto ol li {
  counter-increment: step;
  padding-left: 40px;
}

#howto ol li::before {
  content: counter(step);
  left: 0;
  top: 0.1em;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(255, 77, 94, 0.35);
}

/* ============ Cases ============ */
#cases blockquote {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

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

/* ============ Articles ============ */
#articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

#articles > h2 {
  grid-column: 1 / -1;
  margin-bottom: 0.4em;
}

#articles > h2:first-child {
  padding-left: 18px;
}

#articles article {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease), background 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
  background: var(--surface);
}

#articles article h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5em;
  transition: color 0.3s var(--ease);
}

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

#articles article p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.8em;
}

#articles article p:nth-of-type(2) {
  color: var(--text-soft);
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#articles article a {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

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

#articles article a:hover {
  background: var(--brand);
  color: #fff;
  transform: translateX(2px);
}

#articles article a:hover::after {
  transform: translateX(3px);
}

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

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

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

#faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  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: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s var(--ease);
}

#faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

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

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

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

/* ============ Contact ============ */
#contact h3 + p {
  padding: 16px 20px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  font-size: 0.94rem;
  line-height: 1.9;
}

#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px 20px;
}

#contact ul li {
  margin: 0;
}

#contact ul a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  background: var(--surface-2);
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

#contact ul a:hover {
  background: var(--brand-soft);
  color: var(--brand);
  transform: translateY(-2px);
}

/* ============ Footer ============ */
footer {
  position: relative;
  margin-top: 24px;
  padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 40px) 32px;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-top: 1px solid var(--border);
  color: var(--text-soft);
}

footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--accent));
}

footer > section {
  max-width: var(--maxw);
  margin: 0 auto 28px;
}

footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.7em;
  color: var(--text);
}

footer h3 {
  font-size: 0.95rem;
  margin: 1em 0 0.4em;
  color: var(--text);
}

footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 1em;
}

footer ul li {
  margin: 0;
  padding-left: 0;
}

footer ul li::before {
  display: none;
}

footer a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

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

footer > p {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============ Back to top ============ */
#back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 90;
  padding: 11px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 77, 94, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    filter 0.3s var(--ease);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 34px rgba(255, 77, 94, 0.5);
  filter: brightness(1.06);
}

#back-to-top:active {
  transform: translateY(-1px) scale(0.98);
}

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

  #site-header nav {
    order: 3;
    flex: 1 1 100%;
  }

  #site-header form[role="search"] {
    flex: 0 1 280px;
  }

  #site-header nav ul {
    gap: 2px;
    padding: 6px 0 2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  #site-header nav a {
    white-space: nowrap;
    font-size: 0.88rem;
    padding: 7px 11px;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
    --radius-lg: 20px;
    --radius-xl: 24px;
  }

  body {
    font-size: 15px;
  }

  #site-header {
    padding: 10px 16px;
    gap: 10px;
  }

  .brand {
    font-size: 1.08rem;
  }

  .brand svg {
    width: 34px;
    height: 34px;
  }

  #site-header form[role="search"] {
    flex: 1 1 100%;
    order: 2;
    margin-left: 0;
  }

  #site-header nav {
    order: 3;
  }

  main {
    padding: 16px 12px 48px;
  }

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

  #hero {
    padding: 24px 18px;
  }

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

  #hero ul li {
    font-size: 0.9rem;
    padding: 12px 14px 12px 40px;
  }

  #hero ul li::before {
    left: 16px;
    width: 12px;
    height: 12px;
  }

  #articles {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #articles article {
    padding: 18px;
  }

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

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

  #faq summary::after {
    right: 16px;
  }

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

  blockquote {
    padding: 1em 1.1em;
  }

  footer {
    padding: 32px 16px 24px;
  }

  #back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 10px 15px;
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  h1 {
    font-size: 1.45rem;
  }

  #site-header nav a {
    font-size: 0.84rem;
    padding: 6px 10px;
  }

  #site-header form[role="search"] button {
    padding: 9px 14px;
  }
}

/* ============ Motion & a11y ============ */
@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;
  }
}

@media (prefers-contrast: more) {
  :root {
    --border: rgba(27, 31, 42, 0.28);
    --text-soft: #2a3040;
    --text-muted: #4a5164;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --border: rgba(255, 255, 255, 0.3);
      --text-soft: #e6eaf3;
      --text-muted: #b9c0d0;
    }
  }
}

@media print {
  #site-header,
  #back-to-top,
  footer::before {
    display: none !important;
  }

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

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

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