/* =============================================================
   FoxText — landing page styles
   Single-file stylesheet. No external fonts, no frameworks.
   ============================================================= */

/* ------------------------------ tokens ------------------------------ */
:root {
  --bg: #0b0c0e;
  --bg-1: #0e1013;
  --bg-2: #111318;
  --bg-3: #15181d;
  --bg-4: #1a1e24;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #edeef0;
  --text-2: #a6acb8;
  --text-3: #8a93a1;

  --accent: #3ddc97;
  --accent-soft: rgba(61, 220, 151, 0.12);
  --accent-line: rgba(61, 220, 151, 0.32);
  --accent-ink: #07130d;

  --blue: #4d8dff;
  --violet: #b58cff;
  --amber: #e2b25c;

  --r-s: 8px;
  --r-m: 10px;
  --r-l: 14px;

  --container: 1200px;
  --gutter: 24px;

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

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  --shadow-2: 0 40px 90px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px var(--line);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
pre {
  margin: 0;
}

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

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

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

::selection {
  background: rgba(61, 220, 151, 0.28);
  color: #fff;
}

/* ------------------------------ helpers ------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 0 0 var(--r-s) 0;
  font-size: 14px;
}

.skip-link:focus {
  left: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
  will-change: opacity, transform;
}

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

/* layout hooks (keep grid children from blowing out their track) */
.hero-copy,
.hero-visual,
.tab-panels,
.oss-code,
.footer-brand {
  min-width: 0;
}

/* ------------------------------ buttons ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-m);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 24px -14px rgba(61, 220, 151, 0.9);
}

.btn-primary:hover {
  background: #52e8a6;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -14px rgba(61, 220, 151, 0.95);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-2);
}

.btn-outline:hover {
  color: var(--text);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

/* ------------------------------ header ------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.28s var(--ease), border-color 0.28s var(--ease),
    backdrop-filter 0.28s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(11, 12, 14, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(180deg, rgba(61, 220, 151, 0.14), rgba(61, 220, 151, 0.02));
  color: var(--accent);
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.nav-link--ext .ico-ext {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

/* language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.lang-btn {
  min-width: 30px;
  height: 26px;
  padding: 0 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

/* mobile menu */
.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
}

.menu-bars {
  display: grid;
  gap: 5px;
  width: 15px;
}

.menu-bars i {
  display: block;
  height: 1.5px;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}

.menu-toggle[aria-expanded="true"] .menu-bars i:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bars i:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(11, 12, 14, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu-inner {
  display: grid;
  gap: 4px;
  padding-block: 14px 22px;
}

.mobile-link {
  padding: 11px 4px;
  font-size: 15px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
}

.mobile-link:last-of-type {
  border-bottom: 0;
}

.mobile-link:hover {
  color: var(--text);
}

.lang-switch--mobile {
  justify-self: start;
  margin-top: 10px;
}

.mobile-cta {
  margin-top: 6px;
  justify-self: start;
}

/* ------------------------------ hero ------------------------------ */
.hero {
  position: relative;
  padding-top: 84px;
  padding-bottom: 96px;
  /* clip horizontally only, so the glow can bleed up behind the header */
  overflow-x: clip;
}

.bg-grid {
  position: absolute;
  inset: -10% -10% 0;
  background-image: repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.04) 0 1px,
      transparent 1px 64px
    ),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 64px);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 100%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -280px;
  left: 50%;
  width: 1100px;
  height: 720px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(61, 220, 151, 0.13) 0%,
    rgba(61, 220, 151, 0.05) 38%,
    transparent 68%
  );
  filter: blur(7px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--text-2);
}

.pulse {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent-line);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.hero-title {
  display: flex;
  flex-direction: column;
  margin-top: 26px;
  font-size: 64px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.accent-text {
  color: var(--accent);
}

.hero-sub {
  margin-top: 22px;
  max-width: 30em;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.hero-meta-item {
  white-space: nowrap;
}

.hero-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

.hero-visual {
  position: relative;
  min-width: 0;
}

/* --------- application window mock --------- */
.app-window {
  position: relative;
  border-radius: var(--r-l);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #14171c 0%, #0f1116 100%);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.app-window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.win-dots {
  display: inline-flex;
  gap: 6px;
  flex: none;
}

.win-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2b3038;
}

.win-dots i:first-child {
  background: #3a4048;
}

.win-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.01em;
}

.win-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.win-live .pulse {
  width: 5px;
  height: 5px;
}

.win-live .pulse::after {
  inset: -3px;
}

.win-body {
  display: grid;
  grid-template-columns: 132px minmax(0, 1.06fr) minmax(0, 0.94fr);
  min-height: 348px;
}

