/* =========================================================================
   TrafficXia — design system
   Single stylesheet replacing index_big / index_small / lianxi_* / xiazai_* /
   help_* / video_* / chongzhi_* / xm_danye_* / normalize.css
   ========================================================================= */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[class], ol[class] { list-style: none; padding: 0; }

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

/* inline icons have no width/height attributes: give them a sane default so
   they never stretch to fill their container */
svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

img { height: auto; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; width: 100%; }

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

/* ---------- 2. Tokens ---------- */
:root {
  /* brand */
  --brand-1: #6366f1;   /* indigo  */
  --brand-2: #22d3ee;   /* cyan    */
  --brand-3: #a855f7;   /* violet  */
  --ok:      #22c55e;
  --warn:    #f59e0b;
  --danger:  #ef4444;

  --grad-brand: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-3) 50%, var(--brand-2) 100%);
  --grad-soft:  linear-gradient(135deg, rgba(99,102,241,.16), rgba(34,211,238,.10));

  /* dark theme (default) */
  --bg:           #070a12;
  --bg-elev:      #0d1220;
  --surface:      rgba(255, 255, 255, .035);
  --surface-2:    rgba(255, 255, 255, .06);
  --surface-hover: rgba(255, 255, 255, .085);
  --border:       rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .17);
  --text:         #e9edf7;
  --text-soft:    #a9b3c9;
  --text-dim:     #74809b;
  --header-bg:    rgba(7, 10, 18, .78);
  --shadow-sm:    0 1px 2px rgba(0,0,0,.4);
  --shadow:       0 10px 30px -12px rgba(0,0,0,.65);
  --shadow-lg:    0 28px 60px -22px rgba(0,0,0,.8);
  --glow:         0 0 0 1px rgba(99,102,241,.35), 0 12px 40px -14px rgba(99,102,241,.55);
  color-scheme: dark;

  /* shape + type */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --maxw: 1200px;
  --gut: clamp(16px, 4vw, 32px);
  --sp: clamp(56px, 8vw, 104px);
}

:root[data-theme="light"] {
  --bg:           #f6f8fc;
  --bg-elev:      #ffffff;
  --surface:      rgba(13, 18, 32, .028);
  --surface-2:    rgba(13, 18, 32, .055);
  --surface-hover: rgba(13, 18, 32, .075);
  --border:       rgba(13, 18, 32, .10);
  --border-strong: rgba(13, 18, 32, .20);
  --text:         #121826;
  --text-soft:    #4a5468;
  --text-dim:     #6b7689;
  --header-bg:    rgba(255, 255, 255, .82);
  --shadow-sm:    0 1px 2px rgba(16,24,40,.07);
  --shadow:       0 10px 28px -14px rgba(16,24,40,.22);
  --shadow-lg:    0 26px 54px -24px rgba(16,24,40,.28);
  --glow:         0 0 0 1px rgba(99,102,241,.25), 0 14px 36px -18px rgba(99,102,241,.4);
  color-scheme: light;
}

/* ---------- 3. Base ---------- */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  letter-spacing: .01em;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ambient background wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 36rem at 12% -8%,  rgba(99,102,241,.20), transparent 62%),
    radial-gradient(48rem 32rem at 92% 4%,   rgba(34,211,238,.14), transparent 60%),
    radial-gradient(52rem 34rem at 50% 112%, rgba(168,85,247,.12), transparent 62%);
}

:root[data-theme="light"] body::before { opacity: .55; }

h1, h2, h3, h4 {
  line-height: 1.22;
  letter-spacing: -.02em;
  font-weight: 750;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 1rem + .7vw, 1.45rem); }

p { text-wrap: pretty; }

::selection { background: rgba(99,102,241,.4); color: #fff; }

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

.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 10px 18px;
  background: var(--brand-1);
  color: #fff;
  border-radius: 0 0 var(--r) var(--r);
  font-weight: 650;
  transition: top .18s;
}
.skip-link:focus { top: 0; }

