/* clock.bh studio — the configurator and installer for the reTerminal E1001.
   Tokens are the site's own (assets/css/styles.css §1), copied: this page links only fonts.css.

   1 Tokens   2 Base   3 Header + rail   4 Layout   4b Basic or Advanced   4c One step at a time   5 Preview
   6 Steps + fields   7 Faces   7b Dark or light   8 Battery life   9 Install   9a The review   9b Place, photos, find my
   clock   10 Footer   11 Motion + contrast   12 Notify me (the waitlist) */

/* ============================== 1. TOKENS ============================== */
:root {
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-ui: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #F6F3EC;
  --bg-deep: #EFEAE0;
  --surface: #FFFDF9;
  --ink: #16120E;
  --ink-2: #463F37;
  --ink-3: #6C645B;
  --line: rgba(22, 18, 14, 0.12);
  --line-strong: rgba(22, 18, 14, 0.26);
  --red: #CE1126;
  --red-deep: #A80E20;
  --red-tint: rgba(206, 17, 38, 0.08);
  --red-text: #A80E20;
  --gold: #7A5D1E;
  --ok-text: #1F7A47;
  --ok: #2E8B57;
  --warn-text: #8A5A00;
  --warn-tint: rgba(201, 138, 11, 0.12);
  --code-bg: #17130F;
  --code-ink: #F0E9DD;
  --code-dim: #92887B;
  --focus: #CE1126;
  --shadow: 0 1px 2px rgba(22, 18, 14, 0.04), 0 22px 44px -26px rgba(22, 18, 14, 0.22);
  --header-bg: rgba(246, 243, 236, 0.86);
  --bezel: #111;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --maxw: 88rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 1.1rem;
  --top-h: 6.4rem;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F0D0B;
  --bg-deep: #0A0908;
  --surface: #171310;
  --ink: #F4EFE6;
  --ink-2: #CFC6B9;
  --ink-3: #9C9286;
  --line: rgba(244, 239, 230, 0.13);
  --line-strong: rgba(244, 239, 230, 0.3);
  --red: #F0485C;
  --red-deep: #FF6B7B;
  --red-tint: rgba(240, 72, 92, 0.12);
  --red-text: #FF8A98;
  --gold: #CDAA63;
  --ok-text: #4CC17E;
  --ok: #4CC17E;
  --warn-text: #E9B23A;
  --warn-tint: rgba(233, 178, 58, 0.12);
  --code-bg: #1D1915;
  --focus: #FF6B7B;
  --shadow: 0 0 0 1px rgba(244, 239, 230, 0.02), 0 22px 44px -26px rgba(0, 0, 0, 0.7);
  --header-bg: rgba(15, 13, 11, 0.84);
  --bezel: #050404;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0D0B;
    --bg-deep: #0A0908;
    --surface: #171310;
    --ink: #F4EFE6;
    --ink-2: #CFC6B9;
    --ink-3: #9C9286;
    --line: rgba(244, 239, 230, 0.13);
    --line-strong: rgba(244, 239, 230, 0.3);
    --red: #F0485C;
    --red-deep: #FF6B7B;
    --red-tint: rgba(240, 72, 92, 0.12);
    --red-text: #FF8A98;
    --gold: #CDAA63;
    --ok-text: #4CC17E;
    --ok: #4CC17E;
    --warn-text: #E9B23A;
    --warn-tint: rgba(233, 178, 58, 0.12);
    --code-bg: #1D1915;
    --focus: #FF6B7B;
    --shadow: 0 0 0 1px rgba(244, 239, 230, 0.02), 0 22px 44px -26px rgba(0, 0, 0, 0.7);
    --header-bg: rgba(15, 13, 11, 0.84);
    --bezel: #050404;
    color-scheme: dark;
  }
}

/* ============================== 2. BASE ============================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 1rem); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-ui); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg, canvas, img { display: block; }
code, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
code { font-size: 0.86em; padding: 0.05em 0.35em; border-radius: 0.3em; background: var(--bg-deep); overflow-wrap: anywhere; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 300; padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600;
  transform: translateY(-200%); transition: transform 180ms var(--ease-out);
}
.skip-link:focus { transform: none; }
.noscript { padding: 1rem var(--gutter); text-align: center; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 2.6rem; padding: 0.6rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.9rem; font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center;
  transition: transform 140ms var(--ease-out), background-color 180ms ease, color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { cursor: not-allowed; opacity: 0.45; }
.btn-lg { min-height: 3.1rem; padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn-red { background: var(--red); color: #fff; }
:root[data-theme="dark"] .btn-red, :root[data-theme="dark"] .fstart, :root[data-theme="dark"] .play.is-playing { color: #1A0508; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-red, :root:not([data-theme="light"]) .fstart, :root:not([data-theme="light"]) .play.is-playing { color: #1A0508; } }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-line { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: transparent; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line-strong); }
.btn-arrow { width: 1.1rem; height: 1.1rem; transition: transform 260ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn-red:hover:not(:disabled) { background: var(--red-deep); }
  .btn-ink:hover:not(:disabled) { opacity: 0.86; }
  .btn-line:hover:not(:disabled) { border-color: var(--ink); background: var(--red-tint); }
  .btn-quiet:hover:not(:disabled) { color: var(--ink); text-decoration-color: currentColor; }
  .btn:hover .btn-arrow { transform: translateX(3px); }
}
.chip {
  display: inline-flex; align-items: center; min-height: 2rem; padding: 0.3rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .chip:hover:not(:disabled) { border-color: var(--ink); background: var(--red-tint); } }
.kbd {
  display: inline-block; padding: 0 0.35em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 0.3em;
  font-family: var(--f-mono); font-size: 0.72em; font-weight: 600; line-height: 1.5; color: var(--ink-2); white-space: nowrap;
}

/* ============================== 3. HEADER + RAIL ============================== */
.top {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
}
.top-in, .rail-list {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
}
.top-in { display: flex; align-items: center; gap: 0.9rem; min-height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 29px; height: 29px; flex: none; color: var(--ink); }
.brand-mark .bm-hand { transform-box: view-box; transform-origin: 50px 50px; }
.brand-mark .bm-hour { transform: rotate(305deg); }
.brand-mark .bm-minute { transform: rotate(60deg); }
.brand-mark .bm-second { transform: rotate(180deg); visibility: hidden; }
.bm-live .brand-mark .bm-second { visibility: visible; }
.brand-name { font-family: var(--f-display); font-weight: 500; font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1; }
.brand-studio {
  font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 1.25rem; line-height: 1;
  color: var(--red-text); margin-left: -0.45rem;
}
.top-nav { display: flex; gap: 0.15rem; margin-left: auto; }
.top-nav a {
  padding: 0.45rem 0.75rem; border-radius: 999px; font-size: 0.85rem; font-weight: 550; color: var(--ink-2); text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .top-nav a:hover { color: var(--ink); background: var(--red-tint); } }
.theme-toggle {
  position: relative; width: 2.4rem; height: 2.4rem; padding: 0; cursor: pointer; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  transition: transform 140ms var(--ease-out), border-color 180ms ease, background-color 180ms ease;
}
.theme-toggle:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { border-color: var(--line-strong); background: var(--red-tint); } }
.theme-toggle-icons { position: relative; width: 1.2rem; height: 1.2rem; display: block; }
.theme-toggle svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 420ms var(--ease-out), opacity 260ms ease; }
.icon-moon { opacity: 0; transform: rotate(-70deg) scale(0.6); }
:root[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(70deg) scale(0.6); }
:root[data-theme="dark"] .icon-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { opacity: 0; transform: rotate(70deg) scale(0.6); }
  :root:not([data-theme="light"]) .icon-moon { opacity: 1; transform: none; }
}

