/* FaveShare website — shared styles.
   Tokens match the apps (apple/Packages/LocalPocketUI/Sources/LocalPocketUI/Tokens.swift)
   and the web prototype: violet primary, sunny yellow for save/star, mint for synced. */

:root {
  --bg: #F3F1FB; --surface: #FFFFFF; --surface-2: #F8F6FF; --line: #E3DEF6;
  --ink: #1F1A3D; --muted: #655F8A;
  --primary: #5B43E8; --on-primary: #FFFFFF;
  --sun: #FFC531; --on-sun: #3B2A00;
  --mint: #0E9F7B; --coral: #E8504A; --sky: #2B86DB; --grape: #9146D8; --tang: #D97A14; --danger: #C93434;
  --bezel: #1F1A3D;
  --shadow: 0 30px 60px -30px rgba(54, 38, 140, .42);
  --shadow-sm: 0 10px 24px -16px rgba(54, 38, 140, .35);
  --display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', sans-serif;
  --body: 'Figtree', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wrap: 1180px;
  --r-s: 10px; --r-m: 14px; --r-l: 20px; --r-xl: 28px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131026; --surface: #1D1936; --surface-2: #19152F; --line: #332D58;
    --ink: #F2EFFF; --muted: #A9A2D0;
    --primary: #9483FF; --on-primary: #141028;
    --sun: #FFCF4D; --on-sun: #3B2A00;
    --mint: #3DD9B0; --coral: #FF8078; --sky: #62B4FF; --grape: #C08BFF; --tang: #FFA54D; --danger: #FF7A7A;
    --bezel: #060412;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, .75);
    --shadow-sm: 0 10px 24px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131026; --surface: #1D1936; --surface-2: #19152F; --line: #332D58;
  --ink: #F2EFFF; --muted: #A9A2D0;
  --primary: #9483FF; --on-primary: #141028;
  --sun: #FFCF4D; --on-sun: #3B2A00;
  --mint: #3DD9B0; --coral: #FF8078; --sky: #62B4FF; --grape: #C08BFF; --tang: #FFA54D; --danger: #FF7A7A;
  --bezel: #060412;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .75);
  --shadow-sm: 0 10px 24px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(42px, 6.4vw, 78px); font-weight: 800; }
h2 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 800; }
h3 { font-size: 22px; font-weight: 700; letter-spacing: -.015em; }
h4 { font-size: 18px; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
code, kbd { font-family: var(--mono); font-size: .88em; }
kbd { display: inline-block; padding: 1px 7px; border-radius: 7px; border: 1px solid var(--line); border-bottom-width: 2.5px; background: var(--surface); line-height: 1.5; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 60%, transparent); outline-offset: 3px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--sun) 60%, transparent); color: var(--ink); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 26px; height: 26px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.site-head.scrolled { border-bottom-color: var(--line); }
.head-row { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.mark { width: 36px; height: 36px; border-radius: 11px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; position: relative; transform: rotate(-6deg); flex: none; box-shadow: 0 8px 16px -10px var(--primary); }
.mark::after { content: ""; position: absolute; inset: 3.5px; border: 1.5px dashed color-mix(in srgb, var(--on-primary) 70%, transparent); border-radius: 8px; }
.mark .star { position: absolute; right: -5px; bottom: -5px; width: 15px; height: 15px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.mark .star svg { width: 9px; height: 9px; fill: var(--on-sun); stroke: none; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; transition: background .15s ease; }
.nav a:hover { background: color-mix(in srgb, var(--primary) 9%, transparent); }
.nav a[aria-current="page"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.icon-btn:hover { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.theme-btn .moon, :root[data-theme="dark"] .theme-btn .sun-i { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .sun-i { display: none; } :root:not([data-theme="light"]) .theme-btn .moon { display: block; } }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 10px 16px 18px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 17px; }
  .menu-btn { display: grid; }
  .head-tools .btn { display: none; }
}

/* ---------- buttons, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 0; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--primary); color: var(--on-primary); box-shadow: 0 12px 24px -14px var(--primary); }
.btn.pri:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -14px var(--primary); }
.btn.sun { background: var(--sun); color: var(--on-sun); box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--sun) 80%, #000); }
.btn.sun:hover { transform: translateY(-2px); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--mint)) 15%, var(--surface)); color: var(--ink); white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--mint)); }
.pill.plain::before { display: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--primary); letter-spacing: .01em; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--sun); }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section.tight { padding: clamp(48px, 7vw, 80px) 0; }
.section.alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); display: grid; gap: 16px; }
.section-head.center { justify-items: center; }

/* page hero (inner pages) */
.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); position: relative; overflow-x: clip; }
.page-hero h1 { font-size: clamp(40px, 5.6vw, 66px); max-width: 900px; }
.page-hero .lede { margin-top: 20px; }
.page-hero .btn-row { margin-top: 30px; }

