/*
 * Studio Kí. design system, VI v03 (approved 2026-10-31), applied to the timoji support site.
 * One stylesheet for every page. Components use semantic tokens only; hex values live in the
 * :root token blocks below and nowhere else.
 *
 * Fonts are self-hosted from assets/fonts (Inter, Nunito, Noto Sans TC; SIL Open Font License 1.1)
 * so the site keeps loading no external fonts, as the privacy policy states.
 */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); 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"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/inter-latin-ext.woff2") format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/nunito-600-latin.woff2") format("woff2"); 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: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/nunito-600-latin-ext.woff2") format("woff2"); 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Noto Sans TC: subset to the characters the site uses (see assets/fonts/README.md). */
@font-face { font-family: "Noto Sans TC"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/noto-sans-tc-site-subset.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  /* Surfaces */
  --surface: #f7f5f0;
  --surface-raised: #ffffff;
  --surface-sunken: #edeae6;
  --surface-inverse: #2b2927;
  /* Text */
  --text-primary: #2b2927;
  --text-secondary: #5b5855;
  --text-tertiary: #6b6864;
  --text-brand: #15629a;
  --text-on-action: #2b2927;
  --text-inverse: #f7f5f0;
  --text-disabled: #b3afa9;
  /* Borders */
  --border-subtle: #e1ddd7;
  --border-strong: #7a7773;
  --border-focus: #1f8fd1;
  /* Actions */
  --action-primary: #7ec7e8;
  --action-primary-hover: #91cfeb;
  --action-primary-pressed: #74b5d2;
  --action-secondary-hover: #edeae6;
  /* Logo inks (header lockup only) */
  --logo-ink: #2b2927;
  --logo-brow: #1f8fd1;
  /* Kí pills palette: decorative gradients only */
  --pill-blue: #7ec7e8; --pill-violet: #9d7cf4; --pill-rose: #ffb4a2;
  --pill-teal: #6ee7c8; --pill-amber: #f9d56e;

  /* Spacing (4px grid) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --page-inset: 24px;
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
  /* Size and stroke */
  --control-height: 44px; --control-height-compact: 32px; --icon-size: 20px;
  --stroke-hairline: 1px; --stroke-focus: 2px;
  --shadow-overlay: 0 8px 24px rgba(23, 22, 21, 0.12);
  /* Motion */
  --dur-fast: 120ms; --dur-base: 200ms; --dur-page: 320ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  /* Type families */
  --font-display: "Nunito", "Noto Sans TC", sans-serif;
  --font-sans: "Inter", "Noto Sans TC", system-ui, sans-serif;
  --font-tc: "Noto Sans TC", "Inter", system-ui, sans-serif;

  /* Status tag ("New in 1.7.0") and the CSS device frame around app screens */
  --tag-bg: #edf7fc;
  --tag-text: #15629a;
  --device-bezel: #2b2927;
  /* Live Activity mock (same in both themes, like the system UI it shows) */
  --la-bg: #171615;
  --la-text: #f7f5f0;
  --la-track: #454240;
  --la-accent: #ff9500;

  /* Site layout */
  --content-max: 1200px;   /* Website header */
  --wide-max: 1344px;      /* home page tiles, rows and Product nav */
  --text-max: 720px;       /* reading column */
  --header-height: 88px;
  --product-nav-height: 52px;
}

