/*
 * Veil marketing site.
 * Visual language: quiet and editorial. White (or near-black) page, system type, two-tone
 * "claim" headlines (a dark sentence followed by a grey continuation), one black pill button,
 * hairline rules, and the effect itself as the hero picture. Light / dark via prefers-color-scheme.
 */
:root {
  --bg: #ffffff;
  --ink: #151515;
  --ink-2: #6a6a67;          /* body copy: 5.5:1 on white, >= 4.5:1 on the grey control fills */
  --lo: #858582;             /* grey half of a claim headline (large text): 3.7:1 on white */
  --line: rgb(0 0 0 / .08);
  --line-2: rgb(0 0 0 / .16);
  --soft: #f4f4f3;
  --soft-2: #ebebe9;
  --card: #f6f6f5;
  --card-ink: #1d1d1f;
  --accent: #0a84ff;         /* macOS control blue, used only inside control replicas */
  --link: #0062c4;           /* blue text: 5.5:1 on the card grey */
  --shadow-desk: 0 40px 120px -30px rgb(0 0 0 / .35), 0 0 0 1px rgb(0 0 0 / .06);
  --shadow-card: 0 1px 0 rgb(255 255 255 / .7) inset, 0 20px 50px -24px rgb(0 0 0 / .22), 0 0 0 1px rgb(0 0 0 / .05);
  --gutter: clamp(16px, 6vw, 112px);
  /* spacing scale: section rhythm, heading-to-content, column gaps */
  --sp-section: clamp(72px, 10vw, 150px);
  --sp-head: clamp(28px, 4vw, 48px);
  --sp-col: clamp(24px, 4vw, 64px);
  --sp-tight: 12px;
  /* radius scale */
  --r-lg: clamp(12px, 1.4vw, 20px);   /* desk, video, settings cards */
  --r-md: 14px;                       /* tiles, stills */
  --r-sm: 8px;                        /* segmented controls */
  --r-xs: 5px;                        /* keys, chips */
  --tap: 44px;
  --max: 1440px;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "PingFang TC", "Noto Sans SC", "Noto Sans TC", "Microsoft YaHei", "Microsoft JhengHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --claim: clamp(38px, 5.4vw, 78px);   /* hero: ~2.4-5x body */
  --say: clamp(30px, 3.8vw, 54px);     /* section headings: ~1.6x the step headings */
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --ink: #ececea;
    --ink-2: #9a9a96;
    --lo: #7c7c79;             /* 4.6:1 on #0e0e0e */
    --line: rgb(255 255 255 / .09);
    --line-2: rgb(255 255 255 / .2);
    --soft: #1a1a19;
    --soft-2: #242423;
    --card: #1c1c1b;
    --card-ink: #f2f2f4;
    --link: #5aa9ff;
    --shadow-desk: 0 40px 120px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .07);
    --shadow-card: 0 1px 0 rgb(255 255 255 / .05) inset, 0 20px 50px -24px rgb(0 0 0 / .8), 0 0 0 1px rgb(255 255 255 / .07);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--sans); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p, figure { margin: 0; }
code, pre, kbd { font-family: var(--mono); }
kbd { font-size: .85em; padding: 1px 6px; border-radius: var(--r-xs); background: var(--soft); box-shadow: inset 0 -1px 0 var(--line-2), 0 0 0 1px var(--line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
html { accent-color: var(--accent); caret-color: var(--accent); scrollbar-color: var(--line-2) transparent; }
a { text-underline-offset: .2em; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; z-index: 100; }
.skip:focus { left: 12px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px;
  font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.btn.ink { background: var(--ink); color: var(--bg); box-shadow: 0 10px 24px -10px rgb(0 0 0 / .45); }
.btn.ink:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgb(0 0 0 / .5); }
.btn.soft { background: var(--soft); color: var(--ink); }
.btn.soft:hover { background: var(--soft-2); }
.btn.sm { height: 34px; padding: 0 16px; font-size: 13.5px; }
.btn.lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn .apple { width: 15px; height: 18px; fill: currentColor; margin-top: -2px; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px); }
.bar { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -.01em; margin-right: auto; }
.brand img { border-radius: 7px; }
.bar-links { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.bar-links a { color: var(--ink-2); text-decoration: none; transition: color .2s; }
.bar-links a:hover { color: var(--ink); }
.chip { display: inline-block; margin-left: 4px; padding: 1px 5px; border: 1px solid var(--line-2); border-radius: var(--r-xs); font-size: 11px; line-height: 15px; font-variant-numeric: tabular-nums; }

.lang { display: flex; align-items: center; gap: 2px; }
.lang button { border: 0; background: none; color: var(--ink-2); font: 500 13px/1 var(--sans); padding: 7px 7px; border-radius: 6px; cursor: pointer; transition: color .2s, background .2s; }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--ink); background: var(--soft); }

