/* Shared by every page of the Sequence website. Design tokens: design/SEQUENCE_DESIGN_BRIEF.md (docs/website-brief.md 7). */

/* Brand fonts, served from this site (no third-party requests). Licences are in fonts/. */
@font-face { font-family: "Sora"; src: url("fonts/Sora-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

/* The app's tokens. Dark is the primary design; light follows the device. */
:root {
  --bg: #0B1020;          /* Ink */
  --text: #F3F5FA;        /* Paper */
  --muted: #8B97B5;       /* Dim */
  --surface: #121A2E;     /* Surface */
  --line: #243049;        /* Line */
  --stroke: #5A6A8F;      /* Stroke */
  --signal: #3CF0C4;      /* primary action */
  --on-signal: #0B1020;
  --link: #3CF0C4;        /* Signal is allowed as text on Ink and Surface only */
  --focus: #5B8CFF;       /* Relay */
  --relay: #5B8CFF;
  --warn: #F5A35C;
  --mark-a: #5B8CFF; --mark-b: #4CBEE1; --mark-c: #3CF0C4;
  /* Height of the sticky site bar; config.js keeps it exact as the bar wraps. Anchors land below it. */
  --bar-h: 4.5rem;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F3F5FA; --text: #0B1020; --muted: #5A6A8F; --surface: #FFFFFF; --line: #DDE3EF; --stroke: #5A6A8F;
    --link: #007A5E;      /* Signal Deep: green text on light */
    --focus: #3B6BF0; --relay: #3B6BF0; --warn: #B8641C;
    --mark-a: #3B6BF0; --mark-b: #1E85B5; --mark-c: #009E7A;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--bar-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.55 "DM Sans", system-ui, sans-serif; }
main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 1rem; }
h1, h2, h3 { font-family: "Sora", system-ui, sans-serif; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: 2rem; margin: 0; }
p { margin: 0.25rem 0 0.75rem; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.kicker { font: 500 0.75rem/1.2 "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.note { color: var(--muted); }

/* ---- Site bar: the mark, the pages, Get the app ---- */
.site-bar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-bar-inner { max-width: 72rem; margin: 0 auto; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.75rem 1.25rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); text-decoration: none; font: 600 1.25rem "Sora", system-ui, sans-serif; letter-spacing: -0.02em; }
.brand svg { width: 2.25rem; height: 2.25rem; flex: none; }
.site-nav { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 500; padding: 0.4rem 0; }
.site-nav a[aria-current="page"] { color: var(--link); }
.site-nav a.site-home { color: var(--muted); font-weight: 400; }
.site-nav a.site-home:hover { color: var(--link); }
.site-nav a.site-home { display: inline-flex; align-items: center; gap: 6px; }
.back-logo { height: 26px; width: auto; max-width: none; flex: none; }
/* The logo is drawn for dark backgrounds, so it gets a dark backing in the light theme. */
@media (prefers-color-scheme: light) {
  .back-logo { box-sizing: content-box; height: 24px; padding: 2px 5px; border-radius: 6px; background: #0b0b0d; }
}
.pill { display: inline-flex; align-items: center; min-height: 2.75rem; border-radius: 999px; padding: 0 1.25rem; font: 700 0.95rem "DM Sans", system-ui, sans-serif; text-decoration: none; white-space: nowrap; }
.pill-outline { border: 1.5px solid var(--stroke); color: var(--text); }
button.pill { background: none; cursor: pointer; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
/* The guide's example AI prompt: wraps like prose, so it reads on a phone without scrolling sideways. */
pre.prompt { white-space: pre-wrap; }
.pill-primary { background: var(--signal); color: var(--on-signal); }
.pill-soon { border: 1.5px dashed var(--stroke); color: var(--muted); font-weight: 500; }
@media (max-width: 40rem) {
  .site-bar-inner { padding: 0.5rem 1rem; gap: 0.25rem 1rem; }
  .brand svg { width: 2rem; height: 2rem; }
  .pill { min-height: 2.5rem; padding: 0 1rem; }
  .site-nav { margin-left: 0; width: 100%; order: 3; }
  .site-nav a { padding: 0.25rem 0; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; }
.site-footer-inner { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 2rem; display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; justify-content: space-between; align-items: center; color: var(--muted); }
.site-footer a { color: var(--text); }
.maker { display: flex; align-items: center; gap: 1rem; }
.maker img { width: 4.5rem; height: 4.5rem; flex: none; }
.maker p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

/* ---- Library page ---- */
.intro { font-size: 1.125rem; max-width: 40rem; }
.controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1.25rem 0; }
#tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { min-height: 2.25rem; border: 1.5px solid var(--stroke); background: transparent; color: var(--text); border-radius: 999px; padding: 0 1.1rem; font: 500 0.95rem "DM Sans", system-ui, sans-serif; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
label.sort { margin-left: auto; color: var(--muted); font-size: 0.9rem; }
select { margin-left: 0.4rem; min-height: 2.25rem; font: 500 0.95rem "DM Sans", system-ui, sans-serif; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 0.9rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); padding: 0; list-style: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 1.25rem; display: flex; flex-direction: column; height: 100%; }
.card h2 { font-size: 1.25rem; margin: 0 0 0.25rem; }
.card p { color: var(--text); }
.card p.credit { color: var(--muted); font-size: 0.9rem; margin-top: -0.25rem; }
.card-link { color: inherit; text-decoration: none; }
.card-link:hover, .card-link:focus-visible { text-decoration: underline; }
/* One sequence linked from elsewhere (library.html#sourdough-loaf). */
.grid li:target .card { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.card-top + h2 { margin-top: 0.85rem; }
.card-top .edition { font-family: "DM Sans", system-ui, sans-serif; font-weight: 700; letter-spacing: 0.06em; }
.edition { border: 1px solid var(--link); color: var(--link); border-radius: 999px; padding: 0.15rem 0.55rem; }
.edition.pro { border-color: var(--relay); color: var(--relay); }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; margin: 0.25rem 0 1rem; }
.button { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; min-height: 3rem; background: var(--signal); color: var(--on-signal); text-decoration: none; border-radius: 999px; padding: 0 1.5rem; font: 700 1rem "DM Sans", system-ui, sans-serif; }
.share { margin: 2.5rem 0 1rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.share h2 { font-size: 1.25rem; margin: 0 0 0.25rem; }

/* ---- Guide ---- */
.guide { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 1rem; display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; }
.guide-toc { position: sticky; top: calc(var(--bar-h) + 1rem); align-self: start; max-height: calc(100vh - var(--bar-h) - 2rem); overflow: auto; }
.guide-toc ol { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.guide-toc li a { display: flex; gap: 0.75rem; padding: 0.4rem 0.75rem; border-radius: 12px; color: var(--text); text-decoration: none; font-size: 0.95rem; }
.guide-toc li a span { font: 500 0.75rem/1.6 "JetBrains Mono", ui-monospace, monospace; color: var(--muted); }
.guide-toc li a:hover, .guide-toc li a[aria-current="true"] { background: var(--surface); color: var(--link); }
.guide-toc details > summary { display: none; }
.guide-body { max-width: 44rem; }
.policy { max-width: 44rem; }
.policy > header h1 { font-size: 2.6rem; margin: 0.4rem 0 0.25rem; }
.guide-body > header h1 { font-size: 2.6rem; margin: 0.4rem 0 0.75rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.topic { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--line); }
.topic h2 { font-size: 1.75rem; margin: 0.35rem 0 0.75rem; }
.topic h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.topic ul, .topic ol { padding-left: 1.4rem; }
.topic li { margin: 0.3rem 0; }
.steps { list-style: none; padding: 0 !important; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.75rem; margin: 0.75rem 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -0.1rem; width: 1.9rem; height: 1.9rem; border: 1.5px solid var(--stroke); border-radius: 50%; display: grid; place-items: center; font: 500 0.8rem "JetBrains Mono", ui-monospace, monospace; }
.ui { font-weight: 700; }
.callout { border: 1.5px solid var(--relay); border-radius: 20px; padding: 0.85rem 1.1rem; margin: 1rem 0; background: var(--surface); }
.callout.warning { border-color: var(--warn); }
.callout .kicker { display: block; margin-bottom: 0.25rem; }
.callout.warning .kicker { color: var(--warn); }
.callout p:last-child { margin-bottom: 0; }
table.facts { width: 100%; border-collapse: collapse; margin: 0.75rem 0 1rem; font-size: 0.95rem; }
table.facts th, table.facts td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.facts th { font: 500 0.75rem "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.example { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 1.1rem 1.25rem; margin: 1rem 0; }
.timeline { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.6rem 0.75rem; align-items: center; margin-top: 0.75rem; }
.timeline .label { font-weight: 700; }
.timeline .track { position: relative; height: 1.9rem; background: var(--line); border-radius: 10px; }
.timeline .bar { position: absolute; top: 0; bottom: 0; right: 0; border-radius: 10px; display: flex; align-items: center; padding-left: 0.6rem; font: 500 0.75rem "JetBrains Mono", ui-monospace, monospace; color: var(--on-signal); }
.timeline .scale { grid-column: 2; display: flex; justify-content: space-between; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 0.9rem 1rem; overflow-x: auto; font: 500 0.82rem/1.5 "JetBrains Mono", ui-monospace, monospace; }
.to-top { display: inline-block; margin-top: 0.75rem; font-size: 0.9rem; }

@media (max-width: 52rem) {
  .guide { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .guide-toc { position: static; max-height: none; }
  .guide-toc details > summary { display: list-item; cursor: pointer; font-weight: 700; padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
  .guide-toc details:not([open]) ol { display: none; }
  .guide-body > header h1 { font-size: 2.1rem; }
  .policy > header h1 { font-size: 2.1rem; }
}

/* ---- Home page (index.html): the app's introduction. Scroll effects only run when <html> has .motion
   (set in the page when JavaScript is on and reduced motion is off); otherwise everything is simply shown. ---- */
.home { --device: #05070F; }
/* clip, not hidden: tilted phones and sliding reveals must never widen the page (a phone browser then zooms out),
   and clip keeps the sticky site bar working. */
.home-main { max-width: 72rem; margin: 0 auto; padding: 0 1rem; overflow-x: clip; }
.signal-text { color: var(--link); }
.home h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); margin: 0.35rem 0 0.9rem; }
.home .kicker .num { color: var(--link); margin-right: 0.6rem; }

/* Progress bar across the top, filled by scrolling: five segments like the app's step bar. */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; gap: 4px; height: 4px; padding: 0 4px; pointer-events: none; }
.scroll-progress span { flex: 1; border-radius: 2px; background: var(--line); overflow: hidden; position: relative; }
.scroll-progress span::after { content: ""; position: absolute; inset: 0; background: var(--signal); transform-origin: left; transform: scaleX(var(--fill, 0)); }

/* Reveal on scroll: `translate` and `opacity` animate; `transform` is left free for the parallax. */
.motion .reveal { opacity: 0; translate: 0 2rem; transition: opacity 0.7s ease, translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.motion .reveal.from-right { translate: 3rem 0; }
.motion .reveal.from-left { translate: -3rem 0; }
.motion .reveal.in { opacity: 1; translate: 0 0; }
.motion .reveal.delay { transition-delay: 0.15s; }
.motion .reveal.delay2 { transition-delay: 0.3s; }
[data-parallax] { transform: translateY(var(--py, 0px)); }

/* Phone frame around a screenshot. */
.phone { margin: 0; width: min(19rem, 100%); padding: 0.55rem; border-radius: 2.6rem; background: var(--device); border: 1px solid var(--line); box-shadow: 0 2rem 4rem -1.5rem rgba(0, 0, 0, 0.6); }
.phone img { display: block; width: 100%; height: auto; border-radius: 2.1rem; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 2rem; align-items: center; min-height: calc(100vh - var(--bar-h)); padding: 2rem 0 3rem; }
.hero h1, .hero .hero-line { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; margin: 0.6rem 0 1.1rem; }
.hero-lead { font-size: 1.2rem; max-width: 34rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1.25rem; align-items: center; }
.hero-actions .button { margin-top: 0; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; padding: 0; margin: 0; font: 500 0.8rem "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.hero-facts li::before { content: ""; display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--signal); margin-right: 0.5rem; vertical-align: 0.1rem; }
/* The page title: two lines like the headings below it, the second in Signal, ruled off from the hero. */
.hero .hero-title { grid-column: 1 / -1; margin: 0; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; color: var(--text); }
.hero-title .signal-text { display: block; margin-top: 0.4rem; font-size: 0.7em; line-height: 1.25; }
.hero-title .nowrap { white-space: nowrap; }
.phase-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0 0 1.25rem; }
.phase-row .phase { margin: 0; }
.phase { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1.25rem; padding: 0.45rem 1rem; border-radius: 999px; border: 1.5px solid var(--warn); color: var(--text); font-size: 0.95rem; }
.phase strong { color: var(--warn); }
.phase-link { text-decoration: none; transition: background-color .15s; }
.phase-link:hover, .phase-link:focus-visible { background: var(--surface); }
.phase-link .ext { width: 1rem; height: 1rem; color: var(--link); flex: none; }
.film-jump { border-color: var(--stroke); font-weight: 700; gap: 0.45rem; }
.film-jump svg { width: 1.1rem; height: 1.1rem; color: var(--link); flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.phase .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--warn); flex: none; }
.motion .phase .dot { animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.overview { list-style: none; padding: 0; margin: 0.25rem 0 0; max-width: 36rem; }
.overview li { position: relative; padding-left: 1.6rem; margin: 0.55rem 0; color: var(--muted); }
.overview li::before { content: ""; position: absolute; left: 0.2rem; top: 0.55rem; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--signal); }
.overview strong { color: var(--text); }
.scroll-cue { display: inline-flex; gap: 0.5rem; margin-top: 1.25rem; color: var(--muted); text-decoration: none; font: 500 0.8rem "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.08em; }
.scroll-cue:hover { color: var(--link); }
.motion .scroll-cue.in span { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 0 0.3rem; } }
.hero-visual { position: relative; display: grid; place-items: center; padding: 1.5rem 0; }
.glow { position: absolute; width: 85%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(60, 240, 196, 0.32), rgba(91, 140, 255, 0.18) 45%, transparent 70%); filter: blur(30px); }
.motion .glow { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { scale: 1.12; opacity: 0.75; } }
.phone-hero { position: relative; width: min(20rem, 78vw); }
.motion .phone-hero { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; translate: 0 4rem; } }
.float-chip { position: absolute; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font: 500 0.85rem "DM Sans", system-ui, sans-serif; box-shadow: 0 1rem 2rem -1rem rgba(0, 0, 0, 0.5); white-space: nowrap; }
.float-chip .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--signal); }
.motion .float-chip .dot { animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(60, 240, 196, 0.6); } 100% { box-shadow: 0 0 0 0.7rem rgba(60, 240, 196, 0); } }
.chip-a { top: 44%; left: -6%; }
.chip-b { bottom: 16%; right: 2%; font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--link); }
.motion .chip-a { animation: rise 1s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.motion .chip-b { animation: rise 1s 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* Ticker of things people use it for */
.ticker { overflow: hidden; border-block: 1px solid var(--line); margin: 0 -1rem; padding: 1rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-lead { text-align: center; color: var(--muted); font-weight: 600; margin: 0 0 1rem; }
.ticker-track { display: flex; width: max-content; }
.ticker ul { display: flex; list-style: none; margin: 0; padding: 0; }
.ticker li { font: 600 1.15rem "Sora", system-ui, sans-serif; color: var(--muted); padding: 0 1.5rem; white-space: nowrap; }
.ticker li::after { content: "\2192"; color: var(--link); margin-left: 3rem; }
.motion .ticker-track { animation: marquee 40s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker ul[aria-hidden="true"] { display: none; }
.motion .ticker ul[aria-hidden="true"] { display: flex; }
html:not(.motion) .ticker { -webkit-mask-image: none; mask-image: none; }
html:not(.motion) .ticker-track { width: auto; }
html:not(.motion) .ticker ul { flex-wrap: wrap; justify-content: center; row-gap: 0.5rem; }

/* Feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding: 6rem 0; }
.feature > .phone, .feature > .phone-pair, .feature > .ring-demo { justify-self: center; }
.feature.flip > .feature-copy { order: 2; }
.feature-copy { max-width: 32rem; }
.feature-copy p { font-size: 1.1rem; color: var(--muted); }
.feature-copy strong { color: var(--text); }
.ticks { list-style: none; padding: 0; margin: 1rem 0 0; }
.ticks li { position: relative; padding-left: 2rem; margin: 0.6rem 0; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.2rem; width: 1.2rem; height: 1.2rem; border-radius: 0.3rem; background: var(--signal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5L19 8' fill='none' stroke='%230B1020' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; }
.phone-pair { position: relative; width: min(24rem, 100%); padding-bottom: 2rem; }
.phone-pair .phone { position: relative; z-index: 1; width: 78%; }
.phone-pair .phone-back { position: absolute; z-index: 0; width: 62%; right: 0; top: 12%; rotate: 6deg; }
.flip .phone-pair .phone-back { right: auto; left: 0; rotate: -6deg; }
.flip .phone-pair .phone:not(.phone-back) { margin-left: auto; }
.motion .phone-pair .phone-back.in { opacity: 0.85; }

/* Notification mock-up */
.alert-demo { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.9rem; align-items: center; margin-top: 1.5rem; padding: 1rem 1.1rem; max-width: 24rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1.4rem; }
.alert-icon { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--signal); display: grid; place-items: center; grid-row: span 2; }
.alert-icon svg { width: 1.3rem; height: 1.3rem; fill: var(--on-signal); }
.motion .alert-demo.in .alert-icon svg { animation: bell 1.2s 0.6s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes bell { 0%, 100% { rotate: 0deg; } 15% { rotate: 16deg; } 30% { rotate: -14deg; } 45% { rotate: 10deg; } 60% { rotate: -6deg; } 75% { rotate: 3deg; } }
.alert-text { display: flex; flex-direction: column; }
.alert-text span { color: var(--muted); font-size: 0.95rem; }
.alert-buttons { grid-column: 2; display: flex; gap: 1.25rem; margin-top: 0.4rem; font-weight: 700; color: var(--link); font-size: 0.95rem; }

/* Countdown ring */
.ring-demo { position: relative; width: min(20rem, 80vw); aspect-ratio: 1; --done: 0.35; }
.ring-demo svg { width: 100%; height: 100%; rotate: -90deg; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--signal); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 540.4; stroke-dashoffset: calc(540.4 * var(--done)); transition: stroke-dashoffset 0.12s linear; }
.ring-time { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-time .countdown { font: 500 clamp(2.8rem, 9vw, 4rem) "JetBrains Mono", ui-monospace, monospace; letter-spacing: -0.02em; }
.ring-time small { font: 500 0.8rem "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* Privacy promise */
.promise { text-align: center; padding: 5rem 0; border-top: 1px solid var(--line); }
.promise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 1.5rem; }
.promise-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 1.75rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.promise-tile .big { font: 600 clamp(2.6rem, 6vw, 3.6rem)/1 "Sora", system-ui, sans-serif; color: var(--link); }
.promise-tile span:last-child { color: var(--muted); }
.promise-note { color: var(--muted); }

/* Lite and Pro */
.plans { text-align: center; padding: 5rem 0; border-top: 1px solid var(--line); }
.plans-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 1.5rem; text-align: left; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 1.75rem 1.5rem; }
.plan.pro { border-color: var(--relay); }
.plan h3 { margin: 0; font-size: 1.25rem; }
.plan-price { font: 600 clamp(2.2rem, 5vw, 3rem)/1 "Sora", system-ui, sans-serif; color: var(--link); margin: 0.75rem 0 0.4rem; }
.plan.pro .plan-price { color: var(--relay); }
.plan-note { color: var(--muted); margin: 0; }
.plan.pro .ticks li::before { background-color: var(--relay); }
/* The small "Pro" mark after a feature that needs Sequence Pro. */
a.edition { display: inline-block; font-size: 0.7rem; margin-left: 0.25rem; vertical-align: 0.15em; text-decoration: none; white-space: nowrap; }

/* The film: a poster that becomes YouTube's player when pressed (index.html) */
.film { text-align: center; padding: 5rem 0 3rem; border-top: 1px solid var(--line); }
.film-lead { color: var(--muted); font-size: 1.1rem; margin: 0; }
.film-frame { position: relative; aspect-ratio: 16 / 9; margin: 2rem auto 1rem; border-radius: 28px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.film-play { position: absolute; inset: 0; display: block; color: var(--on-signal); }
.film-play img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease, filter 0.4s ease; }
.film-play:hover img { transform: scale(1.02); filter: brightness(1.08); }
.film-play:focus-visible { outline: 3px solid var(--signal); outline-offset: -3px; border-radius: 28px; }
.film-button { position: absolute; left: 1.25rem; bottom: 1.25rem; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 3rem; padding: 0 1.25rem 0 0.9rem; border-radius: 999px; background: var(--signal); color: var(--on-signal); font: 700 1rem "DM Sans", system-ui, sans-serif; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); }
.film-button svg { width: 1.5rem; height: 1.5rem; }
.film-length { font: 500 0.8rem "JetBrains Mono", ui-monospace, monospace; opacity: 0.75; margin-left: 0.25rem; }
.film-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film-note { color: var(--muted); font-size: 0.95rem; }

/* Closing call to action */
.closing { text-align: center; margin: 2rem auto 0; padding: 3rem 1.5rem; max-width: 46rem; border-radius: 32px; background: radial-gradient(120% 140% at 50% 0%, rgba(60, 240, 196, 0.16), transparent 60%), var(--surface); border: 1px solid var(--line); }
.closing h2 { margin-top: 0; }
.closing p { color: var(--muted); font-size: 1.1rem; }
.closing .hero-actions { justify-content: center; margin-bottom: 0; }

@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 1rem; padding: 1.5rem 0 2rem; }
  .hero-lead { font-size: 1.05rem; }
  .chip-a { left: 0; top: 4%; }
  .chip-b { right: 0; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 3rem 0; }
  .feature.flip > .feature-copy { order: 0; }
  .feature-copy p { font-size: 1rem; }
  .promise { padding: 3rem 0; }
  .promise-grid { grid-template-columns: minmax(0, 1fr); }
  .plans { padding: 3rem 0; }
  .plans-grid { grid-template-columns: minmax(0, 1fr); }
  .closing { padding: 2rem 1rem; }
  .film { padding: 3rem 0 2rem; }
  .film-frame { border-radius: 20px; margin-top: 1.5rem; }
  .film-button { left: 0.75rem; bottom: 0.75rem; min-height: 2.5rem; font-size: 0.9rem; }

  /* Phone frames sized for a phone screen: about a screen tall at most, never edge to edge. */
  .phone { width: min(12.5rem, 54vw); padding: 0.4rem; border-radius: 1.9rem; }
  .phone img { border-radius: 1.55rem; }
  .phone-hero { width: min(13.5rem, 58vw); }
  .phone-pair { width: min(17rem, 80vw); padding-bottom: 1rem; }
  .phone-pair .phone { width: 72%; }
  .phone-pair .phone-back { width: 58%; top: 10%; rotate: 4deg; }
  .flip .phone-pair .phone-back { rotate: -4deg; }
  .ring-demo { width: min(12rem, 56vw); }

  /* Reveals rise instead of sliding in from the side, and the phones don't drift. */
  .motion .reveal.from-right, .motion .reveal.from-left { translate: 0 2rem; }
  .motion .reveal.in.from-right, .motion .reveal.in.from-left { translate: 0 0; }
  [data-parallax] { transform: none; }
}

/* The install link in the site bar, on every page (config.js): beside the name on a phone, so the sticky bar stays two
   rows, and after the menu on a wide screen. */
.site-bar-inner > .pill { margin-left: auto; min-height: 2.25rem; padding-top: 0.25rem; padding-bottom: 0.25rem; font-size: 0.85rem; white-space: nowrap; }
@media (min-width: 56rem) { .site-bar-inner > .pill { order: 1; margin-left: 0; } }

/* Shown to someone who followed the link in a shared sequence (config.js). */
.share-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin: 1rem 0 1.5rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.share-banner p { margin: 0; font-weight: 600; }

/* One page per library sequence (tools/build-website.ps1). */
.sequence-steps { padding-left: 1.5rem; max-width: 40rem; }
.sequence-steps li { margin: 0.35rem 0; }
.sequence-page .hero-actions { align-items: center; }

/* The library's Lite and Pro tabs. */
.edition-tabs { display: flex; gap: 0.5rem; margin: 1.5rem 0 0; border-bottom: 1px solid var(--line); }
.edition-tabs:empty { display: none; }
.edition-tab { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; margin-bottom: -1px; padding: 0.4rem 1.1rem; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: 600 1rem "DM Sans", system-ui, sans-serif; cursor: pointer; }
.edition-tab .edition { font-family: "DM Sans", system-ui, sans-serif; font-weight: 700; letter-spacing: 0.06em; }
.edition-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--link); }
.edition-tab.pro[aria-selected="true"] { border-bottom-color: var(--relay); }