/* Dark theme: follows the system unless the header toggle chose a theme (html[data-theme]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #211f1d; --surface-raised: #2b2927; --surface-sunken: #171615; --surface-inverse: #f7f5f0;
    --text-primary: #f7f5f0; --text-secondary: #c9c4bd; --text-tertiary: #a0a4a7;
    --text-brand: #7ec7e8; --text-on-action: #2b2927; --text-inverse: #2b2927; --text-disabled: #6b6864;
    --border-subtle: #454240; --border-strong: #a0a4a7; --border-focus: #7ec7e8;
    --action-secondary-hover: #2b2927;
    --logo-ink: #f7f5f0; --logo-brow: #7ec7e8;
    --shadow-overlay: 0 8px 24px rgba(0, 0, 0, 0.48);
    --tag-bg: #0e3a5c; --tag-text: #d7eef8; --device-bezel: #171615;
    color-scheme: dark;
  }
}
/* [data-theme="dark"] on <html> comes from the toggle; on an element (the closing Inverse tile) it pins that element to the dark tokens. */
:root[data-theme="dark"], [data-theme="dark"] {
  --surface: #211f1d; --surface-raised: #2b2927; --surface-sunken: #171615; --surface-inverse: #f7f5f0;
  --text-primary: #f7f5f0; --text-secondary: #c9c4bd; --text-tertiary: #a0a4a7;
  --text-brand: #7ec7e8; --text-on-action: #2b2927; --text-inverse: #2b2927; --text-disabled: #6b6864;
  --border-subtle: #454240; --border-strong: #a0a4a7; --border-focus: #7ec7e8;
  --action-secondary-hover: #2b2927;
  --logo-ink: #f7f5f0; --logo-brow: #7ec7e8;
  --shadow-overlay: 0 8px 24px rgba(0, 0, 0, 0.48);
  --tag-bg: #0e3a5c; --tag-text: #d7eef8; --device-bezel: #171615;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-reduced-motion: reduce) { :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-page: 0ms; } }

@media (min-width: 1024px) { :root { --page-inset: 48px; } }
@media (max-width: 767.98px) { :root { --header-height: 64px; } }

/* Traditional Chinese: Noto Sans TC first in every stack, same size and line height. */
:lang(zh-Hant) {
  --font-display: "Noto Sans TC", "Nunito", sans-serif;
  --font-sans: "Noto Sans TC", "Inter", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--surface); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 0;
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px; line-height: 24px; font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure { margin: 0; }
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

a { color: var(--text-brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus { outline: none; }
:focus-visible { outline: var(--stroke-focus) solid var(--border-focus); outline-offset: 2px; }
[tabindex="-1"]:focus-visible { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.shell { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--page-inset); }

.skip-link {
  position: absolute; top: var(--space-2); left: var(--space-4); z-index: 20;
  display: inline-flex; align-items: center; min-height: var(--control-height); padding: 0 var(--space-4);
  background: var(--surface-raised); color: var(--text-primary);
  border: var(--stroke-hairline) solid var(--border-strong); border-radius: var(--radius-md);
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; }

/* ---------- Type styles ---------- */
.kicker, .feature-label, .eyebrow, .policy-nav > p {
  font-family: var(--font-sans);
  font-size: 11px; line-height: 18px; font-weight: 500;
  letter-spacing: 1.32px; text-transform: uppercase;
  color: var(--text-secondary);
}
:lang(zh-Hant).feature-label, :lang(zh-Hant) .feature-label,
:lang(zh-Hant) .eyebrow, :lang(zh-Hant) .policy-nav > p { letter-spacing: 0; text-transform: none; }

/* ---------- Website header ---------- */
.site-header {
  position: relative; z-index: 15; /* above the sticky Product nav, so the mobile menu panel covers it */
  background: var(--surface-raised);
  border-bottom: var(--stroke-hairline) solid var(--border-subtle);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  max-width: var(--content-max); min-height: var(--header-height);
  margin-inline: auto; padding-inline: var(--page-inset);
}
.site-header__brand { color: var(--logo-ink); display: inline-flex; padding: 6px; margin: -6px; border-radius: var(--radius-sm); }
.site-header__brand .brow { fill: var(--logo-brow); }
.studio-ki-lockup { display: block; width: 109px; height: 28px; }

.site-header__nav { display: flex; align-items: center; gap: var(--space-12); margin-left: auto; }
.site-header__nav a {
  display: inline-flex; align-items: center;
  min-height: var(--control-height); padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 16px; line-height: 24px; font-weight: 600;
  color: var(--text-primary); text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease);
}
.site-header__nav a:hover { background: var(--action-secondary-hover); }
.site-header__nav a[aria-current="page"] {
  color: var(--text-brand);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  text-decoration-color: var(--text-brand);
}

.site-header__menu { display: none; }

/* Theme toggle: needs JavaScript, so it only appears once the page has it. */
.site-header__theme { display: none; }
.js .site-header__theme {
  display: inline-grid; place-items: center; flex: none;
  width: var(--control-height); height: var(--control-height); margin-left: var(--space-6);
  padding: 0; border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--text-primary); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}
.js .site-header__theme:hover { background: var(--action-secondary-hover); }
.site-header__theme svg { width: var(--icon-size); height: var(--icon-size); }
.site-header__theme .icon-sun, .site-header__theme[aria-pressed="true"] .icon-moon { display: none; }
.site-header__theme[aria-pressed="true"] .icon-sun { display: block; }
/* 768–1023 px: the 48 px link gap plus the theme button would not fit beside the lockup, so tighten both. */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .site-header__nav { gap: var(--space-8); }
  .js .site-header__theme { margin-left: var(--space-2); }
}

@media (max-width: 767.98px) {
  /* Without JavaScript the links simply stack under the brand row and stay reachable. */
  .site-header__nav {
    flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 0;
    margin-inline: calc(var(--page-inset) * -1);
    border-top: var(--stroke-hairline) solid var(--border-subtle);
  }
  .site-header__nav a {
    min-height: 48px; padding: 0 var(--page-inset); border-radius: 0;
  }
  .site-header__nav a + a { border-top: var(--stroke-hairline) solid var(--border-subtle); }

  /* With JavaScript the links move behind one menu button. */
  .js .site-header__inner { flex-wrap: nowrap; }
  .js .site-header__theme { margin-left: auto; }
  .js .site-header__menu {
    display: inline-grid; place-items: center;
    width: var(--control-height); height: var(--control-height); margin-left: var(--space-1); margin-right: calc(var(--space-3) * -1);
    padding: 0; border: 0; border-radius: var(--radius-md);
    background: transparent; color: var(--text-primary); cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease);
  }
  .js .site-header__menu:hover { background: var(--action-secondary-hover); }
  .js .site-header__menu svg { width: var(--icon-size); height: var(--icon-size); }
  .js .site-header__menu .icon-close, .js .site-header__menu[aria-expanded="true"] .icon-menu { display: none; }
  .js .site-header__menu[aria-expanded="true"] .icon-close { display: block; }
  .js .site-header__nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: var(--surface-raised);
    border-top: var(--stroke-hairline) solid var(--border-subtle);
    border-bottom: var(--stroke-hairline) solid var(--border-subtle);
    box-shadow: var(--shadow-overlay);
  }
  .js .site-header:not(.is-open) .site-header__nav { display: none; }
}

