/* "One calm app for the whole day": five tabs in the app's own segmented control (ui/Chip.tsx Segmented, the
   capsule variant), each showing a real screen of the app (the .d-* pieces from demo.css) and one short line. */
.feats h2.big { max-width: 16ch; }

/* the tabs: a capsule track, the chosen tab on a raised pill that slides (features.js) */
.feat-tabs {
  position: relative; display: flex; margin: var(--s4) 0 0; padding: 4px; border-radius: 999px;
  background: var(--surface2); width: 100%; max-width: 560px; overflow-x: auto; scrollbar-width: none;
}
.feat-tabs::-webkit-scrollbar { display: none; }
.feat-tabs button {
  position: relative; z-index: 1; flex: 1 1 auto; height: 40px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font: 600 13.5px/1 var(--body); cursor: pointer; white-space: nowrap;
  transition: color 0.25s var(--curve-standard);
}
.feat-tabs button[aria-selected="true"] { color: var(--text); }
.feat-tabs button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.feat-pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }
/* before the script measures, the chosen tab carries its own pill */
html:not(.motion) .feat-tabs button[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }

/* the stage: one screen at a time, the same size for all five, the line under it */
.feat-stage { margin-top: var(--s4); }
.feat-panel { display: flex; flex-direction: column; align-items: center; }
.feat-panel[hidden] { display: none; }
.feat-device {
  width: min(340px, 100%); height: 470px; padding: 16px 16px 18px; border-radius: 34px; overflow: hidden;
  background: linear-gradient(180deg, var(--wash) 0%, var(--bg) 40%); border: 1px solid var(--border);
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.35);
  color: var(--text); font-family: var(--body); font-size: 14px; line-height: 1.35;
}
.feat-line { margin: var(--s3) 0 0; font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; text-align: center; max-width: 24ch; text-wrap: balance; }
@media (min-width: 900px) {
  .feat-panel { flex-direction: row; justify-content: flex-start; gap: var(--s6); }
  .feat-line { text-align: left; font-size: 30px; max-width: 14ch; margin: 0; }
}
.app-screen { height: 100%; display: flex; flex-direction: column; }
.app-screen .d-title.center, .app-screen .d-date.center { text-align: center; }
.app-screen .d-title .ic { font-size: 18px; vertical-align: middle; color: var(--muted); }
.app-screen.lit .d-checkmark { background: var(--accent); box-shadow: none; }
.app-screen.lit .d-checkmark svg { opacity: 1; }
.app-screen.lit .d-flame .lit { opacity: 1; }
.app-screen .d-section { margin-top: 14px; }

