/*
 * Kilo website. The design tokens are the app's own (mobile/lib/theme/
 * app_colors.dart): light is #F5F5F7 with the blue accent, dark is GitHub's
 * black with its green -- following the system unless the visitor picks one
 * with the switch in the nav (html[data-theme]). Type is the app's pairing:
 * Sora for headings and numbers, Inter for text.
 */

/* ------------------------------------------------------------ fonts */

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin-ext.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------ tokens */

:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-alt: #ececf0;
  --card: #ffffff;
  --card2: #eeeef1;
  --line: #e3e3e8;
  --txt: #16171b;
  --mut: #5f5f68;
  --mut2: #84848c;
  --accent: #2f6feb;
  --accent-ink: #1f5fd9;
  --accent-soft: rgba(47, 111, 235, 0.1);
  --on-accent: #ffffff;
  --teal: #0ea884;
  --purple: #6d5ce8;
  --yellow: #c98a10;
  --green: #1fa76a;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px -12px rgba(16, 24, 40, 0.14);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.04), 0 30px 60px -20px rgba(16, 24, 40, 0.28);
  --phone-frame: #16171b;
  --hm0: color-mix(in srgb, var(--txt) 8%, var(--card));
  --hm1: color-mix(in srgb, var(--accent) 30%, var(--hm0));
  --hm2: color-mix(in srgb, var(--accent) 50%, var(--hm0));
  --hm3: color-mix(in srgb, var(--accent) 75%, var(--hm0));
  --hm4: var(--accent);
  --logo-tile: var(--accent);
  --logo-glyph: var(--on-accent);
  --logo-line: transparent;

  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --gutter: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* GitHub's dark theme, like the app's dark mode. Written twice: once for
   "follow the system", once for an explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #010409;
    --bg-alt: #0a0d12;
    --card: #0d1117;
    --card2: #161b22;
    --line: #30363d;
    --txt: #e6edf3;
    --mut: #9da7b3;
    --mut2: #8b949e;
    --accent: #3fb950;
    --accent-ink: #3fb950;
    --accent-soft: rgba(63, 185, 80, 0.16);
    --on-accent: #0d1117;
    --teal: #1fd6a8;
    --purple: #a371f7;
    --yellow: #d29922;
    --green: #3fb950;
    --shadow: 0 0 0 1px var(--line);
    --shadow-lg: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(0, 0, 0, 0.9);
    --phone-frame: #1f242c;
    --hm0: #161b22;
    --hm1: #0e4429;
    --hm2: #006d32;
    --hm3: #26a641;
    --hm4: #39d353;
    --logo-tile: var(--card);
    --logo-glyph: var(--txt);
    --logo-line: var(--line);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #010409;
  --bg-alt: #0a0d12;
  --card: #0d1117;
  --card2: #161b22;
  --line: #30363d;
  --txt: #e6edf3;
  --mut: #9da7b3;
  --mut2: #8b949e;
  --accent: #3fb950;
  --accent-ink: #3fb950;
  --accent-soft: rgba(63, 185, 80, 0.16);
  --on-accent: #0d1117;
  --teal: #1fd6a8;
  --purple: #a371f7;
  --yellow: #d29922;
  --green: #3fb950;
  --shadow: 0 0 0 1px var(--line);
  --shadow-lg: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  --phone-frame: #1f242c;
  --hm0: #161b22;
  --hm1: #0e4429;
  --hm2: #006d32;
  --hm3: #26a641;
  --hm4: #39d353;
  --logo-tile: var(--card);
  --logo-glyph: var(--txt);
  --logo-line: var(--line);
}

/* ------------------------------------------------------------ base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
html.calm { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.85em; }
::selection { background: var(--accent); color: var(--on-accent); }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Language: both texts sit side by side, the inactive one is hidden. */
html[lang="en"] [data-l="de"],
html:not([lang="en"]) [data-l="en"] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform 0.2s;
}
.skip:focus { transform: none; }

/* ------------------------------------------------------------ type */

.h2, .h3, .h4, .hero__title, .stat dt, .brand__name {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin: 0;
}
.h2 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.04; font-weight: 750; }
.h3 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; font-weight: 700; }
.h4 { font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--accent);
}
.lede { margin: 18px 0 0; max-width: 640px; font-size: clamp(17px, 1.6vw, 19px); color: var(--mut); }

.head { margin-bottom: clamp(36px, 5vw, 56px); }
.head--center { text-align: center; }
.head--center .lede { margin-left: auto; margin-right: auto; }