/* ---------- Buttons and links ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-height); padding: 0 var(--space-4);
  border: var(--stroke-hairline) solid var(--border-strong); border-radius: var(--radius-md);
  background: transparent; color: var(--text-primary);
  font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.button:hover { background: var(--action-secondary-hover); }
.button:active { transform: scale(0.98); }
.button--primary { background: var(--action-primary); border-color: var(--action-primary); color: var(--text-on-action); }
.button--primary:hover { background: var(--action-primary-hover); border-color: var(--action-primary-hover); }
.button--primary:active { background: var(--action-primary-pressed); border-color: var(--action-primary-pressed); }

/* ---------- Page structure ---------- */
main { padding-block: var(--space-16) var(--space-24); }
main:focus { outline: none; }
.home-page main { padding-block: 0; max-width: calc(var(--wide-max) + 2 * var(--page-inset)); }

.home-section { padding-block: var(--space-24) 0; scroll-margin-top: calc(var(--product-nav-height) + var(--space-6)); }
.home-page main > .home-section:last-child { padding-bottom: var(--space-24); }
@media (prefers-reduced-motion: no-preference) { html:has(.product-nav) { scroll-behavior: smooth; } }

/* Section heading block: kicker above a brand-display h2, 48 px above the content. */
.section-head { margin-bottom: var(--space-12); }
.section-head .feature-label { margin-bottom: var(--space-3); }
.section-head--center { text-align: center; }
.section-head--center h2 { max-width: 16em; margin-inline: auto; }

h2, .home-page h2 {
  font-family: var(--font-display);
  font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: 0;
  color: var(--text-primary); text-wrap: balance;
}
.home-page main h2 { font-size: 48px; line-height: 58px; letter-spacing: -0.96px; }

/* "New in 1.7.0" as a status tag */
.feature-label.tag {
  display: inline-block; padding: 0 var(--space-2); border-radius: var(--radius-sm);
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: 0; text-transform: none;
}

/* ---------- Product nav ---------- */
.product-nav {
  position: sticky; top: 0; z-index: 12;
  min-height: var(--product-nav-height);
  background: var(--surface);
  border-bottom: var(--stroke-hairline) solid var(--border-subtle);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .product-nav {
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  }
}
.product-nav__inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  max-width: calc(var(--wide-max) + 2 * var(--page-inset)); min-height: var(--product-nav-height);
  margin-inline: auto; padding-inline: var(--page-inset);
}
.product-nav__name {
  display: inline-flex; align-items: center; min-height: var(--control-height);
  font-family: var(--font-display); font-size: 20px; line-height: 28px; font-weight: 600;
  color: var(--text-primary); text-decoration: none; border-radius: var(--radius-sm);
}
.product-nav__links { list-style: none; display: flex; align-items: center; gap: var(--space-6); margin: 0 0 0 auto; padding: 0; }
.product-nav__links a {
  display: inline-flex; align-items: center; min-height: var(--control-height);
  font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap;
  color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease);
}
.product-nav__links a:hover, .product-nav__links a[aria-current="true"] { color: var(--text-primary); }
.product-nav__cta {
  display: inline-flex; align-items: center; height: var(--control-height-compact); margin-left: var(--space-6); padding: 0 var(--space-4);
  border-radius: var(--radius-md); background: var(--action-primary); color: var(--text-on-action);
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.product-nav__cta:hover { background: var(--action-primary-hover); }
.product-nav__cta:active { background: var(--action-primary-pressed); transform: scale(0.98); }
.product-nav__toggle { display: none; }

@media (max-width: 767.98px) {
  /* Without JavaScript the links sit in a scrollable row under the name. */
  .product-nav__name { margin-right: auto; }
  .product-nav__links { order: 3; flex: 1 0 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .product-nav__cta { margin-left: 0; }
  /* With JavaScript they move into a panel behind the chevron. */
  .js .product-nav__inner { flex-wrap: nowrap; }
  .js .product-nav__toggle {
    display: inline-grid; place-items: center; width: var(--control-height); height: var(--control-height);
    margin-left: var(--space-1); margin-right: calc(var(--space-3) * -1); padding: 0; border: 0; border-radius: var(--radius-md);
    background: transparent; color: var(--text-primary); cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease);
  }
  .js .product-nav__toggle:hover { background: var(--action-secondary-hover); }
  .js .product-nav__toggle svg { width: var(--icon-size); height: var(--icon-size); transition: transform var(--dur-fast) var(--ease); }
  .js .product-nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .js .product-nav__links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; overflow: visible;
    background: var(--surface-raised); box-shadow: var(--shadow-overlay);
    border-bottom: var(--stroke-hairline) solid var(--border-subtle);
  }
  .js .product-nav:not(.is-open) .product-nav__links { display: none; }
  .js .product-nav__links li + li { border-top: var(--stroke-hairline) solid var(--border-subtle); }
  .js .product-nav__links a { display: flex; min-height: 48px; padding: 0 var(--page-inset); border-radius: 0; font-size: 16px; line-height: 24px; }
}