.rail { border-top: 1px solid var(--line); }
.rail-list {
  display: flex; gap: 0.15rem; overflow-x: auto; scrollbar-width: none; counter-reset: none;
  padding-block: 0.3rem;
}
.rail-list::-webkit-scrollbar { display: none; }
.rail-list li { flex: 1 0 auto; }
.rail a {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.4rem 0.7rem; border-radius: 999px; white-space: nowrap;
  text-decoration: none; color: var(--ink-3); font-size: 0.82rem; font-weight: 600;
  transition: color 160ms ease, background-color 160ms ease;
}
.rail a:focus-visible { outline-offset: -2px; }
.rail-n { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; color: var(--gold); }
.rail a::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.1rem; height: 2px; border-radius: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 280ms var(--ease-out);
}
.rail a[aria-current="step"] { color: var(--ink); }
.rail a[aria-current="step"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .rail a:hover { color: var(--ink); background: var(--red-tint); } }
.rail-mark { width: 0.85rem; height: 0.85rem; flex: none; display: none; }
.rail a[data-status="done"] .rail-mark {
  display: block;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%232E8B57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.rail a[data-status="error"] .rail-mark { display: block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--red); }
/* Advanced's twelve: closer together, so they fit from about 1200 px (narrower, the list scrolls to the one on screen) */
:root[data-mode="advanced"] .rail a { padding-inline: 0.4rem; gap: 0.3rem; font-size: 0.79rem; }
:root[data-mode="advanced"] .rail a::after { left: 0.4rem; right: 0.4rem; }
:root[data-mode="advanced"] .rail-mark { width: 0.75rem; height: 0.75rem; }
/* (the steps not reached yet: no link until they are) */
:root[data-step] .rail a:not([href]) { cursor: default; opacity: 0.5; }
:root[data-step] .rail a:not([href]):hover { background: none; color: var(--ink-3); }

/* ============================== 4. LAYOUT ============================== */
.intro { padding: 0 0 clamp(1.75rem, 3vw, 2.5rem); }
.eyebrow { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.intro h1 {
  margin-top: 0.9rem; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.4rem, 1.4rem + 3.4vw, 4.4rem); line-height: 1; letter-spacing: -0.03em; text-wrap: balance;
}
.lede { margin-top: 1.1rem; max-width: 40rem; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); color: var(--ink-2); text-wrap: pretty; }

.layout {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(1.75rem, 5vw, 3.5rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem;
}
.stage { min-width: 0; }
.intro, .steps { min-width: 0; }
@media (min-width: 64rem) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(25rem, 0.92fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "intro stage" "steps stage"; column-gap: clamp(2.5rem, 4vw, 4.5rem); row-gap: 0; align-items: start;
  }
  .intro { grid-area: intro; }
  .steps { grid-area: steps; }
  .stage { grid-area: stage; position: sticky; top: calc(var(--top-h) + 1rem); }
  .stage-in { max-height: calc(100vh - var(--top-h) - 2rem); overflow-y: auto; scrollbar-width: thin; padding: 2px; }
  /* short screens: a smaller panel rather than a preview that scrolls */
  .device { max-width: max(24rem, calc((100vh - 26rem) / 0.6)); margin-inline: auto; }
}
@media (min-width: 64rem) and (max-height: 52rem) { .pv-keys { display: none; } }

/* ============================== 4b. BASIC OR ADVANCED ============================== */
/* data-mode on the root (from the choice remembered in this browser before the first paint, index.html; app.js
   setMode): "choose" asks first. An element with data-only="..." is there only in the modes it names. */
:root[data-mode="basic"] [data-only]:not([data-only~="basic"]),
:root[data-mode="advanced"] [data-only]:not([data-only~="advanced"]),
:root[data-mode="choose"] [data-only]:not([data-only~="choose"]),
:root[data-mode="choose"] .steps,
:root:not([data-mode]) [data-only]:not([data-only~="advanced"]),
:root:not([data-mode]) .mode-bar { display: none !important; }   /* (no script: the full page, and its note) */
/* Basic, and the question, on one column: no preview (the faces' own pictures are in its Dark or light step);
   Advanced's on one column comes under the step, the step first */
@media (max-width: 63.99rem) {
  :root[data-mode="basic"] .stage, :root[data-mode="choose"] .stage { display: none; }
  :root[data-step] .steps { order: 1; }
  :root[data-step] .stage { order: 2; }
}

.mode-pick { margin-top: clamp(1.6rem, 3vw, 2.2rem); }
.mode-q { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem); line-height: 1.15; letter-spacing: -0.01em; }
.mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0.8rem; margin-top: 1rem; }
.mode-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; min-width: 0;
  padding: 1.1rem 1.2rem 1rem; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 140ms var(--ease-out);
}
.mode-card:active { transform: scale(0.985); }
.mode-card[data-pick="basic"] { border-color: var(--ink); box-shadow: var(--shadow); }
.mode-card[data-pick="basic"]::before {
  content: ""; position: absolute; top: -1px; left: 1.2rem; width: 2.4rem; height: 3px; background: var(--red); border-radius: 0 0 3px 3px;
}
.mode-badge {
  position: absolute; top: 1rem; right: 1rem; padding: 0.12rem 0.5rem; border-radius: 999px; background: var(--red-tint);
  font-size: 0.64rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red-text);
}
.mode-t { font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
.mode-d { font-size: 0.94rem; color: var(--ink-2); text-wrap: pretty; }
.mode-more { font-size: 0.8rem; color: var(--ink-3); text-wrap: pretty; }
.mode-go { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: auto; padding-top: 0.5rem; font-size: 0.9rem; font-weight: 650; color: var(--ink); }
.mode-card[data-pick="basic"] .mode-go { color: var(--red-text); }
.mode-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius); }
@media (hover: hover) and (pointer: fine) {
  .mode-card:hover { border-color: var(--ink); }
  .mode-card:hover .btn-arrow { transform: translateX(3px); }
}
.mode-pick .fine { margin-top: 0.9rem; }
.inline-link {
  padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line-strong);
}
@media (hover: hover) and (pointer: fine) { .inline-link:hover { text-decoration-color: currentColor; } }
.mode-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-top: 1.4rem; }
.mode-note { flex: 1 1 14rem; font-size: 0.84rem; color: var(--ink-3); text-wrap: pretty; }

/* ============================== 4c. ONE STEP AT A TIME ============================== */
/* data-step on the root (index.html, before the first paint, from the address: #basic/wifi; app.js showStep): the one
   step on screen, "Step 3 of 6" over it, Back and Next under it (on a phone, a bar at the foot of the screen), the step
   list in the header from 48rem. Without JavaScript there is no data-step: every step on one page, as before. */
