/* Whisser site — shared design system (light) */

:root {
  --bg: #f2f2f7;
  --bg-elev: #ffffff;
  --surface-2: #f6f6f9;
  --fill: rgba(120, 120, 128, .14);
  --fill-2: rgba(120, 120, 128, .08);
  --label: #0b0b0f;
  --label-2: rgba(60, 60, 67, .76);
  --label-3: rgba(60, 60, 67, .5);
  --sep: rgba(60, 60, 67, .14);
  --blue: #007aff;
  --blue-press: #0062cc;
  --blue-tint: rgba(0, 122, 255, .1);
  --green: #248a3d;
  --red: #ff3b30;
  --orange: #c45e00;
  --bar: rgba(249, 249, 251, .82);
  --bar-line: rgba(60, 60, 67, .12);
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .04), 0 0 0 .5px rgba(15, 23, 42, .04);
  --shadow-2: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 34px -12px rgba(15, 23, 42, .14);
  --shadow-3: 0 2px 6px rgba(15, 23, 42, .05), 0 32px 64px -24px rgba(15, 23, 42, .24);
  --ill-chip: #ffffff;
  --ill-chip-line: rgba(15, 23, 42, .06);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --max: 1180px;
  --gutter: max(16px, min(4vw, 32px));
  --bar-h: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--label);
  font: 400 17px/1.5 var(--font);
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
main { flex: 1 0 auto; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue); text-decoration: none; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.025em; line-height: 1.12; color: var(--label); }
p { margin: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--blue) 24%, transparent); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--label); color: #fff; font-weight: 600; font-size: 15px; transition: top .2s var(--ease); }
.skip:focus { top: 10px; }
.wrap { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap-wide { width: min(1440px, 100% - var(--gutter) * 2); margin-inline: auto; }
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.flip { transform: scaleX(-1); }
.muted { color: var(--label-2); }
.tiny { font-size: 13px; color: var(--label-3); }

/* ---------------------------------------------------------------- nav bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 60;
  padding-top: env(safe-area-inset-top);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid transparent;
  transition: border-color .25s var(--ease);
  view-transition-name: site-bar;
}
.bar.is-scrolled { border-bottom-color: var(--bar-line); }
.bar-in {
  width: min(var(--max), 100% - max(12px, var(--gutter) - 8px) * 2);
  margin-inline: auto;
  height: var(--bar-h);
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  align-items: center;
  gap: 8px;
}
.back, .icon-btn, .bar-link { flex: none; }
.bar-l, .bar-r { display: flex; align-items: center; min-width: 0; }
.bar-r { justify-content: flex-end; gap: 4px; }
.bar-c { position: relative; display: grid; place-items: center; min-width: 0; max-width: min(56vw, 520px); }
.bar-c > * { grid-area: 1 / 1; }

/* iOS back button — chevron + label, label always visible */
.back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  margin-left: -6px;
  padding: 0 10px 0 6px;
  border-radius: 10px;
  color: var(--blue);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -.02em;
  white-space: nowrap;
  transition: opacity .15s ease;
}
.back svg { width: 12px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--spring); }
.back:hover svg { transform: translateX(-2px); }
.back:active { opacity: .35; transition: none; }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--label); font-size: 18px; font-weight: 650; letter-spacing: -.03em; transition: opacity .25s var(--ease), transform .35s var(--ease); }
.brand-mark { width: 26px; height: 26px; fill: currentColor; flex: none; }
.bar-title { overflow: hidden; max-width: 100%; font-size: 17px; font-weight: 600; letter-spacing: -.022em; white-space: nowrap; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .25s var(--ease), transform .35s var(--ease); }
.bar.is-compact .brand { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.bar.is-compact .bar-title { opacity: 1; transform: none; }
.bar-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--blue); }