/* Goals: the goal card, its bar and its numbered steps (GoalsScreen) */
.goal-card { margin-top: 14px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.goal-head { display: flex; align-items: center; gap: 12px; }
.goal-head b { display: block; font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.2; }
.goal-head .d-when { display: inline-flex; align-items: center; gap: 4px; }
.d-tile.big { width: 44px; height: 44px; font-size: 28px; }
.goal-bar { height: 6px; margin-top: 14px; border-radius: 3px; background: var(--surface3); overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.goal-count { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.goal-steps { margin-top: 8px; }
.goal-step { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14.5px; }
.goal-step + .goal-step { border-top: 1px solid var(--line); }
.goal-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); color: var(--muted); font-weight: 600; font-size: 13px; }
.goal-n svg { width: 15px; height: 15px; fill: none; stroke: var(--on-cta); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.goal-step.done .goal-n { background: var(--accent); }
.goal-step.done > span:last-child { color: var(--muted); text-decoration: line-through; }

/* Calendar: Day view's timeline, Goalify's blocks tinted, your own event outlined (Timeline.tsx) */
.cal-seg { display: flex; margin-top: 10px; padding: 3px; border-radius: 999px; background: var(--surface2); }
.cal-seg span { flex: 1; text-align: center; padding: 7px 0; border-radius: 999px; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.cal-seg .on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07); }
.cal-grid { position: relative; flex: 1; margin-top: 14px; --hour: 64px; }
.cal-hour { position: absolute; left: 0; right: 0; top: calc(var(--i) * var(--hour)); display: flex; align-items: flex-start; }
.cal-hour span { width: 44px; margin-top: -7px; font-size: 10.5px; color: var(--muted); }
.cal-hour::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cal-block {
  position: absolute; left: 46px; right: 2px; top: calc(var(--top) * var(--hour)); height: calc(var(--h) * var(--hour) - 2px);
  padding: 4px 8px 4px 10px; border-radius: 8px; overflow: hidden;
  background: color-mix(in srgb, var(--tag) 42%, var(--bg)); color: color-mix(in srgb, var(--tag) 30%, var(--text));
}
.cal-block::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: color-mix(in srgb, var(--tag) 70%, var(--text)); }
.cal-block b { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.cal-block span { display: block; font-size: 11px; opacity: 0.85; }
.cal-block.theirs { background: var(--bg); box-shadow: inset 0 0 0 1px var(--tag); color: var(--text); }
.cal-block.theirs::before { background: var(--tag); }
.cal-block.theirs .ic { color: var(--tag); }
.cal-now { position: absolute; left: 0; right: 0; top: calc(var(--top) * var(--hour)); height: 2px; background: #b83238; }
.cal-now span { position: absolute; left: 0; top: -8px; padding: 1px 5px; border-radius: 8px; background: #b83238; color: #fff; font-size: 10px; font-weight: 600; }

/* Focus: the app's focus screen, small */
.focus-screen { align-items: center; }
.focus-ring { width: 210px; height: 210px; margin-top: 16px; }
.focus-ring circle { fill: none; stroke: var(--accent); stroke-width: 8; }
.focus-ring .fill { stroke: var(--accent); }
.focus-ring .time { font: 500 40px var(--mono); font-variant-numeric: tabular-nums; fill: var(--text); }
.focus-ring .round { font: 400 12px var(--body); fill: var(--muted); }
.focus-lens { display: flex; gap: 6px; margin-top: 16px; }
.focus-lens span { padding: 9px 11px; border-radius: 999px; background: var(--surface); font-weight: 700; font-size: 12.5px; }
.focus-lens .on { background: var(--btn); color: var(--on-btn); }
.focus-start { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; height: 46px; padding: 0 26px; border-radius: 999px; background: var(--btn); color: var(--on-btn); font-weight: 700; font-size: 15px; }
.focus-start svg { width: 14px; height: 14px; fill: currentColor; }

/* Widgets: a home screen with the small (colourful) and medium (calm) widgets, as on the phone */
.home-screen { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 45%, #1b1f1a), #1b1f1a); margin: -16px -16px -18px; padding: 22px 18px; height: calc(100% + 34px); }
.w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.w-small { aspect-ratio: 1; padding: 12px; border-radius: 22px; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--accent) 80%, #000)); color: #fff; display: flex; flex-direction: column; }
.w-mark { display: inline-flex; align-items: center; gap: 6px; }
.w-mark .d-checkmark { display: grid; background: #fff; box-shadow: none; }
.w-mark .d-checkmark svg { opacity: 1; stroke: var(--accent); }
.w-mark .d-flame { width: 18px; height: 18px; display: none; }
.w-mark .d-flame .lit { fill: #fff; opacity: 1; }
.w-label { font-size: 11px; font-weight: 700; opacity: 0.85; margin-top: 4px; }
.w-num { font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1; margin-top: auto; }
.w-sub { font-size: 11px; opacity: 0.85; margin-top: 2px; }
.w-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.w-apps i { aspect-ratio: 1; border-radius: 14px; background: rgba(255, 255, 255, 0.16); }
.w-grid > .w-apps:last-child { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
.w-medium { grid-column: 1 / -1; display: flex; gap: 14px; padding: 14px; border-radius: 22px; background: var(--surface); color: var(--text); }
.w-date span { display: block; font-size: 10.5px; font-weight: 700; color: var(--accent); }
.w-date b { display: block; font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1.05; }
.w-date .w-count { color: var(--muted); font-weight: 400; }
.w-list { flex: 1; min-width: 0; }
.w-sec { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.w-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; font-weight: 600; }
.w-circle { width: 16px; height: 16px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); }
.home-screen .n-flame { display: none; }
html.streak-mode .home-screen .n-flame { display: inline; }
html.streak-mode .home-screen .n-check { display: none; }
html.streak-mode .w-mark .d-flame { display: block; }
html.streak-mode .w-mark .d-checkmark { display: none; }

/* the themes and the privacy line, under the stage */
.feat-foot { display: grid; gap: var(--s2); margin-top: var(--s5); }
@media (min-width: 760px) { .feat-foot { grid-template-columns: 1fr 1fr; align-items: center; } }
.feat-themes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 16px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.feat-themes b, .feat-private b { font-weight: 700; }
.feat-themes > span { color: var(--muted); font-size: var(--fs-small); }
.feat-themes .swatches { flex-basis: 100%; margin-top: 6px; }
.feat-private { margin: 0; padding: 16px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.feat-private b { color: var(--text); }
.focus-screen .d-title { font-size: 28px; white-space: nowrap; }
/* the same on a dark page for the feature screens */
:root[data-theme="dark"] .feat-device { border-color: rgba(255, 255, 255, 0.14); }
 :root .feat-device { border-color: rgba(255, 255, 255, 0.14); } 

/* ---- the end: one line and the pill (the form only without scripts) ---- */
.join-end { text-align: center; }
.join-end h2 { font-family: var(--display); font-weight: 600; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.025em; }
.join-end p { margin: 10px auto 0; color: var(--muted); }
.join-end .pill { margin-top: var(--s3); }
.js .join-fallback { display: none; }

/* ---- Apple's "closer look" layout (owner, Oct 24): everything on one centre line. The heading, a compact tab bar
   sized to its tabs, a larger screen, and a caption under it: a bold lead word, the rest in grey. Then two equal tiles. ---- */
.feats h2.big { text-align: center; margin-left: auto; margin-right: auto; max-width: 14ch; }
.feat-tabs { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.feat-tabs button { flex: 0 0 auto; padding: 0 16px; }
@media (max-width: 420px) { .feat-tabs { width: 100%; } .feat-tabs button { flex: 1 1 auto; padding: 0 10px; } }
.feat-stage { margin-top: var(--s5); }
.feat-panel, .feat-panel:not([hidden]) { flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; }
.feat-device { width: min(360px, 100%); height: 500px; }
.feat-line {
  margin: var(--s4) auto 0; max-width: 30ch; text-align: center;
  font-family: var(--body); font-weight: 600; font-size: 19px; line-height: 1.4; letter-spacing: 0; color: var(--muted);
}
.feat-line b { color: var(--text); }
@media (min-width: 900px) {
  .feat-panel { flex-direction: column; gap: 0; }
  .feat-device { width: 380px; height: 530px; }
  .feat-line { font-size: 21px; max-width: 34ch; margin-top: var(--s4); text-align: center; }
}
/* the two tiles: equal width and height, the same calm card */
.feat-foot { grid-template-columns: 1fr; align-items: stretch; max-width: 920px; margin: var(--s6) auto 0; }
@media (min-width: 760px) { .feat-foot { grid-template-columns: 1fr 1fr; } }
.feat-themes, .feat-private { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 26px 24px; border-radius: 28px; text-align: center; background: var(--surface); border: 1px solid var(--border); }
.feat-themes b, .feat-private b { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.015em; color: var(--text); }
.feat-themes > span, .feat-private span { color: var(--muted); font-size: var(--fs-small); }
.feat-themes .swatches { flex-basis: auto; justify-content: center; margin-top: 10px; }
.feat-line { max-width: 44ch; text-wrap: balance; }
@media (min-width: 900px) { .feat-line { max-width: 46ch; } }
/* the six swatches on one row, even on a phone; Ink keeps an edge on a dark tile */
.feat-themes .swatches { flex-wrap: nowrap; gap: 8px; }
.feat-themes .swatches button { width: 42px; height: 42px; flex: none; }
.feat-themes .swatches button[data-palette="mono"] { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }

/* ---- real screens (owner, Oct 24): every tab is a phone the size of an iPhone screenshot. Today, Cubi, Calendar
   and Focus are screenshots from the app; Goals and Widgets are built in its UI, inside the same frame. ---- */
.feat-device, .feat-device.real {
  width: min(290px, 76vw); height: auto; aspect-ratio: 590 / 1280; padding: 8px; border-radius: 46px; overflow: hidden;
  background: #0f120f; border: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 70px -36px rgba(0, 0, 0, 0.5), 0 14px 30px -18px rgba(0, 0, 0, 0.3);
}
@media (min-width: 900px) { .feat-device, .feat-device.real { width: 310px; height: auto; } }
:root[data-theme="dark"] .feat-device { background: #2a3027; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 40px 70px -36px rgba(0, 0, 0, 0.8); }
 :root .feat-device { background: #2a3027; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 40px 70px -36px rgba(0, 0, 0, 0.8); } 
.feat-device .shot { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 38px; background: #111; }
.feat-device .shot.streak, html.streak-mode .feat-device .shot.gentle { display: none; }
html.streak-mode .feat-device .shot.streak { display: block; }
/* the built screens: the app's page inside the frame, room at the top for the status bar */
.feat-device > .app-screen { border-radius: 38px; overflow: hidden; padding: 46px 16px 18px; background: linear-gradient(180deg, var(--wash) 0%, var(--bg) 40%); }
.feat-device > .app-screen.home-screen { margin: 0; height: 100%; padding: 46px 16px 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 45%, #1b1f1a), #1b1f1a); }
/* six tabs on one row on a phone: tighter padding, and a size smaller on the narrowest */
@media (max-width: 420px) { .feat-tabs button { padding: 0 6px; } }
@media (max-width: 380px) { .feat-tabs button { font-size: 14px; padding: 0 5px; } }
/* the screen is exactly a screenshot's shape (590 × 1280) and the frame wraps it: no bars, nothing cropped. The
   screen's corners sit 8px inside the frame's, so the two curves run parallel (38 + 8 = 46). A video goes in the same way. */
.feat-device, .feat-device.real { aspect-ratio: auto; height: auto; }
.feat-device .shot, .feat-device video, .feat-device > .app-screen { display: block; width: 100%; height: auto; aspect-ratio: 590 / 1280; border-radius: 38px; overflow: hidden; }
.feat-device .shot, .feat-device video { object-fit: cover; clip-path: inset(0 round 38px); }
.feat-device .shot.streak, html.streak-mode .feat-device .shot.gentle { display: none; }
html.streak-mode .feat-device .shot.streak { display: block; }
/* no inner highlight: on a phone this small it read as a stray line around the screen's top corners */
.feat-device, .feat-device.real { box-shadow: 0 40px 70px -36px rgba(0, 0, 0, 0.5), 0 14px 30px -18px rgba(0, 0, 0, 0.3); }
/* the old site's .shot card (style.css: padding, a light border, a shadow) must not reach these: the screenshot
   fills the screen edge to edge */
.feat-device .shot { padding: 0; margin: 0; border: 0; box-shadow: none; background: none; max-width: none; }

/* dark mode: the chosen tab's pill stands out from the track (it was the same grey), and the phone is a near-black
   phone with a fine edge instead of a thick grey-green bezel */
:root[data-theme="dark"] .feat-pill, :root[data-theme="dark"]:not(.motion) .feat-tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--text) 16%, var(--surface2)); box-shadow: none; }
  :root .feat-pill { background: color-mix(in srgb, var(--text) 16%, var(--surface2)); box-shadow: none; }
  html:not([data-theme="light"]):not(.motion) .feat-tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--text) 16%, var(--surface2)); box-shadow: none; }

:root[data-theme="dark"] .feat-device { background: #050605; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 40px 70px -36px rgba(0, 0, 0, 0.8); }
 :root .feat-device { background: #050605; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 40px 70px -36px rgba(0, 0, 0, 0.8); } 
/* a little more room per tab where there is room (between a phone and a laptop) */
@media (min-width: 421px) { .feat-tabs { padding: 5px; } .feat-tabs button { height: 42px; padding: 0 16px; font-size: 14.5px; } .feat-pill { top: 5px; bottom: 5px; } }
/* the phone frame is a picture too */
.feat-device, .feat-device * { cursor: default; user-select: none; -webkit-user-select: none; }

/* Private: a shield, in the theme colour */
.tile-ic { width: 30px; height: 30px; fill: var(--accent); margin-bottom: 4px; }

/* dark: the built screens (Goals, Widgets' page) wear the app's own gradient too, like the screenshots beside them */
:root[data-theme="dark"] .feat-device > .app-screen:not(.home-screen) { background: linear-gradient(180deg, #211f27 0%, #201f24 16%, #1c1b20 24%, #141316 35%, #0e0e0e 47%, #0e0e0e 100%); }
 :root .feat-device > .app-screen:not(.home-screen) { background: linear-gradient(180deg, #211f27 0%, #201f24 16%, #1c1b20 24%, #141316 35%, #0e0e0e 47%, #0e0e0e 100%); } 

/* ---- phones first (owner, Oct 24: "make sure mobile looks balanced"): checked at 360px, the narrowest common phone ---- */
/* the two tiles never grow past the page: the six swatches share the row instead of pushing it wider */
.feat-foot { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .feat-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feat-themes .swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 44px)); gap: 8px; width: 100%; justify-content: center; }
.feat-themes .swatches button { width: 100%; height: auto; aspect-ratio: 1; }
@media (max-width: 480px) { .feat-foot { margin-top: var(--s5); } .feat-themes, .feat-private { padding: 22px 18px; } }
/* six tabs on one row at 360px */
@media (max-width: 380px) { .feat-tabs button { padding: 0 4px; font-size: 13.5px; } }

/* Make it gentle on a phone: one calm card with the switches as a grouped list (hairlines between), not cards inside a card */
@media (max-width: 640px) {
  .gf { padding: 28px 0 8px; gap: 24px; }
  .gf-head { padding: 0 20px; }
  .gf-list { gap: 0; border-top: 1px solid var(--line); }
  .gf-row { border: 0; border-radius: 0; background: transparent; padding: 16px 20px; border-bottom: 1px solid var(--line); }
  .gf-list li:last-child .gf-row { border-bottom: 0; }
  .gf-txt b { font-size: 16px; line-height: 1.3; }
  .gf-was, .gf-now { font-size: 14.5px; line-height: 1.4; }
}

/* ---- the phone, finished (owner, Oct 25): one device for the hero and every tab. A metal rim with a fine light
   edge, an even black bezel, the screen's corners running parallel to the frame's (48 outside, 40 inside), side
   buttons, and a soft two-part shadow. It sizes to the space it is given, so it can never run off the screen. ---- */
.feat-device, .feat-device.real, .d-phone {
  position: relative; box-sizing: border-box; padding: 8px; border-radius: 48px; overflow: visible; border: 0;
  background: linear-gradient(155deg, #3b413b 0%, #121512 26%, #090b09 68%, #2a302a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 0 3px #060706,
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 46px 64px -38px rgba(0, 0, 0, 0.55),
    0 14px 28px -16px rgba(0, 0, 0, 0.35);
}
.feat-device, .feat-device.real { width: min(290px, 100%); }
@media (min-width: 900px) { .feat-device, .feat-device.real { width: min(310px, 100%); } }
.demo-stage { width: min(300px, 100%); max-width: 100%; }
@media (min-width: 960px) { .demo-stage { width: min(320px, 100%); } }
/* the screen inside: concentric with the frame */
.feat-device .shot, .feat-device > .app-screen { border-radius: 40px; }
.feat-device .shot { clip-path: inset(0 round 40px); }
.d-screen { border-radius: 40px; }
/* side buttons: action + volume on the left, power on the right */
.feat-device::before, .d-phone::before, .feat-device::after, .d-phone::after { content: ""; position: absolute; width: 3px; pointer-events: none; }
.feat-device::before, .d-phone::before {
  left: -3px; top: 17%; height: 21%; border-radius: 2px 0 0 2px;
  background: linear-gradient(to bottom, #1d211d 0 15%, transparent 15% 31%, #1d211d 31% 62%, transparent 62% 70%, #1d211d 70% 100%);
}
.feat-device::after, .d-phone::after { right: -3px; top: 26%; height: 11%; border-radius: 0 2px 2px 0; background: #1d211d; }
:root[data-theme="dark"] .feat-device, :root[data-theme="dark"] .d-phone {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 0 0 3px #050605, 0 0 0 1px rgba(255, 255, 255, 0.1), 0 46px 64px -38px rgba(0, 0, 0, 0.85);
}
  :root .feat-device, :root .d-phone {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 0 0 3px #050605, 0 0 0 1px rgba(255, 255, 255, 0.1), 0 46px 64px -38px rgba(0, 0, 0, 0.85);
  }

.hero { overflow-x: clip; }

/* ---- the scroll story (tour.js): a phone that stays while the page scrolls and its screen changes ---- */
.feat-tabs, .feat-stage { display: none; }
.tour { --hh: 78px; --s: 1; position: relative; margin-top: var(--s5); height: calc(100svh - var(--hh) + 5 * 56svh); }
@media (max-width: 640px) { .tour { --hh: 78px; } }
.tour-stage { position: sticky; top: var(--hh); height: calc(100svh - var(--hh)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 6px 0 10px; }
/* the words: the part's name, one line under it */
.tour-copy { width: 100%; text-align: center; }
.tour-caps { display: grid; }
.tour-cap { grid-area: 1 / 1; margin: 0 auto; max-width: 24ch; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.35s var(--curve-standard), transform 0.35s var(--curve-standard), visibility 0s linear 0.35s; }
.tour-cap.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0.08s, 0.08s, 0s; }
.tour-cap b { display: block; font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); }
.tour-cap span { display: block; margin-top: 6px; font-size: 17px; line-height: 1.4; color: var(--muted); text-wrap: balance; }
.tour-index { display: none; list-style: none; margin: 0; padding: 0; }
/* the phone, drawn at 290 x 630 and scaled to fit */
.tour-phone { flex: none; width: calc(318px * var(--s)); height: calc(627px * var(--s)); }
.tour .feat-device { width: 318px; height: 627px; max-width: none; aspect-ratio: auto; transform: scale(var(--s)); transform-origin: 0 0; }
.tour .feat-device > [data-s] { position: absolute; left: 7.752%; top: 3.934%; width: 84.496%; height: 92.132%; margin: 0; border-radius: 15.85% / 7.38%; overflow: hidden; clip-path: none; aspect-ratio: auto; opacity: 0; visibility: hidden; transform: scale(0.985); transition: opacity 0.5s var(--curve-standard), transform 0.5s var(--curve-standard), visibility 0s linear 0.5s; }
.tour .feat-device[data-on="today"] > [data-s="today"],
.tour .feat-device[data-on="cubi"] > [data-s="cubi"],
.tour .feat-device[data-on="goals"] > [data-s="goals"],
.tour .feat-device[data-on="calendar"] > [data-s="calendar"],
.tour .feat-device[data-on="focus"] > [data-s="focus"],
.tour .feat-device[data-on="widgets"] > [data-s="widgets"] { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.tour .feat-device > .shot.streak[data-s], html.streak-mode .tour .feat-device > .shot.gentle[data-s] { display: none; }
html.streak-mode .tour .feat-device > .shot.streak[data-s] { display: block; }
/* the dots (phones) */
.tour-dots { display: flex; gap: 0; }
.tour-dots button { width: 40px; height: 44px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.tour-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--surface3); transition: width 0.3s var(--curve-standard), background-color 0.3s var(--curve-standard); }
.tour-dots button[aria-current]::before { width: 22px; background: var(--text); }
.tour-dots button:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-radius: 8px; }
/* laptops: the words and the list on one side, the phone on the other */
@media (min-width: 900px) {
  .tour-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 96px; max-width: 980px; margin: 0 auto; padding: 0; }
  .tour-copy { text-align: left; }
  .tour-cap { margin: 0; max-width: none; }
  .tour-cap b { font-size: clamp(40px, 5.2vw, 56px); overflow-wrap: normal; }
  .tour-cap span { font-size: 21px; margin-top: 10px; max-width: 26ch; }
  .tour-index { display: grid; gap: 2px; margin-top: 36px; }
  .tour-index button { display: block; padding: 8px 0 8px 18px; border: 0; background: none; font: 500 17px var(--body); color: var(--muted); text-align: left; cursor: pointer; position: relative; transition: color 0.3s var(--curve-standard); }
  .tour-index button::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 4px; background: var(--surface3); transition: background-color 0.3s var(--curve-standard), transform 0.3s var(--curve-standard); }
  .tour-index button:hover, .tour-index button[aria-current] { color: var(--text); }
  .tour-index button[aria-current]::before { background: var(--accent); transform: scale(1.4); }
  .tour-index button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
  .tour-dots, .tour-hint { display: none; }
  .tour-phone { order: 2; }
}
@media (max-height: 560px) { .tour-cap span { display: none; } }
/* pictures don't stretch to fill an absolutely placed box, so they get the screen's size (290 x 630 less the 8px bezel) */
.tour .feat-device > .shot[data-s] { object-fit: cover; }
.tour .feat-device > .app-screen[data-s] { box-sizing: border-box; padding-top: 40px; }
.tour { width: 100%; }
.tour-stage { width: 100%; box-sizing: border-box; }

/* ---- the hero recording: the phone as everywhere else, and one small control for the sound ---- */
/* the real iPhone 15 Pro frame (iphone-frame.webp, 1419 x 2796, screen hole 1179 x 2556 at 120,120 with 180 px corners): the video sits in the hole, the frame on top */
.hero-video { width: min(340px, 100%); }
@media (min-width: 960px) { .hero-video { width: min(380px, 100%); } }
.hv-phone { position: relative; width: 100%; aspect-ratio: 1419 / 2796; filter: drop-shadow(0 36px 36px rgba(0, 0, 0, 0.28)) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.18)); user-select: none; -webkit-user-select: none; }
.hv-phone video { position: absolute; left: 7.752%; top: 3.934%; width: 84.496%; height: 92.132%; object-fit: cover; background: #0e0f0e; border-radius: 15.85% / 7.38%; }
.hv-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* the real iPhone 15 Pro frame on the tour phone too (same image and screen geometry as the hero): the screens run about 10 px
   under the frame's inner bezel so no light line shows, and the frame sits on top. */
.tour .tour-phone .feat-device.real { padding: 0; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 36px 36px rgba(0, 0, 0, 0.28)) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.18)); }
.tour .tour-phone .feat-device.real::before { content: none; }
.tour .tour-phone .feat-device.real::after { content: ""; position: absolute; inset: 0; right: auto; top: 0; width: 100%; height: 100%; border-radius: 0; background: url(/screens/iphone-frame.webp) 0 0 / 100% 100% no-repeat; pointer-events: none; z-index: 3; }
/* phones: a one-line hint under the dots, and the phone stage swipes sideways to change screens */
.tour-hint { margin: 2px 0 0; font-size: 14px; color: var(--muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.tour-hint svg { flex: none; width: 16px; height: 16px; animation: hint-nudge 1.8s var(--curve-standard, ease) infinite; }
.tour-stage { touch-action: pan-y; }
@keyframes hint-nudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .tour-hint svg { animation: none; } }

/* laptops: the phone-only hint must not take a grid cell of its own (it pushed the phone under the list) */
@media (min-width: 900px) { .tour-hint, .tour-dots { display: none !important; } }

/* phones (owner, Oct 25): the dots stand in a column on the right edge, like a scroll bar, so it reads as "scroll down" */
@media (max-width: 899px) {
  .tour-stage { position: sticky; }
  .tour-dots { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); flex-direction: column; z-index: 3; }
  .tour-dots button { width: 32px; height: 34px; }
  .tour-dots button::before { width: 6px; height: 6px; border-radius: 3px; transition: height 0.3s var(--curve-standard), background-color 0.3s var(--curve-standard); }
  .tour-dots button[aria-current]::before { width: 6px; height: 22px; }
}
.tour { --hh: 92px; } @media (max-width: 640px) { .tour { --hh: 82px; } } /* clears the taller header */

/* Phase 1 (Nov 19, 2026): the tour is tabs now, not a scroll-pinned stage, so the page is screens shorter (tour.js) */
.tour { height: auto; margin-top: var(--s5); }
.tour-stage { position: relative; top: auto; height: auto; padding: 0; }
.tour-cap b { font-size: var(--fs-h3); font-weight: 700; }
@media (min-width: 900px) { .tour-stage { min-height: calc(627px * var(--s)); } }
/* the dots sit in a row under the phone now (the side rail belonged to the scroll-pinned tour); 44 px targets */
.tour-dots { position: static; transform: none; flex-direction: row; justify-content: center; }
.tour-dots button { width: 44px; height: 44px; }
.tour-dots button::before { width: 8px; height: 8px; border-radius: 4px; transition: width 0.3s var(--curve-standard), background-color 0.3s var(--curve-standard); }
.tour-dots button[aria-current]::before { width: 22px; height: 8px; }
