:root {
  --primary: #6a3fb5;
  --primary-light: #8b5cf6;
  --primary-dark: #4c2a8a;
  --accent: #f59e0b;
  --accent-soft: #fbbf24;
  --bg: #f7f5fc;
  --bg-alt: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --text: #1f1b2e;
  --text-soft: #4b4560;
  --text-muted: #6b6580;
  --border: rgba(106, 63, 181, 0.14);
  --shadow-sm: 0 2px 10px rgba(76, 42, 138, 0.06);
  --shadow-md: 0 10px 30px rgba(76, 42, 138, 0.10);
  --shadow-lg: 0 20px 50px rgba(76, 42, 138, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --container: 1240px;
  --gap-section: 48px;
  --gap-card: 16px;
  --transition: 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #a78bfa;
    --primary-light: #c4b5fd;
    --primary-dark: #7c3aed;
    --accent: #fbbf24;
    --accent-soft: #fcd34d;
    --bg: #12101a;
    --bg-alt: #1a1726;
    --bg-glass: rgba(30, 26, 44, 0.65);
    --text: #f1eefb;
    --text-soft: #c9c3dd;
    --text-muted: #a49dbb;
    --border: rgba(167, 139, 250, 0.18);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(139, 92, 246, 0.10), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(245, 158, 11, 0.08), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(106, 63, 181, 0.06), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--primary-dark);
}

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

li {
  margin-bottom: 0.4em;
}

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

h1 {
  font-size: 27px;
  margin: 0 0 0.6em;
}

h2 {
  font-size: 23px;
  margin: 0 0 0.7em;
  position: relative;
  padding-bottom: 0.5em;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

h3 {
  font-size: 17px;
  margin: 1.4em 0 0.5em;
}

h4 {
  font-size: 15.5px;
  margin: 1.1em 0 0.4em;
  color: var(--text-soft);
}

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

blockquote {
  margin: 0 0 var(--gap-card);
  padding: 16px 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

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

time {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-header > a {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  transition: transform var(--transition), filter var(--transition);
}

.site-header > a:hover {
  transform: scale(1.04);
  filter: brightness(1.1);
}

.site-header nav {
  flex: 1 1 100%;
}

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

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

.site-header nav a {
  display: inline-block;
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition),
    transform var(--transition);
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--primary-dark);
  background: rgba(139, 92, 246, 0.12);
  transform: translateY(-1px);
}

/* ===== Main container ===== */
main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px;
}

main > section {
  margin-bottom: var(--gap-section);
  animation: fadeUp 0.7s var(--transition) both;
}

main > section:nth-child(2) {
  animation-delay: 0.05s;
}
main > section:nth-child(3) {
  animation-delay: 0.1s;
}
main > section:nth-child(4) {
  animation-delay: 0.15s;
}
main > section:nth-child(5) {
  animation-delay: 0.2s;
}

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

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

/* ===== Hero ===== */
#hero {
  position: relative;
  overflow: hidden;
  padding: 32px 20px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #6a3fb5 0%, #8b5cf6 45%, #f59e0b 130%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

#hero::before,
#hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}

#hero::before {
  width: 320px;
  height: 320px;
  top: -120px;
  right: -80px;
  background: rgba(251, 191, 36, 0.55);
}

#hero::after {
  width: 280px;
  height: 280px;
  bottom: -140px;
  left: -60px;
  background: rgba(255, 255, 255, 0.35);
}

#hero h1 {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
}

#hero p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
  line-height: 1.8;
  max-width: 760px;
}

#hero img {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transition: transform 0.5s var(--transition), box-shadow 0.5s var(--transition);
}

#hero img:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

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

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

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--text-muted);
  opacity: 0.7;
}

main > nav[aria-label="面包屑导航"] a {
  color: var(--primary);
  font-weight: 500;
}

main > nav[aria-label="面包屑导航"] a:hover {
  text-decoration: underline;
}

/* ===== Generic section cards ===== */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#friendlinks {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--shadow-md);
}

#about img,
#products img,
#solutions img,
#cases img {
  margin-top: 20px;
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform 0.5s var(--transition), box-shadow 0.5s var(--transition);
}

#about img:hover,
#products img:hover,
#solutions img:hover,
#cases img:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ===== Products list ===== */
#products ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--gap-card);
  margin-top: 16px;
}

#products ul li {
  position: relative;
  margin: 0;
  padding: 16px 18px 16px 46px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-soft);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

#products ul li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(106, 63, 181, 0.3);
}

#products ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 92, 246, 0.35);
}

/* ===== News ===== */
#news ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--gap-card);
}

#news li {
  margin: 0;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-soft);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

#news li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 92, 246, 0.35);
}

#news time {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-dark);
  background: rgba(139, 92, 246, 0.14);
  border-radius: 999px;
}

/* ===== Articles ===== */
#articles {
  display: grid;
  gap: var(--gap-card);
}

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

#articles article {
  position: relative;
  padding: 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 92, 246, 0.35);
}

#articles article h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
  line-height: 1.4;
  color: var(--text);
}

#articles article p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 10px;
}

#articles article p time {
  font-size: 12.5px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(106, 63, 181, 0.28);
  transition: transform var(--transition), box-shadow var(--transition),
    filter var(--transition);
}

#articles article a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(106, 63, 181, 0.4);
  filter: brightness(1.06);
}

#articles article a::after {
  content: "→";
  margin-left: 6px;
  transition: transform var(--transition);
}

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