/* ---------- home hero ---------- */
.hero { padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.hero-copy { max-width: 860px; }
.hero h1 .hl { position: relative; white-space: nowrap; }
.hero h1 .hl::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .26em; background: var(--sun); border-radius: 6px; z-index: -1; transform: rotate(-1.2deg); }
.hero h1 { position: relative; z-index: 0; }
.hero .lede { margin-top: 22px; font-size: clamp(19px, 1.8vw, 23px); max-width: 700px; }
.hero .btn-row { margin-top: 32px; }
.hero-meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; font-weight: 600; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .ic { width: 17px; height: 17px; color: var(--mint); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; z-index: -1; pointer-events: none; }
.blob.a { width: 520px; height: 520px; background: color-mix(in srgb, var(--primary) 40%, transparent); right: -160px; top: -140px; }
.blob.b { width: 380px; height: 380px; background: color-mix(in srgb, var(--sun) 45%, transparent); left: -160px; top: 300px; opacity: .35; }

/* ---------- live demo ---------- */
.demo { margin-top: clamp(40px, 6vw, 64px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: clamp(16px, 2.4vw, 28px); }
.demo-top { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 18px; }
.demo-top h3 { font-size: 18px; margin-right: auto; display: flex; gap: 10px; align-items: center; }
.demo-top h3 .tag { font-family: var(--body); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--sun) 35%, var(--surface)); color: var(--ink); letter-spacing: 0; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chipbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, var(--line)); font-weight: 600; font-size: 14px; transition: transform .15s ease, background .15s ease; }
.chipbtn:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.chipbtn.on { background: color-mix(in srgb, var(--tang) 16%, var(--surface)); border-style: solid; border-color: color-mix(in srgb, var(--tang) 55%, var(--line)); }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 130px 270px; align-items: center; }
.d-mac { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-width: 0; min-height: 380px; display: flex; flex-direction: column; }
.d-bar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.lights { display: flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.lights i:nth-child(1) { background: #FF5F57; } .lights i:nth-child(2) { background: #FEBC2E; } .lights i:nth-child(3) { background: #28C840; }
.d-bar b { font-family: var(--display); font-size: 14px; margin-left: 6px; }
.d-bar .pill { margin-left: auto; font-size: 11.5px; padding: 3px 9px; }
.d-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); flex: 1; }
.d-side { padding: 12px 10px; border-right: 1px solid var(--line); font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.d-side small { font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 8px 4px; }
.d-side span { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-weight: 500; }
.d-side span.on { background: color-mix(in srgb, var(--primary) 12%, transparent); font-weight: 700; }
.d-side .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.d-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.d-list h4 { font-size: 20px; margin: 2px 2px 6px; }
.row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 0; transition: background .4s ease, box-shadow .4s ease; }
.row .tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c, var(--sky)) 16%, var(--surface)); color: var(--c, var(--sky)); }
.row .tile .ic { width: 17px; height: 17px; }
.row .txt { min-width: 0; flex: 1; }
.row .txt b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .txt small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .st { font-size: 11.5px; font-weight: 700; color: var(--mint); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.row .st.wait { color: var(--tang); }
.row .st.dl { color: var(--primary); }
.row.fresh { background: color-mix(in srgb, var(--sun) 22%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sun) 60%, transparent); animation: rowIn .5s cubic-bezier(.3, 1.4, .5, 1); }
.row.history { border-style: dashed; }
@keyframes rowIn { from { transform: translateY(-8px) scale(.97); opacity: 0; } }
.wire { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 8px; text-align: center; }
.wire-chip { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--mint) 16%, var(--surface)); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.wire-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.wire.down .wire-chip { background: color-mix(in srgb, var(--tang) 18%, var(--surface)); }
.wire.down .wire-chip::before { background: var(--tang); }
.wire-line { position: relative; width: 100%; height: 22px; }
.wire-line::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; border-top: 2.5px dashed color-mix(in srgb, var(--primary) 55%, var(--line)); }
.wire.down .wire-line::before { border-color: var(--line); }
.pkt { position: absolute; top: 3px; left: 0; width: 16px; height: 16px; border-radius: 6px; background: var(--sun); opacity: 0; transform: rotate(12deg); }
.wire.fly-r .pkt { animation: flyR .9s cubic-bezier(.5, 0, .3, 1) forwards; }
.wire.fly-l .pkt { animation: flyL .9s cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes flyR { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 16px); opacity: 0; transform: rotate(372deg); } }
@keyframes flyL { 0% { left: calc(100% - 16px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 0; opacity: 0; transform: rotate(-348deg); } }
.wire-note { font-size: 12px; color: var(--muted); min-height: 38px; line-height: 1.35; }
.d-phone { background: var(--bezel); border-radius: 40px; padding: 9px; box-shadow: var(--shadow-sm); justify-self: center; width: 100%; max-width: 270px; }
.d-screen { background: var(--bg); border-radius: 32px; height: 470px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.d-notch { width: 84px; height: 24px; border-radius: 999px; background: var(--bezel); margin: 9px auto 0; flex: none; }
.d-ph-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.d-ph-head h4 { font-size: 24px; font-weight: 800; }
.d-ph-head .pill { font-size: 11px; padding: 3px 9px; }
.d-ph-list { padding: 0 10px; display: flex; flex-direction: column; gap: 7px; flex: 1; overflow: hidden; }
.d-ph-list .row { border-radius: 14px; }
.d-ph-list .st { max-width: 64px; white-space: normal; text-align: right; line-height: 1.15; font-size: 10.5px; }
.d-tabs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 8px 10px 12px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 10px; font-weight: 600; text-align: center; color: var(--muted); }
.d-tabs span.on { color: var(--primary); }
.d-fab { position: absolute; right: 16px; bottom: 66px; width: 46px; height: 46px; border-radius: 16px; background: var(--sun); color: var(--on-sun); display: grid; place-items: center; transform: rotate(-4deg); box-shadow: 0 10px 18px -10px var(--sun); border: 0; }
.demo-foot { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: var(--muted); }
.demo-foot b { color: var(--ink); }
.demo-log { margin-top: 12px; font-size: 14px; font-weight: 600; min-height: 22px; color: var(--ink); }
@media (max-width: 960px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .wire { flex-direction: row; padding: 8px 0; justify-content: center; }
  .wire-line { width: 22px; height: 70px; }
  .wire-line::before { left: 10px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 2.5px dashed color-mix(in srgb, var(--primary) 55%, var(--line)); }
  .wire.down .wire-line::before { border-color: var(--line); }
  .pkt { left: 3px !important; top: 0; }
  .wire.fly-r .pkt { animation-name: flyD; } .wire.fly-l .pkt { animation-name: flyU; }
  .wire-note { text-align: left; min-height: 0; max-width: 220px; }
}
@keyframes flyD { 0% { top: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: calc(100% - 16px); opacity: 0; } }
@keyframes flyU { 0% { top: calc(100% - 16px); opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: 0; opacity: 0; } }
@media (max-width: 560px) { .d-body { grid-template-columns: minmax(0, 1fr); } .d-side { display: none; } .d-mac { min-height: 0; } }

/* ---------- pillars / cards ---------- */
.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.card p { color: var(--muted); font-size: 16px; }
.card.lift { transition: transform .2s ease, box-shadow .2s ease; }
.card.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.card a.more { font-weight: 700; text-decoration: none; margin-top: auto; display: inline-flex; gap: 6px; align-items: center; }
.card a.more:hover { text-decoration: underline; }
.badge-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--primary)) 15%, var(--surface)); color: var(--c, var(--primary)); flex: none; }
.badge-ic.tilt { transform: rotate(-6deg); }
.pillar { padding: 30px; gap: 14px; position: relative; overflow: hidden; }
.pillar .rule { font-size: 14px; font-weight: 700; color: var(--c); display: inline-flex; gap: 6px; align-items: center; }
.pillar ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15.5px; }
.pillar li { display: flex; gap: 9px; align-items: flex-start; }
.pillar li .ic { width: 18px; height: 18px; color: var(--c); margin-top: 3px; }
.mini { padding: 22px; gap: 10px; }
.mini h3 { font-size: 18px; }
.mini p { font-size: 15px; }