/* ---------- 4. Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: var(--sp); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }

.section-head {
  max-width: 56ch;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
}

.lede {
  color: var(--text-soft);
  font-size: clamp(1rem, .96rem + .25vw, 1.12rem);
  margin-top: 14px;
}

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- 5. Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

/* The blur lives on a pseudo-element: `backdrop-filter` on the header itself
   would make it the containing block for the fixed mobile drawer inside it. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -.02em;
  flex: 0 0 auto;
}
.brand__mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
}
.brand__mark svg { width: 18px; height: 18px; }
.brand__text small {
  display: block;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: -4px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav__link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  font-size: .92rem;
  font-weight: 560;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color .16s, background .16s;
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__link[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* dropdown */
.nav__group { position: relative; }
.nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav__toggle svg { width: 12px; height: 12px; transition: transform .2s; }
.nav__group.open .nav__toggle svg { transform: rotate(180deg); }
.nav__drop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.nav__group.open .nav__drop { opacity: 1; visibility: visible; transform: none; }
.nav__drop a {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: .9rem;
  color: var(--text-soft);
}
.nav__drop a:hover { background: var(--surface-2); color: var(--text); }

.nav__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }

.lang {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
}
.lang a {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: .8rem;
  font-weight: 650;
  color: var(--text-dim);
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] {
  background: var(--grad-brand);
  color: #fff;
}

.nav__burger { display: none; }

/* theme toggle icon swap */
.icon-btn .i-sun { display: none; }
:root[data-theme="light"] .icon-btn .i-sun { display: block; }
:root[data-theme="light"] .icon-btn .i-moon { display: none; }

/* banner under header */
.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--grad-soft);
  font-size: .86rem;
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px var(--gut);
  text-align: center;
  color: var(--text-soft);
  flex-wrap: wrap;
}
.topbar strong { color: var(--text); font-weight: 650; }
.topbar a {
  color: var(--brand-2);
  font-weight: 650;
  border-bottom: 1px dashed currentColor;
}
.topbar a:hover { color: var(--text); }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: .95rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .14s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(99,102,241,.8);
}
.btn--primary:hover { box-shadow: 0 16px 36px -14px rgba(99,102,241,.95); }

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--surface-hover); }

.btn--sm { padding: 8px 15px; font-size: .86rem; }
.btn--lg { padding: 15px 30px; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- 7. Hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 92px) var(--sp); }

.hero__grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}
@media (min-width: 950px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; }
}

.hero h1 { margin-bottom: 8px; }

.hero__sub {
  color: var(--text-soft);
  font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem);
  max-width: 54ch;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 20px;
}
.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(34,197,94,.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,.22); }
  50%      { box-shadow: 0 0 0 7px rgba(34,197,94,.05); }
}

/* platform chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-soft);
}
.chip svg { width: 14px; height: 14px; }

/* stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  margin-top: 40px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.stat {
  padding: 18px;
  background: var(--bg);
  text-align: center;
}
.stat b {
  display: block;
  font-size: clamp(1.3rem, 1.1rem + .8vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span {
  font-size: .8rem;
  color: var(--text-dim);
}

/* ---------- 8. Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 28px);
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.card--hover:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.card__icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--brand-2);
  margin-bottom: 18px;
}
.card__icon svg { width: 22px; height: 22px; }

.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-soft); font-size: .95rem; }

.grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.feature-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}
.feature-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .93rem;
  color: var(--text-soft);
}
.feature-list svg {
  width: 17px; height: 17px;
  flex: 0 0 auto;
  margin-top: 4px;
  color: var(--ok);
}

/* ---------- 9. Video facade (lazy embeds) ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #05070d;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.video iframe,
.video img.video__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.video__btn {
  position: absolute;
  inset: 0;
  width: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(5,7,13,.08), rgba(5,7,13,.62));
  cursor: pointer;
  padding: 0;
}
.video__play {
  width: 68px; height: 68px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad-brand);
  box-shadow: 0 14px 40px -10px rgba(99,102,241,.85);
  transition: transform .2s;
}
.video__play svg { width: 26px; height: 26px; color: #fff; margin-left: 3px; }
.video__btn:hover .video__play { transform: scale(1.1); }
.video__label {
  position: absolute;
  left: 14px; bottom: 12px;
  right: 14px;
  font-size: .82rem;
  font-weight: 600;
  color: #e9edf7;
  text-shadow: 0 1px 10px rgba(0,0,0,.9);
  text-align: left;
}
.video__src {
  position: absolute;
  right: 12px; top: 12px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: rgba(5,7,13,.72);
  border: 1px solid rgba(255,255,255,.16);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #cfd6e6;
}

.video-card { display: grid; gap: 12px; }
.video-card__title {
  font-size: .95rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.45;
}

/* ---------- 10. Pricing / comparison ---------- */
.plans {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr));
  align-items: start;
}

