/* ==========================================================================
   Cánh Trắng — Professional redesign
   Navy + Gold, dark-first, serious software-company aesthetic
   ========================================================================== */

:root {
  /* Dark (default) */
  --bg-0: #070b14;
  --bg-1: #0b1220;
  --bg-2: #111a2e;
  --bg-3: #16223b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e6edf6;
  --text-dim: #9aa7bd;
  --text-mute: #6b7990;
  --accent: #f5b943;       /* gold */
  --accent-2: #ffd27a;
  --accent-ink: #1a1204;
  --navy: #1f3a7a;
  --success: #35d08a;
  --danger: #ff5f6d;
  --info: #6cb6ff;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 1px 2px rgba(0,0,0,.25);
  --shadow-2: 0 20px 40px -20px rgba(0,0,0,.6), 0 2px 0 rgba(255,255,255,.03) inset;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: 'Inter', var(--font-sans);

  --container: 1240px;
}

html[data-theme="light"] {
  --bg-0: #f5f7fb;
  --bg-1: #ffffff;
  --bg-2: #f2f5fa;
  --bg-3: #e8edf5;
  --line: rgba(10, 22, 40, 0.08);
  --line-strong: rgba(10, 22, 40, 0.16);
  --text: #0b1630;
  --text-dim: #4a5875;
  --text-mute: #7a879d;
  --accent: #b78214;
  --accent-2: #d9a03c;
  --accent-ink: #ffffff;
  --navy: #1f3a7a;
  --shadow-1: 0 1px 0 rgba(255,255,255,0.5) inset, 0 1px 2px rgba(10,22,40,.06);
  --shadow-2: 0 20px 40px -20px rgba(10,22,40,.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle grid / gradient backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(800px 400px at 10% -10%, rgba(245,185,67,0.06), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(108,182,255,0.05), transparent 60%);
  z-index: 0;
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(800px 400px at 10% -10%, rgba(183,130,20,0.07), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(31,58,122,0.05), transparent 60%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* ========================= Typography ========================= */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

.section-title { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
.section-sub { color: var(--text-dim); font-size: 16px; max-width: 640px; margin-top: 12px; }

/* ========================= Navigation ========================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg-0) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1f3a7a, #0b1220);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-display);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-1);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  border: 1px solid rgba(245,185,67,0.25);
  pointer-events: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 15px; letter-spacing: .02em; }
.brand-text small { font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); }

.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-dim);
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--bg-2); }
.nav-link.active { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  color: var(--text);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 8px 20px -10px rgba(245,185,67,.5);
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--text-mute); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
}
.theme-toggle button {
  width: 28px; height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  display: grid; place-items: center;
  font-size: 13px;
}
.theme-toggle button.active {
  background: var(--bg-0);
  color: var(--accent);
  box-shadow: var(--shadow-1);
}

/* ========================= Hero ========================= */
.hero {
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-1);
  margin-bottom: 22px;
}
.hero-badge .dot {
  width: 18px; height: 18px;
  border-radius: 999px;
  background: rgba(53, 208, 138, 0.14);
  color: var(--success);
  display: grid; place-items: center;
  font-size: 9px;
}
.hero-badge .dot::before {
  content: "";
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(53, 208, 138, 0.2);
}
.hero h1 {
  font-size: 64px;
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 10px;
  background: rgba(245,185,67,0.15);
  z-index: -1;
  border-radius: 2px;
}
.hero-lede {
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.6;
  max-width: 540px;
  margin: 0 0 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-meta {
  display: flex;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
  flex-wrap: wrap;
}
.hero-meta .chk { color: var(--accent); margin-right: 6px; }

/* Hero mock (software window) */
.hero-mock {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-1);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  min-height: 440px;
}
.mock-chrome {
  height: 38px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
}
.mock-chrome .dot { width: 11px; height: 11px; border-radius: 999px; background: var(--line-strong); }
.mock-chrome .dot.r { background: #ff5f6d; }
.mock-chrome .dot.y { background: #ffbd2e; }
.mock-chrome .dot.g { background: #35d08a; }
.mock-chrome .title { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); }
.mock-body {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 402px;
}
.mock-side {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  font-size: 12px;
}
.mock-side .grp { color: var(--text-mute); font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 10px 8px 4px; }
.mock-side .item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.mock-side .item .ico { width: 14px; text-align: center; color: var(--text-mute); font-size: 11px; }
.mock-side .item.active { background: var(--bg-3); color: var(--text); }
.mock-side .item.active .ico { color: var(--accent); }

.mock-main { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.mock-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  font-size: 13px;
}
.mock-status .on {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 12px;
}
.mock-status .on::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 4px rgba(53,208,138,.15); }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg-2);
}
.mock-stat .lbl { font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.mock-stat .val { font-size: 20px; font-weight: 600; margin-top: 4px; }
.mock-stat .val.accent { color: var(--accent); }
.mock-stat .val.good { color: var(--success); }
.mock-log {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-dim);
  overflow: hidden;
}
.mock-log .ts { color: var(--text-mute); }
.mock-log .ok { color: var(--success); }
.mock-log .warn { color: var(--accent); }
.mock-log .info { color: var(--info); }

/* ========================= Marquee / Games ========================= */
.games {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.games-lbl {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 22px;
}
.games-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.game-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  font-size: 14px;
  font-weight: 500;
}
.game-chip img { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(245,185,67,.2)); }
.game-chip small { color: var(--text-mute); font-size: 11px; font-family: var(--font-mono); }
.game-chip .g-mark {
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(245,185,67,.15), rgba(245,185,67,.05));
  border: 1px solid rgba(245,185,67,.35);
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .04em;
  font-family: var(--font-mono);
}