:root[data-step] .step { display: none; padding: 0; border-top: 0; }
:root[data-step="connect"] .step[data-step="connect"], :root[data-step="wifi"] .step[data-step="wifi"],
:root[data-step="city"] .step[data-step="city"], :root[data-step="tone"] .step[data-step="tone"],
:root[data-step="faces"] .step[data-step="faces"], :root[data-step="photos"] .step[data-step="photos"],
:root[data-step="motion"] .step[data-step="motion"], :root[data-step="battery"] .step[data-step="battery"],
:root[data-step="sound"] .step[data-step="sound"], :root[data-step="access"] .step[data-step="access"],
:root[data-step="review"] .step[data-step="review"], :root[data-step="done"] .step[data-step="done"] { display: block; }
:root[data-step] .step-n { display: none; }
.wiz-n, .wiz { display: none; }
:root[data-step] .wiz-n {
  display: block; margin-bottom: 0.65rem; font-family: var(--f-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
}
:root[data-step] .step-head h2:focus { outline: none; }
/* past the first step the title makes way for the step (it stays, unseen, for the page's outline) */
:root[data-step]:not([data-step="connect"]) .intro > :not(h1):not(.mode-bar) { display: none; }
:root[data-step]:not([data-step="connect"]) .intro h1 {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
:root[data-step]:not([data-step="connect"]) .intro { padding-bottom: clamp(1.4rem, 2.6vw, 2rem); }
:root[data-step]:not([data-step="connect"]) .mode-bar { margin-top: 0; }
.step-aside { margin-top: 0.4rem !important; }
.step-aside a { color: var(--ink); text-underline-offset: 0.2em; text-decoration-color: var(--line-strong); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .step-aside a:hover { text-decoration-color: currentColor; } }

/* Back and Next */
:root[data-step] .wiz {
  position: relative; display: flex; align-items: center; gap: 0.6rem 1rem;
  margin-top: clamp(2rem, 4vw, 2.6rem); padding-top: 1.2rem; border-top: 1px solid var(--line);
}
.wiz .btn { gap: 0.45rem; }
.wiz-back .btn-arrow { width: 1rem; height: 1rem; }
@media (hover: hover) and (pointer: fine) { .wiz-back:hover:not(:disabled) .btn-arrow { transform: translateX(-3px); } }
.wiz-next { margin-left: auto; min-width: 8.5rem; }
.wiz-count, .wiz-meter { display: none; }
@media (max-width: 47.99rem) {
  /* a phone: the bar stays at the foot of the screen while the step scrolls under it */
  :root[data-step] .wiz {
    position: sticky; bottom: 0; z-index: 90; margin-inline: calc(-1 * var(--gutter)); gap: 0.6rem;
    padding: 0.7rem var(--gutter) calc(0.7rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
    background: var(--header-bg); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
  }
  .wiz-meter { display: block; position: absolute; left: 0; right: 0; top: -1px; height: 2px; }
  .wiz-fill { display: block; width: 0; height: 100%; background: var(--red); transition: width 320ms var(--ease-out); }
  .wiz-count { display: inline; margin-inline: auto; font-size: 0.78rem; color: var(--ink-3); }
  .wiz-next { margin-left: 0; min-width: 7.5rem; }
  .wiz .btn { min-height: 2.9rem; padding-inline: 1.05rem; }
  :root[data-step] .rail { display: none; }        /* ("Step 3 of 6" and the bar instead; the page without JavaScript keeps it) */
}

/* ============================== 5. PREVIEW ============================== */
.device { margin: 0; }
.bezel {
  padding: clamp(0.7rem, 2.2vw, 1.5rem) clamp(0.7rem, 2.2vw, 1.5rem) clamp(1rem, 3vw, 2rem);
  background: var(--bezel); border-radius: calc(var(--radius) + 0.3rem); box-shadow: var(--shadow);
}
.screen { position: relative; aspect-ratio: 800 / 480; background: rgb(232, 230, 223); border-radius: 0.2rem; overflow: hidden; }
.screen img, .screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.screen img { transition: opacity 260ms ease, filter 260ms ease; }
.screen img:not([src]) { visibility: hidden; }
.screen[data-state="loading"] img { opacity: 0.45; filter: blur(1px); }
.screen[data-state="loading"] canvas { opacity: 0; }
.screen[data-state="error"] img { opacity: 0.3; }
.screen-msg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 80%;
  padding: 0.35rem 0.8rem; border-radius: 999px; background: rgba(22, 18, 14, 0.78); color: #F4EFE6;
  font-size: 0.78rem; font-weight: 600; text-align: center; opacity: 0; transition: opacity 200ms ease; pointer-events: none;
}
.screen[data-state="loading"] .screen-msg, .screen[data-state="error"] .screen-msg { opacity: 1; }
.pv-caption { margin-top: 0.9rem; font-size: 0.85rem; color: var(--ink-3); text-wrap: pretty; }
.pv-face { font-family: var(--f-display); font-size: 1.15rem; color: var(--ink); margin-right: 0.35rem; }
.pv-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 0.9rem; }
.pv-charge { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); flex: 1 1 12rem; }
.pv-charge input { flex: 1; min-width: 6rem; accent-color: var(--red); }
.pv-charge output { min-width: 2.8rem; text-align: right; font-size: 0.82rem; }
.pv-state { margin-top: 0.6rem; font-size: 0.82rem; color: var(--ink-2); min-height: 1.3em; }
.pv-state b { font-weight: 650; color: var(--ink); }
.pv-readout {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.75rem; margin-top: 0.9rem;
}
.pv-life {
  flex: 1 1 11rem; display: flex; flex-direction: column; justify-content: center; gap: 0.1rem;
  padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: calc(var(--radius) - 0.3rem); background: var(--surface);
}
.pv-life-k { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.pv-life-v { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.01em; }
.pv-life-dh { font-size: 0.82rem; color: var(--ink-3); }
.pv-loupe {
  flex: 0 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  padding: 0.6rem; border: 1px solid var(--line); border-radius: calc(var(--radius) - 0.3rem); background: var(--surface);
}
.stage[data-state="loading"] .pv-loupe canvas { opacity: 0.35; }
.pv-loupe canvas { transition: opacity 200ms ease; width: 216px; max-width: 100%; height: auto; image-rendering: pixelated; border-radius: 0.3rem; background: rgb(232, 230, 223); }
.pv-loupe-k { font-size: 0.68rem; color: var(--ink-3); letter-spacing: 0.06em; }
.pv-keys { margin-top: 0.9rem; font-size: 0.78rem; color: var(--ink-3); line-height: 1.9; }
@media (max-width: 63.99rem) {
  .stage-in { max-width: 40rem; margin-inline: auto; }
  .pv-keys { display: none; }
}
@media (max-width: 30rem) {
  .pv-readout { flex-wrap: nowrap; gap: 0.6rem; }
  .pv-life { flex: 1 1 auto; min-width: 0; padding: 0.7rem 0.8rem; }
  .pv-life-v { font-size: 1.3rem; }
  .pv-life-k { font-size: 0.66rem; letter-spacing: 0.1em; }
  .pv-loupe { padding: 0.45rem; }
  .pv-loupe canvas { width: 144px; }
  .pv-loupe-k { font-size: 0.62rem; }
}

/* segmented control (radios) */
.seg {
  display: inline-flex; flex-wrap: wrap; gap: 0.2rem; padding: 0.2rem; max-width: 100%;
  border: 1px solid var(--line-strong); border-radius: 1.4rem; background: var(--surface);
}
.seg label { position: relative; display: inline-flex; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.3rem; min-width: 2.9rem;
  padding: 0.35rem 0.9rem; border-radius: 999px; font-size: 0.86rem; font-weight: 650; color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap; transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.seg-sm span { min-height: 2rem; padding: 0.3rem 0.8rem; font-size: 0.8rem; }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .seg input:not(:checked):hover + span { color: var(--ink); background: var(--red-tint); } }
@media (max-width: 30rem) {
  .seg[data-steps] { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; border-radius: 1.3rem; }
  .seg[data-steps] label, .seg[data-steps] span { width: 100%; min-width: 0; padding-inline: 0.4rem; }
  .seg[data-steps] label { padding: 0; }
}

/* ============================== 6. STEPS + FIELDS ============================== */
.step { padding: clamp(2rem, 4vw, 2.75rem) 0; border-top: 1px solid var(--line); }
.steps > .step:first-of-type { border-top: 0; padding-top: 0; }
.step-head { display: flex; align-items: baseline; gap: 0.9rem; }
.step-n { font-family: var(--f-mono); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; color: var(--gold); }
.step h2 {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem);
  line-height: 1.08; letter-spacing: -0.02em;
}
.step-sub { margin-top: 0.6rem; max-width: 38rem; color: var(--ink-2); text-wrap: pretty; }
.step > * + * { margin-top: 1.4rem; }
.step > .step-sub { margin-top: 0.6rem; }