.fineprint { margin: 22px 0 0; font-size: 14px; color: var(--mut); max-width: 760px; }
.fineprint--center { margin-left: auto; margin-right: auto; text-align: center; }

.textlink {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-ink); font-weight: 600; text-decoration: none;
}
.textlink svg { width: 16px; height: 16px; stroke-width: 2.2; }
.textlink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ buttons */

.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--h); padding: 0 20px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-display); font-size: 15px; font-weight: 650; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background-color 0.2s;
  box-shadow: 0 6px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn svg { width: 18px; height: 18px; stroke-width: 2.2; flex: none; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--sm { --h: 38px; padding: 0 15px; font-size: 14px; }
.btn--lg { --h: 54px; padding: 0 26px; font-size: 16px; }
.btn--ghost {
  background: var(--card); color: var(--txt);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--txt) 25%, var(--line)); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 0; background: transparent; color: var(--txt); text-decoration: none;
  transition: background-color 0.2s;
}
.icon-btn:hover { background: var(--card2); }
.icon-btn svg { width: 20px; height: 20px; stroke-width: 2; }

/* Sun in light, moon in dark: shows the mode you're in. */
.icon-btn__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn__sun { display: none; }
  :root:not([data-theme="light"]) .icon-btn__moon { display: block; }
}
:root[data-theme="dark"] .icon-btn__sun { display: none; }
:root[data-theme="dark"] .icon-btn__moon { display: block; }

/* ------------------------------------------------------------ logo */

.kilo-mark { width: 100%; height: 100%; overflow: visible; }
.kilo-mark__tile { fill: var(--logo-tile); transition: fill 0.3s; }
.kilo-mark__line { fill: none; stroke: var(--logo-line); stroke-width: 1; }
.kilo-mark__glyph { fill: var(--logo-glyph); transition: fill 0.3s; }

/* ------------------------------------------------------------ launch */

/* Like opening the app: the barbell drops onto its tile, then the page.
   Pure CSS fades it out even if the scripts never run. */
.launch { display: none; }
.intro-on .launch {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: var(--bg);
  animation: launch-out 0.45s var(--ease) 1.05s forwards;
}
.launch__logo { width: 104px; height: 104px; }
.intro-on .launch__logo { animation: launch-logo 0.45s var(--ease) 1.05s forwards; }
@keyframes launch-out { to { opacity: 0; visibility: hidden; } }
@keyframes launch-logo { to { transform: scale(0.85); } }

/* ------------------------------------------------------------ nav */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 20px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--txt); }
.brand__logo { width: 34px; height: 34px; flex: none; }
.brand__logo img, .download__logo img { width: 100%; height: 100%; }
.brand__name { font-size: 22px; font-weight: 750; }

.nav__links { display: flex; gap: 4px; margin-left: 12px; }
.nav__links a {
  padding: 8px 12px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--mut); text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav__links a:hover { color: var(--txt); background: var(--card2); }
.nav__links a.is-active { color: var(--txt); }

.nav__tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.lang {
  display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card2);
}
.lang button {
  border: 0; background: transparent; padding: 5px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--mut);
}
.lang button[aria-pressed="true"] { background: var(--card); color: var(--txt); box-shadow: var(--shadow); }

.nav__menu {
  display: none; width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--card2);
  position: relative;
}
.nav__menu span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--txt);
  transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}