/* ========================= Stats ========================= */
.stats {
  padding: 72px 0 40px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-1);
  position: relative;
  overflow: hidden;
}
.stat-card .n { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; }
.stat-card .n .unit { color: var(--accent); margin-left: 4px; font-size: 24px; }
.stat-card .l { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 26px;
  width: 28px; height: 2px;
  background: var(--accent);
}

/* ========================= Services / Features ========================= */
section.pad { padding: 96px 0; }
section.pad.alt { background: var(--bg-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-head .left { max-width: 640px; }
.section-head .eyebrow { margin-bottom: 14px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  background: var(--bg-1);
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-ico {
  width: 42px; height: 42px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--bg-3);
  color: var(--accent);
  font-size: 16px;
  border: 1px solid var(--line);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: .04em;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: var(--bg-2);
}
.tag.gold { color: var(--accent); border-color: rgba(245,185,67,.25); background: rgba(245,185,67,.08); }
.tag.green { color: var(--success); border-color: rgba(53,208,138,.25); background: rgba(53,208,138,.08); }
.tag.blue { color: var(--info); border-color: rgba(108,182,255,.25); background: rgba(108,182,255,.08); }

.card h3 { font-size: 18px; margin-bottom: 8px; font-weight: 600; }
.card .desc { color: var(--text-dim); font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; flex: 1; }
.card ul { list-style: none; padding: 0; margin: 0 0 18px; font-size: 13px; color: var(--text-dim); }
.card ul li { padding: 6px 0; display: flex; gap: 10px; align-items: flex-start; border-top: 1px dashed var(--line); }
.card ul li:first-child { border-top: 0; }
.card ul li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.card .cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
}
.card .cta:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card .cta::after { content: "→"; transition: transform .15s; }
.card .cta:hover::after { transform: translateX(3px); }

/* Two-col about */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-grid p { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.about-grid p + p { margin-top: 16px; }
.about-grid strong { color: var(--text); }

.principles {
  display: grid;
  gap: 12px;
}
.principle {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: var(--bg-1);
}
.principle h4 { font-size: 14px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.principle h4 .n {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: rgba(245,185,67,.1);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid rgba(245,185,67,.25);
}
.principle p { font-size: 13px; color: var(--text-dim); margin: 0; }

/* Accordion */
.accordion { display: grid; gap: 10px; max-width: 900px; margin: 0 auto; }
.ac-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-1);
  overflow: hidden;
}
.ac-summary {
  list-style: none;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}
.ac-summary::-webkit-details-marker { display: none; }
.ac-summary .mark {
  width: 24px; height: 24px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-dim);
  display: grid; place-items: center;
  font-size: 12px;
  transition: transform .2s;
}
details[open] .ac-summary .mark { transform: rotate(45deg); color: var(--accent); }
.ac-body {
  padding: 6px 22px 22px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}