.group { margin: 1.4rem 0 0; padding: 0; border: 0; min-width: 0; }
.group legend, .label, .field label:not(.check) {
  display: block; padding: 0; margin-bottom: 0.55rem; font-size: 0.86rem; font-weight: 700; color: var(--ink);
}
.label-hint { font-weight: 500; color: var(--ink-3); margin-left: 0.4rem; }
.group > * + * { margin-top: 0.8rem; }
.group-tight { margin-top: 0; }
.field { min-width: 0; }
.field + .field { margin-top: 1.1rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.1rem 1.25rem; }
.field-row .field + .field { margin-top: 0; }
.field-row-hours { grid-template-columns: repeat(2, minmax(0, 9rem)); }
.field-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.field-inline label { margin-bottom: 0 !important; font-weight: 600 !important; }
.field-inline input[type="number"] { width: 6.5rem; }
.unit { font-size: 0.86rem; color: var(--ink-3); }
.with-unit { display: flex; align-items: center; gap: 0.6rem; }
.with-unit input { width: 8rem; }

input[type="text"], input[type="password"], input[type="number"], input[type="url"], input[type="time"], select {
  width: 100%; min-height: 2.75rem; padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-strong); border-radius: 0.65rem; background: var(--surface); color: var(--ink);
  font-size: 1rem; transition: border-color 160ms ease, box-shadow 160ms ease;
}
select { width: auto; max-width: 100%; padding-right: 2.2rem; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%23857C71' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 0.75rem;
}
.field-row-hours select { width: 100%; }
input::placeholder { color: var(--ink-3); opacity: 0.8; }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--red-tint), 0 0 0 1px var(--ink); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--red); }
input:disabled, select:disabled { opacity: 0.5; }
input.mono { font-family: var(--f-mono); font-size: 0.95rem; }
.help { margin-top: 0.4rem; font-size: 0.82rem; color: var(--ink-3); text-wrap: pretty; }
.help code { font-size: 0.8rem; }
.err { margin-top: 0.35rem; font-size: 0.82rem; font-weight: 600; color: var(--red-text); }
.err:empty { display: none; }
.note { font-size: 0.86rem; color: var(--ink-2); padding: 0.8rem 1rem; border-left: 2px solid var(--gold); background: var(--surface); border-radius: 0 0.6rem 0.6rem 0; }
.fine { font-size: 0.78rem; color: var(--ink-3); text-wrap: pretty; }
.notice {
  padding: 0.9rem 1.1rem; border: 1px solid var(--line-strong); border-radius: calc(var(--radius) - 0.3rem);
  background: var(--warn-tint); font-size: 0.9rem; color: var(--ink-2);
}
.notice strong { display: block; color: var(--ink); margin-bottom: 0.2rem; }

.pw-wrap { position: relative; display: flex; }
.pw-wrap input { padding-right: 4.2rem; }
.pw-eye {
  position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%);
  min-height: 2rem; padding: 0.2rem 0.6rem; border: 0; border-radius: 0.45rem; background: transparent;
  font-size: 0.78rem; font-weight: 650; color: var(--ink-2); cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .pw-eye:hover { background: var(--red-tint); color: var(--ink); } }
.pw-wrap-big input { font-size: 1.15rem; letter-spacing: 0.04em; min-height: 3rem; }
.pw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 0.6rem; }
.pw-said { font-size: 0.8rem; color: var(--ok-text); font-weight: 600; }

.check { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.92rem; color: var(--ink-2); cursor: pointer; }
.check input { flex: none; width: 1.15rem; height: 1.15rem; margin: 0.18rem 0 0; accent-color: var(--red); cursor: pointer; }
.check input:disabled + span { opacity: 0.55; }
.check-inline { display: inline-flex; align-items: center; }
.check-inline input { margin-top: 0; }
.check-hint { display: block; font-size: 0.8rem; color: var(--ink-3); }
.check-hint:empty { display: none; }
.check-play { display: flex; align-items: center; gap: 0.6rem; }

.more { border: 1px solid var(--line); border-radius: calc(var(--radius) - 0.3rem); background: var(--surface); }
.more > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; padding: 0.85rem 1rem; cursor: pointer;
  font-weight: 650; font-size: 0.92rem; list-style: none;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before {
  content: ""; align-self: center; width: 0.5rem; height: 0.5rem; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(-45deg); transition: transform 200ms var(--ease-out); margin-right: 0.2rem;
}
.more[open] > summary::before { transform: rotate(45deg); }
.more-hint { font-weight: 500; font-size: 0.82rem; color: var(--ink-3); }
.more > :not(summary) { margin: 0 1rem 1rem; }

/* choice cards (radios) */
.cards { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
.cards-5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 0.25rem; height: 100%;
  padding: 0.8rem 0.9rem 0.85rem; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) - 0.35rem);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.card input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.card-t { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.card-d { font-size: 0.8rem; line-height: 1.4; color: var(--ink-3); text-wrap: pretty; }
.card:has(input:checked) { border-color: var(--ink); box-shadow: var(--shadow); }
.card:has(input:checked)::before {
  content: ""; position: absolute; top: -1px; left: 0.9rem; width: 2rem; height: 3px; background: var(--red); border-radius: 0 0 3px 3px;
}
.card:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .card:not(:has(input:checked)):hover { border-color: var(--line-strong); } }
.card-px canvas.px {
  box-sizing: content-box; width: 128px; height: 40px; max-width: calc(100% - 1rem); object-fit: contain; image-rendering: pixelated;
  margin-bottom: 0.45rem; padding: 0.35rem 0.5rem; border-radius: 0.35rem; background: rgb(232, 230, 223);
}
.cards-5 .card-px canvas.px { width: 80px; height: 22px; }
.card-wrap { position: relative; }
.cards-play .card { padding-right: 2.9rem; }
.play {
  position: absolute; right: 0.55rem; top: 0.6rem; z-index: 1;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center; padding: 0 0 0 0.12rem;
  border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); color: var(--ink);
  font-size: 0.72rem; cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}
.play:active { transform: scale(0.92); }
.play.is-playing { background: var(--red); border-color: var(--red); color: #fff; }
.play-sm { position: static; width: 1.9rem; height: 1.9rem; flex: none; }
@media (hover: hover) and (pointer: fine) { .play:hover { border-color: var(--ink); } }
.sub { margin-top: 0.9rem; padding: 1rem; border-radius: calc(var(--radius) - 0.35rem); background: var(--bg-deep); }

/* ============================== 7. FACES ============================== */
.faces-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; }
.faces-count { font-size: 0.92rem; color: var(--ink-2); }
.faces-count strong { font-family: var(--f-display); font-weight: 500; font-size: 1.35rem; color: var(--ink); }
.faces-tools { display: flex; gap: 0.4rem; }
.loading-line { font-size: 0.86rem; color: var(--ink-3); }
.face-groups > * + * { margin-top: 1.4rem; }
.fgroup { margin: 0; padding: 0; border: 0; min-width: 0; }
.fgroup-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.7rem; }
.fgroup-name {
  margin: 0; padding: 0; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3);
}
.fgroup-head::after { content: ""; flex: 1; border-top: 1px solid var(--line); order: 1; }
.fgroup-tools { order: 2; display: flex; gap: 0.15rem; }
.fgroup-tools button {
  padding: 0.2rem 0.5rem; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-size: 0.75rem; font-weight: 650; color: var(--ink-3);
}
@media (hover: hover) and (pointer: fine) { .fgroup-tools button:hover { color: var(--ink); background: var(--red-tint); } }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: 0.7rem; clear: both; }
.fcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) - 0.35rem);
  transition: border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}