/* ---------- Hero (centred, type-led) ---------- */
.hero {
  position: relative; isolation: isolate;
  padding-top: calc(var(--space-16) + var(--space-24));
  text-align: center;
}
.hero-copy { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); }
.home-page .app-icon { width: 96px; height: auto; border-radius: 22px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: 64px; line-height: 76px; font-weight: 600; letter-spacing: -1.28px;
  color: var(--text-primary); text-wrap: balance;
}
.tagline {
  margin-top: calc(var(--space-6) * -1 + var(--space-2));
  font-family: var(--font-display);
  font-size: 20px; line-height: 28px; font-weight: 600;
  color: var(--text-secondary); text-wrap: balance;
}
.intro { max-width: 640px; font-size: 18px; line-height: 28px; color: var(--text-secondary); }

/* Official App Store artwork: unchanged, 48 px high, with 12 px clear space on all sides. */
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-4); margin-block: calc(var(--space-3) * -1); }
.app-store-link { display: inline-flex; flex: 0 0 auto; padding: 12px; margin: -12px; text-decoration: none; border-radius: var(--radius-md); }
.app-store-link img { width: auto; height: 48px; max-width: none; }
.hero-actions .app-store-link { margin: 0; }

.product-preview { width: min(100%, 320px); margin: var(--space-16) auto 0; }
.product-preview > video {
  width: 100%; height: auto; aspect-ratio: 886 / 1920;
  background: var(--surface-raised); border-radius: var(--radius-xl);
}
/* iPad landscape preview in a CSS device frame; corners concentric (outer = screen radius + bezel) */
.product-preview--ipad {
  --bezel: clamp(8px, 1.6vw, 16px); --screen-r: clamp(8px, 1.6vw, 16px);
  width: min(100%, 960px); padding: var(--bezel);
  background: var(--device-bezel); border-radius: calc(var(--screen-r) + var(--bezel));
}
.product-preview--ipad > video { aspect-ratio: 4 / 3; border-radius: var(--screen-r); background: #000; }

/* ---------- Feature card row (Studio Kí. "Feature card") ---------- */
body { overflow-x: clip; } /* the rows bleed to the viewport edge; never scroll the page sideways */
.fc-section { --inset: calc(max(0px, (100vw - var(--wide-max) - 2 * var(--page-inset)) / 2) + var(--page-inset)); }
.fc-head { margin-bottom: var(--space-12); }
.fc-head .feature-label { margin-bottom: var(--space-3); }
.fc-head h2 { max-width: 16em; }
.fc-track {
  list-style: none; margin: 0 calc(var(--inset) * -1); padding: 0 var(--page-inset) 0 var(--inset);
  display: flex; gap: var(--space-6);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scroll-padding-inline: var(--inset) var(--page-inset);
  scrollbar-width: none;
}
.fc-track::-webkit-scrollbar { display: none; }
.fc-track:focus-visible { outline-offset: -2px; border-radius: var(--radius-xl); }
.fc {
  position: relative; flex: none; scroll-snap-align: start;
  width: 360px; height: 520px; padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-6);
  background: var(--surface-raised); border-radius: var(--radius-xl);
}
.fc-copy { display: flex; flex-direction: column; gap: var(--space-3); }
.fc-eyebrow { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-secondary); }
.fc-title, .home-page .fc-title { font-family: var(--font-sans); font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: 0; color: var(--text-primary); }
.fc-body { color: var(--text-secondary); }
.fc-media { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; }
.fc-media img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-lg); }

/* Feature card media: app screens in the device frame, running off the bottom of the card */
.fc:has(.fc-media--device) { padding-bottom: 0; }
.fc-media--device { align-items: flex-start; overflow: hidden; }
/* Same media height in every card, anchored to the card bottom, so the device tops line up whatever the copy length */
.fc-media--device { flex: none; height: 316px; margin-top: auto; }
:lang(zh-Hant) .fc-media--device { height: 372px; }
/* Concentric corners: screen radius (13.3% of the screen width, as on the device) + the 10 px bezel = outer radius */
.fc .device { width: 232px; padding: 10px 10px 0; border-radius: 38px 38px 0 0; }
.fc .device img { border-radius: 28px 28px 0 0; }
.fc .device { height: 100%; }
.fc .device img { min-height: 100%; object-fit: cover; object-position: top center; }

