/* Scoped overrides for the entry screen and single-image composer. */
:root { --faint:#666666; --header-height:78px; }
html[data-theme="dark"] { --faint:#b0b0b0; }
body, button, input, textarea, select, .sec, .lbl, .lead, .back { letter-spacing:0 !important; }
body, button, select { text-transform:none; }
#brandHome { border:0; background:none; padding:0; min-width:44px; min-height:44px; justify-content:center; cursor:pointer; }
#topbar #hublink, #topbar #adminlink, #topbar #signout { min-height:44px; padding:10px 12px; }
#topbar .langdd-btn, #topbar .themesw { min-height:44px; }
#topbar .themesw { flex-shrink:0; }
/* No blue tap flash on mobile; keyboard focus rings below stay. No double-tap zoom delay on controls. */
html, a, button, summary, label, [role="button"] { -webkit-tap-highlight-color:transparent; }
a, button, summary, label, select, [role="button"] { touch-action:manipulation; }
/* Native controls and scrollbars follow the chosen theme. */
:root { color-scheme:light; }
:root[data-theme="dark"] { color-scheme:dark; }button:focus-visible, a:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
.langdd-menu { max-height:calc(100svh - var(--header-height) - 24px); overflow-y:auto; }
.langdd-menu .langdd-row { grid-template-columns:minmax(0,1fr); }
.langdd-menu .langdd-opt { min-height:44px; }
.langdd-menu .langdd-dl, .langdd-menu .langdd-dl-gap, .langdd-menu .langdd-sep,
.langdd-menu .langdd-group, .langdd-menu .langdd-row:has(.langdd-name) { display:none; }
body .hscroll { height:calc(100svh - var(--header-height)) !important; }
#gate { padding:32px 20px; min-height:100svh; }
#gate .gate-card { max-width:448px; padding:32px; border:1px solid var(--line-strong); border-radius:24px !important; box-shadow:none; }
#gate .gate-card::before { display:none; }
#gate .gate-x { width:44px; height:44px; top:10px; right:10px; opacity:1; color:var(--muted); }
#gate .gate-x:hover { transform:none; }
#gate .tagline { font-size:15px; line-height:1.6; padding-inline:10px; margin:14px 0 26px; }
#gate .tabs { padding:4px; border-radius:12px; gap:4px; }
#gate .tabs button { min-height:44px; font-size:14px; line-height:1.3; padding:10px 8px; text-transform:none; letter-spacing:0; border-radius:8px !important; }
#gate .fld { margin-bottom:18px; }
#gate .lbl { font-size:14px; margin-bottom:8px; }
#gate input { min-height:50px; font-size:16px; border-radius:10px !important; background:var(--bg-2); }
#gate input::placeholder, #toolview #doc::placeholder { color:var(--faint); opacity:1; }
#gate input:focus { border-color:var(--ink); box-shadow:none; outline:2px solid var(--ink); outline-offset:2px; }
#gate .foot { color:var(--faint); font-size:13px; line-height:1.65; }
#gate .err { color:var(--ink); border:1px solid var(--warn-ink); background:var(--warn-bg); border-radius:8px; line-height:1.5; }
#gate .btn { min-height:50px; text-transform:none; letter-spacing:0; font-size:15px; }
#gate form[aria-busy="true"] button[type="submit"] { cursor:wait; opacity:.65; }
#gate form[aria-busy="true"] button[type="submit"]::after { content:""; display:inline-block; width:12px; height:12px; margin-inline-start:10px; border:2px solid currentColor; border-inline-end-color:transparent; border-radius:50%; vertical-align:middle; animation:auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform:rotate(360deg); } }
#toolview, #ext { padding-top:28px !important; padding-bottom:48px; text-align:start; }
#toolview .btn, #ext .btn { text-transform:none; letter-spacing:0 !important; box-shadow:none !important; }
#toolview > .lead, #ext > .lead { font-size:42px !important; line-height:1.15; letter-spacing:0; max-width:25ch; text-align:start !important; }
#toolview .back, #ext .back { display:inline-flex; align-items:center; min-height:44px; background:transparent; color:var(--muted); margin:0 0 24px; font-family:inherit; font-size:14px; text-transform:none; }
#toolview .sub, #ext .sub { max-width:65ch; font-size:16px; line-height:1.7; }
#toolview .sec, #toolview .col-h { letter-spacing:0 !important; }
#toolview #doc { font-size:16px; }
#ext { max-width:1040px; }
#ext .card, #ext .card.accent, #ext .ext-steps { border:0 !important; border-top:1px solid var(--line) !important; border-radius:0 !important; background:transparent !important; padding:28px 0 !important; max-width:none; box-shadow:none; }
#ext .card > div:not(.sec), #ext .ext-intro, #ext .muted-note { max-width:70ch; }
#ext .card .sec, #ext .ext-steps > .sec { color:var(--ink) !important; font-size:18px !important; letter-spacing:0; text-transform:none; }
#ext .ext-steps ol { grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px; }
#ext .ext-steps ol li { padding:42px 0 0 !important; border:0; font-size:15px; }
#ext .ext-steps ol li::before { top:0; inset-inline-start:0; }
#ext .btn { max-width:100%; white-space:normal; text-align:center; }
@media(max-width:760px) {
  #topbar .wrap { padding-inline:16px; }
  #topbar #hublink { padding-inline:8px; }
  #topbar #signout { width:44px !important; height:44px !important; }
  #gate .gate-card { padding:28px 22px; }
  #gate { padding:20px 16px; }
  #toolview > .lead, #ext > .lead { font-size:30px !important; }
  #ext .ext-steps ol { grid-template-columns:minmax(0,1fr); }
  #ext .ext-steps ol li { padding-block:0 !important; padding-inline-start:44px !important; }
  #toolview .controls { gap:10px; }
}
@media(max-width:360px) {
  #topbar .wrap { padding-inline:12px; }
  #topbar .langdd-btn { padding-inline:10px; gap:6px; }
  #langddLabel { font-size:0; }
  #langddLabel::after { content:attr(data-short); font-size:12px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  #gate form[aria-busy="true"] button[type="submit"]::after { animation:none; }
}
/* The router owns both halves of the page transition. */
body #hub:not([hidden]), body #toolview:not([hidden]), body #ext:not([hidden]) { animation:none; }
.view:focus { outline:none; }
#signout { border:0; background:none; font:inherit; font-size:13.5px; cursor:pointer; align-items:center; gap:6px; }
/* One casing for every button: sentence case. Older layers made the primary button
   uppercase and result buttons lowercase, so three styles sat on one screen. */
.btn, .btn.gold, #out .btn { text-transform:none !important; letter-spacing:0 !important; }
/* Your own rehearsal lines: dark text on amber (about 9.6:1). A later layer made it near-white (about 1.7:1). */
.bubble.you { color:#1A1206 !important; }
/* The tab panel is the card; the card inside it draws no second frame. */
#out .an-stage .card { border:0 !important; padding:0 !important; background:none !important; box-shadow:none !important; margin:0 !important; }
/* Space between the reply card's note and its button. */
#out .reply-card > .btn { margin-top:14px; }
/* Amber text is fine on black but 1.9:1 on white; the light theme uses the darker accent ink (about 4.9:1). */
[data-theme="light"] .codeval { color:var(--accent-ink); }
#signout svg { width:18px; height:18px; flex-shrink:0; }
#signout:not([hidden]) { display:inline-flex; }
#intro .hero { align-items:flex-start; padding:40px 6vw !important; width:94vw !important; max-width:94vw !important; }
#intro .hero .mega { font-size:144px !important; letter-spacing:0 !important; transition:font-size .3s ease, margin .3s ease; }
#intro .hero-line { font-size:23px !important; line-height:1.4; max-width:38ch; letter-spacing:0; }
#intro .hero::after, #intro .hero .cube { display:none !important; }
.entry-actions { display:flex; flex-wrap:wrap; align-items:center; gap:16px 24px; margin-top:28px; }
.entry-actions[hidden], .home-choices[hidden], .attachment[hidden] { display:none !important; }
.entry-membership { flex-basis:100%; font-size:13px; color:var(--muted); margin:0; }
.entry-membership a, .about-link a { color:inherit; text-underline-offset:3px; }
.about-link { margin:12px 0 0; font-size:13px; color:var(--muted); }
/* The link closes the footer, so it takes over the footer's bottom spacing. */
#toolview footer { padding-bottom:0; }
#toolview .about-link { margin:14px 0 72px; padding-bottom:env(safe-area-inset-bottom); }
#hublink, #entrySignin { border:0; background:none; font-family:inherit; letter-spacing:0; cursor:pointer; }
#entrySignin { min-height:48px; min-width:88px; padding:12px 18px; }
#intro { position:relative; }
#intro:not(.returning) .hscroll { scroll-snap-type:x mandatory !important; overscroll-behavior-x:contain; }
/* One panel per screen, no divider: a 6% sliver of the next panel's empty padding read as a
   glitch. --edge is the header logo's inset (set by aethel-landing.js) so text lines up with it. */
#intro:not(.returning) .panel { flex:0 0 100%; width:100% !important; max-width:100% !important; border-inline-end:0 !important; padding:48px var(--edge, 6vw) 90px !important; scroll-snap-align:start !important; scroll-snap-stop:always; overflow-y:auto; justify-content:safe center !important; opacity:1 !important; transform:none !important; transition:none !important; }
#intro:not(.returning) .panel:last-child { flex-basis:100%; width:100% !important; max-width:100% !important; border-inline-end:0; }
#intro:not(.returning) .panel > * { flex-shrink:0; }
#intro:not(.returning) .hero .mega { transition:none; }
#intro:not(.returning) .codebox { max-width:100%; }
#intro:not(.returning) .codeval { font-size:24px; letter-spacing:0; overflow-wrap:anywhere; }
#intro:not(.returning) .p-head { font-size:48px !important; letter-spacing:0; }
#intro:not(.returning) .p-lede { font-size:18px !important; }
.landing-content { width:100%; max-width:1100px; margin-inline:0; }
@media(min-width:1000px) {
  .landing-content { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:24px 64px; }
  .landing-content > .p-head { margin:0; }
  .landing-content > .cube-row { grid-column:1 / -1; }
  .access .landing-content > .p-lede { grid-column:1; grid-row:2; }
  .access .landing-content > .codebox { grid-column:2; grid-row:1; margin:0; justify-self:start; }
  .access .landing-content > .access-how { grid-column:2; grid-row:2; }
}
.landing-nav { position:absolute; inset-inline-end:var(--edge, 6vw); bottom:max(20px, env(safe-area-inset-bottom)); display:flex; align-items:center; gap:10px; background:var(--bg); border-radius:24px; }
.landing-nav button { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; border:1px solid var(--line-strong); background:var(--bg); color:var(--ink); cursor:pointer; }
.landing-nav button svg { width:18px; height:18px; }
.landing-nav button:disabled { opacity:.3; cursor:default; }
.landing-nav button:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
#landingPosition { min-width:48px; text-align:center; font-size:13px; font-variant-numeric:tabular-nums; color:var(--muted); }
[dir=rtl] .landing-nav svg { transform:scaleX(-1); }
#intro.returning .landing-nav { display:none; }
#intro.returning .hscroll { height:auto !important; min-height:calc(100svh - 78px); overflow:visible; display:block; }
#intro.returning .panel:not(.hero) { display:none; }
#intro.returning .hero { width:100% !important; max-width:100% !important; min-height:calc(100svh - 78px); height:auto; justify-content:center !important; }
#intro.returning .hero .mega { font-size:88px !important; margin-bottom:16px !important; }
.home-choices { width:100%; max-width:1320px; margin-top:32px; }
#homeChoices .hub-grid { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:20px !important; border:0 !important; margin:0 !important; max-width:none; }
#homeChoices .hub-card { align-items:flex-start !important; text-align:start !important; min-height:240px !important; padding:28px !important; gap:12px; border:1px solid var(--line) !important; border-radius:var(--r-xl) !important; background:var(--surface) !important; color:var(--ink) !important; }
#homeChoices .hub-card::before, #homeChoices .hub-card::after, #homeChoices .hub-ic { display:none !important; }
#homeChoices .hub-card .hub-name { font-size:32px !important; letter-spacing:0 !important; line-height:1.12; margin:0; overflow-wrap:anywhere; }
#homeChoices .hub-card .hub-desc { display:block !important; font-size:15px; line-height:1.55; margin:0 !important; color:var(--muted) !important; max-width:38ch; }
#homeChoices .hub-open { margin-top:auto !important; padding-top:14px; letter-spacing:0 !important; color:var(--muted) !important; }
#homeChoices .hub-card:hover { background:var(--bg-2) !important; border-color:var(--ink) !important; }
#homeChoices .hub-card:focus-visible, #getStarted:focus-visible, #hublink:focus-visible, #entrySignin:focus-visible { outline:2px solid var(--ink) !important; outline-offset:5px; }
.choices-enter { animation:choices-enter .28s ease-out; }
.choices-expand { animation:choices-expand .34s ease-out; transform-origin:top; }
@keyframes choices-enter { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes choices-expand { from { opacity:0; transform:translateY(16px) scaleY(.94); } to { opacity:1; transform:none; } }
#composer { border:1px solid var(--line-strong); border-radius:var(--r-xl); background:var(--surface); padding:16px; }
#composer:focus-within { border-color:var(--ink); }
#toolview #composer textarea#doc { display:block; background:transparent !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; outline:none !important; padding:20px 22px !important; min-height:230px; width:100%; resize:vertical; }
#toolview #langpacks { margin-top:32px; padding:18px 22px; border:1px solid var(--line); border-radius:var(--r-xl); background:transparent; }
#langpacks summary { display:grid; grid-template-columns:auto minmax(0,1fr) 18px; gap:12px; align-items:center; }
#langpacks summary .sec { margin:0; }
#langpacks summary svg { width:18px; height:18px; transition:transform .2s ease; }
#langpacks[open] summary svg { transform:rotate(180deg); }
#langpacks summary:focus-visible { outline:2px solid var(--ink); outline-offset:6px; border-radius:4px; }
#attachment { position:relative; width:156px; margin:4px 4px 12px; padding:6px; border:1px solid var(--line-strong); border-radius:8px; background:var(--bg); }
#attachmentPreview { width:142px; height:100px; object-fit:contain; display:block; background:var(--bg-2); border-radius:4px; }
.attachment-name { display:block; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:6px 2px 2px; text-transform:none; }
.attachment-remove { position:absolute; top:-10px; right:-10px; width:30px; height:30px; display:grid; place-items:center; border:1px solid var(--line-strong); border-radius:50%; background:var(--ink); color:var(--bg); cursor:pointer; font-size:22px; line-height:1; }
.attachment-picker { min-height:46px; padding:0 18px 0 15px !important; display:inline-flex; align-items:center; gap:8px; }
.attachment-picker svg { width:20px; height:20px; flex:none; }
#ocrStatus { flex-basis:100%; text-transform:none; }
#replaceScreenshot { width:min(400px,calc(100vw - 40px)); padding:24px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--ink); margin:auto; }
#replaceScreenshot::backdrop { background:rgb(0 0 0 / .6); }
#replaceScreenshot p { margin:0 0 20px; font-size:18px; }
#replaceScreenshot .controls { justify-content:flex-end; }
@media(max-width:760px) {
  #intro:not(.returning) .panel { padding:28px var(--edge, 6vw) 88px !important; }
  #intro:not(.returning) .p-head { font-size:30px !important; }
  #intro:not(.returning) .p-lede { font-size:15px !important; }
  #intro:not(.returning) .codeval { font-size:20px; }
  #topbar #signout:not([hidden]) { display:inline-flex !important; }
  #topbar #signout { width:30px; height:36px; padding:4px; justify-content:center; flex-shrink:0; }
  #topbar #signout span { display:none; }
  #topbar .bar-right { gap:6px !important; flex-wrap:wrap; justify-content:flex-end; }
  #topbar .wrap { gap:8px; height:auto; min-height:60px; padding-block:8px; }
  #intro .hero { padding:28px 6vw !important; }
  #intro .hero .mega { font-size:76px !important; }
  #intro .hero-line { font-size:18px !important; }
  #intro.returning .hero { justify-content:flex-start !important; min-height:calc(100svh - 60px); }
  #intro.returning .hero .mega { font-size:64px !important; }
  #intro.returning .hscroll { min-height:calc(100svh - 60px); }
  .home-choices { margin-top:24px; }
  #homeChoices .hub-grid { grid-template-columns:minmax(0,1fr) !important; gap:12px !important; }
  #homeChoices .hub-card { min-height:174px !important; padding:20px !important; }
  #homeChoices .hub-card .hub-name { font-size:26px !important; }
  #homeChoices .hub-card .hub-desc { font-size:14px; }
  #homeChoices .hub-open { padding-top:0; }
  #toolview #composer textarea#doc { min-height:170px; padding:10px !important; }
  #toolview #langpacks { padding:16px; }
  #langpacks summary { grid-template-columns:minmax(0,1fr) 18px; }
  #langpacks summary .lp-sum { display:none; }
}
@media(max-height:650px) and (min-width:761px) {
  #intro.returning .hero { padding-block:22px !important; }
  #intro.returning .hero .mega { font-size:64px !important; }
  #homeChoices .hub-card { min-height:190px !important; }
}
@media(prefers-reduced-motion:reduce) {
  #intro .hero .mega { transition:none; }
  .choices-enter, .choices-expand { animation:none; }
  #langpacks summary svg { transition:none; }
}


/* ===== Landing redesign: real product screenshots, one layout family per panel ===== */
.shot { margin:0; height:min(66vh, 600px); aspect-ratio:780 / 1688; border-radius:32px; overflow:hidden; border:1px solid var(--line-strong); background:var(--bg-2); box-shadow:0 34px 70px -42px rgba(0,0,0,.45); flex-shrink:0; }
.shot-img { display:block; width:100%; height:100%; object-fit:cover; object-position:top; }
.shot-light { display:none; }
[data-theme="light"] .shot-dark { display:none; }
[data-theme="light"] .shot-light { display:block; }

/* Hero: copy left, the real result on the right. */
.hero-layout { width:100%; max-width:1100px; display:grid; grid-template-columns:minmax(0,1fr); align-items:center; gap:56px; }
.hero-copy { min-width:0; }
#intro:not(.returning) .hero .hero-line { max-width:30ch; }
@media(min-width:1000px) { .hero-layout { grid-template-columns:minmax(0,1fr) auto; } }
@media(max-width:999px) { .hero-shot { display:none; } }
#intro.returning .hero-shot { display:none; }

/* Screenshot + copy panels; lp-flip puts the picture first on desktop. */
#intro:not(.returning) .lp-split .landing-content { display:flex; flex-direction:column; gap:28px; }
.lp-split .lp-copy { display:flex; flex-direction:column; align-items:flex-start; gap:18px; max-width:52ch; }
.lp-split .lp-copy .p-head, .lp-split .lp-copy .p-lede { margin:0 !important; }
.lp-split .lp-copy .btn { margin-top:8px; }
@media(min-width:1000px) {
  #intro:not(.returning) .lp-split .landing-content { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:72px; }
  #intro:not(.returning) .lp-split:not(.lp-flip) .landing-content { grid-template-columns:minmax(0,1fr) auto; }
}
@media(max-width:999px) {
  .lp-split .lp-copy { order:1; }
  .lp-split .shot { order:2; height:min(46svh, 420px); }
}

/* How it reads a letter: an open row of steps, no boxes. */
#intro:not(.returning) .lp-steps .landing-content { display:block; }
.steps { list-style:none; margin:40px 0 0; padding:0; display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:28px; }
.steps li { border-top:2px solid var(--line-strong); padding-top:18px; display:flex; flex-direction:column; gap:8px; }
.steps li:first-child { border-top-color:var(--accent); }
.steps b { font-size:20px; font-weight:700; letter-spacing:-.01em; color:var(--ink); }
.steps p { margin:0; font-size:15px; line-height:1.55; color:var(--muted); }
@media(max-width:999px) { .steps { grid-template-columns:minmax(0,1fr); gap:0; margin-top:24px; } .steps li { padding:14px 0; border-top-width:1px; } }

/* The privacy statement stands alone, centred. */
#intro:not(.returning) .lp-statement .landing-content { display:block; max-width:880px; margin-inline:auto; text-align:center; }
#intro:not(.returning) .lp-statement .p-head { font-size:clamp(38px, 5.4vw, 72px) !important; line-height:1.04; letter-spacing:-.025em; text-wrap:balance; }
#intro:not(.returning) .lp-statement .p-lede { max-width:56ch; margin:22px auto 0 !important; }

/* Three promises: heading left, large stacked rows right. */
.promises { list-style:none; margin:0; padding:0; }
.promises li { padding:22px 0; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:6px; }
.promises li:last-child { border-bottom:1px solid var(--line); }
.promises b { font-size:24px; font-weight:700; letter-spacing:-.01em; color:var(--ink); }
.promises p { margin:0; font-size:16px; line-height:1.55; color:var(--muted); max-width:52ch; }
@media(min-width:1000px) { #intro:not(.returning) .lp-promises .landing-content { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); align-items:start; } }
@media(max-width:999px) { .promises { margin-top:20px; } .promises b { font-size:20px; } .promises li { padding:16px 0; } }

/* Hub: one casing everywhere. An older rule lowercased the card names and links. */
.hub-card .hub-name, .hub-card .hub-open, .hub-card .hub-desc { text-transform:none !important; }

/* Four panels, not seven. The reading steps sit under "It reads the letter with you",
   the three promises under the no-outside-AI statement, the access line on the last. */
.lp-reads .steps { grid-template-columns:minmax(0,1fr); gap:0; margin:4px 0 0; width:100%; }
.lp-reads .steps li { flex-direction:row; align-items:baseline; gap:16px; padding:11px 0; border-top-width:1px; }
.lp-reads .steps li:last-child { border-bottom:1px solid var(--line); }
.lp-reads .steps b { flex:0 0 9.5em; font-size:16px; }
.lp-reads .steps p { font-size:15px; }
#intro:not(.returning) .lp-statement .landing-content { max-width:1100px; }
.lp-statement .promises { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:32px; margin-top:48px; text-align:start; }
.lp-statement .promises li, .lp-statement .promises li:last-child { border-top:2px solid var(--line-strong); border-bottom:0; padding:18px 0 0; }
.lp-statement .promises li:first-child { border-top-color:var(--accent); }
.lp-statement .promises b { font-size:20px; }
.lp-statement .promises p { font-size:15px; }
.lp-final .access-how { margin:4px 0 0; }
.support-line { margin:0; font-size:15px; color:var(--muted); }
.support-line a { color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
.corner-help { position:absolute; inset-inline-start:var(--edge, 6vw); bottom:max(20px, env(safe-area-inset-bottom)); z-index:5;
  display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 16px; border:1px solid var(--line-strong); border-radius:999px;
  background:var(--bg); color:var(--ink); font-size:14px; font-weight:600; text-decoration:none; }
.corner-help svg { width:17px; height:17px; }
.corner-help:hover { border-color:var(--ink); }
.corner-help:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
#intro.returning .corner-help { display:none; }
@media(max-width:999px) {
  .lp-reads .steps li { flex-direction:column; gap:2px; padding:8px 0; }
  .lp-reads .steps b { flex:none; font-size:15px; }
  .lp-reads .steps p { font-size:14px; }
  .lp-statement .promises { grid-template-columns:minmax(0,1fr); gap:0; margin-top:24px; }
  .lp-statement .promises li, .lp-statement .promises li:last-child { border-top-width:1px; padding:14px 0; }
  .lp-statement .promises b { font-size:17px; }
}
#intro:not(.returning) .lp-statement .p-head { margin-inline:auto !important; max-width:16ch; }
@media(max-width:640px) {
  /* On a phone the five step names say enough; the screenshot stays on screen. */
  .lp-reads .steps { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); column-gap:16px; }
  .lp-reads .steps li { border-bottom:0 !important; padding:9px 0; }
  .lp-reads .steps p { display:none; }
}

/* Passwords: a Show button inside the field, and the rules ticking off as you type. */
.pw-wrap { position:relative; }
.pw-wrap input { width:100%; padding-inline-end:84px !important; }
.pw-show { position:absolute; inset-inline-end:6px; top:50%; transform:translateY(-50%); min-height:38px; min-width:64px; padding:0 12px;
  border:0; border-radius:8px; background:transparent; color:var(--ink); font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.pw-show:hover { background:var(--bg); }
.pw-show:focus-visible { outline:2px solid var(--ink); outline-offset:1px; }
.pw-rules { list-style:none; margin:10px 0 0; padding:0; display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:6px 14px; font-size:13.5px; color:var(--muted); }
.pw-rules li { display:flex; align-items:center; gap:8px; }
.pw-rules li::before { content:""; flex:none; width:14px; height:14px; border-radius:50%; border:1.5px solid var(--line-strong); box-sizing:border-box; }
.pw-rules li.ok { color:var(--ink); }
.pw-rules li.ok::before { border-color:var(--ink); background:var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
[data-theme="dark"] .pw-rules li.ok::before { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-4.9' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
/* Panel 2 on a laptop: a wider column keeps each step on one line, so the panel fits a
   1536x750 window (a 1920 screen at 125% scaling) without scrolling. */
@media (min-width:1000px) {
  .lp-reads .lp-copy { max-width:64ch; }
  .lp-reads .steps li { padding:9px 0; }
}
@media (min-width:1000px) and (max-height:820px) {
  .lp-reads .lp-copy { gap:14px; }
  .lp-reads .steps li { padding:7px 0; }
}
@media (min-width:1000px) and (max-height:680px) {
  #intro:not(.returning) .lp-reads .p-head { font-size:clamp(34px, 6.2vh, 44px) !important; }
  .lp-reads .steps li { padding:5px 0; }
}

/* Help panel: the pilot contact, opened from Help in the corner or "Get help". */
.help-dialog { position:fixed; inset:0; margin:auto; height:fit-content; width:min(420px, calc(100vw - 32px)); padding:28px 26px 22px; border:1px solid var(--line-strong); border-radius:20px;
  background:var(--surface); color:var(--ink); box-shadow:none; }
.help-dialog::backdrop { background:rgba(0,0,0,.55); }
.help-title { margin:0 0 8px; font-size:24px; font-weight:700; letter-spacing:-.01em; }
.help-body { margin:0 0 14px; font-size:15px; line-height:1.55; color:var(--muted); }
.help-number { margin:0 0 18px; font-size:22px; font-weight:600; letter-spacing:.02em; user-select:all; }
.help-actions { display:flex; flex-wrap:wrap; gap:10px; }
.help-actions .btn { min-height:46px; display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.help-close { display:block; margin:18px 0 0 auto; min-height:40px; padding:0 14px; border:0; background:none; color:var(--muted); font:inherit; font-size:14px; cursor:pointer; }
.help-close:hover { color:var(--ink); }
.support-line .support-link { font:inherit; color:var(--ink); text-decoration:underline; text-underline-offset:3px; background:none; border:0; padding:0; cursor:pointer; }
.help-number + .help-email { margin-top:-12px; }
.help-email { margin:0 0 18px; font-size:17px; font-weight:600; user-select:all; overflow-wrap:anywhere; }

/* Three hub cards: smaller names between phone and wide desktop so long ones fit. */
@media(min-width:761px) and (max-width:1100px) {
  #homeChoices .hub-card { padding:22px !important; }
  #homeChoices .hub-card .hub-name { font-size:24px !important; }
  #homeChoices .hub-card .hub-desc { font-size:14px; }
}
/* "Explain my letter" | "Check any message": a two-part switch above the tool's heading. */
#toolview .mode-switch { display:inline-flex; gap:0; margin:4px 0 18px; border:1px solid var(--line-strong); border-radius:999px; padding:3px; background:var(--surface); max-width:100%; }
#toolview .mode-btn { min-height:40px; padding:8px 18px; border:0; border-radius:999px; background:transparent; color:var(--muted); font:inherit; font-size:14px; font-weight:600; line-height:1.2; cursor:pointer; text-transform:none; letter-spacing:0; }
#toolview .mode-btn[aria-pressed="true"] { background:var(--ink); color:var(--bg); }
#toolview .mode-btn:not([aria-pressed="true"]):hover { color:var(--ink); }
#toolview .mode-btn:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
@media(max-width:420px) { #toolview .mode-switch { display:flex; } #toolview .mode-btn { flex:1; padding:8px 10px; } }
/* "Get the extension" in the top bar: a plain link like Return. The extension runs on desktop Chrome and Edge only, so phones keep the hub card and a one-line header. */
#topbar #extlink { min-height:44px; padding:10px 8px; border:0; background:none; color:inherit; font-family:inherit; font-size:12px; letter-spacing:0; cursor:pointer; }
#topbar #extlink:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
@media(max-width:760px) { #topbar #extlink { display:none !important; } }

/* Keyboard users: first Tab stop, out of sight until it has focus. */
.skip-link { position:fixed; left:16px; top:-64px; z-index:1000; padding:10px 14px; background:var(--bg); color:var(--ink); border:1px solid var(--ink); border-radius:10px; }
.skip-link:focus { top:12px; }

.gate-legal { font-size:13px; line-height:1.45; color:var(--muted); margin:2px 0 12px; }
.gate-legal a { color:inherit; text-decoration:underline; }