/* ===== FAQ ===== */
#faq h3 {
  position: relative;
  padding: 14px 16px 14px 44px;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
}

#faq h3:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 92, 246, 0.35);
}

#faq h3 + p {
  margin: 0 0 14px;
  padding: 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

/* ===== HowTo ===== */
#howto ol,
#howto ul {
  padding-left: 1.4em;
}

#howto ol li,
#howto ul li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

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

#howto ol li {
  position: relative;
  counter-increment: step;
  padding: 12px 16px 12px 48px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(106, 63, 181, 0.3);
}

#howto ol li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* ===== Contact ===== */
#contact p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
  margin: 0 0 8px;
  padding: 10px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform var(--transition), border-color var(--transition);
}

#contact p:hover {
  transform: translateX(4px);
  border-color: rgba(139, 92, 246, 0.35);
}

#contact a {
  font-weight: 600;
  word-break: break-all;
}

#contact a:hover {
  text-decoration: underline;
}

/* ===== Sitemap ===== */
#sitemap ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

#sitemap li {
  margin: 0;
}

#sitemap a {
  display: block;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition),
    transform var(--transition), border-color var(--transition);
}

#sitemap a:hover {
  color: var(--primary-dark);
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-2px);
}

/* ===== Friend links ===== */
#friendlinks ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

#friendlinks li {
  margin: 0;
}

#friendlinks a {
  display: inline-block;
  padding: 4px 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  transition: color var(--transition);
}

#friendlinks a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Footer ===== */
footer {
  margin-top: var(--gap-section);
  padding: 32px 20px 40px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

footer > p {
  max-width: var(--container);
  margin: 0 auto 6px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
}

footer > p a {
  color: var(--text-soft);
  font-size: 12.5px;
}

footer > p a:hover {
  color: var(--primary);
  text-decoration: underline;
}

footer section {
  max-width: var(--container);
  margin: 20px auto 0;
  padding: 16px 18px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

footer section h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-soft);
}

footer section p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ===== Responsive: 720px ===== */
@media (min-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding: 14px 32px;
    flex-wrap: nowrap;
  }

  .site-header nav {
    flex: 0 1 auto;
  }

  .site-header nav ul {
    gap: 2px 4px;
  }

  .site-header nav a {
    font-size: 14px;
    padding: 8px 14px;
  }

  main {
    padding: 28px 32px;
  }

  main > section {
    margin-bottom: 56px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 26px;
  }

  h3 {
    font-size: 18px;
  }

  #hero {
    padding: 44px 36px 48px;
    border-radius: var(--radius-xl);
  }

  #hero p {
    font-size: 16px;
  }

  #hero img {
    margin-top: 28px;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #friendlinks {
    padding: 32px 28px;
    border-radius: var(--radius-xl);
  }

  #products ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

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

  #sitemap ul {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  #friendlinks ul {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 20px;
  }

  footer {
    padding: 40px 32px 48px;
  }

  footer > p {
    font-size: 13px;
  }
}

/* ===== Responsive: 1100px ===== */
@media (min-width: 1100px) {
  body {
    font-size: 16px;
    line-height: 1.78;
  }

  .site-header {
    padding: 16px 40px;
  }

  .site-header > a {
    font-size: 22px;
  }

  .site-header nav a {
    font-size: 14.5px;
    padding: 9px 16px;
  }

  main {
    padding: 36px 40px;
  }

  main > section {
    margin-bottom: 72px;
  }

  h1 {
    font-size: 46px;
    line-height: 1.22;
  }

  h2 {
    font-size: 29px;
  }

  h3 {
    font-size: 19px;
  }

  h4 {
    font-size: 16.5px;
  }

  #hero {
    padding: 64px 56px 60px;
  }

  #hero p {
    font-size: 17px;
    line-height: 1.8;
  }

  #hero img {
    margin-top: 36px;
    border-radius: var(--radius-lg);
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #friendlinks {
    padding: 44px 40px;
  }

  #products ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  #products ul li {
    font-size: 15px;
    padding: 20px 22px 20px 52px;
  }

  #news li {
    font-size: 15px;
    padding: 16px 20px;
  }

  #articles {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  #articles article {
    padding: 24px;
  }

  #articles article h3 {
    font-size: 18px;
  }

  #articles article p {
    font-size: 14px;
  }

  #faq h3 {
    font-size: 16px;
    padding: 16px 20px 16px 50px;
  }

  #faq h3 + p {
    font-size: 15px;
    padding: 0 20px;
  }

  #howto ol li,
  #howto ul li {
    font-size: 15px;
  }

  #contact p {
    font-size: 15px;
    padding: 12px 20px;
  }

  #sitemap ul {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  #sitemap a {
    font-size: 14.5px;
    padding: 12px 18px;
  }

  #friendlinks ul {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 24px;
  }

  #friendlinks a {
    font-size: 14px;
  }

  footer {
    padding: 48px 40px 56px;
  }

  footer > p,
  footer > p a {
    font-size: 13px;
  }

  footer section {
    padding: 20px 24px;
  }

  footer section p {
    font-size: 13px;
  }
}

/* ===== Narrow screens ===== */
@media (max-width: 359px) {
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  #hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 24px;
  }

  #sitemap ul,
  #friendlinks ul {
    grid-template-columns: 1fr;
  }
}

/* ===== Focus visible ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Selection ===== */
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: var(--text);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 999px;
  border: 2px solid var(--bg);
}

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