:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --panel: #f1f0eb;
  --ink: #202126;
  --muted: #595d65;
  --line: #deded7;
  --accent: #214fc4;
  --serif: "Iowan Old Style", Baskerville, Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.55 var(--sans); }
a { color: inherit; text-underline-offset: .23em; }
a:hover { color: var(--accent); }
button, input, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(1440px, calc(100% - 8vw)); margin-inline: auto; }
.top, footer, .top nav, footer nav, .brand, .chapter-heading, .downloads, .platform { display: flex; align-items: center; }
.top, footer, .chapter-heading { justify-content: space-between; }
.top { min-height: 78px; }
.brand { gap: 10px; font-size: 24px; font-weight: 730; letter-spacing: -.055em; text-decoration: none; }
.brand-mark { position: relative; display: grid; place-items: center; overflow: hidden; width: 36px; height: 36px; border-radius: 10px; }
.brand-mark img { width: 100%; height: 100%; }
.brand-back { position: absolute; inset: 0; width: 100%; height: 100%; padding: 7px; border-radius: inherit; background: #151d32; fill: none; stroke: #a8ebcd; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.portfolio-link:focus-visible, .portfolio-link:active { --logo-offset: 45%; --logo-opacity: 0; --arrow-offset: 0%; --arrow-opacity: 1; }
@media (hover: hover) {
  .portfolio-link:hover { --logo-offset: 45%; --logo-opacity: 0; --arrow-offset: 0%; --arrow-opacity: 1; }
}
.brand-mark img { transform: translateX(var(--logo-offset, 0%)); opacity: var(--logo-opacity, 1); }
.brand-back { transform: translateX(var(--arrow-offset, -45%)); opacity: var(--arrow-opacity, 0); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .brand-mark img, .brand-back { transition: transform .19s ease-out, opacity .15s ease-out; }
}
.top nav, footer nav { gap: 25px; }
nav a, .downloads a, .photo-caption a, .chapter-heading a { text-decoration: none; }
.top nav a, footer nav a { font-size: 14px; }
.nav-github, .downloads a { border: 1px solid #dbdad4; border-radius: 12px; background: #f0efeb; font-weight: 600; }
.nav-github { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; }
h1, h2 { line-height: 1.03; letter-spacing: -.055em; }
h1 { font-size: clamp(52px,6.25vw,94px); }
h2 { font-size: clamp(32px,3.3vw,48px); font-weight: 570; }
h3 { font-size: 22px; letter-spacing: -.035em; }
.pitch > p, .intro { color: var(--muted); font-size: clamp(17px,1.45vw,20px); max-width: 39ch; }
.pitch > p { margin: 24px 0 30px; }
.downloads { gap: 10px; flex-wrap: wrap; }
.downloads a { display: inline-flex; justify-content: space-between; gap: 20px; padding: 11px 19px; }
.downloads .primary { background: #1b2026; color: white; border-color: #1b2026; box-shadow: 0 5px 12px #20232920; }
.downloads .primary:hover { background: #34414a; }
.platform { flex-wrap: wrap; gap: 8px; margin-top: 13px; color: var(--muted); font-size: 13px; }
.first-run { margin-top: 13px; }
.first-run summary { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); list-style: none; }
.first-run summary::-webkit-details-marker { display: none; }
.first-run summary:hover, .first-run details[open] summary { color: var(--accent); }
.first-run .glyph { width: 15px; height: 15px; }
.first-run p { max-width: 46ch; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.first-run strong { color: var(--ink); font-weight: 550; }
.first-run p a, .companion-note a { color: var(--accent); }
.first-run #copy-status { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.companion-note { margin-top: 13px; font-size: 13px; color: var(--muted); }
.launch-command { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: #202a27; color: #f1f8f3; }
.launch-command code { flex: 1 1 24ch; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.launch-command button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid #73827a; border-radius: 6px; background: transparent; font-size: 12px; font-weight: 600; }
.launch-command button:hover { border-color: #a8b3ad; background: #ffffff14; }
.launch-command .glyph { width: 14px; height: 14px; }
.launch-command .icon-check { display: none; }
.launch-command button.copied { border-color: #8ed4ab; color: #b6ecc9; }
.launch-command button.copied .icon-copy { display: none; }
.launch-command button.copied .icon-check { display: block; }
.chapter, footer { border-top: 1px solid var(--line); padding-block: clamp(36px,4vw,64px); }
.chapter-heading { align-items: baseline; gap: 20px; margin-bottom: 25px; }
.chapter-heading a, .help a, .guide a { color: var(--accent); }
.feature-guide > h2 { margin-bottom: 28px; }
.sync-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; padding: clamp(24px, 3.6vw, 54px); border: 1px solid #d4e2d4; border-radius: 22px; background: linear-gradient(105deg, #e3f2e7, #f0f5dd); }
.sync-feature h3 { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.08; letter-spacing: -.05em; }
.sync-feature h4 { font-size: 16px; margin: 0; }
.sync-feature p, .feature-list p { max-width: 58ch; margin: 9px 0 0; color: var(--muted); }
.sync-feature strong { color: var(--ink); font-weight: 550; }
.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 64px); margin-top: clamp(28px, 3.2vw, 48px); }
.feature-list section { padding-block: clamp(20px, 2.3vw, 34px); border-top: 1px solid var(--line); }
.feature-list a { display: inline-block; font-size: 14px; color: var(--accent); margin-top: 12px; text-decoration: none; }
.feature-list a:hover { text-decoration: underline; }
.copy p, .help p, .help ol { color: var(--muted); }
@media (max-width: 1000px) {
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.companion-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.companion-apps article { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(22px, 3vw, 42px); border: 1px solid var(--line); border-radius: 20px; background: #eff3f6; }
.companion-apps article + article { background: #eaf3ec; }
.companion-apps img { object-fit: contain; margin-bottom: 16px; }
.companion-apps h3 { font-size: clamp(24px, 2.4vw, 36px); line-height: 1.15; }
.companion-apps p { max-width: 52ch; margin: 10px 0 22px; color: var(--muted); }
.companion-apps .downloads { margin-top: auto; font-size: 14px; }
@media (max-width: 700px) {
  .companion-apps { grid-template-columns: 1fr; }
}
.metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.metrics strong { display: block; font: 400 clamp(36px,4.4vw,64px)/1.15 var(--serif); color: var(--accent); }
.metrics span { font-size: 14px; color: var(--muted); }
.setup { display: grid; grid-template-columns: 1fr 1.65fr; gap: 30px; }
.help details { border-bottom: 1px solid var(--line); padding: 13px 0; }
.help details:first-child { padding-top: 0; }
.help summary { font-weight: 600; }
.help details[open] summary { color: var(--accent); }
.help p, .help ol { margin: 10px 0; }
.help li + li { margin-top: 6px; }
footer { gap: 16px; flex-wrap: wrap; }
footer nav { flex-wrap: wrap; gap: 18px; }
.pagehead { padding: 60px 0 30px; }
.pagehead .intro { margin-top: 18px; max-width: 60ch; }
.guide section { border-top: 1px solid var(--line); padding: 28px 0 36px; }
.guide h2 { font-size: clamp(29px,3.1vw,40px); margin-bottom: 19px; }
.guide { max-width: 820px; }
.guide p { margin: 10px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px; text-align: left; border-bottom: 1px solid var(--line); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 2; background: var(--panel); padding: 8px; }
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .top { min-height: 62px; }
  .brand { font-size: 21px; gap: 5px; }
  .brand img, .brand-mark { width: 30px; height: 30px; }
  .top nav { gap: clamp(6px, 2vw, 12px); }
  .top nav a { font-size: 12px; }
  .nav-github { padding: 5px 10px; }
  .chapter-heading { align-items: start; flex-direction: column; gap: 9px; }
  .feature-list, .sync-feature, .setup { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .pagehead { padding-top: 35px; }
  th, td { padding: 6px 4px; font-size: 14px; }
}
.hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 6%; padding: clamp(47px,5vw,80px) clamp(0px,3vw,48px); }
.hero h1 { font-size: clamp(62px,7.1vw,112px); font-weight: 700; line-height: .99; letter-spacing: -.055em; word-spacing: .035em; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 69%, #adddcc 69% 91%, transparent 91%); }
.pitch > p { max-width: 42ch; margin: 20px 0; text-wrap: pretty; }
.hero-samples { justify-self: center; isolation: isolate; position: relative; width: min(100%,390px); height: 275px; }
.sample-photo { position: absolute; right: 8%; top: 0; display: block; width: 66%; background: white; border: 1px solid #e3ded5; border-radius: 9px; padding: 9px 9px 5px; color: #36434c; transform: rotate(8deg); box-shadow: 0 12px 25px #27303520; text-decoration: none; }
.sample-photo img { width: 100%; aspect-ratio: 1.65; object-fit: cover; border-radius: 4px; }
.sample-photo span { display: block; padding: 4px 3px; font: italic 18px var(--serif); }
.sample-photo::before { content: ""; position: absolute; z-index: -2; width: 88%; height: 88%; top: 3%; left: -16%; background: #fff url(../images/demo/glass-atrium.jpg) center/cover; border: 6px solid white; border-radius: 8px; transform: rotate(-17deg) translate(-9%, -15%); box-shadow: 0 6px 18px #27303522; }
.sample-photo img, .sample-photo span { position: relative; z-index: 1; background: white; }
.sample-message { position: absolute; bottom: 8%; left: 0; display: flex; align-items: center; gap: 12px; padding: 13px 19px; border: 1px solid #fff; background: #eff6ee; border-radius: 19px; box-shadow: 0 12px 32px #23392820; transform: rotate(-5deg); text-decoration: none; color: #1d322f; }
.sample-message b, .sample-message small { display: block; }
.sample-message small { color: #52665d; font-size: 12px; }
.sample-message b { font-size: 15px; }
.glyph { width: 18px; height: 18px; flex: none; }
.sample-message .glyph { width: 33px; height: 33px; color: #227953; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .hero-samples a { transition: transform .18s ease; }
  .sample-photo:hover { transform: rotate(4deg) translateY(-3px); }
  .sample-message:hover { transform: rotate(-2deg) translateY(-3px); }
}
.paired-demo { padding: clamp(22px,2.5vw,36px) 0 clamp(34px,4vw,62px); }
.demo-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.demo-heading h2 { font-size: clamp(29px,3vw,43px); }
.demo-heading p { margin-top: 5px; color: var(--muted); }
.demo-mode { display: inline-flex; padding: 4px; gap: 2px; border-radius: 13px; background: #ecebe5; }
.demo-mode button { display: flex; align-items: center; gap: 7px; border: 0; padding: 8px 12px; font: 600 13px var(--sans); border-radius: 10px; background: transparent; color: #52545b; }
.demo-mode [aria-pressed=true] { background: #fff; color: #19223a; box-shadow: 0 1px 5px #131a2b20; }
.device-jumps { display: none; }
/* Each device sits directly on the page. The workspace renders its own toolbar. */
.pair-stage { display: grid; grid-template-columns: minmax(0,1fr) 258px; gap: clamp(15px,2vw,28px); align-items: end; }
.mac-window { background: #242426; border: 1px solid #272a31; border-radius: 17px; box-shadow: 0 14px 24px -18px #19364d80; overflow: hidden; }
.mac-window iframe { display: block; width: 100%; height: clamp(520px,46vw,650px); border: 0; }
.handset { color-scheme: dark; width: 100%; max-width: 258px; display: flex; flex-direction: column; height: 504px; background: #191d26; border: 5px solid #08090b; border-radius: 35px; box-shadow: 0 0 0 1px #575a60, 0 8px 22px #0004; overflow: hidden; color: #f7f8fc; font-family: Roboto, var(--sans); }
.handset:has(#phone-home:not([hidden])) { background: linear-gradient(180deg,#111a27a8, #0c121940 50%,#0d1526ee),url(../images/demo/glass-atrium.jpg) center/cover; }
.handset:has(#phone-shade:not([hidden])) { background: #1d2028; }
.handset:has(#phone-shade:not([hidden])) .phone-nav { display: none; }
.phone-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.ph-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.phone-status { touch-action: none; display: flex; flex: none; width: 100%; min-height: 31px; align-items: center; justify-content: space-between; position: relative; padding: 5px 17px; border: 0; background: transparent; color: #fff; font-size: 10px; font-weight: 650; }
.phone-status:focus-visible { outline-offset: -3px; border-radius: 20px; }
.phone-status i { width: 10px; height: 10px; background: #07090c; box-shadow: inset 0 0 0 2px #191c23; border-radius: 50%; position: absolute; left: calc(50% - 5px); }
.status-time, .status-radios { display: inline-flex; gap: 3px; align-items: center; }
.status-time .ph-icon { width: 11px; height: 11px; }
.signal { width: 9px; height: 9px; background: currentColor; clip-path: polygon(100% 0,100% 100%,0 100%); }
.battery { width: 6px; height: 9px; border: 1px solid; border-radius: 1px; background: linear-gradient(to top,currentColor 68%,transparent 68%); margin: 0 1px; }
.phone-body { flex: 1; min-height: 0; position: relative; }
.handset-page, .ring-screen { height: 100%; overflow: auto; padding: 16px 12px; }
.phone-home { display: flex; flex-direction: column; align-items: start; gap: 8px; padding: 20px 16px 8px; }
.phone-glance { flex: 1; text-shadow: 0 1px 12px #13192188; }
.phone-glance p { font-size: 13px; font-weight: 600; }
.clock { display: block; font-size: 66px; line-height: 1.1; letter-spacing: -.07em; font-weight: 450; }
.trigger-notice { border: 0; border-radius: 18px; padding: 10px 14px; background: #dbe4fa; color: #202b41; display: inline-flex; gap: 7px; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.trigger-notice .ph-icon { width: 17px; height: 17px; }
.phone-alert { display: grid; width: 100%; padding: 9px 13px; border-radius: 16px; color: #192239; background: #eff4ffed; overflow-wrap: anywhere; }
.phone-alert small, .phone-app small { font-size: 11px; }
.phone-alert strong { font-size: 14px; }
.phone-alert span { font-size: 12px; }
.phone-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px 8px 2px; }
.phone-nav button { flex: 1; display: grid; justify-items: center; gap: 3px; border: none; border-radius: 14px; padding: 4px; background: transparent; font-size: 11px; color: #fff; }
.launcher-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; background: #d4e3fc; color: #24436f; }
[data-screen="messages"] .launcher-icon { background: #b4ceff; color: #18488e; }
[data-screen="photos"] .launcher-icon { background: #dce8ca; color: #3c5834; }
.phone-nav [aria-pressed=true] .launcher-icon { box-shadow: 0 0 0 2px #171d2988,0 0 0 3px #ffffff82; }
.gesture { flex: none; height: 3px; width: 65px; border-radius: 7px; background: #e2e5ee; margin: 6px auto; }
.shade { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 10px 8px; background: #1d2028; }
.handset-page[inert] { visibility: hidden; }
.shade-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 12px; }
.shade-head h3 { font-size: 20px; font-weight: 520; }
.shade-head button { border: 0; border-radius: 50%; width: 29px; height: 29px; font-size: 18px; background: #363b47; }
.shade-list { flex: 1; overflow: auto; min-height: 0; }
.shade-notice { display: grid; grid-template-columns: 29px minmax(0,1fr); gap: 0 7px; padding: 12px 10px; margin-bottom: 3px; background: #313641; border-radius: 6px; }
.shade-notice:first-child { border-top-left-radius: 18px; border-top-right-radius: 18px; }
.shade-notice:last-child { border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; }
.shade-notice .ph-icon { grid-row: span 3; background: #c2d6fb; color: #273c60; border-radius: 50%; box-sizing: content-box; padding: 5px; width: 16px; height: 16px; }
.shade-notice small { font-size: 10px; color: #ccd6e9; }
.shade-notice strong { font-size: 14px; font-weight: 600; }
.shade-notice p, .shade-empty { font-size: 12px; line-height: 1.4; color: #d4d8e2; }
.shade-empty { padding: 24px 8px; text-align: center; }
.shade .trigger-notice { margin: 8px 3px 0; align-self: start; }
.phone-app { display: flex; flex-direction: column; }
.phone-app h3 { font-size: 20px; }
.phone-app small, .phone-app label { color: #c4cbdb; }
.phone-app label { font-size: 12px; }
.phone-app img { width: 100%; min-height: 0; flex: 1; object-fit: cover; border-radius: 12px; margin: 10px 0; }
.phone-app select, #phone-compose input { min-width: 0; padding: 7px; border: 1px solid #4d5667; border-radius: 8px; background: #212733; color: white; font: inherit; font-size: 13px; }
.phone-share, .ring-screen button, #phone-compose button { background: #b3c9ff; color: #112445; border: 0; border-radius: 20px; font-size: 13px; font-weight: 650; padding: 8px 10px; }
#phone-directory dd { margin: 0 0 12px; color: #c4cbdb; font-size: 13px; }
#phone-call-status { margin-top: 12px; font-size: 13px; }
#phone-command-list { display: grid; }
.phone-share { margin-top: 8px; }
.phone-chat { flex: 1; overflow: auto; margin: 10px 0; }
.phone-chat p { width: fit-content; max-width: 90%; margin: 0 0 7px; padding: 7px 11px; background: #313a49; border-radius: 13px; font-size: 13px; overflow-wrap: anywhere; }
.phone-chat .sent { margin-left: auto; background: #405784; }
#phone-compose { display: flex; gap: 5px; }
#phone-compose input { flex: 1; }
.ring-screen { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; background: #1b2a44; text-align: center; }
.ring-screen > span { display: grid; place-items: center; width: 72px; height: 72px; font-size: 38px; background: #364c73; border-radius: 50%; margin-bottom: 15px; }
.ring-screen p { font-size: 13px; color: #d0ddf7; margin-bottom: 16px; }
.pair-status { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pair-status i { width: 7px; height: 7px; background: #7ecf9e; border-radius: 50%; flex: none; }
@media (max-width: 880px) {
  .pair-stage { grid-template-columns: minmax(0,1fr) 210px; gap: 12px; }
  .handset { height: 442px; }
}
@media (max-width: 690px) {
  .pair-stage { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .handset { justify-self: center; height: 450px; }
  .demo-heading { flex-direction: column; align-items: start; gap: 10px; }
  .device-jumps { display: flex; gap: 16px; font-size: 13px; color: var(--accent); }
  #mac, .handset { scroll-margin-top: 12px; }
  .mac-window iframe { height: 490px; }
}
@media (max-width: 690px) {
  .device-jumps { position: sticky; top: 0; z-index: 2; width: fit-content; padding: 6px; margin: 0 0 12px; background: #fbfaf7; border: 1px solid #d3d3cc; border-radius: 20px; gap: 2px; }
  .device-jumps a { padding: 2px 10px; text-decoration: none; }
  #mac, .handset { scroll-margin-top: 48px; }
}

.phone-banner {
  position: absolute;
  inset: 4px 6px auto;
  text-align: left;
  color: inherit;
  border: 1px solid #525867;
  background: #303541;
  box-shadow: 0 5px 16px #0005;
}
button.phone-banner { border-radius: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .phone-banner:not([hidden]) { animation: heads-up .2s ease-out; }
  @keyframes heads-up { from { opacity: 0; transform: translateY(-8px); } }
}

.feature-icon { width: 42px; height: 42px; padding: 9px; border-radius: 13px; color: #3752aa; background: #e4eafb; margin: 0 0 9px; }
.feature-list section:nth-child(4n+2) .feature-icon { background: #dcefe3; color: #287454; }
.feature-list section:nth-child(4n+3) .feature-icon { background: #f7e6d6; color: #94532f; }
.feature-list section:nth-child(4n) .feature-icon { background: #eee4f6; color: #744499; }
.sync-feature .feature-icon { background: #c0e1ca; color: #276347; }
@media (max-width: 740px) {
  .hero { grid-template-columns: 1fr; padding: 38px 0 20px; }
  .hero-samples { display: none; }
  .demo-heading { align-items: start; flex-direction: column; gap: 12px; }
}

.howto .directions { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 18px 0; }
.howto ol, .howto ul { padding-inline-start: 1.5em; }
.howto li + li { margin-top: .65em; }
.howto figure { margin: 24px 0; }
.howto figure img { width: 100%; height: auto; border-radius: 10px; }
.howto figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.feature-list a.transfer-guide-link { display: block; }