/* ── Hero ── */
.hero { padding-top: clamp(40px, 9vw, 120px); padding-bottom: var(--sp-head); }
.claim { font-size: var(--claim); line-height: 1.08; letter-spacing: -.028em; font-weight: 500; max-width: 21em; text-wrap: balance; }
.lo { color: var(--lo); }
.claim .lo, .say .lo { display: block; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.fine { margin-top: 18px; font-size: 13.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.dotted { text-decoration: none; border-bottom: 1px dotted currentColor; padding-bottom: 1px; }
.dotted:hover { color: var(--ink); }
/* Homebrew line under the download buttons: label, then the command in a soft box with a copy
   button. The box never widens the page: on a phone it takes its own line and the command
   wraps inside it. */
.brew { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13.5px; color: var(--ink-2); }
.brew-box { display: inline-flex; align-items: stretch; max-width: 100%; min-width: 0; background: var(--soft); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.brew-box code { align-self: center; min-width: 0; overflow-wrap: anywhere; padding: 8px 6px 8px 14px; font-size: 13px; line-height: 1.45; color: var(--ink); }
.brew-copy { flex: none; min-height: var(--tap); min-width: var(--tap); padding: 0 14px; border: 0; border-left: 1px solid var(--line-2); background: transparent; color: var(--ink); font: 500 13.5px var(--sans); cursor: pointer; border-radius: 0 var(--r-md) var(--r-md) 0; }
.brew-copy:hover { background: var(--soft-2); }
.brew-copy.done { color: var(--link); }
.howto code { font-size: .9em; overflow-wrap: anywhere; }

/* ── Live desk ── */
.try { padding-bottom: 0; }
.desk-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 32px; margin-bottom: 18px; }
.desk-say { font-size: 17px; font-weight: 500; }
.hint { font-size: 14px; color: var(--ink-2); max-width: 46em; }
.hint kbd { font-size: 12px; }
.hint-touch { display: none; }
@media (hover: none) { .hint-touch { display: inline; } .hint-pointer { display: none; } }
.desk-frame {
  position: relative; width: 100%; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-desk);
  background: #0a1426; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.stage { position: absolute; left: 0; top: 0; width: 1000px; height: 640px; transform-origin: 0 0; overflow: hidden; isolation: isolate;
  --blur: 32px; --dim: .4; --mono: 0; --tint: #3a3a3f; --tint-a: .2; --grain-a: .075; }

/* wallpaper */
.wall { position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(160deg, #0f2a5c 0%, #17408f 38%, #0d6aa8 70%, #0b2e5e 100%); }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.o1 { width: 560px; height: 560px; left: -140px; top: -120px; background: radial-gradient(circle at 40% 40%, #ff9f5a, #c2410c 60%, transparent 70%); opacity: .85; }
.o2 { width: 520px; height: 520px; right: -100px; top: 120px; background: radial-gradient(circle at 50% 50%, #2dd4bf, #0f766e 60%, transparent 70%); opacity: .8; }
.o3 { width: 460px; height: 460px; left: 280px; bottom: -220px; background: radial-gradient(circle at 50% 50%, #e879f9, #7e22ce 60%, transparent 70%); opacity: .7; }
.o4 { width: 260px; height: 260px; left: 640px; top: -60px; background: radial-gradient(circle, #fde68a, #d97706 60%, transparent 70%); opacity: .75; }

.menubar { position: absolute; left: 0; right: 0; top: 0; height: 26px; z-index: 1; display: flex; align-items: center; gap: 18px;
  padding: 0 14px; font: 500 12.5px/1 var(--sans); color: #fff; background: rgba(20,24,34,.45);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.menubar b { font-weight: 700; }
.apple-mb { width: 11px; height: 13px; border-radius: 50% 50% 45% 45%; background: #fff; opacity: .92; }
.mb-right { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; }
.mb-veil { width: 13px; height: 11px; border-radius: 3px; border: 1.5px solid #fff; position: relative; opacity: .9; }
.mb-veil::after { content: ""; position: absolute; inset: 2px; background: #fff; border-radius: 1px; }

/* windows */
.win { position: absolute; border-radius: 11px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 0 .5px rgba(0,0,0,.5); font-size: 12px; line-height: 1.45;
  transition: box-shadow .25s; cursor: default; }
.win.is-focus { box-shadow: 0 26px 70px rgba(0,0,0,.55), 0 0 0 .5px rgba(0,0,0,.55); }
.win.light { background: #fbfbfc; color: #1d1d1f; }
.win.dark { background: #1d1f26; color: #e6e8ee; }
.tb { flex: none; height: 30px; display: flex; align-items: center; padding: 0 11px; gap: 10px; position: relative; touch-action: none; cursor: grab; }
.tb:active { cursor: grabbing; }
.light .tb { background: #ececee; border-bottom: 1px solid #d9d9dc; }
.dark .tb { background: #2a2c35; border-bottom: 1px solid #14151a; }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.lights .r { background: #ff5f57; } .lights .y { background: #febc2e; } .lights .g { background: #28c840; }
.tt { position: absolute; left: 0; right: 0; text-align: center; font-weight: 600; font-size: 12px; opacity: .72; pointer-events: none; }
.body { flex: 1; min-height: 0; overflow: hidden; }

.notes { padding: 14px 16px; }
.notes .nt-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: #1d1d1f; }
.notes p { color: #4a4a50; margin-bottom: 10px; }
.notes .quiet { color: #6e6e73; font-style: italic; }
.todo { list-style: none; margin: 0 0 10px; padding: 0; }
.todo li { position: relative; padding: 3px 0 3px 22px; }
.todo li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border: 1.5px solid #b0b0b6; border-radius: 50%; }
.todo li.done { color: #6e6e73; text-decoration: line-through; }
.todo li.done::before { background: #f5b301; border-color: #f5b301; }

.tabs { flex: none; display: flex; background: #181a20; font-size: 11.5px; }
.tabs span { padding: 7px 14px; color: #8b90a0; border-right: 1px solid #101116; }
.tabs .on { background: #1d1f26; color: #e6e8ee; box-shadow: inset 0 -2px 0 #78d4c6; }
.code { margin: 0; padding: 10px 0; font: 12px/1.65 var(--mono); white-space: pre; color: #c9ced9; }
.code b { display: inline-block; width: 34px; padding-right: 12px; text-align: right; color: #8b91a5; font-weight: 400; }
.code s { text-decoration: none; color: #c792ea; } .code q { quotes: none; color: #a6e3a1; }
.code u { text-decoration: none; color: #82aaff; } .code n { color: #f9a56b; } .code c { color: #949bb0; font-style: italic; }

.chat { padding: 12px; display: flex; flex-direction: column; gap: 7px; background: #fff; }
.bub { max-width: 82%; padding: 7px 11px; border-radius: 15px; }
.bub.in { background: #e9e9ec; align-self: flex-start; border-bottom-left-radius: 4px; }
.bub.out { background: #0a66d8; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.stamp { align-self: flex-end; font-size: 11px; color: #6e6e73; }

.music .body { background: linear-gradient(180deg, #23262f, #191b22); }
.player { display: flex; gap: 16px; padding: 18px; align-items: center; }
.art { flex: none; width: 108px; height: 108px; border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, #ffd08a, transparent 55%), linear-gradient(135deg, #ff7a59, #7c3aed); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.meta { flex: 1; min-width: 0; }
.meta strong { display: block; font-size: 15px; } .meta > span { color: #9aa0b0; }
.scrub { height: 4px; border-radius: 2px; background: #3a3d48; margin: 14px 0 4px; overflow: hidden; }
.scrub i { display: block; width: 44%; height: 100%; background: #e6e8ee; }
.times { display: flex; justify-content: space-between; font-size: 11px; color: #8b90a0; }
.ctl { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 10px; }
.ctl i { display: block; width: 0; height: 0; border-style: solid; }
.ctl .prev, .ctl .next { border-width: 7px 11px 7px 0; border-color: transparent #e6e8ee transparent transparent; }
.ctl .next { transform: scaleX(-1); }
.ctl .play { width: 12px; height: 16px; border: 0; border-left: 4px solid #e6e8ee; border-right: 4px solid #e6e8ee; }

.cal { display: flex; gap: 14px; padding: 12px 14px; }
.cal-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: 11px; text-align: center; align-content: start; }
.cal-grid span { padding: 5px 0; border-radius: 50%; } .cal-grid .h { color: #6e6e73; font-weight: 600; }
.cal-grid .today { background: #ff453a; color: #fff; font-weight: 700; }
.events { flex: none; width: 128px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.events li { position: relative; padding: 6px 8px 6px 14px; border-radius: 6px; background: #f1f1f4; font-size: 11px; }
.events i { position: absolute; left: 5px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--c); }
.events b { display: block; color: #6a6a72; font-weight: 600; font-size: 11px; }

/* the veil: sits directly beneath the focused window (z-index set from JS) */
.veil { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 1;
  background: rgba(0,0,0,var(--dim));
  -webkit-backdrop-filter: blur(var(--blur)) grayscale(var(--mono)); backdrop-filter: blur(var(--blur)) grayscale(var(--mono));
  transition: opacity .35s ease; }
.stage[data-trans="none"] .veil { transition: none; }
.stage[data-veil="off"] .veil { opacity: 0; }
.stage[data-peek="1"] .veil { opacity: 0; transition: opacity .18s ease; }
.veil-tint, .veil-grain { position: absolute; inset: 0; display: block; }
.veil-tint { background: var(--tint); opacity: var(--tint-a); }
.veil-grain { opacity: var(--grain-a); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px; }
.stage[data-peek="1"] .veil-grain, .stage[data-veil="off"] .veil-grain { visibility: hidden; }

/* fallback when backdrop-filter is missing: blur the non-focused layers directly */
.stage.no-bdf .veil { display: none; }
.stage.no-bdf[data-veil="on"]:not([data-peek="1"]) .wall,
.stage.no-bdf[data-veil="on"]:not([data-peek="1"]) .menubar,
.stage.no-bdf[data-veil="on"]:not([data-peek="1"]) .win:not(.is-focus) {
  filter: blur(var(--blur)) grayscale(var(--mono)) brightness(calc(1 - var(--dim))); }

.peek-pill { position: absolute; z-index: 9999; left: 50%; bottom: 16px; transform: translateX(-50%) translateY(8px); opacity: 0;
  padding: 6px 14px; border-radius: 999px; background: rgba(20,22,28,.78); color: #fff; font: 500 12px/1 var(--sans);
  transition: opacity .2s, transform .2s; pointer-events: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.stage[data-peek="1"] .peek-pill { opacity: 1; transform: translateX(-50%); }

/* ── Controls under the desk: soft tiles, like the app's control panel ── */
.tiles { display: grid; grid-template-columns: auto auto minmax(150px, 1fr) minmax(262px, 1.4fr) minmax(150px, 1fr) minmax(230px, 1.2fr);
  gap: 10px; margin-top: 18px; align-items: stretch; }
.tile { background: var(--card); border-radius: var(--r-md); padding: 14px 16px; box-shadow: 0 0 0 1px var(--line); min-width: 0; }
.t-on { display: flex; align-items: center; gap: 8px; }
.t-on img { border-radius: 6px; }
.t-on strong { font-weight: 600; font-size: 15px; }
.t-mode { display: flex; align-items: center; }
.t-mode .seg { min-width: 150px; }
.row label { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.row label.second { margin-top: 8px; }
.row output { color: var(--ink); font-variant-numeric: tabular-nums; }
.t-trans .btn.peek { margin-top: 10px; }

.switch { margin-left: 6px; width: 40px; height: 24px; border-radius: 999px; border: 0; padding: 2px; background: var(--soft-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .2s; flex: none; }
.switch i { display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] i { transform: translateX(16px); }
.seg { display: flex; flex: 1; padding: 3px; border-radius: var(--r-sm); background: var(--soft-2); }
.seg button { flex: 1; padding: 7px 8px; border: 0; background: none; color: var(--ink-2); border-radius: calc(var(--r-sm) - 2px); font: 500 12.5px/1.2 var(--sans); cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .14), 0 0 0 .5px rgb(0 0 0 / .06); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.35), 0 0 0 .5px rgba(0,0,0,.1); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.sw { width: 18px; height: 18px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); position: relative; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--accent); }
.sw.system { background: conic-gradient(#ff453a, #ff9f0a, #ffd60a, #30d158, #0a84ff, #bf5af2, #ff453a); }
.sw.custom { overflow: hidden; background: conic-gradient(from 90deg, #fff, #888, #fff); }
.sw.custom input { position: absolute; inset: -6px; width: 40px; height: 40px; opacity: 0; cursor: pointer; }
.sw.custom::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font: 600 14px/1 var(--sans); color: #111; pointer-events: none; }
.btn.peek { width: 100%; height: 34px; font-size: 13px; background: var(--soft-2); color: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; }
.btn.peek:active, .btn.peek.held { background: var(--ink); color: var(--bg); }

/* ── Blocks with a two-tone heading ── */
.block { padding-top: var(--sp-section); }
.say { font-size: var(--say); line-height: 1.1; letter-spacing: -.025em; font-weight: 500; max-width: 17em; text-wrap: balance; }
.media { margin-top: var(--sp-head); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-desk); background: #11161f; aspect-ratio: 16 / 10; }
.media video { width: 100%; height: 100%; object-fit: cover; }
.looks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.looks img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line); background: var(--soft); }
.looks figcaption { margin-top: 10px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.looks figcaption b { display: block; color: var(--ink); font-weight: 500; }

/* ── Fine-tuned: sticky claim on the left, setting cards on the right ── */
.tune { padding-top: var(--sp-section); }
.tune-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: var(--sp-col); align-items: start; }
.tune-say { position: sticky; top: calc(50vh - 120px); }
.tune-cards { display: flex; flex-direction: column; gap: var(--sp-head); }
.cp { transition: filter .6s var(--ease), opacity .6s var(--ease), transform .6s var(--ease); }
.js .cp:not(.in) { filter: blur(6px); opacity: .35; transform: scale(.985); }
.cp-card { background: var(--card); color: var(--card-ink); border-radius: var(--r-lg); padding: 18px 22px 8px; box-shadow: var(--shadow-card); }
.ic { width: 18px; height: 18px; flex: none; color: var(--card-ink); }
.cp-h { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.cp-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.cp-h + .cp-row { border-top: 0; }
.cp-row > span:first-child { flex: 1; min-width: 0; }
.cp-row em { font-style: normal; color: var(--ink-2); font-variant-numeric: tabular-nums; width: 34px; text-align: right; font-size: 13.5px; }
.cp-row.col { flex-direction: column; align-items: stretch; gap: 8px; }
.row-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-cap { margin: 14px 4px 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.cp-cap code { font-size: 13px; color: var(--ink); }
.mini-seg { display: inline-flex; padding: 2px; border-radius: var(--r-sm); background: var(--soft-2); font-size: 12.5px; }
.mini-seg i { font-style: normal; padding: 4px 11px; border-radius: calc(var(--r-sm) - 2px); color: var(--ink-2); white-space: nowrap; }
.mini-seg i.on { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .14); }
.mini-slider { position: relative; flex: 0 1 150px; height: 4px; border-radius: 2px; background: var(--line-2); }
.mini-slider::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 100%); border-radius: 2px; background: var(--accent); }
.mini-slider i { position: absolute; top: 50%; left: calc(var(--v) * 100%); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.dots { display: inline-flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.dots i { width: 15px; height: 15px; border-radius: 50%; background: var(--c); }
.dots i.sys { background: conic-gradient(#ff453a, #ff9f0a, #ffd60a, #30d158, #0a84ff, #bf5af2, #ff453a); }
.dots i.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--accent); }
.pick { color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.pick::after { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 2px 3px 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); }
.pick kbd { font-size: 11px; }
.tog { flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--soft-2); position: relative; box-shadow: inset 0 0 0 1px var(--line); }
.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .3); }
.tog.on { background: var(--accent); box-shadow: none; }
.tog.on::after { left: 18px; }
.btnish { font-size: 13px; color: var(--link); white-space: nowrap; }
.group-pill { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13px; color: var(--ink-2); }
.appdot { width: 18px; height: 18px; border-radius: 5px; display: inline-block; }
.appdot.a1 { background: linear-gradient(135deg, #5e5ce6, #2c2c8e); }
.appdot.a2 { background: radial-gradient(circle at 50% 50%, #fff 0 22%, transparent 24%), conic-gradient(#ff453a, #ffd60a, #30d158, #0a84ff, #ff453a); margin-left: -2px; }
.code-card { padding-bottom: 18px; }
.codeblock { margin: 8px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); color: var(--card-ink); font-size: 12.5px; line-height: 1.75; overflow-x: auto; white-space: pre; }
.codeblock .c { color: var(--ink-2); }


/* ── What / Why / How: flat columns separated by hairlines, no boxes ── */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--sp-col); margin-top: var(--sp-head); }
.col { padding-top: 16px; border-top: 1px solid var(--line-2); }
.col h3, .howto h3 { font-size: 21px; font-weight: 500; margin-bottom: 6px; letter-spacing: -.01em; }
.col p, .howto p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.howto b { color: var(--ink); font-weight: 500; }
.howto { list-style: none; counter-reset: h; margin: var(--sp-head) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px var(--sp-col); max-width: 1100px; }
.howto li { counter-increment: h; position: relative; padding: 16px 0 0 44px; border-top: 1px solid var(--line-2); }
.howto li::before { content: counter(h); position: absolute; left: 0; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 500; background: var(--ink); color: var(--bg); font-variant-numeric: tabular-nums; }
.sub-h { margin-top: var(--sp-head); font-size: 21px; font-weight: 500; }
.sc { margin: 12px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sp-col); max-width: 1100px; }
.sc > div { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.sc dt { display: inline-flex; gap: 3px; flex: none; min-width: 120px; }
.sc dt kbd { min-width: 24px; text-align: center; font-family: var(--sans); font-size: 12.5px; padding: 2px 6px; }
.sc dd { margin: 0; font-size: 15px; }

/* ── Get it ── */

/* ── FAQ ── */
.qa { margin-top: var(--sp-head); max-width: 720px; }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; font-size: 17px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; flex: none; width: 13px; height: 13px; opacity: .55; transition: transform .3s var(--ease);
  background: linear-gradient(currentColor, currentColor) center / 100% 1.4px no-repeat, linear-gradient(currentColor, currentColor) center / 1.4px 100% no-repeat; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { padding: 0 40px 22px 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }

/* ── More apps: hairline list ── */
.sibs { padding-top: var(--sp-section); }
.sib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 var(--sp-col); margin-top: var(--sp-head); }
.sib { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); text-decoration: none; transition: opacity .2s; }
.sib:hover { opacity: .7; }
.sib img { width: 44px; height: 44px; flex: none; }
.sib-text { display: grid; gap: 2px; min-width: 0; }
.sib-name { font-weight: 500; font-size: 15.5px; }
.sib-desc { color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }

/* ── Footer (colophon) ── */
.site-footer { margin-top: var(--sp-section); padding: 28px 0 max(40px, calc(env(safe-area-inset-bottom) + 24px)); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot a { text-decoration: none; transition: color .2s; }
.foot a:hover { color: var(--ink); }
.by a { color: var(--ink); }
.foot-sib, .links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-sib { margin-left: auto; }

/* ── Scroll-in ── */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .t-on { grid-column: span 2; } .t-mode { grid-column: span 4; }
  .t-blur, .t-grain { grid-column: span 3; }
  .t-tint, .t-trans { grid-column: span 3; }
}
@media (max-width: 900px) {
  .tune-grid { grid-template-columns: minmax(0, 1fr); }
  .tune-say { position: static; }
  .tune-cards { max-width: 600px; }
  .js .cp:not(.in) { filter: none; opacity: 1; transform: none; }
  .looks { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; gap: 20px; }
  .bar-links a.hide-sm { display: none; }
  .foot-sib { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 640px) {
  .bar { gap: 12px; height: 56px; }
  .bar-links a.hide-xs { display: none; }
  .brand span { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 12px 14px; }
  .t-on, .t-mode { grid-column: span 1; }
  .t-blur, .t-tint, .t-grain, .t-trans { grid-column: span 2; }
  .t-mode .seg { min-width: 0; }
  .ctas .btn.lg { flex: 1 1 100%; }
  .cols, .howto, .sc { grid-template-columns: 1fr; }
  .cols { gap: 20px; }
  .sc dt { min-width: 112px; }
  .cp-card { padding: 14px 16px 6px; }
  .cp-row { font-size: 14px; gap: 10px; }
  .mini-slider { flex-basis: 70px; }
  .mini-seg i { padding: 4px 8px; }
  .dots { gap: 4px; } .dots i { width: 13px; height: 13px; }
  .qa details p { padding-right: 0; }
  .desk-head { margin-bottom: 14px; }
}
/* Phones and touch screens: 44px tap targets, 16px body copy */
@media (max-width: 640px), (pointer: coarse) {
  .btn.sm { height: var(--tap); padding: 0 18px; font-size: 14.5px; }
  .brand { min-height: var(--tap); }
  .lang button { min-width: 36px; min-height: var(--tap); padding: 0 8px; font-size: 14px; }
  .bar-links a { display: inline-flex; align-items: center; min-height: var(--tap); }
  .seg button { min-height: 40px; font-size: 13.5px; }
  .switch { width: 51px; height: 31px; } .switch i { width: 27px; height: 27px; }
  .switch[aria-checked="true"] i { transform: translateX(20px); }
  .sw { width: 30px; height: 30px; }
  .sw::before { content: ""; position: absolute; inset: -4px; }   /* 38px hit area */
  .switch { position: relative; }
  .switch::after { content: ""; position: absolute; inset: -7px -4px; }
  .swatches { gap: 8px; margin-bottom: 8px; }
  input[type="range"] { height: var(--tap); }
  input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -11px; }
  input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; }
  .btn.peek { height: var(--tap); font-size: 14.5px; }
  .row label { font-size: 14px; }
  .dotted { display: inline-flex; align-items: center; min-height: var(--tap); }
  .qa summary { min-height: 56px; }
  .foot a { display: inline-flex; align-items: center; min-height: var(--tap); }
  .foot-sib, .links { gap: 0 20px; }
  .sib { min-height: 64px; }
}
@media (max-width: 640px) {
  .fine .sep { display: none; }
  .fine { flex-direction: column; gap: 0; align-items: flex-start; }
  body, .col p, .howto p, .cp-cap, .qa details p, .hint, .steps li, .sc dd { font-size: 16px; }
  .looks figcaption, .sib-desc { font-size: 15px; }
  .fine { font-size: 14px; }
  .brew { font-size: 14px; }
  .site-footer { font-size: 14px; }
  .qa summary { font-size: 17px; }
}
@media (max-width: 380px) { .looks { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .rise, .js .cp:not(.in) { opacity: 1; transform: none; filter: none; }
}

/* ── Chinese typography ── */
html:lang(zh-Hans) { --sans: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; }
html:lang(zh-Hant) { --sans: system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Source Han Sans TC", "Microsoft JhengHei", sans-serif; }
html[lang^="zh"] .claim, html[lang^="zh"] .say { letter-spacing: 0; line-height: 1.22; font-weight: 600; }
html[lang^="zh"] body { line-height: 1.7; }
.ph { display: inline-block; max-width: 100%; }
.lang button:lang(zh-Hans) { font-family: "PingFang SC", system-ui, sans-serif; }
.lang button:lang(zh-Hant) { font-family: "PingFang TC", system-ui, sans-serif; }