.win-side {
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.side-label {
  padding: 0 6px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.tree {
  display: grid;
  gap: 1px;
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 25px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.tree-item svg {
  width: 13px;
  height: 13px;
  flex: none;
  opacity: 0.75;
}

.tree-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-item--dir {
  color: var(--text-3);
}

.tree-item.is-active {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.tree-item.is-active svg {
  color: var(--accent);
  opacity: 1;
}

.tree-dot {
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.side-chip {
  margin: auto 6px 0;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
}

.win-editor {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.pane-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.pane-name {
  color: var(--text-3);
}

.pane-badge {
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 9.5px;
}

.src {
  padding: 10px 0 12px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 22px;
}

.src .ln,
.shot-src .ln {
  display: flex;
  align-items: baseline;
  min-height: 22px;
  padding-right: 10px;
}

.src .num,
.shot-src .num {
  width: 26px;
  flex: none;
  text-align: right;
  padding-right: 10px;
  color: #3c434d;
  font-size: 10.5px;
  user-select: none;
}

.src .code,
.shot-src .code {
  color: #b9c2ce;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-h1 {
  color: var(--accent);
  font-weight: 600;
}

.t-h2 {
  color: #8fd0ff;
  font-weight: 600;
}

.t-quote {
  color: var(--text-3);
  font-style: italic;
}

.t-b {
  color: #f0d69a;
}

.t-alt {
  color: var(--violet);
}

.t-link {
  color: #7fb2ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.t-fence {
  color: #5d6875;
}

.t-kw {
  color: #ff9ad2;
}

.t-fn {
  color: #9ecbff;
}

.win-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(255, 255, 255, 0.008);
}

.md {
  padding: 12px 14px 16px;
  font-size: 11.5px;
  line-height: 1.7;
  color: #c2c8d2;
  overflow: hidden;
}

.md-h1 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.md-quote {
  margin-top: 8px;
  padding-left: 8px;
  border-left: 2px solid var(--accent-line);
  color: var(--text-3);
  font-style: italic;
}

.md-h2 {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #e8ebef;
}

.md-list {
  margin-top: 5px;
  display: grid;
  gap: 2px;
  padding-left: 13px;
  list-style: disc;
}

.md-list li {
  list-style: inherit;
}

ol.md-list {
  list-style: decimal;
}

.md-list code,
.md-code {
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.md-list code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--violet);
}

.md-link {
  color: #7fb2ff;
}

.md-formula {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(61, 220, 151, 0.05);
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: #d9f7e8;
  font-family: "Times New Roman", Times, serif;
}

.md-formula sup {
  font-size: 0.7em;
  vertical-align: super;
}

.md-code {
  margin-top: 8px;
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #0a0c10;
  border: 1px solid var(--line);
  color: #b9c2ce;
  overflow: hidden;
}

.md-code i {
  font-style: normal;
}

.md-code .t-kw {
  color: #ff9ad2;
}

.md-code .t-fn {
  color: #9ecbff;
}

/* ------------------------------ stats ------------------------------ */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.014), transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  padding: 30px 28px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}

.stat-unit {
  margin-left: 3px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ------------------------------ sections ------------------------------ */
.section {
  padding-block: 120px;
  position: relative;
}

.section--alt {
  background: var(--bg-1);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-title {
  margin-top: 20px;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.032em;
}

.section-sub {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
}

/* ------------------------------ features ------------------------------ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.008));
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease),
    background-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 50px -34px rgba(0, 0, 0, 0.9);
}

.card:hover::before {
  opacity: 1;
}

.card--w1 {
  grid-column: span 1;
}

.card--w2 {
  grid-column: span 2;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent);
}

.card-icon svg {
  width: 19px;
  height: 19px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--text);
}

.card-desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 34em;
}

.card-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 22px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: rgba(0, 0, 0, 0.28);
}

.cv-pane {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.028);
}

.cv-line {
  display: block;
  height: 5px;
  width: 100%;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.13);
}

.cv-line--h {
  background: var(--accent-line);
  width: 55%;
}

.cv-line--w85 {
  width: 85%;
}

.cv-line--w70 {
  width: 70%;
}

.cv-line--w55 {
  width: 55%;
}

.cv-line--w40 {
  width: 40%;
}

.card-visual--code {
  grid-template-columns: 1fr;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.9;
  color: #b9c2ce;
}

.cv-code {
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cv-code .t-kw {
  color: #ff9ad2;
  font-style: normal;
}

.cv-code .t-fn {
  color: #9ecbff;
  font-style: normal;
}

.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.card-chips li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.022);
}

/* ------------------------------ tabs ------------------------------ */
.tabs {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--bg-2);
  overflow: hidden;
}

.tab-list {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.tab {
  position: relative;
  height: 34px;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-3);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.tab:hover {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
}

.tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 22px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--accent);
}

.tab-panel {
  padding: 22px;
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel.is-active {
  animation: panel-in 0.4s var(--ease) both;
}

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

/* simulated screenshot */
.shot {
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: #0a0c10;
  overflow: hidden;
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.shot-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2b3038;
  flex: none;
}

.shot-bar span {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.shot-body {
  display: grid;
  min-height: 268px;
}

.shot-body--split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.shot-src {
  padding: 14px 0;
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 24px;
  overflow: hidden;
}

.shot-src .ln {
  min-height: 24px;
}

.shot-md {
  padding: 16px 18px;
  font-size: 12.5px;
  line-height: 1.75;
  color: #c2c8d2;
  overflow: hidden;
}

.shot-md .md-h1 {
  font-size: 17px;
  border-bottom: 0;
  padding-bottom: 0;
}

.shot-md .md-h2 {
  margin-top: 12px;
  font-size: 13px;
}

.shot-md p {
  margin-top: 6px;
}

.shot-outline {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ol-item {
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.ol-item--1 {
  width: 62%;
}

.ol-item--2 {
  width: 48%;
  margin-left: 12px;
}

.ol-item--3 {
  width: 34%;
  margin-left: 24px;
}

.ol-item.is-current {
  background: var(--accent-line);
}

.shot-body--math {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  padding: 18px;
}

.math-card,
.flow-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}

.math-src {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  word-break: break-all;
}

.math-out {
  padding: 18px 12px;
  border-radius: var(--r-s);
  background: rgba(61, 220, 151, 0.06);
  border: 1px solid rgba(61, 220, 151, 0.16);
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: 22px;
  font-style: italic;
  color: #dcf9ec;
  letter-spacing: 0.01em;
}

.math-out sub,
.math-out sup {
  font-size: 0.6em;
}

.math-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.flow-card {
  align-items: center;
  gap: 6px;
}

.flow-node {
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}

.flow-node--start {
  border-color: var(--line);
  color: var(--text-3);
}

.flow-node--accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.flow-arrow {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
  position: relative;
}

.flow-arrow span {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 5px;
  height: 5px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  transform: translate(-50%, 1px) rotate(45deg);
}

.flow-card .math-tag {
  margin-top: 10px;
}

.shot-body--export {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 8px 0;
  align-content: start;
}

.export-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 120px 54px;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.export-row:last-child {
  border-bottom: 0;
}

.export-ico {
  display: grid;
  place-items: center;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

.export-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #c2c8d2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-bar {
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.export-bar i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  border-radius: inherit;
  background: var(--accent);
}

.export-state {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-align: right;
  color: var(--accent);
}

.export-state--busy {
  color: var(--amber);
}

.export-state--idle {
  color: var(--text-3);
}

.shot-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  margin-top: 20px;
}

.shot-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.shot-desc {
  flex: 1 1 320px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ------------------------------ languages ------------------------------ */
.lang-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lang-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.006));
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease);
}

.lang-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.lang-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.lang-token {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.lang-name {
  font-size: 14.5px;
  font-weight: 600;
}

.lang-code {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.lang-card-desc {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  min-height: 3.4em;
}

.lang-sample {
  display: grid;
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--line);
}

.ls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  background: rgba(10, 12, 16, 0.9);
  font-size: 12px;
}

.ls-row i {
  font-style: normal;
  color: var(--text-2);
}

.ls-row b {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-3);
}