.fpick { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.55rem 0.55rem 0.4rem; cursor: pointer; flex: 1; }
.fpick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fthumb { position: relative; display: block; padding: 4px; margin-bottom: 0.3rem; background: #111; border-radius: 0.5rem; }
.fthumb img { width: 100%; height: auto; aspect-ratio: 800 / 480; background: #1c1a19; border-radius: 2px; transition: opacity 300ms ease; }
.fthumb img:not([src]) { opacity: 0; }
.fthumb .fnone {
  position: absolute; inset: 4px; display: grid; place-items: center; font-size: 0.7rem; color: #9C9286; text-align: center; padding: 0.4rem;
}
.fstart {
  position: absolute; left: 0.5rem; bottom: 0.5rem; padding: 0.12rem 0.45rem; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 0.64rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase;
  opacity: 0; transform: translateY(3px); transition: opacity 180ms ease, transform 220ms var(--ease-out);
}
.fname { font-family: var(--f-display); font-size: 1.02rem; line-height: 1.15; color: var(--ink); }
.fline { font-size: 0.74rem; line-height: 1.4; color: var(--ink-3); text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fkey {
  display: flex; align-items: center; gap: 0.5rem; margin: 0 0.55rem 0.55rem; padding: 0.4rem 0.5rem;
  border-radius: 0.5rem; background: var(--bg-deep); font-size: 0.78rem; font-weight: 650; color: var(--ink-2); cursor: pointer;
}
.fkey input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--red); cursor: pointer; flex: none; }
.fcard.is-off .fthumb img { opacity: 0.45; filter: grayscale(1); }
.fcard.is-off .fname { color: var(--ink-3); }
.fcard.is-toneoff .fthumb img { opacity: 0.45; filter: grayscale(1); }
.fcard.is-toneoff .fname { color: var(--ink-3); }
.fcard.is-start { border-color: var(--ink); box-shadow: var(--shadow); }
.fcard.is-start::before {
  content: ""; position: absolute; top: -1px; left: 0.9rem; width: 2rem; height: 3px; background: var(--red); border-radius: 0 0 3px 3px; z-index: 1;
}
.fcard.is-start .fstart { opacity: 1; transform: none; }
.fcard:has(.fpick input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .fcard:not(.is-start):hover { border-color: var(--line-strong); } }
@media (max-width: 30rem) {
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .fline { display: none; }
  .fpick { padding: 0.4rem 0.4rem 0.3rem; }
  .fkey { margin: 0 0.4rem 0.4rem; }
}

/* ============================== 7b. DARK OR LIGHT ============================== */
/* each face's kind on its picture (faces.json "tone"); the Dark or light step's three cards, each with faces of its kind */
/* (top right: "Starts here" has the bottom left, and a face drawn for Bahrain only, elsewhere, says so instead) */
.ftone {
  position: absolute; right: 0.5rem; top: 0.5rem; padding: 0.08rem 0.42rem; border-radius: 999px;
  font-size: 0.58rem; font-weight: 750; line-height: 1.5; letter-spacing: 0.07em; text-transform: uppercase;
}
.fcard.is-away .ftone { display: none; }
.ftone-dark { background: #111; color: #F4EFE6; box-shadow: 0 0 0 1px rgba(244, 239, 230, 0.45); }
.ftone-light { background: #F4EFE6; color: #111; box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.55); }
/* white paper by day, black after sunset: the mark is both */
.ftone-daynight { display: inline-flex; padding: 0; overflow: hidden; box-shadow: 0 0 0 1px rgba(244, 239, 230, 0.45); }
.ftone-daynight b { font-weight: inherit; padding: 0.08rem 0.32rem 0.08rem 0.42rem; background: #F4EFE6; color: #111; }
.ftone-daynight b + b { padding: 0.08rem 0.42rem 0.08rem 0.32rem; background: #111; color: #F4EFE6; }
.tone-line { font-size: 0.9rem; color: var(--ink-2); padding: 0.75rem 1rem; border-left: 2px solid var(--gold); background: var(--surface); border-radius: 0 0.6rem 0.6rem 0; text-wrap: pretty; }
.tone-line strong { color: var(--ink); font-weight: 650; }
.tone-line a { color: var(--ink); font-weight: 650; text-underline-offset: 0.2em; text-decoration-color: var(--line-strong); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .tone-line a:hover { text-decoration-color: currentColor; } }
.tone-line:empty { display: none; }

.tones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.tcard { gap: 0.2rem; padding: 0.55rem 0.55rem 0.75rem; }
.tpics {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 3px; margin-bottom: 0.45rem; padding: 3px;
  aspect-ratio: 5 / 3; background: #111; border-radius: 0.45rem;        /* (room for four, however many there are) */
}
.tpic { position: relative; display: block; min-width: 0; }
.tpic .fnone { position: absolute; inset: 0; display: grid; place-items: center; padding: 0.2rem; font-size: 0.55rem; color: #9C9286; text-align: center; }
.tpic img { width: 100%; height: auto; aspect-ratio: 800 / 480; background: #1c1a19; border-radius: 2px; transition: opacity 300ms ease; }
.tpic img:not([src]) { opacity: 0; }
.tpic.is-stale img { opacity: 0.35; }
.tcard-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.1rem 0.6rem; padding-inline: 0.3rem; }
.tcard .card-d { padding-inline: 0.3rem; }
.tcard-n { font-size: 0.74rem; color: var(--ink-3); }
.tcard.is-none { cursor: not-allowed; }
.tcard.is-none .tpics { background: transparent; border: 1px dashed var(--line-strong); }
.tcard.is-none .card-t { opacity: 0.5; }
@media (max-width: 30rem) {
  .tones { grid-template-columns: minmax(0, 1fr); }
  .tpics { grid-template-columns: repeat(4, minmax(0, 1fr)); aspect-ratio: 20 / 3; }
}

.sched { display: grid; gap: 0.5rem; margin: 0.6rem 0; counter-reset: sched; }
.sched-row { display: grid; grid-template-columns: minmax(7.5rem, 10rem) minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }
.sched-row select { width: 100%; }
.sched-row input[type="time"] { font-family: var(--f-mono); }
.sched-del {
  width: 2.4rem; height: 2.4rem; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface);
  cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--ink-2);
}
@media (hover: hover) and (pointer: fine) { .sched-del:hover { border-color: var(--red); color: var(--red-text); } }
.sched-empty { font-size: 0.84rem; color: var(--ink-3); }

/* ============================== 8. BATTERY LIFE ============================== */
.life {
  margin-top: 1.6rem; padding: clamp(1rem, 2.5vw, 1.4rem); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.life > * + * { margin-top: 0.6rem; }
.life-h { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.life-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; }
.life-big strong { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); line-height: 1.05; letter-spacing: -0.02em; }
.life-dh { font-size: 0.95rem; color: var(--ink-3); }
.life-chart { display: grid; gap: 0.3rem; margin-top: 0.9rem; }
.lc-row { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) 4.4rem; align-items: center; gap: 0.6rem; font-size: 0.8rem; }
.lc-k { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.lc-bar { position: relative; height: 0.7rem; }
.lc-fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--line-strong);
  transition: width 420ms var(--ease-out);
}
.lc-v { text-align: right; color: var(--ink-3); font-family: var(--f-mono); font-size: 0.76rem; }
.lc-row.is-now .lc-fill { background: var(--red); }
.lc-row.is-now .lc-k, .lc-row.is-now .lc-v { color: var(--ink); font-weight: 700; }

/* ============================== 9. INSTALL ============================== */
.link-card { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.link-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; }
.link-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--line-strong); flex: none; }
.link-card[data-state="busy"] .link-dot { background: var(--gold); animation: pulse 1.1s ease-in-out infinite; }
.link-card[data-state="ready"] .link-dot { background: var(--ok); }
.link-card[data-state="error"] .link-dot { background: var(--red); }
@keyframes pulse { 50% { opacity: 0.3; } }
.link-text { flex: 1 1 14rem; display: flex; flex-direction: column; min-width: 0; }
.link-text strong { font-size: 1rem; }
.link-text span { font-size: 0.84rem; color: var(--ink-3); }
.link-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.link-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 0.6rem 1rem;
  margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line);
}
.link-facts dt { font-size: 0.68rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.link-facts dd { font-size: 0.88rem; font-weight: 600; overflow-wrap: anywhere; }
.link-msg { margin-top: 0.7rem; font-size: 0.86rem; color: var(--ink-2); }
.link-msg:empty { display: none; }
.link-msg.is-error { color: var(--red-text); font-weight: 600; }
.choice { padding: 1rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); }
.choice p { font-size: 0.92rem; }
.choice-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }

.release { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.release-row { display: grid; grid-template-columns: 6.5rem minmax(0, auto) minmax(0, 1fr); align-items: baseline; gap: 0.2rem 0.9rem; padding: 0.8rem 1.1rem; }
.release-row + .release-row { border-top: 1px solid var(--line); }
.release-k { font-size: 0.7rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.release-v { font-family: var(--f-mono); font-size: 0.92rem; font-weight: 600; }
.release-d { font-size: 0.82rem; color: var(--ink-3); }
.release-d.is-warn { color: var(--warn-text); font-weight: 600; }
.release-d.is-ok { color: var(--ok-text); font-weight: 600; }
@media (max-width: 30rem) { .release-row { grid-template-columns: 1fr; } }
.problems { padding: 0.9rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--red); background: var(--red-tint); font-size: 0.88rem; }
.problems ul { margin-top: 0.4rem; display: grid; gap: 0.25rem; }
.problems li::before { content: "– "; color: var(--red-text); }
.problems a { color: var(--red-text); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.actions-why { font-size: 0.84rem; color: var(--ink-3); margin-top: 0.6rem !important; }
.actions-why:empty { display: none; }
.progress-track { position: relative; height: 0.6rem; border-radius: 999px; background: var(--bg-deep); overflow: hidden; border: 1px solid var(--line); }
.progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--red); border-radius: 999px; transition: width 240ms linear; }
.progress[data-state="done"] .progress-fill { background: var(--ok); }
.progress[data-state="error"] .progress-fill { background: var(--ink-3); }
.progress-text { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.5rem; font-size: 0.88rem; color: var(--ink-2); }
.progress[data-state="error"] .progress-text { color: var(--red-text); font-weight: 600; }
.done { padding: 1.1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.done > * + * { margin-top: 0.7rem; }
.done-h { font-family: var(--f-display); font-size: 1.35rem; line-height: 1.2; }
.done-face { font-size: 0.92rem; color: var(--ink-2); }
.done-link .btn { max-width: 100%; white-space: normal; }
.log { border: 1px solid var(--line); border-radius: calc(var(--radius) - 0.3rem); background: var(--surface); }
.log > summary { display: flex; align-items: baseline; gap: 0.2rem 0.6rem; padding: 0.85rem 1rem; cursor: pointer; font-weight: 650; font-size: 0.92rem; list-style: none; }
.log > summary::-webkit-details-marker { display: none; }
.log > summary::before {
  content: ""; align-self: center; width: 0.5rem; height: 0.5rem; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(-45deg); transition: transform 200ms var(--ease-out); margin-right: 0.2rem;
}
.log[open] > summary::before { transform: rotate(45deg); }
.log-count { font-weight: 500; color: var(--ink-3); font-size: 0.8rem; margin-left: 0.3rem; }
.log-tools { display: flex; gap: 0.4rem; justify-content: flex-end; padding: 0 0.8rem 0.5rem; }
.log-pre {
  margin: 0 0.6rem 0.6rem; padding: 0.8rem 0.9rem; max-height: 20rem; overflow: auto; border-radius: 0.6rem;
  background: var(--code-bg); color: var(--code-ink); font-family: var(--f-mono); font-size: 0.74rem; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.log-pre:empty::before { content: "Nothing yet. After an install the clock's own lines appear here: Wi-Fi, the time, films, the battery."; color: var(--code-dim); }
.log-pre .l-tool { color: var(--code-dim); }
.log-pre .l-page { color: #8FE3B0; font-weight: 600; }
.log-pre .l-face { color: #F5C66B; }
.log-pre .l-err { color: #FF8A98; }
.log-pre .l-me { color: #9DB8FF; }
.keep { margin-top: 2rem !important; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.keep > * + * { margin-top: 0.8rem; }
.keep-h { font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; }
.keep-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.file-btn { cursor: pointer; }
.file-btn:has(+ input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.keep-msg { font-size: 0.86rem; color: var(--ink-2); }
.keep-msg:empty { display: none; }
.keep-msg.is-error { color: var(--red-text); font-weight: 600; }

/* ============================== 9a. THE REVIEW ============================== */
/* What goes onto the clock (app.js renderReview): each choice with an Edit link back to its step; in Advanced, every
   other setting that is not as the clock has it (or, before it is read, not at its default) */
.sum > * + * { margin-top: 1.2rem; }
.sum-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sum-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; align-items: baseline; gap: 0.15rem 1rem; padding: 0.85rem 1.1rem; }
.sum-row + .sum-row { border-top: 1px solid var(--line); }
.sum-row dt { font-size: 0.7rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.sum-row dd { min-width: 0; }
.sum-v { display: block; font-size: 0.95rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.sum-d { display: block; font-size: 0.82rem; color: var(--ink-3); text-wrap: pretty; overflow-wrap: anywhere; }
.sum-ul { display: grid; gap: 0.2rem; }
.sum-ul li { font-size: 0.88rem; color: var(--ink-2); text-wrap: pretty; overflow-wrap: anywhere; }
.sum-ul b { font-weight: 650; color: var(--ink); }
.sum-was { color: var(--ink-3); }
.sum-edit a { font-size: 0.84rem; font-weight: 650; color: var(--red-text); text-underline-offset: 0.2em; white-space: nowrap; }
.sum-h { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; line-height: 1.2; }
.sum-h + .sum-list { margin-top: 0.7rem; }
.sum-note { font-size: 0.88rem; color: var(--ink-2); text-wrap: pretty; }
@media (max-width: 30rem) {
  .sum-row { grid-template-columns: minmax(0, 1fr) auto; padding: 0.8rem 0.9rem; }
  .sum-row dt { grid-column: 1 / -1; }
}
/* the last step without an install behind it: Find my clock is the step (its own heading would say it twice) */
.step.is-find .find-h { display: none; }

/* ============================== 9b. PLACE, PHOTOS, FIND MY CLOCK ============================== */
textarea {
  width: 100%; min-height: 4.2rem; padding: 0.6rem 0.8rem; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: 0.65rem; background: var(--surface); color: var(--ink);
  font-size: 1rem; line-height: 1.45; transition: border-color 160ms ease, box-shadow 160ms ease;
}
textarea:focus-visible, input[type="search"]:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--red-tint), 0 0 0 1px var(--ink); }
input[type="search"] {
  width: 100%; min-height: 2.75rem; padding: 0.55rem 0.8rem 0.55rem 2.3rem;
  border: 1px solid var(--line-strong); border-radius: 0.65rem; color: var(--ink); font-size: 1rem;
  background: var(--surface) no-repeat 0.8rem center / 1rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%23857C71' stroke-width='1.7'/%3E%3Cpath d='M13 13l4.5 4.5' stroke='%23857C71' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
}
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* the place */
.place > * + * { margin-top: 0.6rem; }
.place-card {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1.2rem; flex-wrap: wrap;
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: calc(var(--radius) - 0.3rem); background: var(--surface);
  border-left: 3px solid var(--red);
}
.place-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.6rem; min-width: 0; }
.place-city { font-family: var(--f-display); font-weight: 400; font-size: 1.45rem; line-height: 1.1; letter-spacing: -0.01em; }
.place-country { font-size: 0.9rem; color: var(--ink-2); font-weight: 600; }
.place-ar { font-size: 0.95rem; color: var(--ink-3); flex-basis: 100%; text-align: left; }
.place-time { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; margin-left: auto; }
.place-clock { font-size: 1.4rem; font-weight: 600; letter-spacing: 0.02em; }
.place-off { font-size: 0.76rem; color: var(--ink-3); }
.place-pick { position: relative; }
.place-list {
  position: absolute; z-index: 95; left: 0; right: 0; top: calc(100% + 0.35rem); max-height: min(22rem, 60vh); overflow-y: auto;   /* (over Back and Next) */
  margin: 0; padding: 0.35rem; border: 1px solid var(--line-strong); border-radius: 0.8rem; background: var(--surface);
  box-shadow: var(--shadow); overscroll-behavior: contain;
}
.pl-country {
  display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.6rem 0.25rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.pl-country .pl-ar { letter-spacing: 0; text-transform: none; font-size: 0.8rem; font-weight: 600; }
.pl-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 3.4rem; align-items: baseline; gap: 0.8rem;
  padding: 0.5rem 0.6rem; border-radius: 0.5rem; cursor: pointer; font-size: 0.92rem;
}
.pl-item .pl-name { font-weight: 650; }
.pl-item .pl-ar { color: var(--ink-2); }
.pl-item .pl-time { text-align: right; font-size: 0.82rem; color: var(--ink-3); }
.pl-item[aria-selected="true"] { background: var(--red-tint); outline: 1px solid var(--red); outline-offset: -1px; }
.pl-item.is-current .pl-name::after { content: " · now"; color: var(--red-text); font-weight: 600; font-size: 0.8rem; }
@media (hover: hover) and (pointer: fine) { .pl-item:hover { background: var(--red-tint); } }
.pl-none { padding: 0.7rem; font-size: 0.86rem; color: var(--ink-3); }
.place-hint { font-size: 0.86rem; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.place-hint:empty { display: none; }
.place-hint .chip { border-color: var(--red); color: var(--red-text); }

/* faces drawn for Bahrain only, elsewhere; the Photos face without photos */
.faway {
  position: absolute; right: 0.5rem; top: 0.5rem; padding: 0.12rem 0.45rem; border-radius: 999px; display: none;
  background: rgba(17, 17, 17, 0.82); color: #F4EFE6; font-size: 0.62rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase;
}
.fcard.is-away { opacity: 0.62; }
.fcard.is-away .faway { display: block; }
.fcard.is-away .fpick, .fcard.is-away .fkey { cursor: not-allowed; }
.fcard.is-away .fthumb img { filter: grayscale(1) contrast(0.8); opacity: 0.5; }
.fcard.is-local .fthumb { background: #1d1a17; }
.fcard.is-stale .fthumb img { opacity: 0.35; }
.fcard.is-empty .fthumb img { opacity: 0; }

/* photos */
.ph-drop {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 1.1rem 1.2rem;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.ph-drop.is-over { border-color: var(--red); background: var(--red-tint); }
.ph-drop-t { font-size: 0.9rem; color: var(--ink-2); }
.ph-count { margin-left: auto; font-size: 0.82rem; color: var(--ink-3); }
.ph-drop .file-btn:has(+ .ph-drop-t), .ph-drop label.btn { cursor: pointer; }
.ph-drop:has(input:focus-visible) label.btn { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (hover: none) { .ph-paste { display: none; } }
.ph-msg { font-size: 0.86rem; color: var(--ink-2); }
.ph-msg:empty { display: none; }
.ph-msg.is-error { color: var(--red-text); font-weight: 600; }
.ph-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.6rem), 1fr)); gap: 0.6rem; touch-action: pan-y; }
.ph-strip:empty { display: none; }
.ph-strip.is-ordering { cursor: grabbing; }
.ph-item { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.ph-pick {
  position: relative; display: block; width: 100%; padding: 3px; border: 1px solid var(--line); border-radius: 0.55rem;
  background: #111; cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease, transform 140ms var(--ease-out);
}
.ph-pick canvas { width: 100%; height: auto; aspect-ratio: 800 / 480; border-radius: 2px; background: rgb(232, 230, 223); }
.ph-item.is-sel .ph-pick { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.ph-pick:active { transform: scale(0.98); }
.ph-n {
  position: absolute; left: 0.35rem; top: 0.35rem; min-width: 1.3rem; padding: 0 0.3rem; border-radius: 999px; text-align: center;
  background: rgba(17, 17, 17, 0.78); color: #F4EFE6; font-size: 0.66rem; line-height: 1.3rem;
}
.ph-badge {
  position: absolute; right: 0.35rem; bottom: 0.35rem; padding: 0.08rem 0.4rem; border-radius: 999px;
  font-size: 0.6rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; background: rgba(17, 17, 17, 0.78); color: #F4EFE6;
}
.ph-badge.is-new { background: var(--red); color: #fff; }
.ph-badge.is-changed { background: #C98A0B; color: #1A1206; }
.ph-badge.is-over { background: #6C645B; color: #fff; }
.ph-iname { font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-gone { grid-column: 1 / -1; font-size: 0.82rem; color: var(--warn-text); font-weight: 600; }

.ph-editor { display: grid; gap: 1rem; }
.ph-glass { padding: clamp(0.4rem, 1.4vw, 0.75rem); background: var(--bezel); border-radius: calc(var(--radius) - 0.1rem); box-shadow: var(--shadow); }
.ph-glass canvas {
  width: 100%; height: auto; aspect-ratio: 800 / 480; border-radius: 0.2rem; background: rgb(232, 230, 223);
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.ph-glass canvas:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.ph-under { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.7rem; }
.ph-hint { font-size: 0.8rem; color: var(--ink-3); flex: 1 1 14rem; }
.ph-panel { padding: 1rem 1.1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ph-panel > * + * { margin-top: 0.9rem; }
.ph-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.3rem 0.8rem; }
.ph-head .help { grid-column: 2; margin-top: 0; }
.ph-name-l { font-size: 0.86rem; font-weight: 700; }
.ph-tabs { display: flex; gap: 0.2rem; padding: 0.2rem; border-radius: 999px; background: var(--bg-deep); overflow-x: auto; scrollbar-width: none; }
.ph-tabs::-webkit-scrollbar { display: none; }
.ph-tabs button {
  flex: 1 0 auto; min-height: 2.2rem; padding: 0.3rem 0.9rem; border: 0; border-radius: 999px; background: transparent;
  font-size: 0.86rem; font-weight: 650; color: var(--ink-2); cursor: pointer; transition: background-color 160ms ease, color 160ms ease;
}
.ph-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(22, 18, 14, 0.12); }
.ph-tabs button:disabled { opacity: 0.4; cursor: not-allowed; }
.ph-tabs button:focus-visible { outline-offset: -2px; }
.ph-fixed { font-size: 0.84rem; color: var(--ink-2); padding: 0.6rem 0.8rem; border-radius: 0.6rem; background: var(--warn-tint); }
.ph-pane > * + * { margin-top: 0.8rem; }
.range { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) 3.4rem; align-items: center; gap: 0.6rem; font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.range input { width: 100%; accent-color: var(--red); }
.range output { text-align: right; font-size: 0.8rem; color: var(--ink-3); }
.ph-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ph-grid2 { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: flex-end; }
.ph-grid2 .label { margin-bottom: 0.4rem; }
.ph-date { align-self: center; }
.ph-cap-l { display: block; font-size: 0.86rem; font-weight: 700; margin-bottom: 0.45rem; }
.ph-styles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ph-styles .card { padding: 0.6rem 0.6rem 0.7rem; }
@media (max-width: 30rem) { .ph-styles .card-d { display: none; } .ph-styles .card { padding: 0.45rem 0.45rem 0.55rem; } .ph-styles .card-t { text-align: center; } }
.ph-style-px { width: 100%; max-width: 7.5rem; height: auto; aspect-ratio: 1; margin: 0 auto 0.4rem; border-radius: 0.45rem; background: rgb(232, 230, 223); }
.ph-pos { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; }
.ph-pos-grid { display: grid; grid-template-columns: repeat(3, 1.9rem); gap: 0.25rem; padding: 0.3rem; border-radius: 0.55rem; background: var(--bg-deep); }
.ph-pos-grid button {
  width: 1.9rem; height: 1.25rem; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 0.3rem;
  background: var(--surface); cursor: pointer;
}
.ph-pos-grid button span { width: 0.45rem; height: 0.45rem; border-radius: 50%; border: 1.5px solid var(--ink-3); }
@media (hover: hover) and (pointer: fine) { .ph-pos-grid button:hover { border-color: var(--red); } .ph-pos-grid button:hover span { border-color: var(--red); } }
.ph-foot { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.chip-del { margin-left: auto; color: var(--red-text); border-color: var(--red); }
.ph-private { margin-top: 1rem; }
.ph-dither { display: flex; }

/* install: photos, find my clock */
.actions-photos { font-size: 0.84rem; color: var(--ink-2); margin-top: 0.5rem !important; }
.find { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.find > * + * { margin-top: 0.8rem; }
.find-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem 1.2rem; }
.find-text { flex: 1 1 18rem; }
.find-h { font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; }
.find-head .help { margin-top: 0.2rem; }
.find-msg { font-size: 0.9rem; color: var(--ink-2); }
.find-msg:empty { display: none; }
.find-msg.is-error { color: var(--red-text); font-weight: 600; }
.find-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: 0.55rem 1rem; }
.find-facts dt { font-size: 0.66rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.find-facts dd { font-size: 0.9rem; font-weight: 600; overflow-wrap: anywhere; }
.find-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.find-link { font-size: 0.95rem; font-weight: 600; color: var(--red-text); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.find-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.find-actions .help { flex: 1 1 14rem; margin: 0; }
.find-old { font-size: 0.88rem; color: var(--ink-2); padding: 0.8rem 0.9rem; border-radius: 0.6rem; background: var(--warn-tint); }
.mac-hint {
  font-size: 0.82rem; color: var(--ink-2); padding: 0.55rem 0.75rem 0.55rem 2.1rem; border-radius: 0.55rem; background: var(--bg-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='7.2' fill='none' stroke='%23A80E20' stroke-width='1.6'/%3E%3Cpath d='M10 9v5M10 6.2v.2' stroke='%23A80E20' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 0.65rem 0.62rem; background-size: 1rem;
}
@media (max-width: 30rem) {
  .range { grid-template-columns: 5.2rem minmax(0, 1fr) 2.8rem; }
  .ph-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-panel { padding: 0.8rem; }
  .ph-head { grid-template-columns: minmax(0, 1fr); }
  .ph-head .help { grid-column: 1; }
  .pl-item { grid-template-columns: minmax(0, 1fr) auto 2.9rem; gap: 0.5rem; }
  .place-city { font-size: 1.25rem; }
  .chip-del { margin-left: 0; }
}

/* ============================== 10. FOOTER ============================== */
.foot { border-top: 1px solid var(--line); background: var(--bg-deep); }
.foot-in {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 1.5rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 2rem;
}
.foot h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; margin-bottom: 0.6rem; }
.foot p, .foot li { font-size: 0.86rem; color: var(--ink-2); text-wrap: pretty; }
.foot-list { display: grid; gap: 0.4rem; }
.foot a { color: var(--ink); text-underline-offset: 0.2em; }
.foot-base { max-width: var(--maxw); margin: 0 auto; padding: 1rem var(--gutter) 2rem; font-size: 0.76rem; color: var(--ink-3); }

/* ============================== 11. MOTION + CONTRAST ============================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(22, 18, 14, 0.4); --ink-3: #4F483F; }
  :root[data-theme="dark"] { --line: rgba(244, 239, 230, 0.45); --ink-3: #C2B8AB; }
}
@media (forced-colors: active) {
  .seg input:checked + span { outline: 2px solid Highlight; }
  .card:has(input:checked), .fcard.is-start, .mode-card[data-pick="basic"] { outline: 2px solid Highlight; }
  .progress-fill, .lc-fill { forced-color-adjust: none; background: Highlight; }
  .ph-item.is-sel .ph-pick, .pl-item[aria-selected="true"] { outline: 2px solid Highlight; }
}
@media (max-width: 47.99rem) { :root[data-step] { --top-h: 3.6rem; } }
@media (max-width: 40rem) {
  :root:not([data-step]) { --top-h: 6rem; }
  .top-nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .rail a { padding: 0.35rem 0.55rem; font-size: 0.78rem; }
  .actions .btn { flex: 1 1 100%; }
}
@media (max-width: 22rem) { .brand-name { display: none; } .brand-studio { margin-left: 0; } }

/* ============================== 12. NOTIFY ME (the waitlist) ============================== */
/* The band under the steps, shared with clock.bh (assets/js/waitlist.js, backend/waitlist.py; the same rules as
   styles.css §16, with this page's tokens). */
.notify-band {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}
.notify-copy h2 {
  font-family: var(--f-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.2rem);
}
.notify-copy .eyebrow + h2 { margin-top: 0.9rem; }
.notify-copy .lede { margin-top: 0; max-width: 36rem; }
.notify-form {
  position: relative; display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.3rem, 2.4vw, 1.9rem); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.notify-form::before {
  content: ""; position: absolute; top: -1px; left: clamp(1.3rem, 2.4vw, 1.9rem);
  width: 2.25rem; height: 3px; background: var(--red); border-radius: 0 0 3px 3px;
}
.notify-form .btn-solid { background: var(--red); color: #fff; }
@media (hover: hover) and (pointer: fine) { .notify-form .btn-solid:hover { background: var(--red-deep); } }
.notify {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.notify [lang="ar"] { font-family: "Noto Naskh Arabic", "Noto Sans Arabic", "Geeza Pro", "Segoe UI", system-ui, sans-serif; }
.notify-ar { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.85rem); line-height: 1.55; color: var(--ink-2); }
.notify-copy > * + * { margin-top: 0.9rem; }
.notify-copy h2 + .notify-ar { margin-top: 0.4rem; }
.notify-copy .section-sub[lang="ar"], .notify-copy .lede[lang="ar"] { margin-left: auto; }
.nf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1rem; }
.nf-field { display: block; min-width: 0; }
.nf-email, .nf-note { grid-column: 1 / -1; }
.nf-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem;
  margin-bottom: 0.4rem; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2);
}
.nf-label em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.nf-label [lang="ar"] { font-size: 0.9rem; }
.notify-form input, .notify-form select, .notify-form textarea {
  width: 100%; min-height: 2.75rem; padding: 0.55rem 0.8rem; margin: 0;
  border: 1px solid var(--line-strong); border-radius: 0.65rem; background: var(--bg); color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.4; transition: border-color 160ms ease, box-shadow 160ms ease;
}
.notify-form textarea { min-height: 4.2rem; resize: vertical; }
.notify-form select {
  appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%23857C71' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 0.75rem;
}
.notify-form input:focus-visible, .notify-form select:focus-visible, .notify-form textarea:focus-visible {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--red-tint), 0 0 0 1px var(--ink);
}
.notify-form [aria-invalid="true"] { border-color: var(--red); }
.nf-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.nf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 0.25rem; }
.nf-actions .btn { gap: 0.8rem; }
.nf-actions .btn [lang="ar"] { font-weight: 500; }
.nf-actions .btn:disabled { opacity: 0.55; cursor: progress; }
.nf-msg {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; min-width: 0; margin: 0;
  font-size: 0.875rem; font-weight: 600; line-height: 1.45; color: var(--ink-2);
}
.nf-msg:empty { display: none; }
.nf-msg:focus { outline: none; }
.nf-msg[data-tone="ok"] { color: var(--ok-text); }
.nf-msg[data-tone="bad"] { color: var(--red-text); }
.nf-fine {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem;
  font-size: 0.78rem; line-height: 1.55; color: var(--ink-3);
}
.notify-form.is-done .nf-grid, .notify-form.is-done .nf-actions .btn, .notify-form.is-done .nf-fine { display: none; }
.notify-form.is-done .nf-msg { font-size: 1.05rem; }
@media (max-width: 56rem) { .notify { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 30rem) { .nf-grid { grid-template-columns: minmax(0, 1fr); } .nf-label { flex-wrap: wrap; } }