.ac-body ul { padding-left: 20px; }
.ac-body li { margin: 8px 0; }
.table-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 14px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--bg-2); color: var(--text); text-transform: uppercase; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-1);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all .2s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-card .ico { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-3); color: var(--accent); }
.contact-card h4 { font-size: 15px; }
.contact-card p { font-size: 12.5px; color: var(--text-mute); margin: 0; font-family: var(--font-mono); }
.contact-card .go { margin-top: auto; font-size: 13px; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }

/* Footer */
footer {
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text-dim);
  font-size: 13.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-grid h5 { font-size: 13px; color: var(--text); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--accent); }
.footer-bot {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-mute);
  font-family: var(--font-mono);
}

/* Floating actions */
.float-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
  z-index: 40;
}
.float-btn {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--text);
  transition: all .15s;
  box-shadow: var(--shadow-2);
}
.float-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ============== Download page specific ============== */
.page-header {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.crumbs { font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); margin-bottom: 18px; }
.crumbs a { color: var(--text-dim); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 8px; color: var(--line-strong); }

.page-header h1 { font-size: 48px; letter-spacing: -0.03em; font-weight: 700; margin-bottom: 12px; }
.page-header p { color: var(--text-dim); font-size: 16px; max-width: 640px; margin: 0; }

.toolbar {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  align-items: center;
  flex-wrap: wrap;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 42px;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-2);
}
.search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.search input::placeholder { color: var(--text-mute); }
.search .key {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text-dim);
  font-size: 13px;
}
.filter:hover { color: var(--text); border-color: var(--text-mute); }
.filter.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.filter .count {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-left: 6px;
  opacity: .7;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.dl-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-1);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .2s;
}
.dl-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.dl-card .tag-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dl-card h3 { font-size: 17px; font-weight: 600; }
.dl-card p { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; margin: 0; flex: 1; }
.dl-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-mute);
}
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 13px;
  border: 0;
}
.dl-btn:hover { background: var(--accent-2); }
.dl-btn.ext { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.dl-btn.ext:hover { background: var(--bg-2); border-color: var(--accent); color: var(--accent); }

.dl-section { margin-bottom: 64px; }
.dl-section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.dl-section-head .ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg-3);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 18px;
  border: 1px solid var(--line);
}
.dl-section-head h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.dl-section-head .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: .08em;
}
.dl-card .code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}
.dl-card .filename {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-mute);
  word-break: break-all;
}
.dl-card .fmt-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.notice {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--bg-1);
  padding: 28px;
  margin-top: 48px;
}
.notice h3 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.notice h3 i { color: var(--accent); }
.notice ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.notice ul li { display: flex; gap: 12px; color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.notice ul li::before { content: "→"; color: var(--accent); flex-shrink: 0; }
.notice code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 280px;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-2);
  z-index: 60;
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h5 { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }
.tweaks-row { display: flex; gap: 6px; }
.tweaks-row button {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text-dim);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tweaks-row button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

/* Modal */
.modal-ov {
  position: fixed; inset: 0;
  background: rgba(5, 8, 16, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-ov.open { display: flex; }
.modal {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-2);
  position: relative;
}
.modal .close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text-dim);
  display: grid; place-items: center;
}
.modal h3 { font-size: 22px; margin-bottom: 10px; }
.modal p { color: var(--text-dim); font-size: 14px; margin: 0 0 14px; }
.modal ul { padding-left: 20px; color: var(--text-dim); font-size: 14px; }
.modal ul li { margin: 8px 0; }

/* ============== Responsive ============== */
@media (max-width: 980px) {
  .hero { padding: 48px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 44px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dl-grid { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 32px; }
  .page-header h1 { font-size: 36px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 12px 20px; }
  .nav-links .nav-link:not(.cta) { display: none; }
  .hero h1 { font-size: 36px; }
  .hero-mock { min-height: auto; }
  .mock-body { grid-template-columns: 1fr; }
  .mock-side { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  section.pad { padding: 64px 0; }
  .dl-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}
