/* WhyKite's parent website: the TV's night sky, sized for a phone, dark only like the TV. The CSP has no font-src, so
   every web font is blocked: text uses the phone's own fonts. */
:root {
  --bg: #14162B; --bg2: #1E2148; --card: #262A55; --card2: #2F3468; --line: #3A3F78;
  --edge: #6B73B8; /* a field's or button's outline: 3:1 on --card, so it reads as a control */
  --text: #F6F3EA; --muted: #C4C2DA;
  --sun: #FFC94D; --mint: #6FE3B5; --sky: #7CC4FF; --coral: #FF8A7A;
  --head: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --r: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* buttons set their own display, which would beat the browser's [hidden] */
html {
  background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%;
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; /* 16px and up: iOS doesn't zoom into fields */
}
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(120% 50% at 50% -10%, var(--bg2), var(--bg) 70%) no-repeat;
  isolation: isolate; /* so a z-index: -1 decoration sits between body's sky and the page */
}
::selection { background: rgba(255, 201, 77, .35); }
html { scrollbar-color: var(--line) var(--bg); }
.bar, main, footer { width: 100%; max-width: 36rem; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.bar { padding-top: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: var(--text); text-decoration: none; font: 600 1.3rem/1 var(--head); }
main { flex: 1; padding-bottom: 32px; }
main:focus, h1:focus { outline: none; }
main[aria-busy="true"] { opacity: .6; transition: opacity .2s .2s; }
footer { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 20px; padding: 0 16px 16px; font-size: .9rem; }
footer a { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); }