/* Live Activity card: a Lock Screen in the device frame, drawn in CSS (same frame and corners as the other cards) */
.fc .device .lock {
  position: relative; display: flex; flex-direction: column; align-items: center; height: 100%;
  padding: 10px 8px 0; border-radius: 28px 28px 0 0; overflow: hidden;
  color: var(--la-text); font-family: var(--font-sans); text-align: center;
  background: radial-gradient(120% 70% at 50% 0%, #6b5a4c 0%, #3a312b 45%, #1d1a18 100%);
}
.lock-island { flex: none; width: 72px; height: 22px; border-radius: var(--radius-full); background: #000; }
.lock-date { margin-top: 22px; font-size: 13px; line-height: 18px; font-weight: 600; opacity: 0.85; }
.lock-clock { font-family: var(--font-display); font-size: 68px; line-height: 72px; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.la-card {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: auto; margin-bottom: 12px; padding: 12px;
  border-radius: 20px; background: rgba(23, 22, 21, 0.72); text-align: left;
}
.fc .device .la-card img { flex: none; width: 44px; height: 44px; min-height: 0; border-radius: 0; object-fit: contain; }
.la-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.la-name { font-size: 13px; line-height: 18px; font-weight: 600; }
.la-time { font-size: 24px; line-height: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.la-bar { display: block; height: 4px; margin-top: 6px; border-radius: var(--radius-full); background: var(--la-track); overflow: hidden; }
.la-bar span { display: block; width: 72%; height: 100%; border-radius: inherit; background: var(--la-accent); }

.fc-controls { display: none; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-6); }
.js .fc-controls { display: flex; }
.js .fc-controls[hidden] { display: none; }
.fc-ctl {
  display: inline-grid; place-items: center; width: var(--control-height); height: var(--control-height);
  padding: 0; border: 0; border-radius: var(--radius-full);
  background: var(--surface-sunken); color: var(--text-primary); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.fc-ctl svg { width: var(--icon-size); height: var(--icon-size); }
.fc-ctl:hover:not(:disabled) { background: var(--action-primary); color: var(--text-on-action); }
.fc-ctl:active:not(:disabled) { transform: scale(0.98); }
.fc-ctl:disabled { color: var(--text-disabled); cursor: default; }

/* Round action on linked cards (decorative; the whole card is the link). */
.fc-action {
  position: absolute; right: var(--space-6); bottom: var(--space-6);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--surface-sunken); color: var(--text-primary);
  transition: background-color var(--dur-fast) var(--ease);
}
.fc-action svg { width: var(--icon-size); height: var(--icon-size); }

/* ---------- Highlight tiles (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-8);
  min-height: 480px; padding: var(--space-16) var(--space-12) var(--space-12);
  background: var(--surface-raised); color: var(--text-primary); border-radius: var(--radius-xl);
  text-align: center;
}
.tile--full { grid-column: 1 / -1; }
.tile__copy { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); max-width: 480px; }
.tile--full .tile__copy { max-width: 720px; }
.tile h3 {
  font-family: var(--font-display); font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: 0;
  color: var(--text-primary); text-wrap: balance;
}
.tile--full h3 { font-size: 48px; line-height: 58px; letter-spacing: -0.96px; }
.tile__copy p { color: var(--text-secondary); text-wrap: pretty; }
.tile--full .tile__copy p { font-size: 18px; line-height: 28px; }
.tile__media { flex: 1; min-height: 0; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.tile__media img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
@media (min-width: 1024px) { .bento .tile { height: 640px; } }

/* App screens in a Studio Kí. device frame: an Inkstone bezel that runs off the bottom edge of the tile. */
.tile:has(.tile__media--device) { padding-bottom: 0; }
.tile__media--device { align-items: flex-start; }
.device {
  width: 300px; height: 100%; min-height: 0; overflow: hidden;
  padding: 12px 12px 0; background: var(--device-bezel);
  border-radius: 48px 48px 0 0;
}
.tile--full .device { width: 360px; border-radius: 56px 56px 0 0; }
.device img { display: block; width: 100%; height: auto; max-width: none; max-height: none; }

/* ---------- Compare panel ---------- */
.compare-panel {
  position: relative; max-width: 960px; margin-inline: auto; padding: var(--space-8);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface-raised); border-radius: var(--radius-xl);
}
.comparison { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; line-height: 22px; }
.comparison th, .comparison td {
  padding: var(--space-4); text-align: center; vertical-align: middle;
  border-bottom: var(--stroke-hairline) solid var(--border-subtle);
}
.comparison tbody tr:last-child > * { border-bottom: 0; }
.comparison th:first-child { width: 44%; text-align: left; padding-left: 0; }
.comparison thead th { padding-top: var(--space-4); font-size: 20px; line-height: 28px; font-weight: 600; color: var(--text-primary); }
.comparison thead th:first-child { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-secondary); }
.comparison thead th span { display: block; font-size: 12px; line-height: 18px; font-weight: 400; color: var(--text-secondary); }
.comparison tbody th { font-size: 16px; line-height: 24px; font-weight: 400; color: var(--text-primary); }
.comparison td { color: var(--text-primary); }
.comparison td { font-weight: 500; }
.cmp-icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; }
.cmp-icon--yes circle { fill: var(--action-primary); }
.cmp-icon--yes path { stroke: var(--text-on-action); }
.cmp-icon--no path { stroke: var(--text-tertiary); }
/* The Plus column reads as one band, so each row is easy to compare */
.comparison th:last-child, .comparison td:last-child { background: var(--tag-bg); }
.comparison thead th:last-child { border-radius: var(--radius-md) var(--radius-md) 0 0; padding-top: var(--space-4); }
.comparison tbody tr:last-child td:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.comparison thead th:last-child span { color: var(--tag-text); }
.plan-note { max-width: var(--text-max); margin: var(--space-6) auto 0; text-align: center; font-size: 12px; line-height: 18px; color: var(--text-tertiary); }