.nav__menu span:first-child { top: 15px; }
.nav__menu span:last-child { top: 23px; }
.nav__menu[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav__menu[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

@media (max-width: 1020px) {
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 4px; border-radius: 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__links a:hover { background: transparent; }
  .nav__menu { display: inline-block; }
  .no-js .nav__links { position: static; display: flex; flex-direction: row; flex-wrap: wrap; border: 0; padding: 0; background: none; }
  .no-js .nav__menu { display: none; }
}
@media (max-width: 560px) {
  .nav__gh, .nav__cta { display: none; }
  .nav__inner { gap: 10px; }
}

/* ------------------------------------------------------------ reveal */

.js [data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.calm [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ------------------------------------------------------------ hero */

.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(16px, 3vw, 40px); overflow: hidden; }
.hero__grid-bg {
  position: absolute; inset: -40px -20% auto; height: 620px; pointer-events: none;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(60% 70% at 70% 35%, #000 0%, transparent 75%);
  mask-image: radial-gradient(60% 70% at 70% 35%, #000 0%, transparent 75%);
}
.hero__grid-bg svg { width: 100%; height: 100%; }
:root[data-theme="dark"] .hero__grid-bg { opacity: 0.32; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero__grid-bg { opacity: 0.32; } }
@media (max-width: 900px) { .hero__grid-bg { opacity: 0.22 !important; } }
.hero__inner {
  position: relative;
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(24px, 4vw, 64px); align-items: center;
}
.hero__title {
  font-size: clamp(46px, 7.4vw, 92px); line-height: 0.98; font-weight: 800; letter-spacing: -0.045em;
  margin: 18px 0 0;
}
.hero__title em { font-style: normal; color: var(--accent); }
.hero__lede { margin: 24px 0 0; max-width: 560px; font-size: clamp(17px, 1.7vw, 20px); color: var(--mut); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 28px 0 0; list-style: none;
  font-size: 14px; color: var(--mut);
}
.hero__meta li { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { width: 16px; height: 16px; stroke-width: 2; color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 12px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow);
  font-size: 14px; color: var(--txt); text-decoration: none;
}
.chip[hidden] { display: none; }
.chip b { font-family: var(--font-display); }
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent); }
.chip__more {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 13px;
}
.chip__more svg { width: 14px; height: 14px; stroke-width: 2.4; transition: transform 0.2s; }
.chip:hover .chip__more svg { transform: translateX(2px); }

.hero__stage { position: relative; display: grid; place-items: center; padding: 20px 0; }
.hero__glow {
  position: absolute; width: 120%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 26%, transparent), transparent);
  filter: blur(10px); pointer-events: none;
}

/* Phone */
.phone {
  position: relative; width: min(330px, 78vw);
  padding: 10px; border-radius: 52px;
  background: var(--phone-frame);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.phone::before {
  content: ""; position: absolute; top: 22px; left: 50%; z-index: 2;
  width: 84px; height: 24px; margin-left: -42px; border-radius: 999px; background: #000;
}
.phone__screen {
  position: relative; overflow: hidden; border-radius: 42px; aspect-ratio: 780 / 1733;
  background: var(--bg);
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s; }
.phone__screen img.is-swapping { opacity: 0; }
.phone--hero { width: min(340px, 74vw); }
.js .phone--hero { animation: rise 0.9s var(--ease) both; animation-delay: var(--hero-delay, 0s); }

.float {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px; border-radius: 20px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-display); line-height: 1.2;
}
.float small { display: block; font-family: var(--font-body); font-size: 12.5px; color: var(--mut); }
.float b { display: block; font-size: 18px; letter-spacing: -0.02em; }
.float__bar { display: block; width: 120px; height: 6px; margin-top: 8px; border-radius: 6px; background: var(--card2); overflow: hidden; }
.float__bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.float__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.float__icon svg { width: 22px; height: 22px; stroke-width: 2.2; }
.float--rank { right: -4%; top: 26%; }
.float--rank img { width: 60px; height: 60px; filter: drop-shadow(0 6px 14px rgba(46, 242, 208, 0.35)); }
.float--streak { left: -2%; top: 8%; padding-right: 18px; }
.float--streak img { width: 34px; height: 34px; }
.float--streak b { font-size: 22px; }
.float--pr { left: -6%; bottom: 14%; }
.js .float { animation: pop 0.7s var(--ease) both, bob 6s ease-in-out infinite; }
.js .float--streak { animation-delay: calc(var(--hero-delay, 0s) + 0.45s), 0s; }
.js .float--rank { animation-delay: calc(var(--hero-delay, 0s) + 0.6s), -2s; }
.js .float--pr { animation-delay: calc(var(--hero-delay, 0s) + 0.75s), -4s; }

.js .hero__copy > * { animation: rise 0.8s var(--ease) both; }
.js .hero__copy > :nth-child(2) { animation-delay: calc(var(--hero-delay, 0s) + 0.06s); }
.js .hero__copy > :nth-child(3) { animation-delay: calc(var(--hero-delay, 0s) + 0.14s); }
.js .hero__copy > :nth-child(4) { animation-delay: calc(var(--hero-delay, 0s) + 0.22s); }
.js .hero__copy > :nth-child(5) { animation-delay: calc(var(--hero-delay, 0s) + 0.3s); }
.intro-on { --hero-delay: 1.15s; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.92); } }
@keyframes bob { 50% { translate: 0 -8px; } }
.calm .float, .calm .hero__copy > *, .calm .phone--hero { animation: none !important; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__copy { text-align: center; }
  .hero__lede { margin-left: auto; margin-right: auto; }
  .hero__ctas, .hero__meta { justify-content: center; }
  .hero__stage { margin-top: 12px; }
  .float--rank { right: 0; }
  .float--streak { left: 0; }
  .float--pr { left: 0; }
}
@media (max-width: 480px) {
  .float { padding: 9px 12px 9px 9px; gap: 9px; border-radius: 16px; }
  .float b { font-size: 15px; }
  .float small { font-size: 11px; }
  .float--rank img { width: 42px; height: 42px; }
  .float__bar { width: 84px; }
  .float--streak b { font-size: 18px; }
  .float__icon { width: 32px; height: 32px; }
  .hero__ctas .btn { flex: 1 1 100%; }
}

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  margin: clamp(48px, 7vw, 88px) 0 0; border-radius: var(--r-lg); overflow: hidden;
  background: var(--line); box-shadow: var(--shadow);
}
.stat { margin: 0; padding: 26px 22px; background: var(--card); }
.stat dt { font-size: clamp(32px, 3.6vw, 44px); font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.stat dd { margin: 10px 0 0; font-size: 14.5px; color: var(--mut); line-height: 1.4; }
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:last-child { grid-column: span 2; }
}