h1 { font: 600 1.8rem/1.2 var(--head); margin: 8px 0 12px; }
h2 { font: 600 1.2rem/1.3 var(--head); margin: 28px 0 8px; }
h3 { font: 600 1.05rem/1.3 var(--head); margin: 20px 0 8px; }
.card > h2:first-child { margin-top: 0; }
p, ul { margin: 0 0 12px; }
ul { padding-left: 1.2em; }
li { margin-bottom: 6px; }
a { color: var(--sky); text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.lead { color: var(--muted); font-size: 1.05rem; text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
.small, small { color: var(--muted); font-size: .9rem; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.steps { display: flex; gap: 6px; max-width: 10rem; margin: 16px 0 4px; } /* the first-run steps, lit up to this one */
.steps i { flex: 1; height: 4px; background: var(--line); border-radius: 2px; }
.steps i.on { background: var(--sun); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; text-decoration: none; }

/* ---------- forms ---------- */
label { display: block; margin: 16px 0 6px; font-weight: 600; }
input, select { font: inherit; color: inherit; caret-color: var(--sun); }
/* A field, or .tel around one: a dark well with a 1px edge. Focus turns the edge sky blue and adds a soft ring. */
input:not([type=checkbox]):not([type=radio]), select, .tel {
  width: 100%; min-height: 52px; padding: 12px 16px; background: var(--bg); border: 1px solid var(--edge); border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #9896BD; opacity: 1; } /* 6:1 on the well */
select { /* Safari draws its own short select: drawn here instead, the arrow a data: image (the CSP allows data:) */
  appearance: none; -webkit-appearance: none; padding-left: 14px; padding-right: 32px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23C4C2DA' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 8px;
}
input:not([type=checkbox]):not([type=radio]):hover, select:hover, .tel:hover { border-color: var(--muted); }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, .tel:focus-within {
  border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky), 0 0 0 5px rgba(124, 196, 255, .2); outline: none;
}
.hint { margin: 8px 0 0; color: var(--muted); font-size: .9rem; text-wrap: pretty; }
.tel { display: flex; align-items: center; padding: 0; }
.tel span { flex: none; display: flex; align-items: center; gap: 12px; padding-left: 16px; color: var(--muted); font-weight: 600; }
.tel span::after { content: ""; width: 1px; height: 24px; background: var(--line); }
.tel > input[type=tel], .tel > input[type=tel]:focus { min-height: 50px; padding-left: 12px; border: 0; background: none; box-shadow: none; }
.otp { font-size: 1.4rem; font-variant-numeric: tabular-nums; letter-spacing: .4em; text-indent: .4em; text-align: center; }
.otp::placeholder { font-size: 1rem; letter-spacing: normal; }
.code { font-size: 1.3rem; font-variant-numeric: tabular-nums; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.unit > input[type=number], .unit > input[type=number]:focus { min-height: 50px; border: 0; background: none; box-shadow: none; font-variant-numeric: tabular-nums; }
.unit span { padding: 0 16px 0 0; font-weight: 400; }
.unit span::after { content: none; }
.unit span::before { content: ""; width: 1px; height: 24px; background: var(--line); }
button, .button {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin: 12px 0 0; padding: 12px 20px;
  font: 600 1.05rem/1.2 var(--head); color: var(--text); text-align: center; text-decoration: none;
  background: transparent; border: 1px solid var(--edge); border-radius: 14px; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s;
}
:is(button, .button):not(:disabled, [aria-disabled="true"]):hover { border-color: var(--muted); background: rgba(246, 243, 234, .05); }
:is(button, .button):not(:disabled, [aria-disabled="true"]):active { transform: translateY(1px); }
.primary { background: var(--sun); border-color: var(--sun); color: var(--bg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 20px -12px rgba(0, 0, 0, .8); }
.primary:not(:disabled, [aria-disabled="true"]):hover { background: #FFD772; border-color: #FFD772; }
.danger, .danger:not(:disabled, [aria-disabled="true"]):hover { border-color: var(--coral); color: var(--coral); }
.danger:not(:disabled, [aria-disabled="true"]):hover { background: rgba(255, 138, 122, .08); }
button:disabled, button[aria-disabled="true"] { opacity: .55; cursor: default; }
button[aria-disabled="true"] { cursor: progress; } /* form() sets it while the request runs */
button.link { display: inline-flex; width: auto; margin: 0; padding: 0 4px; border: 0; color: var(--sky); font: inherit; text-decoration: underline; text-underline-offset: .2em; }
button.link:not(:disabled):hover { background: none; color: var(--text); }
.quiet, .quiet:not(:disabled, [aria-disabled="true"]):hover { border-color: transparent; color: var(--sky); } /* a lesser choice: Skip, + Add */
.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 8px; }
.err { margin: 10px 0 0; color: var(--coral); font-weight: 600; }
.note { margin: 10px 0 0; color: var(--mint); }
.err:empty, .note:empty, p.code:empty { display: none; }
.flash { padding: 10px 14px; color: var(--mint); background: rgba(111, 227, 181, .12); border: 1px solid var(--mint); border-radius: 12px; }
.banner { margin: 0 0 16px; padding: 14px 16px; background: rgba(255, 201, 77, .1); border: 1px solid var(--sun); border-radius: var(--r); }
.card { margin: 16px 0; padding: 16px; background: var(--card); border: 0; border-radius: var(--r); }
dialog { width: min(34rem, calc(100% - 32px)); padding: 20px; color: var(--text); background: var(--card); border: 0; border-radius: var(--r); }
dialog::backdrop { background: rgba(10, 11, 25, .75); }
dialog h2 { margin-top: 0; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { float: left; width: 100%; margin: 16px 0 6px; padding: 0; font-weight: 600; } /* float: inside the box, like a label */
legend + * { clear: both; }
.user { padding: 18px; background: linear-gradient(var(--card), var(--bg2)); border: 1px solid rgba(246, 243, 234, .08); border-radius: 24px; }
.user > legend { display: flex; align-items: center; gap: 12px; margin-top: 0; font: 600 1.2rem/1.3 var(--head); overflow-wrap: anywhere; }
.user .face { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 1.6rem; background: rgba(255, 201, 77, .12); border-radius: 12px; }
.user .face:empty { display: none; }
.user .remove { margin-top: 16px; border-top: 1px solid rgba(246, 243, 234, .08); }
.kids .add, .kids .add:not(:disabled, [aria-disabled="true"]):hover { border: 1px dashed var(--edge); color: var(--sky); }
.kids .add:not(:disabled, [aria-disabled="true"]):hover { border-color: var(--sky); background: rgba(124, 196, 255, .06); }
.kids [type=submit] { position: sticky; bottom: 12px; z-index: 1; } /* Save stays in reach below a long list of cards */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pair label { margin-top: 0; font-weight: 400; color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; }
.check input { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--sun); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; } /* a segmented choice: the radios are hidden, the chosen one lit */
.chips label { position: relative; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin: 0; padding: 0 14px; font-weight: 400; border: 1px solid var(--edge); border-radius: 14px; cursor: pointer; }
.chips input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chips label:has(:checked) { background: rgba(255, 201, 77, .15); border-color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun); }
.chips label:has(:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
.chips .hint { margin-top: 0; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 12px; } /* the pay page's two plans: chips as cards */
.plans label { flex-direction: column; gap: 2px; min-height: 104px; padding: 14px; }
.plans b { font: 600 1.15rem/1.3 var(--head); }
.amount { white-space: nowrap; } /* a plan's price: large, after a year's worth of months struck out, small and grey */
.amount strong { font: 700 1.5rem/1.2 var(--head); color: var(--text); }
.amount s { margin-right: 4px; color: var(--muted); font-size: .95rem; text-decoration-thickness: 2px; text-decoration-color: var(--coral); }
.promise { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; } /* the trial's promises, each with a tick */
.promise li { position: relative; padding-left: 1.6em; font-size: 1.05rem; }
.promise li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 700; }
.landing .promise { margin-bottom: 16px; }
.avatars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.avatars > legend { grid-column: 1 / -1; margin-bottom: 0; }
.avatars label { position: relative; margin: 0; }
.avatars input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.avatars span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; font-size: 1.9rem; border: 1px solid var(--edge); border-radius: 14px; cursor: pointer; }
.avatars input:checked + span { background: rgba(255, 201, 77, .15); border-color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun); }
.avatars input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
summary { display: flex; align-items: center; gap: 8px; min-height: 48px; color: var(--coral); font-weight: 600; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "›"; font-size: 1.3rem; transition: transform .15s; }
details[open] > summary::after { transform: rotate(90deg); }
.remove { margin-top: 8px; }
.recovery summary { color: var(--sky); } /* Unlink's coral says "careful"; a code isn't */
p.code { margin: 12px 0 0; font-size: 2rem; font-weight: 700; letter-spacing: .2em; text-indent: .2em; } /* a code shown, not typed */

/* ---------- lists of switches: apps and videos ---------- */
/* A grouped card like Home's menu: rows under hairlines, the card's own edge closing the last one. */
.rows { margin: 0; padding: 0 16px; list-style: none; background: var(--card); border-radius: var(--r); }
.rows:empty { display: none; }
.rows > li { margin: 0; border-bottom: 1px solid rgba(246, 243, 234, .07); }
.rows > li:last-child { border-bottom: 0; }
.rows details { padding-bottom: 8px; }
.rows summary { min-height: 36px; margin-top: -8px; color: var(--muted); font-size: .9rem; font-weight: 400; }
/* An item's Themes and Remove share one line under it; the one opened takes the whole width. */
.rows > li:has(> details) { display: flex; flex-wrap: wrap; column-gap: 24px; }
.rows > li > .switch { flex: 1 0 100%; }
.rows > li > details { margin-top: 0; }
.rows > li > details[open] { flex-basis: 100%; }
.empty { padding: 12px 0; }
.more .check { align-items: center; min-height: 48px; margin: 0; } /* a themes' tick is a 48px target */
.more legend { margin-top: 8px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; margin: 0; padding: 8px 0; font-weight: 400; cursor: pointer; }
.switch .name { display: block; font-weight: 600; }
.switch small { display: block; }
.warn { color: var(--sun); }
.switch input {
  appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; margin: 0; border-radius: 16px; cursor: pointer;
  background: radial-gradient(circle at 16px 50%, var(--muted) 10px, transparent 11px), var(--bg); box-shadow: inset 0 0 0 1px var(--edge);
}
.switch input:checked { background: radial-gradient(circle at 36px 50%, var(--bg) 10px, transparent 11px), var(--mint); box-shadow: none; }
.switch input:disabled { opacity: .4; cursor: default; }

/* ---------- videos: channels found by name, each a picture, its name and counts, and Add ---------- */
.results { margin: 12px 0 0; padding: 0; list-style: none; }
.results:empty { display: none; }
.results li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.results img { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.results img.gone { visibility: hidden; }
.results li > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.results .name { display: block; font-weight: 600; }
.results small { display: block; }
.results .kids { color: var(--mint); }
.results a { display: inline-flex; align-items: center; min-height: 32px; font-size: .9rem; }
.results button { flex: none; width: auto; min-height: 44px; margin: 0; padding: 0 18px; }
.results .added { flex: none; color: var(--muted); font-size: .9rem; }

/* ---------- home: each TV as a card with its status, a dashed "add" tile, then the settings in three groups ---------- */
.ic { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tvs { margin: 0; padding: 0; list-style: none; }
.tv { padding: 18px 18px 6px; background: linear-gradient(var(--card), var(--bg2)); border: 1px solid rgba(246, 243, 234, .08); border-radius: 24px; }
.tv .top { display: flex; align-items: center; gap: 14px; }
.tv .top > div { flex: 1; min-width: 0; }
.tv .top .ic { width: 48px; height: 48px; padding: 11px; color: var(--sky); background: rgba(124, 196, 255, .14); border-radius: 14px; }
.tv h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.tv .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 0; }
.tv .say { margin: 14px 0 0; padding: 10px 14px; font-size: .95rem; background: rgba(246, 243, 234, .05); border-radius: 12px; }
.tv .say + .say { margin-top: 8px; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: .85rem; font-weight: 700; border-radius: 999px; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { color: var(--mint); background: rgba(111, 227, 181, .14); }
.pill.on::before { box-shadow: 0 0 0 3px rgba(111, 227, 181, .25); }
.pill.off, .pill.down { color: var(--coral); background: rgba(255, 138, 122, .14); }
.pill.offline { color: var(--muted); background: rgba(246, 243, 234, .08); }
/* the TV's two tools: rows under hairlines, each opening in place */
.tv .tools { margin-top: 14px; }
.tv .tools .remove { margin: 0; border-top: 1px solid rgba(246, 243, 234, .08); }
.tv .tools details[open] { padding-bottom: 12px; }
.tv .tools summary { justify-content: space-between; font-size: .95rem; }
.addtv {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; margin: 12px 0 0; color: var(--sky); font-weight: 600;
  text-decoration: none; border: 1px dashed var(--edge); border-radius: var(--r); transition: border-color .15s, background-color .15s;
}
.addtv .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.addtv:hover { border-color: var(--sky); background: rgba(124, 196, 255, .06); }
.group { margin: 32px 0 10px; color: var(--muted); font: 600 .95rem/1.3 system-ui, sans-serif; }
/* each group one list: an icon tile in the group's colour, the name and what it's for, a drawn chevron */
.menu { background: var(--card); border-radius: var(--r); overflow: hidden; }
.menu a { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 18px 10px 14px; color: var(--text); text-decoration: none; transition: background-color .15s; }
.menu a + a { border-top: 1px solid rgba(246, 243, 234, .07); }
.menu a:hover { background: rgba(246, 243, 234, .05); }
.menu a:focus-visible { outline-offset: -3px; }
.menu a::after { content: ""; flex: none; width: 8px; height: 8px; border: solid var(--muted); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.menu span { flex: 1; min-width: 0; }
.menu b { display: block; font-weight: 600; }
.menu small { display: block; margin-top: 1px; }
.menu .ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; }
.menu.sky .ic { color: var(--sky); background: rgba(124, 196, 255, .14); }
.menu.sun .ic { color: var(--sun); background: rgba(255, 201, 77, .14); }
.menu.mint .ic { color: var(--mint); background: rgba(111, 227, 181, .14); }
.say { margin: 12px 0 0; }
.signout { margin-top: 24px; }
.signout button { border-color: transparent; color: var(--muted); }
.delete-acct { margin-top: 24px; }

/* ---------- consent before the children: two promises, then one tick that lights up and wakes Agree ---------- */
.consent { margin-top: 24px; padding: 8px 20px 16px; background: linear-gradient(var(--card), var(--bg2)); border: 1px solid rgba(246, 243, 234, .08); border-radius: 24px; }
.promises { margin: 0; padding: 0; list-style: none; }
.promises li { display: flex; gap: 14px; margin: 0; padding: 16px 0; }
.promises li + li { border-top: 1px solid rgba(246, 243, 234, .08); }
.promises svg { flex: none; width: 40px; height: 40px; padding: 9px; fill: none; stroke: var(--mint); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; background: rgba(111, 227, 181, .12); border-radius: 12px; }
.promises span { align-self: center; text-wrap: pretty; }
.promises strong { color: var(--mint); }
.agree { margin: 8px 0 4px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--edge); border-radius: 14px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.agree:hover { border-color: var(--muted); }
.agree:has(:checked) { background: rgba(255, 201, 77, .1); border-color: var(--sun); }
.consent .quiet { margin-top: 4px; }
.kept { margin: 0 0 8px; border-top: 1px solid rgba(246, 243, 234, .08); } /* the full list, one tap away */
.kept summary { color: var(--sky); font-size: .95rem; }
.kept ul { margin: 0 0 8px; padding-left: 1.2em; }

/* ---------- the PIN: each field's hint turns mint when it's right, coral when the second stops matching ---------- */
.pins .hint.ok { color: var(--mint); }
.pins .hint.ok::before { content: "✓ "; }
.pins .hint.bad { color: var(--coral); font-weight: 600; }
.pins .otp[aria-invalid], .pins .otp[aria-invalid]:focus { border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral); }

/* Agree and the PIN's button wait in grey until the form is ready. Still tappable: the error says what's missing. */
.consent:has(.agree input:not(:checked)) .primary, .pins:not(.ready) .primary { background: var(--card2); border-color: var(--card2); color: var(--muted); box-shadow: none; }

/* ---------- history: filter chips, then each day's events ---------- */
.filter { display: flex; gap: 8px; margin: -6px -16px 6px; padding: 6px 16px; overflow-x: auto; scrollbar-width: none; } /* one row, swiped */
.filter::-webkit-scrollbar { display: none; }
.filter button { flex: none; width: auto; min-height: 44px; margin: 0; padding: 0 16px; font-weight: 400; border-radius: 999px; white-space: nowrap; }
.filter [aria-pressed="true"], .filter [aria-pressed="true"]:not(:disabled, [aria-disabled="true"]):hover { background: rgba(255, 201, 77, .15); border-color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun); }
.log li { display: flex; gap: 12px; padding: 10px 0; }
.log time { flex: none; width: 4.6em; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.log small { display: block; }
.log p { margin: 0; overflow-wrap: anywhere; }
.older { margin-top: 16px; }

.center { text-align: center; }
.pip { display: block; margin: 24px auto 8px; }
.legal h2 { margin-top: 32px; }

/* ---------- sign-in: Pip perched on the card's edge, a moon rising behind it, under the TV's night sky ---------- */
body:has(.signin) {
  background:
    radial-gradient(circle at 37px 52px, rgba(246, 243, 234, .5) 0 .9px, transparent 1.4px) 0 0 / 241px 241px,
    radial-gradient(circle at 190px 160px, rgba(246, 243, 234, .4) 0 .8px, transparent 1.3px) 0 0 / 241px 241px,
    radial-gradient(circle at 300px 60px, rgba(246, 243, 234, .75) 0 1.1px, transparent 1.6px) 0 0 / 373px 373px,
    radial-gradient(circle at 110px 290px, rgba(246, 243, 234, .55) 0 1px, transparent 1.5px) 0 0 / 373px 373px,
    radial-gradient(circle at 260px 340px, rgba(246, 243, 234, .6) 0 1.2px, transparent 1.7px) 0 0 / 461px 461px,
    radial-gradient(circle at 420px 210px, rgba(255, 233, 180, .9) 0 1.5px, transparent 2px) 0 0 / 557px 557px,
    radial-gradient(circle at 90px 470px, rgba(246, 243, 234, .7) 0 1.3px, transparent 1.8px) 0 0 / 557px 557px,
    radial-gradient(120% 60% at 50% -10%, var(--bg2), var(--bg) 70%) no-repeat;
}
body:has(.signin) .bar { display: none; } /* Pip and the heading carry the name here */
body:has(.signin) main { display: flex; flex-direction: column; padding-top: 112px; }
.signin {
  position: relative; width: 100%; max-width: 26rem; margin: auto; padding: 32px 28px 24px;
  background: linear-gradient(var(--card), var(--bg2)); border: 1px solid rgba(246, 243, 234, .08); border-radius: 24px;
  box-shadow: 0 32px 64px -32px rgba(0, 0, 0, .8);
}
.signin::before { /* behind the card (z-index -1 in body's stacking context), so the card's edge is its horizon */
  content: ""; position: absolute; z-index: -1; top: -96px; left: 50%; width: 152px; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(124, 196, 255, .17) 84%, rgba(124, 196, 255, 0)); /* the TV's glow */
}
.signin .perch { position: absolute; top: -90px; left: 50%; transform: translateX(-50%); } /* its feet on the card's top edge */
.signin h1, .signin .lead { text-align: center; text-wrap: balance; }
.signin h1 { margin: 0 0 8px; }
.signin .lead { margin-bottom: 4px; }
.signin .tel { margin-top: 28px; } /* the number box has no label above it */
.signin form:nth-of-type(2) { animation: arrive .25s cubic-bezier(.16, 1, .3, 1); } /* the code form, once the text is sent */
.signin .fine { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid rgba(246, 243, 234, .08); text-align: center; text-wrap: balance; }
.signin .fine span { display: block; margin-top: 2px; } /* the links get their own line, never split */
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 400px) { .signin { padding: 28px 20px 20px; } }
@media (max-width: 380px) { .signin h1 { font-size: 1.6rem; } } /* one line on a 360px phone */
@media (prefers-reduced-motion: reduce) { .signin form { animation: none; } }
@supports not selector(:has(*)) { .signin { margin-top: 112px; } } /* older browsers keep the bar: room for Pip below it */

/* ---------- the landing page: / for a visitor. Wider than the app, airy, a few big words per section. ---------- */
body:has(.landing) :is(.bar, main, footer) { max-width: 68rem; }
.enter { display: none; }
body:has(.landing) .bar { display: flex; align-items: center; justify-content: space-between; }
body:has(.landing) .enter {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--edge); border-radius: 999px;
  color: var(--text); font: 600 .95rem/1 var(--head); text-decoration: none;
}
.enter:hover { border-color: var(--muted); }
.landing section { padding: 48px 0; }
.landing section + section { border-top: 1px solid rgba(246, 243, 234, .07); }
/* One line at every width: the line is about 10em long, so 8vw fills a phone with room to spare, up to 5.5rem. */
.landing h1 { font-size: min(8vw, 5.5rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 12px; text-wrap: balance; }
.landing h2 { font-size: clamp(1.5rem, 5vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 12px; }
.landing .lead { font-size: clamp(1.05rem, 2.6vw, 1.3rem); max-width: 34rem; }
.landing .button.primary { display: inline-flex; width: 100%; max-width: 20rem; margin: 24px 0 0; padding: 14px 32px; font-size: 1.1rem; }
.landing .button.primary + .small { margin-top: 16px; }
.landing ul, .landing ol { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.landing li { margin: 0; }
.landing li b { display: block; font: 600 1.1rem/1.25 var(--head); }
.landing li span { display: block; color: var(--muted); margin-top: 4px; }
.landing .src { display: block; margin-top: 10px; color: var(--muted); font-size: .8rem; }
.landing .src a, a.src { color: var(--muted); }

.landing .hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 56px; }
.hero .lead { margin: 0 auto; }
.sky-art { width: 100%; max-width: 320px; margin-bottom: 8px; overflow: visible; }
.kite { transform-box: view-box; transform-origin: 163px 184px; animation: sway 6s ease-in-out infinite alternate; }
.stars circle { animation: twinkle 3s ease-in-out infinite alternate; }
.stars circle:nth-child(2n) { animation-delay: -1.5s; }
.stars circle:nth-child(3n) { animation-duration: 4.5s; }
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes twinkle { from { opacity: .25; } to { opacity: 1; } }

.brain { text-align: center; }
.brain .big {
  margin: 0; font: 700 clamp(3rem, 14vw, 6.5rem)/1 var(--head); letter-spacing: -.03em;
  background: linear-gradient(90deg, var(--sky), var(--mint) 50%, var(--sun)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brain .lead { margin: 12px auto 0; text-wrap: balance; }

.facts li { padding: 20px; background: var(--card); border-radius: 18px; }
.landing .facts b { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; color: var(--sun); letter-spacing: -.02em; }
.facts li:nth-child(3) b { color: var(--coral); }
.landing .facts span { color: var(--text); margin-top: 8px; }

.lessons { grid-template-columns: 1fr 1fr; }
.lessons li { padding: 14px 12px 14px 16px; background: var(--bg2); border-radius: 14px; border-left: 4px solid var(--sky); }
.landing .lessons b { font-size: 1rem; }
.landing .lessons span { font-size: .9rem; }
.lessons li:nth-child(4n+2) { border-color: var(--sun); }
.lessons li:nth-child(4n+3) { border-color: var(--mint); }
.lessons li:nth-child(4n) { border-color: var(--coral); }

/* Each TV screen in a frame of the same size, filling its width. */
.landing .does { gap: 40px; }
.does li { min-width: 0; } /* else a column grows to its screenshot's full width */
.shot { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 20px; margin-bottom: 16px; background: var(--bg2); border-radius: 18px; }
.shot img { width: 100%; height: auto; border: 5px solid #0B0C18; border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); } /* sized before it loads: no jump */
.landing .does small { color: var(--sky); font: 600 .8rem/1 var(--head); letter-spacing: .06em; text-transform: uppercase; }
.landing .does b { margin-top: 8px; font-size: 1.3rem; }

/* Words beside one screen: stacked on a phone, side by side from 40rem. */
.feature { display: grid; gap: 24px; align-items: center; }
div.feature { margin-top: 48px; }
.feature > * { min-width: 0; } /* as .does li */
.feature .shot { margin: 0; }
.feature h3 { margin: 0 0 8px; font-size: clamp(1.3rem, 3.5vw, 1.7rem); line-height: 1.2; }
.feature h3 + p { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 30rem; }

.faq { max-width: 46rem; margin-top: 16px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { justify-content: space-between; min-height: 64px; padding: 12px 0; color: var(--text); font: 600 1.1rem/1.3 var(--head); }
.faq summary::after { color: var(--sun); }
.faq p { margin: 0 0 20px; color: var(--muted); }
.faq a { color: var(--sky); }

.how { counter-reset: step; }
.how li { counter-increment: step; display: flex; align-items: center; gap: 16px; font: 600 1.05rem/1.3 var(--head); }
.how li::before {
  content: counter(step); flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--sun); color: var(--bg); font-weight: 700;
}

.close { text-align: center; }
.pricing { text-align: center; } /* the landing page's plans: the pay step's cards, centred */
.landing .pricing .lead { max-width: none; }
.pricing .plans { max-width: 34rem; margin: 24px auto 0; text-align: left; }
.pricing .plans label { text-align: center; }
.landing .pricing .promise { width: fit-content; margin: 20px auto 0; text-align: left; }
.landing .promise b { display: inline; font: inherit; font-weight: 700; } /* a promise reads as one sentence */
.pricing .button.primary { margin: 24px auto 0; }
.close h2 { max-width: 28rem; margin: 16px auto 0; }

@media (min-width: 40rem) {
  .facts { grid-template-columns: 1fr 1fr; gap: 16px; }
  .does, .feature { grid-template-columns: 1fr 1fr; }
  .feature { gap: 40px; }
  .facts li { padding: 24px; }
  .lessons { grid-template-columns: repeat(3, 1fr); }
  .lessons li { padding: 18px 18px 18px 22px; }
  .landing .lessons b { font-size: 1.1rem; }
  .landing .lessons span { font-size: 1rem; }
  .landing .how { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 56px; } /* the same gap after each step */
}
@media (min-width: 60rem) {
  .landing section { padding: 88px 0; }
  .landing .hero { padding: 24px 0 88px; }
  .sky-art { max-width: 400px; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .landing .does { gap: 56px 40px; }
}
@media (prefers-reduced-motion: reduce) { .kite, .stars circle { animation: none; } }