.lang-note {
  margin-top: 28px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-line);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  background: rgba(255, 255, 255, 0.018);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ------------------------------ download ------------------------------ */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dl-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.dl-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 50px -34px rgba(0, 0, 0, 0.9);
}

.dl-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.dl-icon svg {
  width: 21px;
  height: 21px;
}

.dl-name {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.022em;
}

.dl-arch {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}

.dl-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
}

.dl-file > :first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.dl-size {
  flex: none;
  color: var(--text-3);
  opacity: 0.8;
}

.dl-btn {
  margin-top: 16px;
  width: 100%;
}

.dl-btn svg {
  width: 16px;
  height: 16px;
}

/* platform not shipped yet: visible, but clearly not clickable */
.dl-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.dl-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* package managers */
.pkg {
  margin-top: 22px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: rgba(0, 0, 0, 0.22);
}

.pkg-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.pkg-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pkg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, 0.025);
  min-width: 0;
}

.pkg-os {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.pkg-row code {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11.5px;
  color: #cfd6e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  border: 1px solid var(--line);
  color: var(--text-3);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.copy-btn.is-copied {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* ------------------------------ open source ------------------------------ */
.oss-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.oss-copy .section-title {
  max-width: 15em;
}

.oss-points {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.oss-points li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

.oss-dash {
  width: 12px;
  height: 1px;
  margin-top: 12px;
  flex: none;
  background: var(--accent);
  opacity: 0.7;
}

.oss-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.code-card {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: #0a0c10;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.code-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.code-card-head .copy-btn {
  margin-left: auto;
}

.code-card-body {
  margin: 0;
  padding: 18px 20px;
  font-size: 12.5px;
  line-height: 2;
  color: #c2c8d2;
  overflow-x: auto;
}

.code-card-body code {
  font-size: inherit;
  white-space: pre;
}

.c-comment {
  color: #4d5561;
}

.c-kw {
  color: #ff9ad2;
}

.license-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
}

.license-badge {
  padding: 2px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 5px;
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* ------------------------------ footer ------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: 48px;
  padding-block: 64px 48px;
}

.footer-tagline {
  margin-top: 16px;
  max-width: 22em;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-3);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2px;
}

.footer-col a {
  align-self: flex-start;
  max-width: 100%;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-3);
  overflow-wrap: anywhere;
  transition: color 0.18s var(--ease);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line);
}