/* ------------------------------------------------------------ sections */

.section { padding: clamp(64px, 8vw, 104px) 0; position: relative; overflow-x: hidden; overflow-x: clip; }
.section--alt { background: var(--bg-alt); }

.card {
  position: relative;
  padding: clamp(20px, 2.6vw, 30px); border-radius: var(--r-lg);
  background: var(--card); box-shadow: var(--shadow);
}
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card__sub { margin: 6px 0 0; font-size: 15px; color: var(--mut); line-height: 1.45; }
.card__sub code { color: var(--mut2); }
.tag {
  display: inline-block; vertical-align: 3px; margin-left: 6px; padding: 2px 9px; border-radius: 999px;
  background: var(--card2); color: var(--mut); font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0;
}
.card__icon {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink);
}
.card__icon svg { width: 22px; height: 22px; stroke-width: 2; }
.card__note { margin: 18px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--mut); }

/* ------------------------------------------------------------ tour */

.tour { display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 6vw, 96px); align-items: center; }
.tour__device { position: relative; display: grid; place-items: center; }
.tour__device::before {
  content: ""; position: absolute; width: 140%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none;
}
.tour__note { margin: 28px 0 0; font-size: 13.5px; color: var(--mut2); }

.tabbar {
  display: inline-flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow);
  margin-bottom: 32px; max-width: 100%;
}
.tabbar button {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 108px; padding: 10px 18px 8px; border: 0; border-radius: 999px; background: transparent;
  font-size: 13.5px; font-weight: 600; color: var(--mut2);
  transition: color 0.2s, background-color 0.2s;
}
.tabbar button svg { width: 24px; height: 24px; stroke-width: 2; }
.tabbar button:hover { color: var(--txt); }
.tabbar button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent-soft); }

.panel p { margin: 16px 0 0; color: var(--mut); max-width: 560px; }
.js .panel:not(.is-active) { display: none; }
.js .panel.is-active { animation: fade-in 0.45s var(--ease); }
.no-js .panel + .panel { margin-top: 48px; }
.no-js .thumbs { display: none; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } }

.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 34px; line-height: 1.5; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6feb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
:root[data-theme="dark"] .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233fb950' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233fb950' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
}

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.thumb {
  padding: 9px 16px; border-radius: 999px; border: 0;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 600; color: var(--mut);
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.thumb:hover { color: var(--txt); }
.thumb[aria-pressed="true"] { background: var(--txt); color: var(--bg); box-shadow: none; }

@media (max-width: 900px) {
  .tour { grid-template-columns: 1fr; }
  .tour__device { order: -1; }
  .tabbar { display: flex; width: 100%; }
  .tabbar button { flex: 1; min-width: 0; padding-left: 8px; padding-right: 8px; }
}

/* ------------------------------------------------------------ bento */

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bento > *, .tools > *, .tour > * { min-width: 0; }
.card--wide { grid-column: span 2; }

@media (max-width: 1020px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: span 2; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .card--wide { grid-column: auto; }
}

/* Heatmap */
.heatmap { overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; scrollbar-width: thin; }
.heatmap svg { width: 100%; min-width: 620px; height: auto; }
.heatmap rect.c { rx: 2.4px; transition: fill 0.4s; }
.heatmap text { font-family: var(--font-body); font-size: 9px; fill: var(--mut2); }
.l0 { fill: var(--hm0); background: var(--hm0); }
.l1 { fill: var(--hm1); background: var(--hm1); }
.l2 { fill: var(--hm2); background: var(--hm2); }
.l3 { fill: var(--hm3); background: var(--hm3); }
.l4 { fill: var(--hm4); background: var(--hm4); }
.heatmap rect.today { stroke: var(--txt); stroke-width: 1.2; }
.card--calendar { display: flex; flex-direction: column; }
.heatmap__foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: auto 0 0; padding-top: 22px; }
.kpi { margin: 0; padding: 16px; border-radius: var(--r); background: var(--card2); --k: var(--accent); }
.kpi--yellow { --k: var(--yellow); }
.kpi--teal { --k: var(--teal); }
.kpi__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--k) 16%, transparent); color: var(--k); }
.kpi__icon svg { width: 17px; height: 17px; stroke-width: 2.2; }
.kpi dt { margin-top: 12px; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 28px); font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.kpi dd { margin: 4px 0 0; font-size: 13px; line-height: 1.35; color: var(--mut); }
@media (max-width: 480px) { .kpis { gap: 8px; } .kpi { padding: 12px; } }
.legend { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--mut2); }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend span:first-child { margin-right: 4px; }
.legend span:last-child { margin-left: 4px; }
.tip {
  position: absolute; z-index: 5; pointer-events: none;
  padding: 7px 10px; border-radius: 10px;
  background: var(--txt); color: var(--bg);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
}
.tip[hidden] { display: none; }

/* Flame */
.card--flame { display: flex; flex-direction: column; }
.flame-stage { position: relative; display: grid; place-items: center; height: 160px; margin: -6px 0 8px; }
.flame-stage img {
  width: 150px; height: 150px; transform-origin: 50% 80%;
  transition: transform 0.35s var(--ease), filter 0.35s;
}
.flame-stage img.is-out { filter: grayscale(1) opacity(0.45); }
.flame-stage b {
  position: absolute; right: 14%; bottom: 14%;
  font-family: var(--font-display); font-size: 40px; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.card--flame .field { margin-top: auto; }

/* Creatine */
.creatine__head { display: flex; align-items: center; gap: 14px; }
.creatine__icon {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; flex: none;
  background: var(--accent-soft); color: var(--accent-ink);
}
.creatine__icon svg { width: 24px; height: 24px; stroke-width: 2; }
.creatine__head > div { flex: 1; min-width: 0; }
.creatine__streak { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; color: var(--accent-ink); font-size: 16px; }
.creatine__streak svg { width: 16px; height: 16px; stroke-width: 2.2; }
.creatine__status { margin: 2px 0 0; font-size: 14.5px; color: var(--mut); }
.creatine__status.is-done { color: var(--green); font-weight: 600; }
.creatine__tick {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; flex: none;
  border: 0; background: var(--card2); color: var(--mut2);
  transition: background-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.creatine__tick svg { width: 26px; height: 26px; stroke-width: 2.4; }
.creatine__tick[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); transform: scale(1.04); }
.creatine__week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; list-style: none; padding: 0; margin: 22px 0 0; }
.creatine__week li { display: grid; justify-items: center; gap: 8px; font-size: 13px; color: var(--mut); }
.creatine__week li.is-today { color: var(--txt); font-weight: 600; }
.creatine__day {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--line); background: transparent; color: var(--on-accent);
  transition: background-color 0.2s, border-color 0.2s;
}
.creatine__day svg { width: 18px; height: 18px; stroke-width: 2.6; opacity: 0; transition: opacity 0.2s; }
.creatine__day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.creatine__day[aria-pressed="true"] svg { opacity: 1; }
.is-today .creatine__day[aria-pressed="false"] { border-color: var(--accent); }