.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--fill-2); color: var(--blue); font-size: 19px; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.icon-btn:hover { background: var(--fill); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.is-plain { background: transparent; }
.icon-btn.is-plain:hover { background: var(--fill-2); }
.icon-btn.is-danger { color: var(--red); }
.icon-btn.is-ok { color: var(--green); }
.bar .icon-btn { background: transparent; font-size: 21px; }
.bar .icon-btn:hover { background: var(--fill-2); }
.bar-link { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--blue); font-size: 16px; font-weight: 600; white-space: nowrap; transition: background-color .2s var(--ease); }
.bar-link:hover { background: var(--blue-tint); }
.bar-link.is-filled { padding: 0 14px; background: var(--blue); color: #fff; }
.bar-link.is-filled:hover { background: var(--blue-press); }

/* section tabs — centred, underline for the current page */
.tabs { position: relative; z-index: 2; border-bottom: .5px solid var(--sep); }
.tabs-in {
  display: flex;
  gap: 2px;
  width: 100%;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs-in::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 13px;
  color: var(--label-2);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s var(--ease);
}
.tab:first-child { margin-left: auto; }
.tab:last-child { margin-right: auto; }
.tab:hover { color: var(--label); }
.tab[aria-current="page"] { color: var(--label); font-weight: 600; }
.tab[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -.5px; height: 2px; border-radius: 2px 2px 0 0; background: var(--label); }

/* ---------------------------------------------------------------- buttons */
.btn {
  --b-bg: var(--blue);
  --b-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--b-bg);
  color: var(--b-fg);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.015em;
  white-space: nowrap;
  transition: transform .25s var(--spring), background-color .2s var(--ease), opacity .2s;
}
.btn:hover { --b-bg: var(--blue-press); }
.btn:active { transform: scale(.97); }
.btn .icon { font-size: 18px; }
.btn .brand-mark { width: 20px; height: 20px; fill: currentColor; }
.btn-lg { min-height: 50px; padding: 0 22px; border-radius: 14px; font-size: 17px; }
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 14.5px; }
.btn-tinted { --b-bg: var(--blue-tint); --b-fg: var(--blue); }
.btn-tinted:hover { --b-bg: color-mix(in srgb, var(--blue) 16%, transparent); }
.btn-gray { --b-bg: var(--fill-2); --b-fg: var(--label); }
.btn-gray:hover { --b-bg: var(--fill); }
.btn-dark { --b-bg: var(--label); --b-fg: #fff; }
.btn-dark:hover { --b-bg: #2c2c2e; }
.btn-plain { --b-bg: transparent; --b-fg: var(--blue); padding-inline: 8px; }
.btn-plain:hover { --b-bg: var(--blue-tint); }
.btn-white { --b-bg: #fff; --b-fg: #0b0b0f; }
.btn-white:hover { --b-bg: #ececf1; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-weight: 600; font-size: 16px; }
.link-arrow .icon { font-size: 16px; transition: transform .25s var(--spring); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: clamp(32px, 6vw, 72px) 0 clamp(20px, 4vw, 44px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 56px); }
.hero-copy { max-width: 640px; }
.hero-center { text-align: center; }
.hero-center .hero-copy { margin-inline: auto; }
.hero-center .btn-row { justify-content: center; }
.display { font-size: clamp(40px, 6.2vw, 72px); line-height: 1.03; letter-spacing: -.045em; font-weight: 750; text-wrap: balance; }
.lead { margin-top: 16px; max-width: 34ch; color: var(--label-2); font-size: clamp(19px, 2.1vw, 23px); line-height: 1.42; letter-spacing: -.018em; text-wrap: pretty; }
.hero-center .lead { margin-inline: auto; max-width: 40ch; }
.hero .btn-row { margin-top: 28px; }
.hero-art { position: relative; width: 100%; max-width: 600px; margin-left: auto; aspect-ratio: 4 / 3; }
.hero-art svg { width: 100%; height: 100%; overflow: visible; }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(28px, 5vw, 56px) 0; }
.section + .section { padding-top: clamp(8px, 2vw, 20px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2, .h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
.section-head p { margin-top: 8px; color: var(--label-2); font-size: 17px; max-width: 60ch; }
.h3 { font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.count { color: var(--label-3); font-size: 15px; font-weight: 500; white-space: nowrap; }

.grid { display: grid; gap: clamp(12px, 1.8vw, 18px); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 280px)), 1fr)); }
.grid-2 { display: grid; gap: clamp(12px, 1.8vw, 20px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: clamp(12px, 1.8vw, 20px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 14px; }

.card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: clamp(20px, 2.4vw, 26px); border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-1); color: var(--label); }
.card p { color: var(--label-2); font-size: 16px; line-height: 1.55; }
.card > p, .callout p { max-width: 78ch; }
.card h3 + p, .card .h3 + p { margin-top: 8px; }
.card .h3 + .stack { margin-top: 8px; }
a.card, .card.is-link { transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
a.card:hover, .card.is-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
a.card:active { transform: scale(.985); transition-duration: .15s; }
.card-foot { margin-top: auto; padding-top: 18px; }
.card .link-arrow { font-size: 15px; }

/* monotone icon tiles */
.tile { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px; background: var(--fill-2); color: var(--label); font-size: 22px; }
.tile.is-sm { width: 32px; height: 32px; margin: 0; border-radius: 8px; font-size: 18px; }
.tile.is-solid { background: var(--label); color: #fff; }
.tile .brand-mark { width: 1em; height: 1em; fill: currentColor; }
.app-icon { display: inline-grid; place-items: center; width: var(--s, 48px); height: var(--s, 48px); flex: none; border-radius: calc(var(--s, 48px) * .26); background: var(--fill-2); color: var(--label); font-size: calc(var(--s, 48px) * .5); }
.app-icon .icon { stroke-width: 1.7; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 6px; background: var(--fill-2); color: var(--label-2); font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; line-height: 1.35; white-space: nowrap; }
.badge.is-new, .badge.is-published { background: rgba(52, 199, 89, .14); color: var(--green); }
.badge.is-beta, .badge.is-alpha, .badge.is-pre-alpha, .badge.is-experiment, .badge.is-experimental { background: rgba(255, 149, 0, .14); color: var(--orange); }
.badge.is-updated { background: var(--blue-tint); color: var(--blue); }
.badge.is-draft { background: rgba(255, 204, 0, .2); color: #8a6a00; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* inset grouped list */
.list { border-radius: var(--r); background: var(--bg-elev); box-shadow: var(--shadow-1); overflow: hidden; }
.list-title { margin: 0 0 8px 4px; color: var(--label-2); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px 16px; color: var(--label); }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 16px); border-top: .5px solid var(--sep); }
.row.has-tile { --inset: 62px; }
a.row { transition: background-color .15s ease; }
a.row:hover { background: var(--fill-2); }
a.row:active { background: var(--fill); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16.5px; font-weight: 500; letter-spacing: -.015em; line-height: 1.3; }
.row-sub { margin-top: 2px; color: var(--label-2); font-size: 14.5px; line-height: 1.45; }
.row-end { display: flex; align-items: center; gap: 8px; color: var(--label-3); font-size: 15px; }
.row-end .icon { font-size: 17px; }

/* ---------------------------------------------------------------- tools */
.app-card h3 { margin-top: 16px; font-size: 18.5px; letter-spacing: -.022em; }
.app-card .badge { position: absolute; top: 18px; right: 18px; }
.app-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: var(--label); }
a.app-row:hover { background: var(--fill-2); }
.app-row .app-icon { --s: 40px; }
.app-row h3 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.app-row p { margin-top: 1px; color: var(--label-2); font-size: 14px; line-height: 1.4; }
.app-row .badge { margin-left: auto; }
.app-row:not([hidden]) ~ .app-row::before { content: ""; position: absolute; top: 0; right: 0; left: 70px; border-top: .5px solid var(--sep); }
.tool-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; align-items: start; }
.tool-group[hidden] { display: none; }
.searchbox { position: relative; display: block; max-width: 520px; }
.searchbox .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--label-3); font-size: 18px; pointer-events: none; }
.searchbox .input { padding-left: 42px; }
.hero-center .searchbox { margin: 26px auto 0; }
.no-results { padding: 32px 0; color: var(--label-2); text-align: center; }