/* ---------- Closing statement: one Inverse tile ---------- */
.tile--inverse { padding-bottom: 0; gap: var(--space-8); }
.tile--inverse h2 { max-width: 16em; }
.maker-copy { font-size: 18px; line-height: 28px; color: var(--text-secondary); }
.maker-copy span { display: block; text-wrap: balance; }
.tile--inverse .support-note { margin-top: var(--space-3); font-size: 16px; line-height: 24px; }

/* Kí pills: static decoration on their own layer, never within 32 px of text or controls. */
.ki-pills { position: absolute; inset: 0; z-index: -1; pointer-events: none; display: none; }
.ki-pill {
  position: absolute; display: block; width: 18px; border-radius: var(--radius-full);
  transform: rotate(45deg); transform-origin: center;
}
.ki-pill--s { width: 12px; }
.ki-pill.l5 { height: 90px; }  .ki-pill.l3 { height: 59px; }  .ki-pill.l2 { height: 40px; }
.ki-pill--s.l5 { height: 60px; } .ki-pill--s.l3 { height: 40px; } .ki-pill--s.l2 { height: 26px; }
.ki-pill.bv { background: linear-gradient(180deg, var(--pill-blue), var(--pill-violet)); }
.ki-pill.ra { background: linear-gradient(180deg, var(--pill-rose), var(--pill-amber)); }
.ki-pill.tb { background: linear-gradient(180deg, var(--pill-teal), var(--pill-blue)); }
/* Hero: only at 1200 px and wider, where the 640 px text column leaves 230 px or more on each side for the clusters plus the safe area. */
@media (min-width: 1200px) { .ki-pills--hero { display: block; } }

/* Inverse tile: one band of 24 px pills along the bottom of the tile, below the copy (the 32 px tile gap is the safe area). */
.ki-pills--band { position: relative; inset: auto; z-index: 0; display: block; flex: none; width: calc(100% + 2 * var(--space-12)); height: 260px; margin-inline: calc(var(--space-12) * -1); }
.ki-pills--band .ki-pill { width: 24px; }
.ki-pills--band .l5 { height: 120px; } .ki-pills--band .l3 { height: 79px; } .ki-pills--band .l2 { height: 53px; }
.ki-pills--band .ki-pill:nth-child(1)  { left: 3%;  top: 70px; }
.ki-pills--band .ki-pill:nth-child(2)  { left: 12%; top: 150px; }
.ki-pills--band .ki-pill:nth-child(3)  { left: 19%; top: 36px; }
.ki-pills--band .ki-pill:nth-child(4)  { left: 27%; top: 120px; }
.ki-pills--band .ki-pill:nth-child(5)  { left: 36%; top: 24px; }
.ki-pills--band .ki-pill:nth-child(6)  { left: 43%; top: 176px; }
.ki-pills--band .ki-pill:nth-child(7)  { left: 51%; top: 80px; }
.ki-pills--band .ki-pill:nth-child(8)  { left: 60%; top: 160px; }
.ki-pills--band .ki-pill:nth-child(9)  { left: 67%; top: 40px; }
.ki-pills--band .ki-pill:nth-child(10) { left: 75%; top: 120px; }
.ki-pills--band .ki-pill:nth-child(11) { left: 85%; top: 20px; }
.ki-pills--band .ki-pill:nth-child(12) { left: 92%; top: 150px; }