.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan--featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box,
    var(--grad-brand) border-box;
  border: 1px solid transparent;
  box-shadow: var(--glow);
}
.plan__tag {
  position: absolute;
  top: -11px; left: 22px;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: var(--grad-brand);
  color: #fff;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.plan__name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.03em;
}
.plan__price small {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0;
}
.plan__specs {
  display: grid;
  gap: 8px;
  font-size: .87rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.plan__specs div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.plan__specs b { color: var(--text); font-weight: 650; }
.plan .btn { margin-top: auto; }

/* comparison table */
.table-wrap {
  margin-top: 30px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.cmp {
  min-width: 740px;
  font-size: .9rem;
}
.cmp th, .cmp td {
  padding: 13px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.cmp thead th {
  background: var(--bg-elev);
  font-weight: 700;
  font-size: .86rem;
  color: var(--text);
  z-index: 2;
  white-space: nowrap;
}
.cmp tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg);
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 190px;
}
.cmp tbody tr:hover td { background: var(--surface-2); }
.cmp tbody tr:last-child th,
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp td { color: var(--text-soft); }
.cmp .yes, .cmp .no {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: .76rem;
  font-weight: 800;
}
.cmp .yes { background: rgba(34,197,94,.16); color: #4ade80; }
.cmp .no  { background: rgba(239,68,68,.14);  color: #fb7185; }
.cmp .hl { color: var(--text); font-weight: 650; }

/* ---------- 11. Download list ---------- */
.dl-list { display: grid; gap: 12px; }

.dl {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: transform .18s, border-color .18s, background .18s, box-shadow .18s;
}
.dl:hover {
  transform: translateX(3px);
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.dl__icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--brand-2);
}
.dl__icon svg { width: 22px; height: 22px; }
.dl__body { min-width: 0; }
.dl__name {
  font-weight: 650;
  font-size: .98rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.dl__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: .78rem;
  color: var(--text-dim);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .72rem;
  font-weight: 650;
  color: var(--text-soft);
}
.badge--v { color: var(--brand-2); border-color: rgba(34,211,238,.3); }
.badge--new { color: #4ade80; border-color: rgba(34,197,94,.3); }
.dl__cta { flex: 0 0 auto; }

@media (max-width: 620px) {
  .dl { grid-template-columns: 40px 1fr; }
  .dl__icon { width: 40px; height: 40px; }
  .dl__cta { grid-column: 1 / -1; }
  .dl__cta .btn { width: 100%; }
}

/* ---------- 12. Projects (search + grid) ---------- */
.filters {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.search {
  position: relative;
  max-width: 480px;
}
.search svg {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 13px 44px 13px 44px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .95rem;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.search input::placeholder { color: var(--text-dim); }
.search input:focus {
  outline: none;
  border-color: var(--brand-1);
  background: var(--bg-elev);
  box-shadow: 0 0 0 4px rgba(99,102,241,.15);
}
.search__clear {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-soft);
  cursor: pointer;
  display: none;
  place-items: center;
}
.search__clear svg { position: static; transform: none; width: 14px; height: 14px; }
.search.has-value .search__clear { display: grid; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tab {
  padding: 7px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
.tab:hover { background: var(--surface-hover); color: var(--text); }
.tab[aria-selected="true"] {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
}
.tab span {
  opacity: .7;
  font-size: .78em;
  margin-left: 4px;
}

.result-count {
  font-size: .86rem;
  color: var(--text-dim);
}

.proj-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.proj {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: transform .18s, border-color .18s, background .18s, box-shadow .18s;
  content-visibility: auto;
  contain-intrinsic-size: auto 150px;
}
.proj:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.proj__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.proj__id {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  color: var(--brand-2);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(34,211,238,.1);
  border: 1px solid rgba(34,211,238,.24);
}
.proj__cat {
  font-size: .72rem;
  font-weight: 650;
  color: var(--text-dim);
}
.proj__name {
  font-size: .96rem;
  font-weight: 650;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}
.proj__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 650;
  color: var(--brand-2);
}
.proj__foot svg { width: 14px; height: 14px; transition: transform .18s; }
.proj:hover .proj__foot svg { transform: translateX(3px); }

.empty {
  padding: 56px 20px;
  text-align: center;
  color: var(--text-dim);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
}
.empty svg { width: 40px; height: 40px; margin: 0 auto 14px; opacity: .5; }

/* ---------- 13. Article / help ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.breadcrumb a:hover { color: var(--brand-2); }
.breadcrumb svg { width: 12px; height: 12px; opacity: .6; }

.article-layout {
  display: grid;
  gap: clamp(26px, 4vw, 44px);
  align-items: start;
}
@media (min-width: 1000px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 266px; }
  .article-layout--left { grid-template-columns: 250px minmax(0, 1fr); }
}

.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.7em; }
.prose p, .prose li { color: var(--text-soft); }
.prose strong { color: var(--text); font-weight: 650; }
.prose a {
  color: var(--brand-2);
  border-bottom: 1px solid rgba(34,211,238,.35);
  overflow-wrap: anywhere;
}
.prose a:hover { border-bottom-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .5em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li {
  position: relative;
  padding-left: 1.5em;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: .35em; top: .72em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad-brand);
}
.prose hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin-block: 2em;
}
.prose code {
  font-family: var(--mono);
  font-size: .88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
}

/* definition-style help entries */
.defs { display: grid; gap: 12px; }
.def {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-1);
  border-radius: 0 var(--r) var(--r) 0;
}
.def dt {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
  font-size: .97rem;
}
.def dd {
  margin: 0;
  color: var(--text-soft);
  font-size: .93rem;
  overflow-wrap: anywhere;
}

.toc {
  position: sticky;
  top: 92px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: .88rem;
}
.toc h4 {
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.toc ol { display: grid; gap: 4px; counter-reset: t; list-style: none; padding: 0; }
.toc a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  transition: background .16s, color .16s;
}
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc a[aria-current="page"] {
  background: var(--grad-soft);
  color: var(--text);
  font-weight: 650;
}

/* key/value info rows (project official urls) */
.kv {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}
@media (min-width: 640px) { .kv { grid-template-columns: 1fr 1fr; } }
.kv__item {
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.kv__k {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 7px;
}
.kv__k svg { width: 14px; height: 14px; }
.kv__v {
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand-2);
  overflow-wrap: anywhere;
}
.kv__v:hover { color: var(--text); }

/* prev / next */
.pager {
  display: grid;
  gap: 12px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color .18s, background .18s, transform .18s;
}
.pager a:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.pager small {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.pager b { font-weight: 650; font-size: .93rem; line-height: 1.45; }
.pager .next { text-align: right; }

/* ---------- 14. Steps / numbered flow ---------- */
.steps { counter-reset: s; display: grid; gap: 14px; }
.step {
  counter-increment: s;
  position: relative;
  padding: 18px 20px 18px 62px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.step::before {
  content: counter(s);
  position: absolute;
  left: 18px; top: 17px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
}
.step h4 { margin-bottom: 5px; font-size: 1rem; }
.step p { color: var(--text-soft); font-size: .92rem; }

/* flow pills */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.flow span {
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-soft);
}
.flow svg { width: 14px; height: 14px; color: var(--text-dim); }

/* ---------- 15. Notice / callout ---------- */
.notice {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--r);
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.3);
  color: var(--text-soft);
  font-size: .93rem;
}
.notice svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--warn); margin-top: 3px; }
.notice strong { color: var(--text); }
.notice--info {
  background: rgba(34,211,238,.07);
  border-color: rgba(34,211,238,.28);
}
.notice--info svg { color: var(--brand-2); }
.notice--ok {
  background: rgba(34,197,94,.08);
  border-color: rgba(34,197,94,.28);
}
.notice--ok svg { color: var(--ok); }

/* ---------- 16. Contact ---------- */
.contact-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.contact {
  display: grid;
  gap: 12px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.contact:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.contact__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--brand-2);
}
.contact__icon svg { width: 21px; height: 21px; }
.contact__k { font-size: .8rem; color: var(--text-dim); font-weight: 650; }
.contact__v {
  font-size: 1.02rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.contact a.contact__v:hover { color: var(--brand-2); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 650;
  cursor: pointer;
  width: fit-content;
}
.copy-btn:hover { background: var(--surface-hover); color: var(--text); }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn.copied { color: var(--ok); border-color: rgba(34,197,94,.4); }

/* ---------- 17. Gallery (seo screenshots) ---------- */
.shots {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}
.shot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.shot:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.shot img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top left; background: #0b0f1a; }
.shot figcaption {
  padding: 13px 16px;
  font-size: .88rem;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rank {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 24px; height: 24px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--grad-brand);
  color: #fff;
  font-size: .73rem;
  font-weight: 800;
}

/* ---------- 18. CTA band ---------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--grad-soft);
  padding: clamp(30px, 5vw, 56px);
  text-align: center;
}
.cta::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 120%;
  background: radial-gradient(40rem 20rem at 50% 0, rgba(99,102,241,.22), transparent 70%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta p { color: var(--text-soft); max-width: 58ch; margin: 14px auto 0; }
.cta .btn-row { justify-content: center; }

/* ---------- 19. Footer ---------- */
.site-footer {
  margin-top: var(--sp);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, var(--surface));
  font-size: .9rem;
}
.footer__grid {
  display: grid;
  gap: clamp(26px, 4vw, 48px);
  padding-block: clamp(40px, 6vw, 64px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}
.footer__brand { max-width: 34ch; }
.footer__brand p {
  color: var(--text-dim);
  font-size: .87rem;
  margin-top: 14px;
}
.footer h5 {
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
  font-weight: 700;
}
.footer ul { display: grid; gap: 9px; }
.footer a { color: var(--text-soft); }
.footer a:hover { color: var(--brand-2); }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-block: 18px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-dim);
}
.footer__links span { font-weight: 650; color: var(--text-soft); }
.footer__links a { color: var(--text-dim); }

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .82rem;
}
.footer__badges {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer__badges img { border-radius: 4px; }
.footer__badges a { display: grid; gap: 3px; justify-items: center; font-size: .7rem; }

/* ---------- 20. Back to top ---------- */
.totop {
  position: fixed;
  right: 18px; bottom: 90px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-soft);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s, visibility .2s, color .2s;
  z-index: 90;
}
.totop.show { opacity: 1; visibility: visible; transform: none; }
.totop:hover { color: var(--text); }
.totop svg { width: 18px; height: 18px; }