.panel-dark { position: relative; overflow: hidden; padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl); background: #0b0b0f; color: #f5f5f7; }
.panel-dark h2, .panel-dark h3 { color: #fff; }
.panel-dark p { color: rgba(235, 235, 245, .72); }
.panel-dark strong { color: #fff; }
.panel-dark .tile { background: rgba(255, 255, 255, .1); color: #fff; }
.panel-dark .label { margin-bottom: 6px; color: rgba(235, 235, 245, .6); font-size: 15px; font-weight: 600; }

/* ---------------------------------------------------------------- banners */
.banner { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 56px); border-radius: var(--r-xl); color: #fff; background: var(--g1, #0b0b0f); }
.banner h1, .banner h2 { color: #fff; }
.banner .lead { color: rgba(255, 255, 255, .82); }
.banner .btn-plain { --b-fg: #fff; }
.banner .btn-plain:hover { --b-bg: rgba(255, 255, 255, .14); }
.banner-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 24px; }
.banner .hero-art { max-width: 440px; }
.banner { --ill-chip: #1c1c1e; --ill-chip-line: rgba(255, 255, 255, .08); }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; overflow: hidden; border-radius: var(--r-lg); background: var(--sep); box-shadow: var(--shadow-1); }
.stat { padding: 22px 22px 20px; background: var(--bg-elev); }
.stat b { display: block; font-size: clamp(28px, 3.4vw, 38px); font-weight: 720; letter-spacing: -.04em; line-height: 1.05; }
.stat span { display: block; margin-top: 6px; color: var(--label-2); font-size: 14.5px; }

/* ---------------------------------------------------------------- callout / checks */
.callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 .5px var(--sep); }
.callout > .icon { margin-top: 2px; font-size: 22px; color: var(--blue); }
.callout h3, .callout h4 { font-size: 16.5px; letter-spacing: -.015em; }
.callout p { margin-top: 4px; color: var(--label-2); font-size: 15.5px; line-height: 1.55; }
.checks { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.checks li { display: flex; gap: 12px; color: var(--label-2); font-size: 16.5px; line-height: 1.5; }
.checks li .icon { margin-top: 3px; font-size: 19px; color: var(--check, var(--blue)); }
.checks strong { color: var(--label); font-weight: 600; }
.checks.is-dont { --check: var(--red); }

/* ---------------------------------------------------------------- code */
.code { position: relative; overflow: hidden; border-radius: var(--r-lg); background: #111114; color: #e7e7ee; box-shadow: var(--shadow-2); }
.code-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); color: rgba(235, 235, 245, .55); font-size: 13px; }
.code-head i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a40; }
.code-head span { margin-left: 8px; }
.code-head .icon-btn { margin-left: auto; width: 30px; height: 30px; font-size: 15px; background: rgba(255, 255, 255, .08); color: #fff; }
.code pre { margin: 0; padding: 18px 20px 22px; overflow-x: auto; font: 13.5px/1.7 var(--mono); letter-spacing: 0; tab-size: 2; }
.code .k { color: #ff9f0a; }
.code .s { color: #ff6961; }
.code .p { color: #64d2ff; }
.method { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 9px; border-radius: 7px; background: var(--fill-2); color: var(--label); font: 500 12.5px/1.4 var(--mono); letter-spacing: 0; overflow-wrap: anywhere; }
.method b { color: var(--blue); font-weight: 700; }
.method b.is-get { color: var(--green); }

/* ---------------------------------------------------------------- timeline */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: -8px; width: 1.5px; background: var(--sep); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-elev); box-shadow: inset 0 0 0 2px var(--blue); }
.timeline time { display: block; color: var(--label-3); font-size: 14px; font-weight: 500; }
.timeline a, .timeline .tl-title { display: inline-block; margin-top: 2px; color: var(--label); font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; }
.timeline a:hover { color: var(--blue); }

/* ---------------------------------------------------------------- press assets */
.asset { padding: 0; overflow: hidden; }
.asset-preview { display: flex; align-items: center; justify-content: center; height: 168px; padding: 24px; overflow: hidden; background: #fff; box-shadow: inset 0 -.5px 0 var(--sep); }
.asset-preview.is-dark { background: #0b0b0f; }
.asset-preview.is-blue { background: #007aff; }
.asset-preview img { display: block; width: auto; height: auto; max-width: 100%; max-height: 112px; object-fit: contain; }
.asset-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 16px; }
.asset-body h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.012em; }
.asset-body p { margin-top: 1px; font-size: 13px; color: var(--label-3); }
.asset-dl { display: flex; gap: 6px; }
.swatch { display: flex; flex-direction: column; overflow: hidden; border: 0; border-radius: var(--r); background: var(--bg-elev); box-shadow: var(--shadow-1); text-align: left; padding: 0; }
.swatch i { display: block; height: 84px; background: var(--c); box-shadow: inset 0 -.5px 0 var(--sep); }
.swatch span { padding: 12px 14px 0; font-size: 15px; font-weight: 600; }
.swatch code { padding: 2px 14px 14px; color: var(--label-2); font: 13px var(--mono); }
.icon-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 18px 10px; }
.icon-wall a { display: grid; justify-items: center; gap: 8px; color: var(--label-2); font-size: 12.5px; text-align: center; line-height: 1.25; }
.icon-wall .app-icon { --s: 54px; transition: transform .35s var(--spring), background-color .2s; }
.icon-wall a:hover .app-icon { transform: translateY(-2px); background: var(--fill); }

/* ---------------------------------------------------------------- stories */
.stories { display: grid; gap: clamp(16px, 2vw, 22px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-1); color: var(--label); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.story:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.story:active { transform: scale(.985); transition-duration: .15s; }
.story-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #e9e9ee; }
.story-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.story:hover .story-media img { transform: scale(1.03); }
.story-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(11, 11, 15, .12); }
.story-fallback svg { width: 30%; height: auto; fill: currentColor; }
.story-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--label-3); font-size: 14px; font-weight: 500; }
.story h2, .story h3 { font-size: clamp(20px, 2vw, 22px); line-height: 1.2; letter-spacing: -.028em; }
.story p { color: var(--label-2); font-size: 15.5px; line-height: 1.55; }
.clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }
.byline { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: .5px solid var(--sep); min-width: 0; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; background: var(--fill); }
.avatar.is-lg { width: 80px; height: 80px; }
.byline-name { overflow: hidden; color: var(--label); font-size: 14.5px; font-weight: 600; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.byline-handle { overflow: hidden; color: var(--label-3); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.story.is-feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.story.is-feature .story-media { aspect-ratio: auto; min-height: 380px; }
.story.is-feature .story-body { justify-content: center; gap: 12px; padding: clamp(24px, 3.4vw, 44px); }
.story.is-feature h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -.04em; }
.story.is-feature p { font-size: 17px; }
.story.is-feature .byline { margin-top: 10px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 36px; }
.pager .tiny { min-width: 90px; text-align: center; }
.empty { display: grid; justify-items: center; gap: 8px; padding: clamp(40px, 8vw, 80px) 24px; border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--shadow-1); text-align: center; }
.empty .tile { width: 60px; height: 60px; margin-bottom: 10px; border-radius: 16px; font-size: 28px; }
.empty h1, .empty h2, .empty h3 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.035em; }
.empty p { max-width: 42ch; color: var(--label-2); }
.empty .btn-row { margin-top: 14px; justify-content: center; }

/* ---------------------------------------------------------------- article */
.article-head { padding: clamp(28px, 5vw, 56px) 0 8px; text-align: center; }
.article-head .display { font-size: clamp(34px, 5.4vw, 60px); max-width: 18ch; margin-inline: auto; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin-bottom: 16px; color: var(--label-3); font-size: 15px; font-weight: 500; }
.author-chip { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; margin-top: 24px; text-align: left; }
.author-chip .avatar { width: 40px; height: 40px; }
.author-chip small { display: block; color: var(--label-3); font-size: 13px; }
.author-chip b { display: block; overflow: hidden; font-size: 15.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.article-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.cover { width: min(1080px, 100% - var(--gutter) * 2); margin: clamp(24px, 4vw, 40px) auto 0; overflow: hidden; border-radius: var(--r-xl); box-shadow: var(--shadow-2); background: var(--fill-2); }
.cover img { width: 100%; max-height: 620px; object-fit: cover; }
.prose { margin-top: clamp(28px, 5vw, 48px); color: #1d1d1f; font-size: clamp(18px, 1.9vw, 20px); line-height: 1.78; letter-spacing: -.012em; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose figure, .prose table { margin: 1.15em 0; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin: 1.9em 0 .6em; color: var(--label); line-height: 1.15; letter-spacing: -.035em; }
.prose h1 { font-size: 1.9em; }
.prose h2 { font-size: 1.6em; }
.prose h3 { font-size: 1.3em; }
.prose h4, .prose h5, .prose h6 { font-size: 1.1em; }
.prose strong, .prose b { color: var(--label); font-weight: 650; }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.prose img { width: auto; max-width: 100%; height: auto; margin: 1.8em auto; border-radius: var(--r); }
.prose iframe, .prose video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r); }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--blue); color: var(--label); font-size: 1.08em; font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--label-3); }
.prose hr { height: 1px; margin: 2.6em 0; border: 0; background: var(--sep); }
.prose pre, .prose code { font-family: var(--mono); font-size: .86em; }
.prose pre { overflow-x: auto; padding: 18px 20px; border-radius: var(--r); background: var(--fill-2); }
.prose :not(pre) > code { padding: .12em .4em; border-radius: 6px; background: var(--fill-2); }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .9em; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--sep); text-align: left; }
.author-card { display: flex; align-items: center; gap: 20px; margin-top: clamp(40px, 6vw, 64px); padding: 24px; border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--shadow-1); }
.author-card h2 { font-size: 21px; letter-spacing: -.025em; }
.author-card .handle { margin-top: 2px; color: var(--label-3); font-size: 14.5px; }
.author-card .bio { margin-top: 10px; color: var(--label-2); font-size: 15.5px; line-height: 1.6; }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 8px; min-width: 0; }
.field-label { color: var(--label-2); font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--sep); color: var(--label); font-size: 16px; outline: none; transition: box-shadow .2s var(--ease); }
.input::placeholder, .textarea::placeholder { color: var(--label-3); }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 0 0 0 1.5px var(--blue), 0 0 0 4px var(--blue-tint); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--label-3) 50%), linear-gradient(135deg, var(--label-3) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.title-input { width: 100%; padding: 0; border: 0; background: none; color: var(--label); font-size: clamp(30px, 4.4vw, 44px); font-weight: 750; letter-spacing: -.04em; line-height: 1.1; outline: none; }
.title-input::placeholder { color: var(--label-3); }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px; border-radius: 10px; background: var(--fill-2); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .seg button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--label); font-size: 14px; font-weight: 550; white-space: nowrap; cursor: pointer; transition: background-color .25s var(--ease), box-shadow .25s var(--ease); }
.seg input:checked + span, .seg button[aria-pressed="true"] { background: var(--bg-elev); box-shadow: 0 3px 8px rgba(0, 0, 0, .1), 0 3px 1px rgba(0, 0, 0, .03); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); }
.drop { position: relative; display: grid; place-items: center; gap: 6px; min-height: 132px; padding: 18px; overflow: hidden; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--sep); color: var(--label-2); text-align: center; font-size: 14.5px; cursor: pointer; transition: box-shadow .2s var(--ease), background-color .2s var(--ease); }
.drop:hover, .drop.is-over { box-shadow: inset 0 0 0 1.5px var(--blue); background: var(--blue-tint); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .icon { font-size: 26px; color: var(--blue); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop.has-image { color: #fff; }
.drop.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .55)); }
.drop.has-image .drop-copy { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; text-align: left; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 10px; color: var(--label-2); font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.notice { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; padding: 14px 16px; border-radius: 14px; font-size: 15px; background: var(--bg-elev); box-shadow: inset 0 0 0 .5px var(--sep); }
.notice .icon { margin-top: 1px; font-size: 20px; color: var(--blue); }
.notice a { font-weight: 600; }
.notice.is-success .icon { color: var(--green); }
.notice.is-warning .icon { color: var(--orange); }
.notice.is-error .icon { color: var(--red); }

/* ---------------------------------------------------------------- footer */
.footer { margin-top: clamp(48px, 8vw, 96px); padding: clamp(36px, 5vw, 56px) 0 calc(28px + env(safe-area-inset-bottom)); border-top: .5px solid var(--sep); background: var(--bg-elev); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 28px; }
.footer .brand { font-size: 19px; }
.footer-about { margin-top: 12px; max-width: 30ch; color: var(--label-2); font-size: 14.5px; line-height: 1.55; }
.footer h2 { margin-bottom: 12px; color: var(--label); font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.footer ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.footer ul a { color: var(--label-2); font-size: 14.5px; transition: color .15s; }
.footer ul a:hover { color: var(--blue); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 36px; padding-top: 20px; border-top: .5px solid var(--sep); color: var(--label-3); font-size: 13px; }

/* ---------------------------------------------------------------- sheet (site menu) & alert */
.sheet, .alert { max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--label); }
.sheet:focus, .sheet:focus-visible, .alert:focus, .alert:focus-visible { outline: none; }
.sheet::backdrop, .alert::backdrop { background: rgba(0, 0, 0, .3); animation: fade-in .3s var(--ease); }
.sheet[open] { position: fixed; inset: auto 0 0 0; width: 100%; display: flex; justify-content: center; animation: sheet-up .5s var(--ease); }
.sheet-panel { width: min(560px, 100%); max-height: min(86vh, 760px); overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: var(--bg); box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); }
.sheet-grab { width: 36px; height: 5px; margin: 0 auto 8px; border-radius: 3px; background: var(--fill); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 14px; }
.sheet-head h2 { font-size: 22px; letter-spacing: -.03em; }
.sheet .list { margin-bottom: 18px; }
.sheet .row .icon { font-size: 20px; color: var(--label-2); }
.sheet .row[aria-current="page"] .row-title { font-weight: 600; }
.sheet.is-closing { animation: sheet-down .3s var(--ease) forwards; }
.sheet.is-closing::backdrop { animation: fade-out .3s var(--ease) forwards; }
.sheet .btn { width: 100%; }
.alert[open] { position: fixed; inset: 0; width: 100%; height: 100%; display: grid; place-items: center; padding: 24px; animation: pop-in .35s var(--spring); }
.alert-panel { width: min(300px, 100%); overflow: hidden; border-radius: 14px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); text-align: center; }
.alert-copy { padding: 20px 18px 16px; }
.alert-copy h2 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.alert-copy p { margin-top: 4px; color: var(--label-2); font-size: 14px; line-height: 1.4; }
.alert-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: .5px solid var(--sep); }
.alert-actions button { min-height: 46px; border: 0; background: none; color: var(--blue); font-size: 17px; }
.alert-actions button + button { border-left: .5px solid var(--sep); font-weight: 600; }
.alert-actions .is-danger { color: var(--red); }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(1.1); } }
@media (min-width: 760px) {
  .sheet[open] { inset: calc(var(--bar-h) + env(safe-area-inset-top) + 8px) max(16px, calc((100vw - var(--max)) / 2)) auto auto; width: 360px; display: block; animation: pop-down .35s var(--ease); transform-origin: top right; }
  .sheet-panel { width: 100%; max-height: calc(100vh - 90px); padding: 16px 16px 18px; border-radius: 18px; box-shadow: var(--shadow-3), 0 0 0 .5px var(--sep); }
  .sheet-grab { display: none; }
  .sheet::backdrop { background: rgba(0, 0, 0, .05); }
  .sheet.is-closing { animation: pop-up .2s var(--ease) forwards; }
}
@keyframes pop-down { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
@keyframes pop-up { to { opacity: 0; transform: translateY(-6px) scale(.98); } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 300; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 14px; background: rgba(28, 28, 30, .94); color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, .22); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: transform .45s var(--spring), opacity .3s var(--ease); }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast .icon { font-size: 18px; color: #30d158; }

/* ---------------------------------------------------------------- motion */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* first screen animates on first paint without waiting for JavaScript (keeps LCP fast) */
.js main > :first-child .reveal, .js main > :first-child.reveal { opacity: 1; transform: none; transition: none; animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .2s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .35s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid, .banner-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 440px; margin: 4px auto 0; }
  .banner .hero-art { max-width: 320px; }
  .story.is-feature { grid-template-columns: 1fr; }
  .story.is-feature .story-media { min-height: 0; aspect-ratio: 16 / 9; }
  .grid-2, .tool-groups { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --bar-h: 50px; }
  body { font-size: 16.5px; }
  .stories, .grid-3 { grid-template-columns: 1fr; }
  .hero-art { max-width: 340px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .author-card { flex-direction: column; text-align: center; }
  .footer-top { gap: 24px 16px; }
  .btn-row.is-stack-sm { flex-direction: column; align-items: stretch; }
  .btn-row.is-stack-sm .btn { width: 100%; }
  .app-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 16px; }
  .app-card .app-icon { --s: 42px !important; grid-row: span 2; }
  .app-card h3 { margin-top: 0; padding-right: 64px; }
  .app-card p { font-size: 15px; margin-top: 2px; }
  .app-card .badge { top: 16px; right: 16px; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
  .back { padding-right: 6px; }
}
@media print {
  .bar, .tabs, .footer, .sheet, .article-actions, .toast { display: none !important; }
  body { background: #fff; }
}