/* flow (copy → history → favorite → sync) */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.flow li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; position: relative; }
.flow li::before { counter-increment: step; content: counter(step); font-family: var(--display); font-weight: 800; font-size: 15px; width: 30px; height: 30px; border-radius: 10px; background: var(--ink); color: var(--bg); display: grid; place-items: center; margin-bottom: 12px; }
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -12px; top: 36px; width: 10px; border-top: 2.5px dashed color-mix(in srgb, var(--primary) 55%, var(--line)); }
.flow h4 { margin-bottom: 6px; }
.flow p { font-size: 15px; color: var(--muted); }
.flow { padding: 0; margin: 0; }
@media (max-width: 860px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flow li::after { display: none; } }
@media (max-width: 520px) { .flow { grid-template-columns: minmax(0, 1fr); } }

/* ---------- split feature rows ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split.rev > :first-child { order: 2; }
.split + .split { margin-top: clamp(72px, 9vw, 112px); }
.split h2 { font-size: clamp(30px, 3.6vw, 44px); }
.split .lede { margin-top: 16px; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16.5px; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 7px; background: color-mix(in srgb, var(--mint) 18%, var(--surface)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E9F7B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.checks li b { font-weight: 700; }
@media (max-width: 900px) { .split, .split.rev { grid-template-columns: minmax(0, 1fr); } .split.rev > :first-child { order: 0; } }

/* ---------- device frames for screenshots ---------- */
.shot { position: relative; }
.mac-frame { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.mac-frame .bar { height: 30px; display: flex; align-items: center; padding: 0 12px; gap: 6px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.mac-frame .bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.mac-frame .bar i:nth-child(1) { background: #FF5F57; } .mac-frame .bar i:nth-child(2) { background: #FEBC2E; } .mac-frame .bar i:nth-child(3) { background: #28C840; }
.mac-frame img { width: 100%; }
.phone-frame { background: var(--bezel); border-radius: 46px; padding: 10px; box-shadow: var(--shadow); max-width: 300px; width: 100%; }
.phone-frame img { border-radius: 37px; width: 100%; }
.phone-frame.sm { max-width: 240px; border-radius: 38px; padding: 8px; }
.phone-frame.sm img { border-radius: 31px; }
.shot-pair { display: grid; grid-template-columns: minmax(0, 1fr); position: relative; padding-right: 18%; }
.shot-pair .phone-frame { position: absolute; right: 0; bottom: -40px; width: 32%; max-width: 230px; border-radius: 34px; padding: 7px; }
.shot-pair .phone-frame img { border-radius: 28px; }
.phones { display: flex; justify-content: center; gap: clamp(14px, 3vw, 28px); align-items: flex-start; }
.phones .phone-frame:nth-child(2) { margin-top: 48px; }
.phones .phone-frame:nth-child(3) { margin-top: 18px; }
@media (max-width: 640px) { .phones { flex-wrap: wrap; } .phones .phone-frame { max-width: 46%; margin-top: 0 !important; } .phones .phone-frame:nth-child(3) { display: none; } }
.float-chip { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 10px 14px; font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.float-chip .ic { color: var(--mint); }
figure { margin: 0; }
figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- tabs (feature explorer) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tab { min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tab-panel[hidden] { display: none; }
.tab-panel { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 560px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-family: var(--display); font-size: 15px; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td.y, td.n, td.p { font-weight: 700; white-space: nowrap; }
td.y { color: var(--mint); } td.n { color: var(--muted); } td.p { color: var(--tang); }
th.us, td.us { background: color-mix(in srgb, var(--primary) 7%, transparent); }

/* ---------- quote / callout ---------- */
.callout { border-radius: var(--r-l); padding: 22px 24px; background: color-mix(in srgb, var(--c, var(--primary)) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c, var(--primary)) 25%, var(--line)); display: flex; gap: 14px; align-items: flex-start; }
.callout .ic { color: var(--c, var(--primary)); margin-top: 3px; }
.callout p { font-size: 16px; }
.big-rule { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.02em; line-height: 1.18; text-wrap: balance; max-width: 960px; }
.big-rule em { font-style: normal; color: var(--primary); }
.big-rule mark { background: none; color: inherit; box-shadow: inset 0 -.28em 0 color-mix(in srgb, var(--sun) 80%, transparent); }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; }
.stat b { display: block; font-family: var(--display); font-size: clamp(30px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--primary); }
.stat span { display: block; margin-top: 8px; font-size: 14.5px; color: var(--muted); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- architecture diagram ---------- */
.arch { display: grid; gap: 12px; }
.arch-layer { border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; }
.arch-layer > b { font-family: var(--display); font-size: 17px; }
.arch-layer > b small { display: block; font-family: var(--body); font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.arch-layer.core { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.mods { display: flex; flex-wrap: wrap; gap: 8px; }
.mods span { font-size: 13.5px; font-weight: 600; padding: 6px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.mods span code { font-size: 12.5px; color: var(--primary); }
@media (max-width: 700px) { .arch-layer { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* ---------- download cards ---------- */
.dl-card { padding: 30px; gap: 14px; }
.dl-card .head { display: flex; gap: 16px; align-items: center; }
.dl-card .head img { width: 64px; height: 64px; }
.dl-card ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15.5px; display: grid; gap: 6px; }
.dl-card.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-sm); }
.status-note { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 700; color: var(--tang); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 20px; transition: box-shadow .2s ease; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 32px 18px 0; font-weight: 700; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .ans { padding: 0 0 20px; color: var(--muted); font-size: 16px; display: grid; gap: 10px; }
.faq .ans ul, .faq .ans ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.faq-group + .faq-group { margin-top: 44px; }
.faq-group > h3 { margin-bottom: 16px; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 2px solid color-mix(in srgb, var(--primary) 55%, var(--line)); border-radius: 16px; padding: 0 16px; min-height: 54px; max-width: 620px; }
.search-box input { border: 0; background: none; outline: none; flex: 1; font-size: 17px; min-width: 0; }
.search-box .ic { color: var(--muted); }
.no-hits { display: none; color: var(--muted); padding: 20px 0; }

/* ---------- prose (policy pages) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(26px, 3vw, 32px); margin: 48px 0 14px; }
.prose h3 { margin: 28px 0 10px; font-size: 20px; }
.prose p, .prose li { color: var(--ink); font-size: 17px; }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 22px; display: grid; gap: 8px; margin: 14px 0; }
.prose .meta { color: var(--muted); font-size: 15px; }

/* ---------- CTA band ---------- */
.cta { border-radius: var(--r-xl); padding: clamp(36px, 6vw, 64px); background: var(--primary); color: var(--on-primary); position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.cta::after { content: ""; position: absolute; inset: 12px; border: 2px dashed color-mix(in srgb, var(--on-primary) 35%, transparent); border-radius: 20px; pointer-events: none; }
.cta h2 { font-size: clamp(30px, 4vw, 46px); }
.cta p { margin-top: 12px; font-size: 18px; opacity: .88; max-width: 560px; }
.cta .btn.ghost { background: color-mix(in srgb, var(--on-primary) 14%, transparent); color: var(--on-primary); border-color: color-mix(in srgb, var(--on-primary) 35%, transparent); }
.cta-icon { width: 120px; height: 120px; transform: rotate(8deg); filter: drop-shadow(0 18px 24px rgba(0,0,0,.25)); }
@media (max-width: 760px) { .cta { grid-template-columns: minmax(0, 1fr); } .cta-icon { display: none; } }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: clamp(64px, 9vw, 110px); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid p { color: var(--muted); margin-top: 12px; max-width: 300px; }
.foot-grid h4 { font-size: 15px; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--ink); text-decoration: none; }
.foot-grid a:hover { color: var(--primary); text-decoration: underline; }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- language menu ---------- */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; width: auto; padding: 0 12px; gap: 6px; display: inline-flex; align-items: center; font-weight: 700; font-size: 13px; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 6px; display: grid; gap: 2px; z-index: 60; }
.lang-pop a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 9px 12px; border-radius: 10px; }
.lang-pop a:hover { background: color-mix(in srgb, var(--primary) 9%, transparent); }
.lang-pop a[aria-current="true"] { color: var(--primary); }
.lang-pop a[aria-current="true"]::after { content: " ✓"; }
.foot-langs a { color: var(--muted); }
.foot-langs a[aria-current="true"] { color: var(--ink); font-weight: 700; text-decoration: none; }

/* ---------- Chinese typography ---------- */
:lang(zh-Hans) { --body: 'Figtree', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif; --display: 'Bricolage Grotesque', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif; }
:lang(zh-Hant) { --body: 'Figtree', 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', system-ui, sans-serif; --display: 'Bricolage Grotesque', 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) h4, :lang(zh) .big-rule, :lang(zh) .brand { letter-spacing: 0; }
:lang(zh) h1, :lang(zh) h2 { line-height: 1.22; font-weight: 700; }
:lang(zh) .page-hero h1 { font-size: clamp(36px, 5vw, 58px); }
:lang(zh) h1 { font-size: clamp(38px, 5.8vw, 70px); }
:lang(zh) .lede, :lang(zh) .prose p, :lang(zh) .prose li { line-height: 1.8; }
:lang(zh) body { line-height: 1.75; }
:lang(zh) .big-rule { line-height: 1.4; font-weight: 700; }
:lang(zh) .eyebrow { letter-spacing: .04em; }
:lang(zh) .brand { font-family: 'Bricolage Grotesque', sans-serif; }

/* lang / small helpers */
.lang-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-strip span { font-weight: 700; padding: 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.kbd-row { display: inline-flex; gap: 4px; }
.sp-top { margin-top: 28px; }
.sp-top-s { margin-top: 14px; }

/* demo share sheet (inside the iPhone) */
.d-sheet { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 28%, transparent); display: flex; align-items: flex-end; z-index: 3; animation: fade .2s ease; }
.d-sheet[hidden] { display: none; }
.d-sheet-card { width: 100%; background: var(--surface); border-radius: 22px 22px 30px 30px; padding: 14px 14px 18px; display: grid; gap: 4px; box-shadow: 0 -10px 30px -20px rgba(0,0,0,.4); animation: sheetUp .3s cubic-bezier(.3, 1.3, .5, 1); }
.d-sheet-card b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-sheet-card small { font-size: 11.5px; color: var(--muted); }
.d-sheet-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.d-sheet-apps button { border: 0; background: none; padding: 0; font-size: 10.5px; font-weight: 600; display: grid; justify-items: center; gap: 5px; color: var(--ink); }
.d-sheet-apps button::before { content: ""; width: 40px; height: 40px; border-radius: 12px; background: var(--c); box-shadow: inset 0 0 0 2px color-mix(in srgb, #fff 25%, transparent); transition: transform .15s ease; }
.d-sheet-apps button:hover::before { transform: scale(1.08); }
@keyframes sheetUp { from { transform: translateY(40%); opacity: 0; } }

/* two everyday jobs (home) */
.jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .jobs { grid-template-columns: minmax(0, 1fr); } }
.job { padding: 28px; gap: 14px; }
.job > p { font-size: 16px; }
.share-mock { display: grid; gap: 8px; margin-top: 6px; }
.share-mock .row { background: var(--surface-2); }
.share-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: var(--primary); color: var(--on-primary); white-space: nowrap; }
.share-mock .row:nth-child(3) .share-pill { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.apps-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.apps-strip span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 13%, var(--surface)); }
.apps-strip span::before { content: ""; width: 10px; height: 10px; border-radius: 4px; background: var(--c); }
.ff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 6px; }
@media (max-width: 520px) { .ff { grid-template-columns: minmax(0, 1fr); } }
.ff-form { display: grid; gap: 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.ff-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ff-field { display: block; min-height: 34px; padding: 7px 10px; border-radius: 9px; background: var(--surface); border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color .2s ease, background .4s ease; }
.ff-field.next { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.ff-field.done { background: color-mix(in srgb, var(--mint) 10%, var(--surface)); border-color: color-mix(in srgb, var(--mint) 45%, var(--line)); }
.ff-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow-sm); display: grid; gap: 4px; align-content: start; }
.ff-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; padding: 4px 6px 8px; border-bottom: 1px solid var(--line); margin-bottom: 2px; color: var(--muted); }
.ff-head kbd { margin-left: auto; font-size: 11px; }
.ff-panel button { text-align: left; border: 0; background: none; border-radius: 9px; padding: 7px 8px; display: grid; gap: 1px; min-width: 0; }
.ff-panel button:hover, .ff-panel button:focus-visible { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.ff-panel button b { font-size: 13px; }
.ff-panel button small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-panel button.used { opacity: .45; }
.ff-note { font-size: 14px; font-weight: 600; color: var(--ink) !important; min-height: 22px; }
.ff-reset { justify-self: start; align-self: flex-start; }

/* ---------- illustrations (inline SVG, theme-aware, animated) ---------- */
.ill { width: 100%; height: auto; display: block; overflow: visible; }
.ill .sf { fill: var(--surface); } .ill .s2 { fill: var(--surface-2); } .ill .bgf { fill: var(--bg); }
.ill .bz { fill: var(--bezel); } .ill .ink { fill: var(--ink); } .ill .mu { fill: var(--muted); }
.ill .pr { fill: var(--primary); } .ill .su { fill: var(--sun); } .ill .sky { fill: var(--sky); }
.ill .grape { fill: var(--grape); } .ill .coral { fill: var(--coral); } .ill .tang { fill: var(--tang); }
.ill .lnf { fill: var(--line); }
.ill .ln { stroke: var(--line); stroke-width: 1.5; }
.ill .ln-s { stroke: var(--line); stroke-width: 1.5; }
.ill .hl { fill: color-mix(in srgb, var(--sun) 30%, var(--surface)); }
.ill .sh { filter: drop-shadow(0 10px 14px rgba(54, 38, 140, .16)); }
.ill .zone { stroke: color-mix(in srgb, var(--primary) 30%, var(--line)); stroke-width: 2; stroke-dasharray: 10 9; }
.ill .on-pr { stroke: var(--on-primary); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ill .dash-on { stroke: color-mix(in srgb, var(--on-primary) 70%, transparent); stroke-width: 1.3; stroke-dasharray: 3 3; }
.ill .wire { fill: none; stroke: color-mix(in srgb, var(--primary) 65%, var(--line)); stroke-width: 2.5; stroke-dasharray: 7 7; stroke-linecap: round; animation: wireFlow 1s linear infinite; }
.ill .wifi { fill: none; stroke: var(--primary); stroke-width: 4.5; stroke-linecap: round; animation: wifiPulse 2.4s ease-in-out infinite; }
.ill text { font-family: var(--body); fill: var(--ink); }
.ill .t-app { font-size: 10.5px; font-weight: 700; }
.ill .t-app-lg { font-size: 17px; font-weight: 700; }
.ill .t-chip { font-size: 14px; font-weight: 700; }
.ill .t-kbd { font-family: var(--mono); font-size: 10px; font-weight: 700; }
.ill .t-small { font-size: 11px; font-weight: 700; fill: var(--muted); }
/* .pop marks parts that appear with their tile (the tile itself fades in on scroll); no separate SVG entrance animation — it can stick on its first frame in background tabs and Safari */
.ill .blink { animation: blinkIn 3.2s ease-in-out infinite; }
.ill .fill-in { transform-box: fill-box; transform-origin: left center; animation: fillIn 3.6s ease-out infinite both; }
.ill .ring-bg { stroke: var(--line); stroke-width: 4; }
.ill .ring { stroke: var(--primary); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 107; animation: ring 3s ease-in-out infinite; }
@keyframes wireFlow { to { stroke-dashoffset: -14; } }
@keyframes wifiPulse { 0%, 100% { opacity: .35; } 40% { opacity: 1; } }
@keyframes illPop { from { opacity: 0; transform: scale(.8); } }
@keyframes blinkIn { 0%, 45% { opacity: 0; } 58%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fillIn { 0% { transform: scaleX(0); } 22%, 90% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes ring { 0% { stroke-dashoffset: 107; } 70%, 100% { stroke-dashoffset: 0; } }

/* hero story */
.hero-art { margin-top: clamp(36px, 5vw, 56px); }
.story { list-style: none; margin: 18px 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.story li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 15px; color: var(--muted); animation: 6s linear infinite; }
.story li b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); font-family: var(--display); }
.story li:nth-child(1) { animation-name: st1; } .story li:nth-child(2) { animation-name: st2; } .story li:nth-child(3) { animation-name: st3; }
@keyframes st1 { 0%, 14% { color: var(--ink); border-color: var(--sun); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 35%, transparent); } 17%, 100% { color: var(--muted); } }
@keyframes st2 { 0%, 14% { color: var(--muted); } 16%, 42% { color: var(--ink); border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); } 45%, 100% { color: var(--muted); } }
@keyframes st3 { 0%, 42% { color: var(--muted); } 45%, 95% { color: var(--ink); border-color: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 28%, transparent); } 100% { color: var(--muted); } }

/* scenario tiles */
.scenes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .scenes { grid-template-columns: minmax(0, 1fr); } }
.scene { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 18px 22px; display: grid; gap: 12px; align-content: start; transition: transform .2s ease, box-shadow .2s ease; }
.scene:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.scene .art { background: var(--surface-2); border-radius: 14px; padding: 10px; }
.scene h3 { font-size: 19px; }
.scene p { color: var(--muted); font-size: 15px; }
.icon-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.icon-row span { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.icon-row .badge-ic { width: 44px; height: 44px; border-radius: 14px; }
.duo { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: end; }
.duo figure { display: grid; gap: 14px; }
.duo figcaption { text-align: left; margin: 0; }
.duo figcaption b { display: block; font-family: var(--display); font-size: 22px; color: var(--ink); }
.duo .phone-frame { margin: 0 auto; }
@media (max-width: 760px) { .duo { grid-template-columns: minmax(0, 1fr); } }

/* scene tiles: wide tile, screenshot art, extra illustration bits */
.scene.wide { grid-column: span 2; }
@media (max-width: 600px) { .scene.wide { grid-column: auto; } }
.scene .art img.shot { width: 100%; aspect-ratio: 320 / 190; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.scene .art .phone-crop { aspect-ratio: 320 / 190; overflow: hidden; display: flex; justify-content: center; padding-top: 12px; }
.scene .art .phone-crop img { width: 46%; height: auto; align-self: flex-start; border: 7px solid var(--bezel); border-bottom: 0; border-radius: 26px 26px 0 0; }
.scene.wide .art .ill { max-height: 360px; }
.ill .u { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ill .mt { fill: var(--mint); }
.ill .t-app-md { font-size: 13px; font-weight: 700; }
.ill .t-search { font-size: 17px; font-weight: 700; }
.ill .t-row { font-size: 13px; font-weight: 600; }
.ill .caret { animation: caret 1s steps(1) infinite; }
.ill .pulse-star { transform-box: fill-box; transform-origin: center; animation: pulseStar 2s ease-in-out infinite; }
.ill .keep { animation: keepIt 4s ease-in-out infinite; }
.ill .drop { animation: dropIt 4s ease-in-out infinite; }
.ill .check-pop { transform-box: fill-box; transform-origin: center; animation: checkPop 4s ease-in-out infinite; }
.ill .state-a { animation: stateA 4s steps(1) infinite; }
.ill .state-b { animation: stateB 4s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes pulseStar { 50% { transform: scale(1.25); } }
@keyframes keepIt { 0%, 40% { opacity: 1; } 55%, 90% { opacity: 1; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--mint) 60%, transparent)); } }
@keyframes dropIt { 0%, 40% { opacity: 1; } 55%, 90% { opacity: .35; } 100% { opacity: 1; } }
@keyframes checkPop { 0%, 45% { opacity: 0; transform: scale(.4); } 55%, 92% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes stateA { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes stateB { 0% { opacity: 0; } 50% { opacity: 1; } }

/* ---------- scenario pages ---------- */
.uc .split { align-items: center; }
.uc .eyebrow { font-family: var(--mono); }
.uc-art { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(14px, 2vw, 24px); box-shadow: var(--shadow-sm); }
.uc-mini { margin-top: 22px; max-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.uc .apps-strip { margin-top: 18px; }
.uc .job { box-shadow: var(--shadow-sm); }
.scenes.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .scenes.two { grid-template-columns: minmax(0, 1fr); } }
details.tech { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
details.tech > summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 22px; font-weight: 700; font-size: 16px; position: relative; }
details.tech > summary::-webkit-details-marker { display: none; }
details.tech > summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
details.tech[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.tech-body { padding: 4px 22px 26px; display: grid; gap: 40px; }
.tech-body .section-head { margin-bottom: 18px; }
.tech-body h2 { font-size: clamp(22px, 2.6vw, 28px); }
.device-tabs { justify-content: flex-start; margin: 26px 0 0; }
.device-tabs .tab { min-height: 48px; padding: 0 22px; font-size: 16px; }
.apps-panels { padding-top: clamp(40px, 6vw, 64px); }
.panel-h { font-size: clamp(30px, 3.8vw, 44px); }
.tab-panel > .lede { margin-top: 12px; }
.tab-panel > .btn-row { margin-top: 22px; }

/* illustration text colours (real content inside the scenes) */
.ill .mint { fill: var(--mint); }
.ill .on-pr-t { fill: var(--on-primary); }
.ill .coral-t { fill: var(--coral); }
.ill .ln-star { fill: none; stroke: var(--muted); stroke-width: 1.6; opacity: .6; }
.ill .ring-s { stroke-dasharray: 82; animation-name: ringS; }
@keyframes ringS { 0% { stroke-dashoffset: 82; } 70%, 100% { stroke-dashoffset: 0; } }
.ill .drop-in { animation: dropIn 2.7s ease-in-out infinite; }
@keyframes dropIn { 0%, 68% { opacity: 0; } 76%, 96% { opacity: 1; } 100% { opacity: 0; } }
.ff-field.img::before { content: ""; display: inline-block; width: 24px; height: 15px; margin-right: 7px; vertical-align: -3px; border-radius: 3px; background: linear-gradient(to bottom, var(--primary) 0 28%, color-mix(in srgb, var(--sky) 30%, var(--surface)) 28%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sky) 45%, var(--line)); }