/* Overload */
.overload { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.overload__inputs { display: grid; gap: 18px; align-content: start; }
.overload__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.steppers { display: flex; flex-wrap: wrap; gap: 10px; }
.stepper {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--card2);
}
.stepper button {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: var(--card); color: var(--txt); box-shadow: var(--shadow);
}
.stepper button svg { width: 16px; height: 16px; stroke-width: 2.4; }
.stepper output { min-width: 34px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.stepper small { font-size: 11px; color: var(--mut2); margin-right: 4px; }
.advice {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px; border-radius: var(--r);
  background: color-mix(in srgb, var(--advice, var(--accent)) 10%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--advice, var(--accent)) 28%, transparent);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.advice__icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none;
  background: color-mix(in srgb, var(--advice, var(--accent)) 18%, transparent); color: var(--advice, var(--accent));
}
.advice__icon svg { width: 22px; height: 22px; stroke-width: 2.2; }
.advice__text { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 500; }
.advice[data-kind="up"] { --advice: var(--green); }
.advice[data-kind="hold"] { --advice: var(--accent); }
.advice[data-kind="down"] { --advice: var(--purple); }
@media (max-width: 680px) { .overload { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ forms */

.field { display: grid; gap: 8px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--mut); letter-spacing: 0.01em; }
.field__row { display: flex; align-items: center; gap: 14px; }
.field__row .range { flex: 1; }

.num {
  display: inline-flex; align-items: center; gap: 6px;
  height: 46px; padding: 0 14px; border-radius: 14px; background: var(--card2);
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 0.2s;
}
.num:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.num input {
  width: 100%; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--font-display); font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num__unit { font-size: 14px; color: var(--mut2); font-weight: 600; }
.field__row .num { width: 128px; flex: none; }

.select {
  height: 46px; padding: 0 38px 0 14px; border: 0; border-radius: 14px; background: var(--card2);
  font-family: var(--font-display); font-size: 17px; font-weight: 650; color: var(--txt);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2384848c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }

.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer;
  --p: 50%;
}
.range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(to right, var(--accent) var(--p), var(--card2) var(--p));
}
.range::-moz-range-track { height: 6px; border-radius: 6px; background: var(--card2); }
.range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--card); border: 0; box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent); }

/* Option groups: radio pills with a label above (fieldset.seg), and a
   segmented control of buttons (.seg--modes). */