.footer-copy,
.footer-demo {
  font-size: 12.5px;
  color: var(--text-3);
}

.footer-demo {
  font-family: var(--font-mono);
  font-size: 11.5px;
  opacity: 0.75;
}

/* ------------------------------ back to top / toast ------------------------------ */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(17, 19, 24, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-2);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.95);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

.to-top:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(13, 22, 18, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease),
    visibility 0.24s var(--ease);
}

.toast svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 56px;
  }

  .hero-inner {
    gap: 44px;
  }

  .section-title {
    font-size: 36px;
  }

  .win-body {
    grid-template-columns: 118px minmax(0, 1fr) minmax(0, 0.92fr);
    min-height: 324px;
  }
}

@media (max-width: 1080px) {
  .nav-links {
    gap: 0;
  }

  .nav-link {
    padding: 0 9px;
    font-size: 13.5px;
  }

  .header-cta {
    display: none;
  }
}

@media (max-width: 1024px) {
  .hero {
    padding-top: 64px;
    padding-bottom: 80px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .hero-title {
    font-size: 52px;
  }

  .hero-sub {
    max-width: 34em;
  }

  .hero-visual {
    max-width: 760px;
  }

  .section {
    padding-block: 88px;
  }

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

  .card--w2,
  .card--w1 {
    grid-column: span 1;
  }

  .lang-cards,
  .dl-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .oss-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-block: 52px 40px;
  }

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

  .stat {
    padding: 24px 22px;
  }

  .stat:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-actions .lang-switch {
    display: none;
  }

  .header-inner {
    justify-content: space-between;
  }

  .tab-panel {
    padding: 16px;
  }

  .shot-body--math {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  .hero-title {
    font-size: 42px;
    letter-spacing: -0.03em;
  }

  .hero-sub {
    font-size: 15px;
  }

  .section-title {
    font-size: 30px;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .features-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .card--w1,
  .card--w2 {
    grid-column: span 1;
  }

  .lang-cards,
  .dl-grid,
  .pkg-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .win-body {
    grid-template-columns: 110px minmax(0, 1fr);
    min-height: 0;
  }

  .win-preview {
    display: none;
  }

  .win-editor {
    border-right: 0;
  }

  .shot-body--split {
    grid-template-columns: minmax(0, 1fr);
  }

  .shot-src {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .export-row {
    grid-template-columns: 48px minmax(0, 1fr) 44px;
    gap: 10px;
    padding: 12px 14px;
  }

  .export-bar {
    display: none;
  }

  .tab-list {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tab-list::-webkit-scrollbar {
    display: none;
  }

  .tab {
    padding: 0 12px;
    flex: none;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    padding-block: 72px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 48px;
    padding-bottom: 64px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-meta {
    font-size: 11px;
    gap: 8px;
  }

  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat {
    padding: 18px 0;
    border-left: 0;
  }

  .stat:first-child {
    padding-top: 22px;
  }

  .stat + .stat {
    border-top: 1px solid var(--line);
  }

  .win-side {
    display: none;
  }

  .win-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .md-formula {
    font-size: 11.5px;
  }

  .card,
  .lang-card,
  .dl-card {
    padding: 20px;
  }

  .pkg {
    padding: 16px;
  }

  .math-out {
    font-size: 17px;
    padding: 14px 8px;
  }

  .section-title {
    font-size: 26px;
  }

  .to-top {
    right: 16px;
    bottom: 16px;
    width: 38px;
    height: 38px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 66px;
    justify-content: center;
    transform: translate(0, 10px);
  }

  .toast.is-show {
    transform: translate(0, 0);
  }
}

/* ------------------------------ 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;
  }

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

@media (prefers-contrast: more) {
  :root {
    --text-2: #c8ced8;
    --text-3: #9aa2b0;
    --line: rgba(255, 255, 255, 0.18);
    --line-strong: rgba(255, 255, 255, 0.28);
  }
}