/* ---------- 21. Mobile nav ---------- */
@media (max-width: 1040px) {
  .nav__burger {
    display: grid;
    place-items: center;
  }
  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    height: 100%;
    width: min(88vw, 340px);
    margin-left: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 84px 20px 30px;
    background: var(--bg-elev);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
    z-index: 110;
  }
  .nav__menu.open { transform: none; }
  .nav__link { padding: 12px 14px; border-radius: var(--r-sm); font-size: 1rem;
               color: var(--text); font-weight: 600; }
  .nav__drop a { color: var(--text-soft); font-size: .95rem; padding: 11px 12px; }
  .nav__group { position: static; }
  .nav__drop {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: var(--surface);
    margin: 2px 0 6px 12px;
    display: none;
  }
  .nav__group.open .nav__drop { display: grid; }
  .nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 12, .6);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    z-index: 105;
  }
  .nav-scrim.show { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
}

@media (min-width: 1041px) {
  .nav-scrim { display: none; }
}

/* ---------- 22. Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 23. Print ---------- */
@media print {
  .site-header, .site-footer, .totop, .video__btn, .nav-scrim, .topbar { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  a { color: #000; text-decoration: underline; }
}

/* ---------- 24. Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* icon sizes in contexts without a dedicated rule */
.topbar__in > svg { width: 16px; height: 16px; color: var(--brand-2); }
.eyebrow svg { width: 15px; height: 15px; }
.pager small svg { width: 12px; height: 12px; display: inline-block; vertical-align: -2px; }
.breadcrumb svg { width: 12px; height: 12px; }
.proj__foot svg, .flow svg { width: 14px; height: 14px; }

/* ---------- 25. Retired video placeholder ---------- */
.video--gone {
  background: var(--surface);
  border-style: dashed;
  border-color: var(--border-strong);
  box-shadow: none;
}
.video__gone {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 22px;
  text-align: center;
}
.video__gone > svg {
  width: 30px; height: 30px;
  color: var(--text-dim);
  opacity: .7;
}
.video__gone-t {
  font-size: .95rem;
  font-weight: 650;
  color: var(--text);
}
.video__gone-b {
  font-size: .84rem;
  color: var(--text-dim);
  max-width: 34ch;
}
.video__gone .btn { margin-top: 6px; }