/* ---------- Subpage cards (Privacy, Support): Feature cards with the arrow action, no media ---------- */
.home-links { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); text-align: left; }
.link-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-3);
  min-height: 200px; padding: var(--space-8) var(--space-8) calc(var(--space-8) + 44px);
  background: var(--surface-raised); color: var(--text-primary); text-decoration: none;
  border-radius: var(--radius-xl);
  transition: transform var(--dur-base) var(--ease);
}
.link-card:hover { transform: translateY(-2px); }
.link-card:hover .fc-action { background: var(--action-primary); color: var(--text-on-action); }
.link-card:focus-visible { outline: var(--stroke-focus) solid var(--border-focus); outline-offset: 2px; }
.link-card strong { font-size: 24px; line-height: 32px; font-weight: 600; }
.link-card > span:not(.fc-action) { color: var(--text-secondary); }
.link-icon { width: 28px; height: 28px; color: var(--text-brand); margin-bottom: var(--space-1); }

.support-note { font-size: 14px; line-height: 22px; color: var(--text-secondary); }
.support-note p + p { margin-top: var(--space-1); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-2) var(--space-6);
  padding-block: var(--space-12);
  font-size: 12px; line-height: 18px; color: var(--text-tertiary);
}
.site-footer-wrap { background: var(--surface); border-top: var(--stroke-hairline) solid var(--border-subtle); }
.home-page .site-footer.shell { max-width: calc(var(--wide-max) + 2 * var(--page-inset)); }
.apple-credit { flex-basis: 100%; }

/* ---------- Subpages: one reading column, 720 px ---------- */
body:not(.home-page) main.shell { max-width: calc(var(--text-max) + 2 * var(--page-inset)); }
.page-heading { padding-bottom: var(--space-12); }
.page-heading h1 {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: 0;
  color: var(--text-primary); text-wrap: balance;
}
.page-heading .subtitle { margin-top: var(--space-3); font-size: 18px; line-height: 28px; color: var(--text-secondary); }
.policy-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-top: var(--space-4); font-size: 14px; line-height: 22px; color: var(--text-secondary); }

.paper { background: var(--surface-raised); border-radius: var(--radius-md); }

/* Privacy: contents panel on top, then the policy as plain text in the column */
.policy-nav { margin-bottom: var(--space-12); padding: var(--space-6); background: var(--surface-raised); border-radius: var(--radius-md); }
.policy-nav > p { margin-bottom: var(--space-3); }
.policy-nav ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--space-6); }
.policy-nav li { break-inside: avoid; }
.policy-nav a {
  display: flex; align-items: center; min-height: 36px; padding: var(--space-1) var(--space-2); margin-inline: calc(var(--space-2) * -1);
  border-radius: var(--radius-sm);
  font-size: 14px; line-height: 20px; color: var(--text-secondary); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}
.policy-nav a:hover { background: var(--action-secondary-hover); color: var(--text-primary); }
.policy.paper { background: transparent; border-radius: 0; }
.policy section { scroll-margin-top: var(--space-6); }
.policy section + section { margin-top: var(--space-8); padding-top: var(--space-8); border-top: var(--stroke-hairline) solid var(--border-subtle); }
.policy h2, .guide-entry h2, .support-row h2 { font-family: var(--font-sans); font-size: 24px; line-height: 32px; font-weight: 600; margin-bottom: var(--space-3); }
.policy p, .policy address { color: var(--text-secondary); font-style: normal; }
.policy p + p { margin-top: 1em; }
.policy a, .contact-email { overflow-wrap: anywhere; }

/* Support */
.guide-entry { padding: var(--space-8); margin-bottom: var(--space-12); border-radius: var(--radius-xl); }
.guide-entry h2 { margin-bottom: 0; }
.guide-entry p { margin-top: var(--space-2); color: var(--text-secondary); }
.guide-entry .button { margin-top: var(--space-6); }
.support-paper.paper { background: transparent; border-radius: 0; margin-bottom: var(--space-8); }
.support-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: var(--space-2) var(--space-4); padding-block: var(--space-8); }
.support-row:first-child { padding-top: 0; }
.support-row + .support-row { border-top: var(--stroke-hairline) solid var(--border-subtle); }
.support-row h2 { margin-bottom: 0; }
.support-detail { grid-column: 2; }
.support-number {
  display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 var(--space-2);
  border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--text-secondary);
  font-size: 12px; line-height: 18px; font-weight: 500; margin-top: 2px; justify-self: start;
}
.support-row h3 { font-size: 20px; line-height: 28px; font-weight: 600; margin-bottom: var(--space-2); }
.support-row p { color: var(--text-secondary); }
.support-detail .button { margin-top: var(--space-6); }
.contact-email { display: block; width: fit-content; margin-top: var(--space-3); font-size: 14px; line-height: 22px; }