fieldset.seg { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.seg legend { float: left; width: 100%; padding: 0; margin: 0 0 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label > span {
  display: inline-block; padding: 9px 15px; border-radius: 999px; background: var(--card2);
  font-size: 14px; font-weight: 600; color: var(--mut); white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.seg label > span:hover { color: var(--txt); }
.seg input:checked + span { background: var(--accent); color: var(--on-accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg--wide label { flex: 1; }
.seg--wide label > span { display: block; text-align: center; }
.seg--modes { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--card2); }
.seg--modes button {
  padding: 7px 14px; border: 0; border-radius: 999px; background: transparent;
  font-size: 13.5px; font-weight: 600; color: var(--mut); white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg--modes button[aria-pressed="true"] { background: var(--card); color: var(--txt); box-shadow: var(--shadow); }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  padding: 8px 14px; border-radius: 999px; border: 0;
  background: var(--card2); color: var(--mut);
  font-size: 14px; font-weight: 600;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.chips button:hover { color: var(--txt); }
.chips button[aria-checked="true"], .chips button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.chips--plates button { display: inline-flex; align-items: center; gap: 8px; padding-left: 10px; }
.chips--plates button i { width: 12px; height: 22px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.chips--plates button:active { transform: scale(0.96); }

/* ------------------------------------------------------------ ranks */

.section--ranks { overflow: hidden; }
.section--ranks::before {
  content: ""; position: absolute; left: 50%; top: 22%; width: 900px; height: 900px; margin-left: -450px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, #a585ff 16%, transparent), transparent);
}
.ladder {
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 8px;
  list-style: none; padding: 0; margin: 0 0 clamp(40px, 6vw, 72px);
}
.ladder li { flex: 0 0 calc((100% - 48px) / 7); display: grid; justify-items: center; align-content: start; text-align: center; gap: 2px; }
.ladder img {
  width: 100%; max-width: 150px; aspect-ratio: 1;
  transition: transform 0.4s var(--ease), filter 0.4s;
  filter: drop-shadow(0 10px 20px color-mix(in srgb, var(--glow) 25%, transparent));
}
.ladder li:hover img { transform: translateY(-8px) scale(1.06); filter: drop-shadow(0 14px 30px color-mix(in srgb, var(--glow) 55%, transparent)); }
.ladder b { font-family: var(--font-display); font-size: 16px; letter-spacing: -0.02em; margin-top: 4px; }
.ladder small { font-size: 12.5px; color: var(--mut); line-height: 1.35; }
.js .ladder.is-in li { animation: pop 0.6s var(--ease) both; }
.js .ladder.is-in li:nth-child(2) { animation-delay: 0.06s; }
.js .ladder.is-in li:nth-child(3) { animation-delay: 0.12s; }
.js .ladder.is-in li:nth-child(4) { animation-delay: 0.18s; }
.js .ladder.is-in li:nth-child(5) { animation-delay: 0.24s; }
.js .ladder.is-in li:nth-child(6) { animation-delay: 0.3s; }
.js .ladder.is-in li:nth-child(7) { animation-delay: 0.36s; }
@media (max-width: 900px) { .ladder li { flex-basis: calc((100% - 24px) / 4); } }
@media (max-width: 480px) {
  .ladder li { flex-basis: calc((100% - 16px) / 3); }
  .ladder small { display: none; }
}

.rankcalc { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.rankcalc__inputs { display: grid; gap: 18px; }
.rankcalc__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rankcalc__out {
  display: grid; justify-items: center; text-align: center;
  padding: 24px; border-radius: var(--r);
  background: radial-gradient(70% 60% at 50% 30%, color-mix(in srgb, var(--rank-glow, #a585ff) 22%, transparent), transparent), var(--card2);
  transition: background 0.4s;
}
.rankcalc__badge { width: min(220px, 60vw); aspect-ratio: 1; }
.rankcalc__badge img {
  width: 100%; height: 100%;
  filter: drop-shadow(0 12px 28px color-mix(in srgb, var(--rank-glow, #a585ff) 45%, transparent));
}
.rankcalc__badge img.is-swapping { animation: badge-in 0.5s var(--ease); }
@keyframes badge-in { from { opacity: 0.2; transform: scale(0.82) rotate(-6deg); } }
.rankcalc__name { margin: 8px 0 0; font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.bar { width: 100%; max-width: 300px; height: 8px; margin: 16px auto 0; border-radius: 8px; background: color-mix(in srgb, var(--txt) 10%, transparent); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 0.5s var(--ease); }
.rankcalc__next { margin: 12px 0 0; font-weight: 600; }
.rankcalc__ratio { margin: 4px 0 0; font-size: 14px; color: var(--mut); }
@media (max-width: 860px) { .rankcalc { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ tools */

.tools { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1020px) { .tools { grid-template-columns: 1fr; } }

.plates .card__top { flex-wrap: wrap; }
.plates__viz {
  margin: 0 -8px; padding: 6px 0; border-radius: var(--r);
  background: var(--card2);
}
.plates__viz svg { width: 100%; height: auto; }
.plates__sleeve { fill: #a9afb8; }
.plates__shaft { fill: #8a9099; }
.plates__collar { fill: #6b717a; }
:root[data-theme="dark"] .plates__sleeve { fill: #6e7681; }
:root[data-theme="dark"] .plates__shaft { fill: #545d68; }
:root[data-theme="dark"] .plates__collar { fill: #8b949e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .plates__sleeve { fill: #6e7681; }
  :root:not([data-theme="light"]) .plates__shaft { fill: #545d68; }
  :root:not([data-theme="light"]) .plates__collar { fill: #8b949e; }
}
.plate { stroke: rgba(0, 0, 0, 0.18); stroke-width: 1; }
.plate-label { font-family: var(--font-display); font-size: 15px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }

.plates__out { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 18px; }
.plates__label { font-size: 13px; font-weight: 600; color: var(--mut); }
.plates__list { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); font-weight: 750; letter-spacing: -0.02em; }
.plates__total { margin-left: auto; font-family: var(--font-display); font-size: 17px; font-weight: 650; color: var(--mut); }
.plates__msg { min-height: 1.5em; margin: 6px 0 0; font-size: 14px; color: var(--yellow); }
.plates__controls { display: grid; gap: 18px; margin: 18px 0; }
.plates__controls[hidden] { display: none; }
.plates__tapactions { display: flex; gap: 8px; }

.muscles .chips { margin-bottom: 16px; }
.bodies { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--card2); }
.body { margin: 0; display: grid; justify-items: center; gap: 6px; }
.body svg { width: 100%; max-height: 330px; }
.body figcaption { font-size: 12.5px; font-weight: 600; color: var(--mut); }
.body .base { fill: #c9cdd3; stroke: #5b5f66; stroke-width: 0.6; }
.body .m { stroke: #5b5f66; stroke-width: 0.6; transition: fill 0.4s; }
.shares { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.shares li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 15px; }
.shares b { font-variant-numeric: tabular-nums; color: var(--mut); font-weight: 600; }
.shares .track { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--txt) 8%, transparent); overflow: hidden; }
.shares .track i { display: block; height: 100%; border-radius: inherit; transition: width 0.5s var(--ease); }

/* ------------------------------------------------------------ features */

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.tile {
  padding: 22px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.tile:hover { transform: translateY(-3px); }
.tile svg { width: 26px; height: 26px; stroke-width: 1.9; color: var(--accent-ink); }
.tile h3 { margin: 16px 0 6px; font-family: var(--font-display); font-size: 17px; letter-spacing: -0.015em; line-height: 1.3; }
.tile p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--mut); }
@media (max-width: 1020px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; } .tile { padding: 18px; } }
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 16px 18px; }
  .tile svg { grid-row: span 2; margin-top: 2px; }
  .tile h3 { margin: 0; font-size: 16px; }
}

.look { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 20px; }
.look p { margin: 14px 0 0; color: var(--mut); }
.look .h3 { margin-top: 18px; }
.look__icons {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px;
  padding: 18px; border-radius: var(--r); background: var(--card2);
}
.look__icons .ic { aspect-ratio: 1; border-radius: 26%; overflow: hidden; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.25); }
.look__icons .ic svg { width: 100%; height: 100%; }
.look__icons .ic--dark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 12px -4px rgba(0, 0, 0, 0.4); }
.js .look__icons.is-in .ic { animation: pop 0.5s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
@media (max-width: 860px) { .look { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .look__icons { gap: 7px; padding: 12px; } }

/* ------------------------------------------------------------ privacy */

.zeros {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  list-style: none; padding: 0; margin: 0 0 clamp(36px, 5vw, 56px);
}
.zeros li {
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 26px 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow);
}
.zeros b { font-family: var(--font-display); font-size: clamp(40px, 5vw, 60px); line-height: 1; letter-spacing: -0.04em; color: var(--accent); }
.zeros span { font-size: 15px; color: var(--mut); }
@media (max-width: 760px) { .zeros { grid-template-columns: repeat(2, 1fr); } }

.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.privacy__text p { margin: 0 0 18px; font-size: 18px; color: var(--mut); }
.privacy__text p:first-child { color: var(--txt); font-size: 20px; }
.privacy__net { padding: 26px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.netlist { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 16px; }
.netlist li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.netlist svg { width: 22px; height: 22px; stroke-width: 2; color: var(--accent-ink); margin-top: 2px; }
.netlist b { display: block; font-family: var(--font-display); font-size: 16px; letter-spacing: -0.01em; }
.netlist span { display: block; font-size: 14.5px; color: var(--mut); line-height: 1.5; }
@media (max-width: 860px) { .privacy { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ download */

.section--download { background: var(--bg-alt); }
.download__logo { display: block; width: 88px; height: 88px; margin: 0 auto 22px; }
.download__version { display: block; margin-top: 10px; font-size: 15px; color: var(--mut); }
.download__version[hidden] { display: none; }
.download__version b { color: var(--txt); font-family: var(--font-display); }

.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.platform {
  position: relative; display: flex; flex-direction: column;
  padding: 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow);
}
.platform.is-mine { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg); }
.platform__badge {
  position: absolute; top: 18px; right: 18px; display: none;
  padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 700;
}
.platform.is-mine .platform__badge { display: inline-block; }
.platform__icon { width: 30px; height: 30px; stroke-width: 1.8; color: var(--accent-ink); }
.platform h3 { margin: 16px 0 8px; font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
.platform p { margin: 0 0 20px; font-size: 14.5px; line-height: 1.55; color: var(--mut); }
.platform__actions { margin-top: auto; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.platform__size { font-size: 13px; color: var(--mut2); font-variant-numeric: tabular-nums; }

@media (max-width: 1020px) { .platforms { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .platforms { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ faq */

.faq { display: grid; gap: 12px; }
.faq details { border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 17px; font-weight: 650; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; stroke-width: 2.2; flex: none; color: var(--mut2); transition: transform 0.3s var(--ease); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 22px 22px; color: var(--mut); }

/* ------------------------------------------------------------ footer */

.foot { padding: 64px 0 32px; border-top: 1px solid var(--line); }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 32px; }
.foot__brand p { margin: 14px 0 0; max-width: 300px; font-size: 14.5px; color: var(--mut); }
.foot__col { display: grid; align-content: start; gap: 8px; font-size: 14.5px; }
.foot__col h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut2); }
.foot__col a { color: var(--mut); text-decoration: none; }
.foot__col a:hover { color: var(--txt); }
.foot__credits p { margin: 0; color: var(--mut); line-height: 1.5; }
.foot__credits a { color: var(--txt); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--mut2); }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__brand, .foot__credits { grid-column: span 2; } }

/* ------------------------------------------------------------ small screens */

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .card { border-radius: 22px; }
  .rankcalc__row, .overload__row { grid-template-columns: 1fr; }
  .tabbar button { font-size: 12.5px; padding: 8px 4px 6px; }
}

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