/* Guide: FAQ entries as raised disclosure rows */
.guide-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-12); }
.guide-nav a {
  display: inline-flex; align-items: center; min-height: var(--control-height); padding: 0 var(--space-4);
  background: var(--surface-raised); color: var(--text-primary);
  border-radius: var(--radius-md);
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}
.guide-nav a:hover { background: var(--surface-sunken); }
.guide-content.paper { background: transparent; border-radius: 0; }
.guide-content section { scroll-margin-top: var(--space-6); }
.guide-content section + section { margin-top: var(--space-16); }
.guide-content h2 { margin-bottom: var(--space-6); font-family: var(--font-sans); font-size: 24px; line-height: 32px; }
.guide-content details { background: var(--surface-raised); border-radius: var(--radius-md); }
.guide-content details + details { margin-top: var(--space-3); }
.guide-content summary {
  display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600; cursor: pointer; list-style: none;
  transition: background-color var(--dur-fast) var(--ease);
}
.guide-content summary::-webkit-details-marker { display: none; }
.guide-content summary::after {
  content: ""; flex: none; margin-left: auto; width: 8px; height: 8px;
  border-right: var(--stroke-focus) solid var(--text-secondary); border-bottom: var(--stroke-focus) solid var(--text-secondary);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--dur-fast) var(--ease);
}
.guide-content details[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.guide-content summary:hover { background: var(--action-secondary-hover); }
.answer { padding: 0 var(--space-6) var(--space-6); color: var(--text-secondary); }
.answer p { overflow-wrap: anywhere; }
.answer p + p { margin-top: 1em; }

/* ---------- Responsive ---------- */
@media (max-width: 1023.98px) {
  .tile__media--device { flex: none; height: 400px; }
  .tile__media:not(.tile__media--device) img { max-height: 400px; }
}
@media (max-width: 767.98px) {
  main { padding-block: var(--space-16); }
  .home-section { padding-top: var(--space-16); }
  .home-page main > .home-section:last-child { padding-bottom: var(--space-16); }
  .hero { padding-top: calc(var(--space-16) + var(--space-16)); }
  .hero h1 { font-size: 48px; line-height: 58px; letter-spacing: -0.96px; }
  .product-preview { width: min(100%, 260px); margin-top: var(--space-12); }
  .product-preview--ipad { width: 100%; }
  h2, .home-page h2, .home-page main h2 { font-size: 32px; line-height: 40px; letter-spacing: 0; }
  .fc { width: 300px; height: 460px; }
  .fc .device { width: 200px; border-radius: 34px 34px 0 0; }
  .fc-media--device { height: 232px; }
  :lang(zh-Hant) .fc-media--device { height: 280px; }
  .fc .device img { border-radius: 24px 24px 0 0; }
  .bento { grid-template-columns: 1fr; }
  .tile { padding: var(--space-12) var(--space-6) var(--space-6); }
  .tile h3, .tile--full h3 { font-size: 32px; line-height: 40px; letter-spacing: 0; }
  .tile--full .tile__copy p { font-size: 16px; line-height: 24px; }
  .device, .tile--full .device { width: 240px; border-radius: 40px 40px 0 0; padding: 10px 10px 0; }
  .tile__media--device { height: 340px; }
  .tile--inverse { padding-bottom: 0; }
  .ki-pills--band { height: 220px; width: calc(100% + 2 * var(--space-6)); margin-inline: calc(var(--space-6) * -1); }
  .ki-pills--band .ki-pill:nth-child(6), .ki-pills--band .ki-pill:nth-child(12) { display: none; }
  .compare-panel { padding: var(--space-6) var(--space-4); }
  /* Narrow screens: both plan columns stay in view, no sideways scrolling */
  .comparison { min-width: 0; table-layout: fixed; font-size: 13px; line-height: 20px; }
  .comparison th:first-child { width: 40%; }
  .comparison th, .comparison td { padding: var(--space-3) var(--space-2); overflow-wrap: break-word; }
  .comparison thead th { font-size: 16px; line-height: 22px; }
  .comparison thead th span { font-size: 11px; line-height: 16px; }
  .comparison tbody th { font-size: 14px; line-height: 20px; }
  .home-links { grid-template-columns: 1fr; gap: var(--space-4); }
  .site-footer { flex-direction: column; gap: var(--space-2); }
  .page-heading { padding-bottom: var(--space-8); }
  .policy-nav ol { columns: 1; }
  .guide-entry { padding: var(--space-6); }
  .guide-content summary { padding-inline: var(--space-4); }
  .answer { padding-inline: var(--space-4); }
}

/* ---------- System modes ---------- */
@media (prefers-reduced-motion: reduce) {
  .link-card:hover { transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .paper, .fc, .link-card, .la-card, .fc-ctl, .button, .compare-panel, .tile, .policy-nav, .guide-content details, .product-nav__cta, .site-header__nav a[aria-current="page"] { border: 1px solid CanvasText; }
  .site-header__brand, .site-header__brand .brow { color: CanvasText; fill: CanvasText; }
  .ki-pills { display: none; }
}
@media print {
  .site-header__nav, .site-header__menu, .site-header__theme, .product-nav, .policy-nav, .skip-link, .guide-nav, .ki-pills { display: none !important; }
  .shell { max-width: none; padding-inline: 0; }
  main { padding: 0; }
  .paper { border: 0; }
  .policy section { break-inside: avoid; }
  details::details-content { content-visibility: visible; }
}
