/* Midnight glass: the portal's skin. Colours come only from midnight.css (design/themes/midnight.css);
   the rules of the look (gold = a lit city or the one action that matters; one hero per screen) are in the theme's
   handover. tokens.css (the shared console tokens) is still linked first and is not used here. */

@font-face { font-family: "Geist"; src: url(geist.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
/* Same shipped WOFF2 under a neutral family name so :lang(zh-Hant) / :lang(ja) keep the shipped Latin face ahead of
   system CJK fallbacks without adding a web font or repeating the face token outside midnight.css. */
@font-face { font-family: "PortalLatin"; src: url(geist.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --mg-edge: max(var(--mg-gutter), calc((100vw - var(--mg-width-wide)) / 2)); --mg-check-corner: 5px; interpolate-size: allow-keywords;
  --mg-ring-fade: outline-color var(--mg-t-quick) var(--mg-ease); }  /* the page's left edge; a 20 px check box's corner; the focus ring arrives in step with the control's own change */
html { background: var(--mg-bg); color: var(--mg-ink); overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.mg { font-family: var(--mg-font); font-size: var(--mg-fs-body); line-height: var(--mg-lh-body); background: var(--mg-bg); overflow-x: clip; min-height: 100svh; display: flex; flex-direction: column; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--mg-act-ring); outline-offset: 4px; border-radius: 6px; }  /* one focus style: the gold ring */
/* at rest the ring is the same line in a transparent colour, so focus fades it in over --mg-t-quick and, leaving, fades it
   out (with no line at rest it snapped off in one frame: agy M-06); contrast themes draw no line at rest (end of file) */
:where(a, button, input, summary, label, [tabindex]) { outline: 2px solid transparent; outline-offset: 4px; transition: var(--mg-ring-fade); }
:where(input) { outline-offset: 3px; }
:where(.app-radio + label) { outline-offset: 2px; }
strong { font-weight: var(--mg-weight-strong); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--mg-fs-small); }

/* --- the frame --- */
.nav { position: relative; z-index: 10; display: flex; flex-wrap: wrap; gap: var(--mg-space-2) var(--mg-space-4); align-items: center; justify-content: space-between; padding: 28px var(--mg-edge); }
.mg-home .nav { position: absolute; top: 0; left: 0; right: 0; }
.brand a { display: flex; align-items: center; gap: var(--mg-space-3); font-weight: var(--mg-weight-medium); font-size: var(--mg-fs-ui); letter-spacing: -.01em; text-decoration: none; }
.brand .mark { width: 22px; height: 22px; background: url(mark.svg) center / contain no-repeat; }
.nav-link { font-size: var(--mg-fs-small); color: var(--mg-mute); text-decoration: none; transition: color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade); }
.nav-link:hover { color: var(--mg-ink); }
main { flex: 1; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: var(--mg-space-6) var(--mg-edge) var(--mg-space-7); color: var(--mg-mute); font-size: var(--mg-fs-small); box-shadow: 0 -1px 0 var(--mg-line); }
.foot a { text-decoration: none; transition: color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade); }
.foot a:hover { color: var(--mg-ink); }

/* --- the one gold action, and glass for everything else you can press --- */
.act, .btn.primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--mg-control-glass); padding: var(--mg-space-3) 22px; border-radius: var(--mg-control-corner); border: 0; cursor: pointer;
  font: inherit; font-weight: var(--mg-weight-strong); font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); text-align: center; text-decoration: none; overflow-wrap: anywhere; color: var(--mg-act-ink);
  background-color: var(--mg-act);
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--mg-act) 97%, var(--mg-white)), color-mix(in srgb, var(--mg-act) 97%, var(--mg-bg)));  /* matte: a 3 % tonal shift, no highlight, ring or glow */
  box-shadow: none;  /* .btn.primary would otherwise take the glass button's hairline */
  transition: background-color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade);
}
/* hover and press change only the colour, which sits under the gradient from the start: switching a gradient (an
   image) to a colour blanked the image at once and faded the colour in from transparent, a flash of black (agy U-12) */
.act:hover, .btn.primary:hover { background-color: var(--mg-act-hover); background-image: none; }
.act:active, .btn.primary:active { background-color: var(--mg-act-press); background-image: none; transition-duration: var(--mg-t-quick); }  /* a press answers at once */
.btn.primary[disabled], .btn.primary[disabled]:hover { background: color-mix(in srgb, var(--mg-white) 8%, transparent); color: var(--mg-mute); opacity: 1; }
/* everything else you can press: a flat dark surface with a hairline edge (no top light: that was a bevel too) */
.glassbtn, .btn, details.remove > summary.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--mg-control-glass); padding: 10px 26px; border-radius: var(--mg-control-corner); border: 0; cursor: pointer;
  font: inherit; font-weight: var(--mg-weight-medium); font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); text-align: center; text-decoration: none; overflow-wrap: anywhere; color: var(--mg-ink);
  background: color-mix(in srgb, var(--mg-white) 7%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-white) 12%, transparent);
  transition: background-color var(--mg-t-standard) var(--mg-ease), box-shadow var(--mg-t-quick) var(--mg-ease), var(--mg-ring-fade);
}
.glassbtn:hover, .btn:not(.primary):hover { background: color-mix(in srgb, var(--mg-white) 11%, transparent); }
/* pressed: the surface goes down a step and its edge comes up, at once: on a phone a tap has no hover before it, and
   7 % to 4 % on black alone was a 7/255 step nobody saw (agy M-07); nothing scales or moves */
.glassbtn:active, .btn:not(.primary):not([disabled]):active { background: color-mix(in srgb, var(--mg-white) 3%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-white) 28%, transparent); transition-duration: var(--mg-t-quick); }
.btn[disabled] { opacity: .5; cursor: default; }
/* once.js: a checkout button that was pressed is working, not unavailable: it keeps its surface, says so, and the
   label fades in from a faint one */
.btn[disabled][aria-busy="true"] { --busy-ink: var(--mg-ink); opacity: 1; cursor: progress; animation: mg-busy-in var(--mg-t-quick) var(--mg-ease); }
.btn.primary[aria-busy="true"] { --busy-ink: var(--mg-act-ink); }
.btn.danger[aria-busy="true"] { --busy-ink: var(--mg-error); }
@keyframes mg-busy-in { from { color: color-mix(in srgb, var(--busy-ink) 35%, transparent); } }  /* from a faint label, never a blank button (as Copy, agy M-06) */
.btn.primary[disabled][aria-busy="true"] { background-color: var(--mg-act-press); background-image: none; color: var(--mg-act-ink); }
/* the one working indicator: a small light before the label of a button whose request is out (sign-in, checkout, the
   device and billing forms). It breathes at the slow step, the only thing that moves while the customer waits; under
   reduced motion it stays lit and still */
.btn[aria-busy="true"]::before { content: ""; flex: none; width: 6px; height: 6px; margin-right: var(--mg-space-2); border-radius: 50%; background: currentColor;
  animation: mg-working var(--mg-t-slow) var(--mg-ease) infinite alternate; }
@keyframes mg-working { to { opacity: .3; } }
.quiet { font-size: var(--mg-fs-ui); color: var(--mg-mute); text-decoration: none; transition: color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade); }
.quiet:hover { color: var(--mg-ink); }
/* Phones (agy L-06, L-07; 207: the header brand and a link alone in its paragraph too, never one inside a sentence).
   A tap shows the page's own pressed state, not the browser's cyan flash (which covered the whole screen when Done
   closed the Enlarge sheet); the text links and text toggles that had none brighten while pressed. The small text
   targets reach 44 px tall: padding given back by an equal negative margin, so the hit area grows and nothing on the
   page moves or changes size. */
html { -webkit-tap-highlight-color: transparent; }
.nav-link, .hero .quiet, .foot a, .lone-link > a { display: inline-block; }
/* the lone "How it works" link under the plans: a 44 px target, padding given back by a negative margin (no change of look) */
.note.center > a.hit { display: inline-block; --mg-hit-pad: max(0px, (44px - 1lh) / 2); padding-block: var(--mg-hit-pad); margin-block: calc(-1 * var(--mg-hit-pad)); }
.brand a, .nav-link, .hero .quiet, .foot a, .lone-link > a, details.qr-alt > summary, details.qr-big:not([open]) > summary {
  --mg-hit-pad: max(0px, (44px - 1lh) / 2); padding-block: var(--mg-hit-pad); margin-block: calc(-1 * var(--mg-hit-pad)); }
:is(.nav-link, .quiet, .foot a, details.qr-alt > summary, details.qr-big:not([open]) > summary):active { color: var(--mg-ink); transition-duration: var(--mg-t-quick); }

/* --- a single-column page (sign in, messages, guides, account until its own skin lands) --- */
main.page { width: 100%; max-width: calc(var(--mg-width-text) + 2 * var(--mg-gutter)); margin: 0 auto; padding: clamp(20px, 5vw, 64px) var(--mg-gutter) 80px; }
main.page.wide { max-width: calc(var(--mg-width-wide) + 2 * var(--mg-gutter)); }
main.page > * + * { margin-top: var(--mg-space-4); }
main.page h1 { font-weight: var(--mg-weight-strong); font-size: var(--mg-fs-title); line-height: var(--mg-lh-title); letter-spacing: var(--mg-track-title); text-wrap: balance; }
main.page.wide > h1 { text-align: left; }
main.page h2 { font-weight: var(--mg-weight-medium); font-size: var(--mg-fs-heading); letter-spacing: var(--mg-track-heading); line-height: var(--mg-lh-heading); }
main.page h3 { font-weight: var(--mg-weight-medium); font-size: var(--mg-fs-subhead); letter-spacing: var(--mg-track-heading); line-height: var(--mg-lh-subhead); }
.lead { font-size: var(--mg-fs-body); line-height: var(--mg-lh-body); color: var(--mg-mute); }
.lead strong { color: var(--mg-ink); }
.note { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
.note a, main.page p a:not(.btn):not(.act):not(.quiet), main.page li a:not(.btn):not(.act):not(.quiet):not(.help-card) { color: var(--mg-ink); text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; }
main.page p a.quiet { text-decoration: none; }
main.page p a.quiet:hover { color: var(--mg-ink); }
.center { text-align: center; }
.notice { padding: var(--mg-space-3) var(--mg-space-4); border-radius: var(--mg-row); font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-note-text); background: var(--mg-note); box-shadow: inset 0 0 0 1px var(--mg-note-edge); }
/* a plan with no room: plain words in the button's place, not a box that reads as a disabled field */
.plan-full { display: flex; align-items: center; min-height: 44px; margin-top: auto; font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); color: var(--mg-mute); }
.error { padding: var(--mg-space-3) var(--mg-space-4); border-radius: var(--mg-row); font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-error); background: var(--mg-error-bg); box-shadow: inset 0 0 0 1px var(--mg-error-edge); }
.card, .panel { position: relative; }  /* unboxed (2026-11-12): sections, not boxes; space and hairlines separate them */
.card > * + *, .panel > * + * { margin-top: var(--mg-space-4); }
.panel { max-width: 32rem; }
.panel h1 { max-width: 11.5em; overflow-wrap: anywhere; }
main.page .panel h1.email-title { font-size: var(--mg-fs-heading); line-height: var(--mg-lh-heading); max-width: none; }
.panel .tile { margin: 0 0 8px; }
/* the message and waiting pages' icon is a bare line drawing, not an 88 px gradient tile (agy U-08: with the cards gone
   the tile was the last box on the page); the gradient layer is sized away, the icon keeps its own stroke */
.panel .tile, .wait-inline .tile { width: 40px; height: 40px; background-size: 40px, 0 0; box-shadow: none; }
.panel .notice { text-align: left; }
/* a notice on a message page or under the plans is a line of text, as in the account, not a box (agy U-08); the
   connection check's verdict keeps its own surface (its rules are more specific) */
.panel:not(.check-verdict) .notice, main.page.wide > .notice { padding: 0; background: none; box-shadow: none; font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); }
.panel .center, .panel p.center { text-align: left; }
.panel .actions.center { justify-content: flex-start; }  /* unboxed sections read from one left edge */
.stack { max-width: 600px; margin: 0 auto; }
.stack > * + * { margin-top: 20px; }
.stack .orb { width: 88px; height: 88px; margin-bottom: 4px; }
.stack .center > * + * { margin-top: 14px; }
.stack .center h1 { margin-left: auto; margin-right: auto; max-width: 11em; }
.stack .card p { color: var(--mg-mute); }
.actions.center { justify-content: center; gap: 14px; }
/* "This pilot is by invitation" (agy U-09): it read centre, left, centre under a small dark orb; now it reads from one
   left edge like every other message page, the how-to-ask part under a hairline, and no orb */
.stack .center, .stack p.center { text-align: left; }
.stack .center h1 { margin-left: 0; }
.stack .actions.center { justify-content: flex-start; }
.stack .orb { display: none; }
.stack > .card { padding-top: var(--mg-space-5); box-shadow: 0 -1px 0 var(--mg-line); }
.orb { display: block; width: 120px; height: 120px; margin: 0 auto 8px; border-radius: 50%;
  background: url(night-poster.jpg) center / 136% no-repeat; background-image: image-set(url(night-poster.avif) type("image/avif"), url(night-poster.webp) type("image/webp"), url(night-poster.jpg) type("image/jpeg"));
  -webkit-mask-image: radial-gradient(closest-side, var(--mg-bg) 88%, transparent); mask-image: radial-gradient(closest-side, var(--mg-bg) 88%, transparent); }  /* the night globe's still, small */
.fine { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
.or { color: var(--mg-mute); font-size: var(--mg-fs-small); text-align: center; }
.or + p .btn { width: 100%; }  /* the other way in is as wide as the form's button */
/* between the link form (and its note) and the password form: a hairline with a small centred "or" */
.or-rule { display: flex; align-items: center; gap: var(--mg-space-3); margin: var(--mg-space-6) 0 var(--mg-space-4); color: var(--mg-mute); font-size: var(--mg-fs-small); }
.or-rule::before, .or-rule::after { content: ""; flex: 1; height: 1px; background: var(--mg-line); }
.pw-signin form + .fine { margin-top: var(--mg-space-3); }
.pw-signin > .error { margin-top: var(--mg-space-4); }  /* the wrong-password box: the panel's one gap under its heading */
.pw-signin input { scroll-margin-top: calc(var(--mg-space-8) * 3); }  /* the answer to a failed try autofocuses the password field: its heading and box stay in view above it */

/* forms */
form { display: grid; gap: 12px; }
.panel form { margin-top: 24px; }
label { font-size: var(--mg-fs-small); color: var(--mg-mute); }
input[type=email], input[type=text], input[type=password], input:not([type]), .account-shell .account-password input[type=password] {
  appearance: none; -webkit-appearance: none; min-height: 58px; width: 100%; min-width: 0; border-radius: var(--mg-control-corner); border: 0; padding: var(--mg-space-3) var(--mg-space-5); font: inherit; font-size: max(16px, var(--mg-fs-ui)); line-height: var(--mg-lh-ui); color: var(--mg-ink);
  background: color-mix(in srgb, var(--mg-white) 6%, transparent); box-shadow: inset 0 0 0 1px var(--mg-field-edge); transition: box-shadow var(--mg-t-quick) var(--mg-ease), var(--mg-ring-fade);  /* the edge and the ring land together */
}
input::placeholder { color: var(--mg-faint); opacity: 1; }
input:focus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-ink) 65%, transparent); }  /* the edge brightens; the ring is the gold focus ring */
input:focus-visible { outline-offset: 3px; }
/* no outline: none here: a field takes the page's ink focus ring (:focus-visible at the top), as every button does */
input[readonly] { min-height: 48px; font-size: var(--mg-fs-small); color: var(--mg-mute); }
form .btn { width: 100%; }

/* plans (/plans) */
/* /plans (2026-11-12, the owner: "The plans page looks weird"): one grid of three equal columns, each with the same top
   hairline and its text on its own left edge, space between them; no box and no gold round the featured plan (gold is
   for lights, routes, the focus ring and tap markers): Plus is marked by being the one moonlight button. Equal buttons. */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--mg-space-7); margin-top: var(--mg-space-7); align-items: stretch; }
.card.plan { display: flex; flex-direction: column; padding: var(--mg-space-5) 0 0; box-shadow: inset 0 1px 0 var(--mg-line); }
.card.plan .btn { width: 100%; }
main.page.wide > :is(.plans, form, .notice) ~ .note.center { text-align: left; }  /* the lines under the plans (or under "not open yet") on the page's one left edge */
main.page.wide > :is(.plans, form) + .note { margin-top: var(--mg-space-7); }
/* the lines under the plans as one quiet block (agy P-04): a reading width; after the first, smaller, muted, 8 px apart */
main.page.wide > :is(.plans, form) ~ .note { max-width: 62ch; }
main.page.wide > :is(.plans, form) ~ .note ~ .note { margin-top: 8px; font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
main.page.wide > :is(.plans, form) ~ .note.support,
main.page.wide > :is(.plans, form) ~ .note:not(.support) + .note.github {
  margin-top: var(--mg-space-5); padding-top: var(--mg-space-4); box-shadow: 0 -1px 0 var(--mg-line);
}
main.page.wide > :is(.plans, form) ~ .note.support + .note.github { margin-top: var(--mg-space-2); }
main.page.wide:has(> .note.support, > .note.github) { padding-bottom: var(--mg-space-6); }
/* signed in, one checkout form round the plans (agy P-01, P-02): the one consent box and the legal line first, from the
   grid's left edge, then the three columns, each with its own button (or a full plan's line, at a button's height) at its
   foot, so the buttons stand under their plans in one row on a laptop and under each plan on a phone */
main.page.wide > form:has(> .plans) { display: block; margin-top: var(--mg-space-6); }
main.page.wide > form > .plans { margin-top: var(--mg-space-6); }
/* on a laptop (agy P-04): signed in, a tighter top and foot, so the page ends with its footer inside a 900 px window; the first line under the plans 40 px below them */
@media (min-width: 821px) {
  main.page.wide:has(> form > .plans) { padding-top: clamp(20px, 3.5vw, 44px); padding-bottom: 48px; }
  main.page.wide > form:has(> .plans), main.page.wide > form > .plans { margin-top: var(--mg-space-5); }
  main.page.wide > :is(.plans, form) + .note { margin-top: var(--mg-space-6); }
}
.plan-consent { display: grid; gap: var(--mg-space-2); scroll-margin-block: var(--mg-space-5); }
.card.plan .plan-full { min-height: var(--mg-control-glass); margin-top: var(--mg-space-5); }  /* the row of buttons stays whole */
/* the box left unticked when a button is pressed (once.js, agy P-03, lane 284): the gold ring on the box and one line
   under it inside .plan-consent, in the page's own voice instead of the browser's bubble; .plan-consent scrolls into view */
.start-now input[aria-invalid="true"] { outline: 2px solid var(--mg-act-ring); outline-offset: 3px; box-shadow: inset 0 0 0 1.5px var(--mg-ink); }
.consent-need { margin-left: calc(20px + var(--mg-space-3)); font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-ink); }
.card.plan { position: relative; }
.card.plan > .plan-slot { margin-top: var(--mg-space-5); }
.consent-need[hidden] { display: none; }
/* agy P-07: the box's label and the legal links get a taller hit area (padding given back, nothing moves) */
.plan-consent .start-now { --mg-hit-pad: max(0px, (44px - 1lh) / 2); padding-block: var(--mg-hit-pad); margin-block: calc(-1 * var(--mg-hit-pad)); }
.plan-consent .terms a { padding-block: 8px; }  /* inline: the line box does not grow */
.card.plan .price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--mg-space-2); row-gap: var(--mg-space-1); }
.card.plan .price-figure { font-size: clamp(3.5rem, 5.4vw, 5.5rem); font-weight: var(--mg-weight-regular); letter-spacing: -.05em; line-height: .95; }
.card.plan .price-per { font-size: var(--mg-fs-ui); color: var(--mg-mute); }
.card.plan .price-note { flex-basis: 100%; font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
.card.plan .price.whole { font-size: var(--mg-fs-heading); font-weight: var(--mg-weight-medium); letter-spacing: var(--mg-track-heading); }
.card.plan .price-planned { margin-top: var(--mg-space-3); font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); color: var(--mg-ink); }  /* the pilot: "Planned price later ... Not for sale now." */
.card.plan .facts { list-style: none; color: var(--mg-mute); font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); flex: 1; }
.card.plan .facts li { padding: var(--mg-space-1) 0; color: var(--mg-mute); }
.card.plan p:last-child { margin-top: var(--mg-space-5); }
/* the start-now box and the terms line above the pay button */
.start-now { display: flex; align-items: flex-start; gap: var(--mg-space-3); font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); cursor: pointer; }
/* the consent box drawn in the page's own language: a moonlight hairline square, moonlight with a dark tick when
   checked, the gold focus ring (the browser's box was a grey filled square that read as disabled) */
.start-now input { appearance: none; -webkit-appearance: none; display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin: 1px 0 0;
  border-radius: var(--mg-check-corner); background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--mg-ink) 60%, transparent); cursor: pointer; }
.start-now:hover input:not(:checked) { box-shadow: inset 0 0 0 1.5px var(--mg-ink); }
.start-now input:checked { background: var(--mg-act); box-shadow: none; }
.start-now input:checked::after { content: ""; width: 10px; height: 5px; margin-top: -3px; border-left: 2px solid var(--mg-act-ink); border-bottom: 2px solid var(--mg-act-ink); transform: rotate(-45deg); }
.start-now input:focus-visible { outline-offset: 3px; }
:is(.card.plan, .plan-consent) .terms { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
:is(.card.plan, .plan-consent) .terms a:hover { color: var(--mg-ink); }

/* account pieces that appear before the account skin lands (PR 2) */
.device { padding-top: 18px; margin-top: 18px; box-shadow: 0 -1px 0 var(--mg-line); }
.device > * + * { margin-top: 12px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
details > summary { cursor: pointer; }
.qr { width: 220px; max-width: 100%; padding: 18px; border-radius: var(--mg-control-corner); background: var(--mg-qr-tile); }
.qr svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
.qr svg rect { fill: transparent; }
.qr svg path { fill: var(--mg-qr-ink); }
.help-list, .outbox { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.outbox > li { min-width: 0; }
main.page ol.steps { padding-left: 1.2em; display: grid; gap: 18px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; color: var(--mg-mute); }

/* --- home: one hero, then each section carries one light --- */
main.home { padding: 0; }
main.home > .note { padding: 0 var(--mg-edge); }  /* the footer lines (support, Discord, GitHub) on the footer's own left edge */
main.home > .note:last-of-type { padding-bottom: var(--mg-space-6); }
.home section { position: relative; padding: var(--mg-section) var(--mg-gutter); }
.home .wrap { max-width: var(--mg-measure); margin: 0 auto; }
.home h2 { font-weight: var(--mg-weight-display); font-size: var(--mg-display-section); line-height: 1; letter-spacing: var(--mg-track-section); text-wrap: balance; }
.home .sub { margin-top: var(--mg-space-4); font-size: var(--mg-fs-body); line-height: var(--mg-lh-body); color: var(--mg-mute); max-width: 30em; }

.home .hero { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; padding: 0 var(--mg-edge); isolation: isolate; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(38% 46% at 58% 34%, var(--mg-sky-glow), transparent 70%), radial-gradient(60% 34% at 68% 104%, var(--mg-horizon), var(--mg-horizon-far) 50%, transparent 75%),
              radial-gradient(120% 90% at 50% 45%, transparent 55%, var(--mg-vignette) 100%); }
.hero .sky { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
.hero .sky canvas { position: absolute; left: 0; top: 0; width: calc(100% + 120px); height: calc(100% + 120px); display: block; transform: translate(-60px, -60px); }  /* night.js drifts it a few px a minute */
.hero .copy { position: relative; z-index: 2; padding-top: var(--mg-space-6); }
.hero h1 { font-weight: var(--mg-weight-display); font-size: var(--mg-display-hero); line-height: .94; letter-spacing: var(--mg-track-display); }
.hero h1 span { display: block; }
.hero .lede { margin-top: var(--mg-space-5); max-width: 26em; font-size: var(--mg-fs-body); line-height: var(--mg-lh-body); color: var(--mg-mute); text-wrap: pretty; }
.hero .ctas { margin-top: var(--mg-space-6); display: flex; align-items: center; gap: var(--mg-space-5); flex-wrap: wrap; }
.stage { position: relative; justify-self: end; width: min(64vw, 880px, 96svh, calc(100% + 96px)); aspect-ratio: 1; margin-right: calc(var(--mg-gutter) * -.6); }
.poster { position: absolute; inset: 0; background: url(night-poster.jpg) center / cover no-repeat;
  background-image: image-set(url(night-poster.avif) type("image/avif"), url(night-poster.webp) type("image/webp"), url(night-poster.jpg) type("image/jpeg"));
  -webkit-mask-image: radial-gradient(closest-side, var(--mg-bg) 80%, transparent 99%); mask-image: radial-gradient(closest-side, var(--mg-bg) 80%, transparent 99%); }
.stage canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
/* the way down: one thin chevron at the bottom of the hero, a link to the cities; a slow small bob, and it fades once
   the page has been scrolled (night.js sets #mg-home.scrolled); under reduced motion it stands still */
.hero .down { position: absolute; left: 50%; bottom: var(--mg-space-5); z-index: 3; width: 44px; height: 44px; margin-left: -22px;
  display: grid; place-items: center; color: var(--mg-ink); opacity: .72; transition: opacity var(--mg-t-slow) var(--mg-ease); }
.hero .down::before { content: ""; width: 11px; height: 11px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); animation: mg-bob 2s var(--mg-ease) infinite alternate; }
.hero .down:hover, .hero .down:focus-visible { opacity: 1; }  /* a key that lands on it shows it whole */
#mg-home.scrolled .hero .down { opacity: 0; pointer-events: none; }
#mg-home.scrolled .hero .down:focus-visible { opacity: 1; }  /* faded, it is still a Tab stop: a key that lands on it shows it */
@keyframes mg-bob { from { translate: 0 -5px; } to { translate: 0 1px; } }
/* the globe drawn in code (night.js): the poster stays until the first whole frame is drawn, then they crossfade.
   The edge feather is drawn into the globe itself, so the canvases need no mask. */
.stage canvas.wg-body, .stage canvas.wg-ov { opacity: 0; transition: opacity var(--mg-slow) var(--mg-ease); }
.stage.wg-ready canvas.wg-body, .stage.wg-ready canvas.wg-ov { opacity: 1; }
.stage.wg-ready .poster { opacity: 0; transition: opacity var(--mg-slow) var(--mg-ease); }
.stage.arriving .poster { transition: none; }  /* returning from /signin: the still never shows, not even fading */
.stage.poster-back .poster { transition: opacity var(--mg-slow) var(--mg-ease); }  /* the live globe did not come: the still fades back in */
/* The night globe (night.js) on the hero's stage: the poster is its own still; drag sideways to turn it (vertical swipes
   still scroll), arrows when focused, the focus ring round the globe itself, on .grip. */
.stage[data-night] { cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.stage[data-night].dragging { cursor: grabbing; }
.stage .grip { position: absolute; inset: 14.5%; z-index: 4; border-radius: 50%; }  /* the globe itself: 0.355 of the stage */
.stage .grip:focus-visible { border-radius: 50%; outline-offset: -2px; }  /* drawn inside: the hero clips at its edge (a phone), a ring outside the globe was cut */
.foot .credit { flex-basis: 100%; max-width: 62em; font-size: var(--mg-caption); line-height: var(--mg-lh-small); color: var(--mg-mute); }

/* cities: one list in the table order, and a globe that turns to the row in view */
.home .cities .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--mg-space-7); align-items: start; }
.home .cities .pin { order: 2; }  /* one alignment: words on the left edge, the light on the right */
.pin { position: sticky; top: max(40px, calc(50svh - 290px)); aspect-ratio: 1; width: 100%; max-width: 580px; justify-self: end; }
.pin .poster { inset: 0; }  /* the same still as the hero: the globe is 0.355 of its box in both */
.pin.live .poster { display: none; }
.pin canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.clist { margin-top: var(--mg-space-6); }
.clist.two ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 3vw, 48px); align-items: start; }
.clist ol { list-style: none; }
.clist li { position: relative; padding: clamp(14px, 1.8vw, 26px) 0; font-size: var(--mg-city); letter-spacing: -.045em; line-height: 1; font-weight: var(--mg-weight-regular); color: var(--mg-mute); transition: color var(--mg-t-slow) var(--mg-ease); }  /* not --mg-unlit (3.6:1 read as disabled) */
.clist.two li { font-size: var(--mg-city-two); }
.clist li + li { box-shadow: 0 -1px 0 var(--mg-line); }
.clist.two li:nth-child(2) { box-shadow: none; }  /* two columns fill row by row: the second item opens its column */
.clist li small { display: block; margin-top: var(--mg-space-2); font-size: var(--mg-fs-ui); letter-spacing: 0; font-weight: var(--mg-weight-regular); color: var(--mg-mute); }
.clist li small strong { font-weight: var(--mg-weight-medium); color: var(--mg-gold-soft); }
.clist li.on, .clist li:focus-visible { color: var(--mg-ink); }
.clist li:focus-visible::before { opacity: 1; }  /* the keyboard reaches a row as the pointer does */
.clist li.on small { color: var(--mg-mute); }
.clist li::before { content: ""; position: absolute; left: -18px; top: calc(clamp(14px, 1.8vw, 26px) + .42em); width: 7px; height: 7px; border-radius: 50%; background: var(--mg-gold); box-shadow: 0 0 14px 3px color-mix(in srgb, var(--mg-gold) 55%, transparent); opacity: 0; transition: opacity var(--mg-t-slow) var(--mg-ease); }
.clist li.on::before { opacity: 1; }
.clist li.coming.on::before { background: transparent; box-shadow: inset 0 0 0 1px var(--mg-gold); }
/* without the script, every city reads at full strength */
.cities:not(:has(.pin.live)) .clist li { color: var(--mg-ink); }

/* steps: three small lit objects on one line of light */
.home .steps .grid { position: relative; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--mg-space-7); margin-top: var(--mg-space-7); }
.home .steps .grid::before { content: ""; position: absolute; left: 44px; right: calc(33% - 44px); top: 44px; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--mg-rim) 50%, transparent), color-mix(in srgb, var(--mg-rim) 15%, transparent)); }
.tile { position: relative; display: block; width: 88px; height: 88px; border-radius: var(--mg-tile);
  background: url(icon-mail.svg) center / 44px no-repeat, radial-gradient(120% 120% at 30% 15%, var(--mg-tile-top), var(--mg-tile-bottom) 70%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--mg-white) 14%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--mg-white) 6%, transparent); }
.tile.plan { background-image: url(icon-plan.svg), radial-gradient(120% 120% at 30% 15%, var(--mg-tile-top), var(--mg-tile-bottom) 70%); }
.tile.code { background-image: url(icon-code.svg), radial-gradient(120% 120% at 30% 15%, var(--mg-tile-top), var(--mg-tile-bottom) 70%); }
.tile.clock { background-image: url(icon-clock.svg), radial-gradient(120% 120% at 30% 15%, var(--mg-tile-top), var(--mg-tile-bottom) 70%); }
.home .steps .n { margin-top: var(--mg-space-5); font-size: var(--mg-fs-small); color: var(--mg-mute); }
.home .steps h3 { margin-top: var(--mg-space-1); font-weight: var(--mg-weight-medium); font-size: var(--mg-fs-heading); letter-spacing: var(--mg-track-heading); line-height: var(--mg-lh-heading); }
.home .steps li p:last-child { margin-top: var(--mg-space-3); color: var(--mg-mute); font-size: var(--mg-fs-body); line-height: var(--mg-lh-body); }

/* plans on the home page: which cities each plan includes, over one light */
.plan-cities { position: relative; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: var(--mg-space-7) 0 var(--mg-space-6); }
.plan-cities li { padding: var(--mg-space-5) var(--mg-space-5) var(--mg-space-5) 0; }
.plan-cities li + li { padding-left: var(--mg-space-5); box-shadow: inset 1px 0 0 var(--mg-line); }
.plan-cities h3 { font-weight: var(--mg-weight-medium); font-size: var(--mg-fs-heading); letter-spacing: var(--mg-track-heading); line-height: var(--mg-lh-heading); }
.plan-cities p { margin-top: var(--mg-space-3); color: var(--mg-mute); font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); }
/* the monthly price, when the page is given it (the same text /plans shows, through pages._price) */
.plan-cities .price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--mg-space-2); margin-top: var(--mg-space-3); color: var(--mg-ink); }
.plan-cities .price-figure { font-size: var(--mg-fs-title); line-height: 1; font-weight: var(--mg-weight-regular); letter-spacing: var(--mg-track-title); }
.plan-cities .price-per { font-size: var(--mg-fs-ui); color: var(--mg-mute); }
.plan-cities .price-note { flex-basis: 100%; margin-top: var(--mg-space-1); font-size: var(--mg-fs-small); color: var(--mg-mute); }
.plan-cities .price.whole { font-size: var(--mg-fs-heading); font-weight: var(--mg-weight-medium); }
.plans-home .center { text-align: left; }  /* one left edge: the button under the cards too */

/* sign in, at the end of the home page */
.home .join h2 { max-width: 10em; }
.home .join .orb { width: 112px; height: 112px; margin: 0 0 var(--mg-space-6); }
.home .join p + p { margin-top: var(--mg-space-5); }
/* Home and sign-in are one place: no browser page transition here. night.js moves the one globe itself (out before the
   page changes, in on arrival) and the words fade with .leaving and on load; the browser's cross-fade would show a
   picture of the old globe over the new one. */
body.has-travel main, body.has-travel .foot { animation: mg-words-in var(--mg-t-standard) var(--mg-ease) backwards; }  /* the top bar is the same bar on both pages: it stays */
@keyframes mg-words-in { from { opacity: 0; } to { opacity: 1; } }
/* back on home from /signin: the words wait until the globe has glided most of the way home, never fading in over it */
body.has-travel.returning main, body.has-travel.returning .foot { animation: none; opacity: 0; }  /* night.js lets them in once the globe has cleared them */
body.has-travel .foot { box-shadow: none; }  /* T-07: no hairline under the closing globe, as on /signin */
/* arriving from the other page: arrive.js (in the head) shows the last page's frame and keeps the words back from the first
   paint until night.js runs */
html.mg-arriving main, html.mg-arriving .foot { opacity: 0; }
html.mg-arriving .stage .poster { visibility: hidden; }
html.mg-arriving body.mg-home::after { content: ""; position: fixed; z-index: 0; left: var(--at-x); top: var(--at-y); width: var(--at-s); height: var(--at-s); pointer-events: none;
  background: var(--at-img, url(night-poster.jpg)) 0 0 / 100% 100% no-repeat; }
/* on /signin the frame is painted only inside the globe's window (.gl-left), as night.js's stand: never over the form or
   the footer, even without :has(). The frame keeps its window position (a fixed background) and the window cuts it. */
html.mg-arriving main.signin-globe { opacity: 1; }
html.mg-arriving main.signin-globe > :not(.gl-left) { opacity: 0; }
@media (max-width: 820px) { html.mg-arriving main.signin-globe > .gl-left { position: relative; } }  /* wider, it is sticky: positioned already */
html.mg-arriving main.signin-globe > .gl-left::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--at-img, url(night-poster.jpg)) calc(var(--at-x) / var(--z, 1)) calc(var(--at-y) / var(--z, 1)) / calc(var(--at-s) / var(--z, 1)) calc(var(--at-s) / var(--z, 1)) no-repeat fixed; }
.travel .stand { position: absolute; background: url(night-poster.jpg) center / cover no-repeat; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { body.has-travel main, body.has-travel .nav, body.has-travel .foot { animation: none; } }
/* One globe for the whole page (night.js, #mg-home[data-travel]; prototype): a fixed layer under the content, with the
   stars behind the globe; the content sits above it. The closing block puts its words on the right and leaves the left
   to the globe, in the same place as on /signin (.join-globe is that place, empty). */
.travel { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.travel canvas.wg-body, .travel canvas.wg-ov { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 50% 50%; }
.travel canvas:not(.wg-body):not(.wg-ov) { position: absolute; left: 0; top: 0; width: calc(100% + 120px); height: calc(100% + 120px); transform: translate(-60px, -60px); }
body.has-travel .nav, body.has-travel main, body.has-travel .foot { position: relative; z-index: 1; transition: opacity var(--mg-t-standard) var(--mg-ease); }
.mg-home.has-travel .nav { position: absolute; }  /* home's bar stays over the hero */
body.has-travel .nav { z-index: 2; }  /* above main (also 1, and later), whose hero globe would take the bar's clicks */
/* pressing Sign in: the words go first (150 ms) while the globe glides to /signin's place */
body.has-travel.leaving main, body.has-travel.leaving .foot { animation: mg-words-out var(--mg-t-quick) var(--mg-ease) both; }
@keyframes mg-words-out { from { opacity: 1; } to { opacity: 0; } }
body.has-travel .hero .sky, body.has-travel .home .hero::before { display: none; }  /* one globe, one sky: no background edge passes across it */
.join-globe { display: none; }
@media (min-width: 760px) {
  body.has-travel #mg-home .join { position: relative; min-height: calc(100svh - 140px); display: grid; align-items: center; }
  body.has-travel #mg-home .join .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); column-gap: var(--mg-space-7); width: 100%; }
  body.has-travel #mg-home .join .wrap > * { grid-column: 2; }
  body.has-travel #mg-home .join .orb { display: none; }
  body.has-travel .pin canvas { display: none; }  /* mounted at a phone width, then widened: the travel globe is the cities' here */
  body.has-travel main > .note { margin-left: auto; margin-right: var(--mg-edge); max-width: 30rem; padding-inline: 0; }  /* the footer lines beside the closing words, off the globe; the margin keeps the edge, so no padding: by --mg-edge on both sides it ate the 30rem box from ~1350 px wide (her screenshot, 11-13) */
  body.has-travel #mg-home .join .join-globe { --g: min(70vw, calc((100svh - 164px) / .59), calc((100vw - 36rem) / .66)); display: block; position: absolute;
    left: calc(var(--g) * -.26); bottom: calc(var(--g) * -.3); width: var(--g); aspect-ratio: 1; pointer-events: none; }
}
/* Large windows (B, the owner's choice of two, 11-13; widened to every portal page, 11-15; and to the plain home and
   /signin, 11-17, lane 213): every body.mg page, the travel globe's or not (?travel=0, reduced motion, no WebGL2, before
   night.js mounts), as designed for 1920x1080, scaled whole on larger windows (zoom on main, .nav and .foot, never on
   .travel: night.js sizes the globe's layer in window px), in steps by the smaller of width/1920 and height/1080, x2 at
   most; and on home from 900 px tall every section at least a window tall, its content centred (1280x700, 1280x618 and
   1366x768 do not change). Inside a zoom a window unit is the real window's, then zoomed: each one there is divided by
   --z (the type's vw clamps are at their caps from 1792 design px, which every step leaves). */
body.mg { --z: 1; }
@media (min-width: 2240px) and (min-height: 1260px) { body.mg { --z: 1.25; } }
@media (min-width: 2560px) and (min-height: 1440px) { body.mg { --z: calc(4 / 3); } }
@media (min-width: 3200px) and (min-height: 1800px) { body.mg { --z: calc(5 / 3); } }
@media (min-width: 3840px) and (min-height: 2160px) { body.mg { --z: 2; } }
body.mg :is(main, .nav, .foot) { zoom: var(--z); --mg-edge: max(var(--mg-gutter), calc((100vw / var(--z) - var(--mg-width-wide)) / 2)); }
@media (min-width: 760px) and (min-height: 900px) {
  body.has-travel #mg-home > section:not(.hero):not(.join) { min-height: calc(100svh / var(--z)); display: flex; flex-direction: column; justify-content: center; }
  body.has-travel #mg-home > section:not(.hero):not(.join) > .wrap { width: 100%; }
  body.has-travel #mg-home > .hero { min-height: calc(100svh / var(--z)); }
  body.has-travel #mg-home .join { min-height: calc(100svh / var(--z) - var(--mg-tail, 140px)); overflow-y: clip; }  /* --mg-tail: night.js, what follows it;
     clip: the globe's empty place (.join-globe) hangs below the closing and made the page end ~200 px of black past the footer */
  body.has-travel .home .pin { top: max(40px, calc(50svh / var(--z) - 290px)); }
  body.has-travel #mg-home .join .join-globe { --g: min(70vw / var(--z), calc((100svh / var(--z) - 164px) / .59), calc((100vw / var(--z) - 36rem) / .66)); }
}
/* The plain home and /signin (no travel globe: ?travel=0, reduced motion, no WebGL2, or before night.js mounts it) under
   the zoom (--z over 1 only from 2240x1260): their own window units divided by --z as the travel rules above do, so the
   hero is a window tall, and the stage, the cities' pin and the sign-in globe stay inside the window (lane 213). The
   travel pages keep the rules above; under 2240x1260 nothing here applies. */
@media (min-width: 2240px) and (min-height: 1260px) {
  body.mg:not(.has-travel) .home .hero { min-height: calc(100svh / var(--z)); }
  body.mg:not(.has-travel) .stage { width: min(64vw / var(--z), 880px, 96svh / var(--z), calc(100% + 96px)); }
  body.mg:not(.has-travel) .pin { top: max(40px, calc(50svh / var(--z) - 290px)); }
  body.mg main.page.signin-globe > .gl-left { height: min(100%, calc(100svh / var(--z) - 8rem)); }  /* travel or not: main is zoomed, so its window is one screen in zoomed units */
  body.mg:not(.has-travel) main.page.signin-globe .gl-left .stage { --g: min(70vw / var(--z), calc((100cqh - 24px) / .59), calc((100vw / var(--z) - 36rem) / .66)); }
}
/* On a phone the travelling globe is a large backdrop under the words (the owner's reference): the list's own globe box
   and the closing orb go; the words get a soft dark halo, and the closing block a gradient from below (the hero keeps the live phone hero's own),
   so a light that falls under a line is dimmed there, never boxed. */
@media (max-width: 759.98px) {
  body.has-travel #mg-home .join .orb { display: none; }  /* the list keeps its own globe, as on the live page */
  body.has-travel main, body.has-travel .nav { text-shadow: 0 0 14px var(--mg-bg), 0 0 5px var(--mg-bg); }
  body.has-travel main :is(.act, .btn, .glassbtn, button, input) { text-shadow: none; }  /* controls have their own surface */
  body.has-travel .nav a { color: var(--mg-ink); }  /* over the globe's rim: full ink, not the grey */
  body.has-travel .home .join::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
    z-index: 0; pointer-events: none; background: linear-gradient(to top, var(--mg-bg) 18%, color-mix(in srgb, var(--mg-bg) 72%, transparent) 55%, transparent); }
  body.has-travel .home .join { position: relative; }
  body.has-travel .home .join .wrap { position: relative; z-index: 1; }
  body.has-travel .home .join { padding-top: calc(56vw + 24px); }  /* the globe sits above the closing words, as on /signin */
}

/* The text reveal in the trial (desk-polish; ?travel=1; the owner chose A of three on 11-13): arrive.js sets html.mg-rv-a
   before the first paint: the hero's lines play from CSS alone from the first frame. Every other section's words are
   hidden only once night.js marks arrivals (html.mg-rv-live, set by reveal.js) and only while that section has not
   arrived (data-mg-arrived, night.js's alone, as the page settles there); a section already on screen then, or one she
   has gone past without it arriving, is left as it is (.mg-rv-skip); one with a held-back line in view when her
   scrolling stops plays then (.mg-rv-in, reveal.js's, beside night.js's arrival). Opacity and transform; the mask's edge is a clip-path
   that moves with the line (paint only, no layout). Nothing stays applied after the last frame: the page is today's. */
@keyframes mg-rv-mask { from { transform: translateY(calc(100% + .5em)); clip-path: inset(-1em -.2em calc(100% + .25em) -.2em); }
  to { transform: none; clip-path: inset(-1em -.2em -.25em -.2em); } }  /* the line rises from behind a fixed edge .25em under its box */
@keyframes mg-rv-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes mg-rv-fade { from { opacity: 0; } }
html.mg-rv-live #mg-home > section:not(.hero):not([data-mg-arrived]):not(.mg-rv-skip):not(.mg-rv-in) :is(h2, .sub, .clist, .grid > li, .plan-cities > li, .wrap > p):not(:has(:focus-visible)) { opacity: 0; }  /* a focused control is never held invisible */
/* the headings line by line (the lines as authored), the text under them as one block, sets staggered */
html.mg-rv-a:not(.mg-arriving) #mg-home > :is(.hero, :is([data-mg-arrived], .mg-rv-in):not(.mg-rv-skip)) :is(h1 > span, h2) { animation: mg-rv-mask var(--mg-t-slow, 400ms) var(--mg-ease) var(--rv-d, 0ms) backwards; }
html.mg-rv-a #mg-home h1 > span + span { --rv-d: 70ms; }
html.mg-rv-a:not(.mg-arriving) #mg-home > :is(.hero, :is([data-mg-arrived], .mg-rv-in):not(.mg-rv-skip)) :is(.lede, .ctas, .sub, .clist, .wrap > p, .grid > li, .plan-cities > li) {
  animation: mg-rv-rise var(--mg-t-standard, 200ms) var(--mg-ease) var(--rv-d, 150ms) backwards; }
html.mg-rv-a #mg-home :is(.grid, .plan-cities) > li:nth-child(1) { --rv-d: 100ms; }
html.mg-rv-a #mg-home :is(.grid, .plan-cities) > li:nth-child(2) { --rv-d: 170ms; }
html.mg-rv-a #mg-home :is(.grid, .plan-cities) > li:nth-child(3) { --rv-d: 240ms; }
html.mg-rv-a #mg-home .plans-home .wrap > p { --rv-d: 290ms; }  /* Compare plans after the three plans, never the prices last */
@media (max-width: 759.98px) {  /* a phone: fade only, no masks */
  html[class*="mg-rv-"]:not(.mg-arriving) #mg-home > :is(.hero, :is([data-mg-arrived], .mg-rv-in):not(.mg-rv-skip)) :is(h1 > span, h1, h2, .lede, .ctas, .sub, .clist, .wrap > p, .grid > li, .plan-cities > li) { animation-name: mg-rv-fade; }
}

/* --- setup guides and connection check --- */
.actions.center { justify-content: center; }
main.page p a.quiet { text-decoration: none; }
main.page p a.quiet:hover { color: var(--mg-ink); }

.help-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--mg-space-6); margin-top: var(--mg-space-6); }
.help-grid > li.help-wide { grid-column: 1 / -1; }
.help-card { display: flex; flex-direction: column; gap: var(--mg-space-1); padding: var(--mg-space-4) 0; text-decoration: none; color: var(--mg-ink);
  box-shadow: 0 1px 0 var(--mg-line); transition: color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade); }
.help-card:hover strong { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--mg-ink) 40%, transparent); }
.help-card strong { font-size: var(--mg-fs-subhead); font-weight: var(--mg-weight-medium); line-height: var(--mg-lh-subhead); color: var(--mg-ink); }
.help-card span { font-size: var(--mg-fs-small); color: var(--mg-mute); line-height: var(--mg-lh-small); }
.help-grid + .note { margin-top: var(--mg-space-5); }

.guide-pills { display: flex; flex-wrap: wrap; gap: var(--mg-space-2); margin-top: var(--mg-space-5); }
.guide-pills .pill-link { min-height: 44px; padding: var(--mg-space-2) var(--mg-space-4); font-size: var(--mg-fs-ui); }
.guide-pills .pill-link[aria-current="page"] {
  background: color-mix(in srgb, var(--mg-white) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-ink) 28%, transparent);
  color: var(--mg-ink);
}

.guide-steps { margin-top: var(--mg-space-7); }
/* one step column for both lists on a guide page (agy U-10): the main steps and the Clash/Hiddify card hang their
   numerals in the same 40 px column, so every step's text starts on one edge, at every width */
.guide-steps, .guide-card { --step-col: 40px; --step-gap: 16px; }
.guide-steps > ol.steps { position: relative; list-style: none; padding-left: 0; display: grid; gap: 34px; }
.guide-steps > ol.steps > li {
  position: relative; display: grid; grid-template-columns: var(--step-col) minmax(0, 1fr); column-gap: var(--step-gap); align-items: start;
}
.guide-steps > ol.steps > li:not(:last-child)::before {
  content: ""; position: absolute; left: calc(var(--step-col) / 2); top: calc(var(--step-col) / 2); bottom: calc(-34px - var(--step-col) / 2); width: 1px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--mg-rim) 48%, transparent), color-mix(in srgb, var(--mg-rim) 18%, transparent));
}
.step-num { position: relative; z-index: 1; display: grid; place-items: center; width: var(--step-col); height: var(--step-col);
  font-size: var(--mg-fs-title); font-weight: var(--mg-weight-regular); font-variant-numeric: tabular-nums; color: var(--mg-mute); background: var(--mg-bg); }  /* a plain numeral on the rail, no tile */
.step-body { min-width: 0; padding-top: var(--mg-space-1); }
.step-body p { margin-top: var(--mg-space-3); color: var(--mg-mute); font-size: var(--mg-fs-body); line-height: var(--mg-lh-body); overflow-wrap: anywhere; }
.step-body strong, .guide-card strong { color: var(--mg-ink); font-weight: var(--mg-weight-strong); }
.step-body p.step-seen { margin-top: var(--mg-space-2); font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); }  /* "What you see": a quiet line under its step (/help/start/<device>) */

.guide-card { margin-top: var(--mg-space-7); padding-top: var(--mg-space-6); box-shadow: 0 -1px 0 var(--mg-line); }
.guide-card ol.steps { list-style: none; padding-left: 0; margin-top: 18px; display: grid; gap: 16px; counter-reset: clash-step; }
.guide-card ol.steps > li { counter-increment: clash-step; display: grid; grid-template-columns: var(--step-col) minmax(0, 1fr); column-gap: var(--step-gap); align-items: start; }
.guide-card ol.steps > li::before { content: counter(clash-step); width: var(--step-col); margin-top: 1px; text-align: center; font-size: var(--mg-fs-ui); font-weight: var(--mg-weight-medium); font-variant-numeric: tabular-nums; color: var(--mg-mute); }  /* a plain numeral */
.guide-card p, .guide-card li { color: var(--mg-mute); font-size: var(--mg-fs-body); line-height: var(--mg-lh-body); overflow-wrap: anywhere; }
.guide-card ul.trouble-list { margin-top: 16px; padding-left: 1.25em; display: grid; gap: 10px; }
.guide-card p.note { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); margin-top: var(--mg-space-4); }
.guide-actions { margin-top: var(--mg-space-6); gap: var(--mg-space-3); }
/* step pictures: the devices stand on the page itself; on a phone the picture leaves the rail's indent and takes the
   full width, so its button labels stay at 13 px or more down to 320 */
.step-pic { position: relative; display: block; width: 100%; max-width: 360px; height: auto; aspect-ratio: 360 / 220; margin-top: var(--mg-space-4); background: var(--mg-bg); }
@media (min-width: 1024px) { .step-body .step-pic { max-width: 480px; } }  /* larger on a laptop: the labels read at 23 px */
.clash-body { min-width: 0; }
.clash-body .step-pic { margin-top: var(--mg-space-3); background: none; }
@media (max-width: 560px) {
  main.page .guide-steps > ol.steps, main.page .guide-card ol.steps { padding-left: 0; }  /* the list's 1.2em indent (main.page ol.steps) costs a phone 22 px */
  /* the step's column starts 80 px (main steps) or 44 px (Clash card) in from its centred list: span 16 px from each
     screen edge instead (the Clash card's pictures run to the card's edges) */
  .step-body .step-pic { width: calc(100vw - 32px); max-width: none; margin-left: calc(-1 * (var(--step-col) + var(--step-gap)) - (100vw - 32px - 100% - var(--step-col) - var(--step-gap)) / 2); }
  .clash-body .step-pic { width: calc(100vw - 40px); max-width: none; margin-left: calc(-1 * (var(--step-col) + var(--step-gap)) - (100vw - 40px - 100% - var(--step-col) - var(--step-gap)) / 2); }  /* edge to edge of its card */
  /* the pictures take the full width here, so a rail down the numerals could only be cut by them (agy U-10): on a
     phone the numerals alone carry the order */
  .guide-steps > ol.steps > li::before { display: none; }
}

.panel.check-verdict { max-width: 560px; margin-top: clamp(12px, 3vh, 36px); }
.panel.check-verdict > * + * { margin-top: 18px; }
.panel.check-verdict .notice { display: flex; align-items: flex-start; justify-content: flex-start; gap: var(--mg-space-3); border-radius: var(--mg-row); font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); color: var(--mg-ink); text-align: left; }
.panel.check-verdict .notice.is-through::before, .panel.check-verdict .notice.is-not-through::before { content: ""; width: 9px; height: 9px; margin-top: .44em; border-radius: 50%; flex-shrink: 0; }
.panel.check-verdict .notice.is-through { background: color-mix(in srgb, var(--mg-rim) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-rim) 45%, transparent); }
.panel.check-verdict .notice.is-through::before { background: var(--mg-gold); }
.panel.check-verdict .notice.is-not-through { background: var(--mg-error-bg); box-shadow: inset 0 0 0 1px var(--mg-error-edge); }
.panel.check-verdict .notice.is-not-through::before { background: var(--mg-error); }
.check-hint { color: var(--mg-mute); font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); }
.check-hint strong { color: var(--mg-ink); }
.check-ip { padding-top: var(--mg-space-1); color: var(--mg-mute); font-size: var(--mg-fs-small); }
.check-ip strong { display: block; margin-top: 6px; font-size: clamp(1.375rem, 2.5vw, 1.875rem); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--mg-ink); overflow-wrap: anywhere; }
.check-verdict + .support { text-align: left; }

/* --- account & billing states --- */
/* The account, rebuilt 2026-11-12 on the text scale, spacing and widths in midnight.css (the other pages follow).
   Phone first: one column. From 1024 px the plan sits beside the devices. A device separates connect (its QR, the two
   app buttons, its links) from manage (new link, remove), which folds away. */
.tile.wait { background-image: url(icon-wait.svg), radial-gradient(120% 120% at 30% 15%, var(--mg-tile-top), var(--mg-tile-bottom) 70%); }
.tile.link { background-image: url(icon-link.svg), radial-gradient(120% 120% at 30% 15%, var(--mg-tile-top), var(--mg-tile-bottom) 70%); }
.tile.device-icon { width: 52px; height: 52px; border-radius: var(--mg-row); background-size: 26px, 100%; flex-shrink: 0; }

main.page.app { max-width: calc(var(--mg-width-app) + 2 * var(--mg-gutter)); }
.account-shell { display: grid; gap: var(--mg-space-5); }
.account-shell:not(:has(> .account-grid)) { max-width: var(--mg-width-text); }  /* no plan yet, or waiting: one column, so Sign out sits under it, not 870 px away (agy U-11) */
.account-head { display: grid; gap: var(--mg-space-2); min-width: 0; }
main.page .account-head h1 { font-size: var(--mg-fs-title); line-height: var(--mg-lh-title); letter-spacing: var(--mg-track-title); }
.account-email { font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); color: var(--mg-mute); overflow-wrap: anywhere; }
.account-grid { display: grid; gap: var(--mg-space-5); align-items: start; min-width: 0; }
.account-side, .account-main { min-width: 0; }
@media (min-width: 1024px) {
  .account-grid { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); gap: var(--mg-space-6); }
}
@media (min-width: 1024px) and (min-height: 48rem) {
  .account-side { position: sticky; top: var(--mg-space-5); }
}
.account-shell .card { padding: 0; }
.account-shell .plan-card { padding-bottom: var(--mg-space-5); box-shadow: 0 1px 0 var(--mg-line); }
.account-shell .plan-billing { padding-top: 0; box-shadow: none; }
.account-shell .plan-billing form .btn { min-height: 44px; padding: var(--mg-space-2) var(--mg-space-5); }  /* Manage billing is a button like Sign out (agy U-07: as a 26 px grey link it read as a caption); one geometry for everything you press */
details.redeem-fold > summary { list-style: none; display: inline-flex; align-items: center; gap: var(--mg-space-2); min-height: 44px; cursor: pointer;
  font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); font-weight: var(--mg-weight-medium); color: var(--mg-mute);
  transition: color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade); }
details.redeem-fold > summary::-webkit-details-marker { display: none; }
details.redeem-fold > summary:hover, details.redeem-fold[open] > summary { color: var(--mg-ink); }
details.redeem-fold > summary::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
  transition: transform var(--mg-t-quick) var(--mg-ease), margin-top var(--mg-t-quick) var(--mg-ease); }
details.redeem-fold[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
details.redeem-fold > #redeem-code { padding-top: var(--mg-space-3); }
.account-shell .devices-head { padding-bottom: var(--mg-space-3); box-shadow: 0 1px 0 var(--mg-line); }
.account-shell .tile.device-icon { display: none; }
.account-shell .card > * + * { margin-top: var(--mg-space-4); }
main.page .account-shell h2 { font-size: var(--mg-fs-heading); line-height: var(--mg-lh-heading); font-weight: var(--mg-weight-medium); letter-spacing: var(--mg-track-heading); }
main.page .account-shell h3 { font-size: var(--mg-fs-subhead); line-height: var(--mg-lh-subhead); font-weight: var(--mg-weight-medium); letter-spacing: var(--mg-track-heading); }
.account-shell .btn { font-weight: var(--mg-weight-medium); }
.account-shell .btn.primary { font-weight: var(--mg-weight-strong); }
.hint { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
.globe-slot { flex-shrink: 0; }
.globe-slot:empty { display: none; }

/* The account globe: a still, with the cities of the customer's plan lit. Positions come from cities.css, written
   from cities.json by cities.py; which lights are lit is decided by the server (cities.account_globe). The heading
   (an email, often long) keeps the whole column: the globe sits above it, or out in the margin on a wide screen.
   The still has room for its halo, so the box reaches past its neighbours, and the image's edge is masked away. */
.aglobe { --globe: clamp(112px, 15vw, 190px); position: relative; display: block; width: var(--globe); aspect-ratio: 1;
  margin: calc(var(--globe) * -.12) 0 calc(var(--globe) * -.06) calc(var(--globe) * -.11);
  background: url(globe-account.jpg) center / contain no-repeat;
  background-image: image-set(url(globe-account.avif) type("image/avif"), url(globe-account.jpg) type("image/jpeg"));
  -webkit-mask-image: radial-gradient(closest-side, var(--mg-bg) 84%, transparent);
  mask-image: radial-gradient(closest-side, var(--mg-bg) 84%, transparent);
  transition: filter var(--mg-slow) var(--mg-ease); }
.plan-globe { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--mg-space-4); align-items: center; }
.plan-globe .aglobe { --globe: 96px; margin: calc(var(--mg-space-2) * -1) 0; }
.plan-globe-words { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
.aglobe .gl { --d: max(3px, calc(var(--globe) * .016)); position: absolute; width: var(--d); height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2); border-radius: 50%;
  background: color-mix(in srgb, var(--mg-ink) 42%, transparent); }
.aglobe .gl.lit { --d: max(4px, calc(var(--globe) * .026)); background: var(--mg-gold-hi);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--mg-gold) 40%, transparent), 0 0 calc(var(--d) * 1.8) calc(var(--d) * .4) var(--mg-gold-glow); }
.aglobe .gl.waiting, .aglobe .gl.held { --d: max(6px, calc(var(--globe) * .034)); background: transparent;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-ink) 72%, transparent); }
.aglobe .gl.waiting { animation: gl-wait 2.4s var(--mg-ease) infinite alternate; }
.aglobe .gl.waiting:nth-child(2n) { animation-delay: -.8s; }
.aglobe .gl.waiting:nth-child(3n) { animation-delay: -1.6s; }
.aglobe .gl.held { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-waiting) 70%, transparent); }
.aglobe .gl.far { width: max(6px, calc(var(--globe) * .03)); height: 2px; margin: -1px 0 0 calc(max(6px, calc(var(--globe) * .03)) / -2);
  border-radius: 50%; transform: rotate(var(--rim)); }
.aglobe .gl.far.lit { box-shadow: 0 0 8px 1px var(--mg-gold-glow); }
.aglobe .gl.far.waiting, .aglobe .gl.far.held { box-shadow: none; background: color-mix(in srgb, var(--mg-ink) 55%, transparent); }
.aglobe .gl.far.held { background: color-mix(in srgb, var(--mg-waiting) 60%, transparent); }
.aglobe.is-held { filter: grayscale(.7) brightness(.72); }
@keyframes gl-wait { from { opacity: .3; } to { opacity: 1; } }

.panel.wait-card { max-width: none; width: 100%; margin: 0; }
.panel.wait-card .tile { margin: 0 0 6px; }
.panel.wait-card .notice { text-align: left; }
.wait-inline { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding-top: 8px; }
.wait-copy { display: grid; gap: 14px; min-width: 0; }

.plan-meta { display: grid; gap: var(--mg-space-1); min-width: 0; }
.plan-meta h2 { overflow-wrap: anywhere; }
.plan-card .status { display: flex; align-items: flex-start; gap: var(--mg-space-3); font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); color: var(--mg-ink); }
.plan-card .status::before { content: ""; width: 8px; height: 8px; margin-top: .45em; border-radius: 50%; flex-shrink: 0; background: var(--mg-gold); }
.plan-billing { display: grid; gap: var(--mg-space-2); justify-items: start; padding-top: var(--mg-space-4); box-shadow: 0 -1px 0 var(--mg-line); }
.plan-billing form .btn { width: auto; }
.plan-card.is-ending .status { color: var(--mg-ink); }
.plan-card.is-ending .status::before { background: var(--mg-gold); box-shadow: none; }  /* still on until the date */
/* held, payment failed, past due (agy U-01): no box (it touched the text once cards lost their padding); the plan keeps
   the same unboxed header as every state, its status line and dot say what is wrong, and Manage billing, the one way
   out, becomes the screen's action: the moonlight button, still the same <button> in the same form. The server makes
   no other button primary in these states. */
.account-shell .plan-card:is(.is-held, .is-payment-failed, .is-past-due) .plan-billing form .btn {
  min-height: var(--mg-control-glass); padding: var(--mg-space-3) 22px; font-weight: var(--mg-weight-strong); color: var(--mg-act-ink); text-decoration: none;
  background-color: var(--mg-act); transition: background-color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade); }
.account-shell .plan-card:is(.is-held, .is-payment-failed, .is-past-due) .plan-billing form .btn:hover { background-color: var(--mg-act-hover); color: var(--mg-act-ink); }
.account-shell .plan-card:is(.is-held, .is-payment-failed, .is-past-due) .plan-billing form .btn:active { background-color: var(--mg-act-press); transition-duration: var(--mg-t-quick); }
.plan-card.is-held .status, .plan-card.is-payment-failed .status { color: var(--mg-note-text); font-weight: 500; }
.plan-card.is-held .status::before { background: var(--mg-waiting); box-shadow: none; }
.plan-card.is-payment-failed .status::before { background: var(--mg-error); box-shadow: none; }
.plan-card.is-ended .status::before, .plan-card.is-incomplete .status::before, .plan-card.is-inactive .status::before { background: var(--mg-waiting); box-shadow: none; }
/* a notice in the account is a status line in the row it belongs to, not a box inside an unboxed row (agy U-08) */
.account-shell .notice { padding: 0; background: none; box-shadow: none; font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); }
.account-shell.is-held .device-title h3 { color: var(--mg-mute); }  /* not opacity on the block: it took small text to 3.6:1 and dimmed the focus ring */

.devices-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--mg-space-2) var(--mg-space-4); }
.empty-note { color: var(--mg-mute); }
.account-shell .device { padding: var(--mg-space-5) 0; margin-top: 0; box-shadow: 0 1px 0 var(--mg-line); }
.account-shell .device > * + * { margin-top: var(--mg-space-4); }
.device > .fold-body { margin-top: 0; }  /* stage 3: the card's body sits in .fold-in with the same spacing, so a wide card is */
.fold-in > * { margin-top: 12px; }        /* exactly as before and a folded one is its name row alone */
.account-shell .fold-in > * { margin-top: var(--mg-space-4); }
.fold-state { display: none; }
.device-head { display: flex; align-items: center; gap: var(--mg-space-4); }
.device-title { min-width: 0; display: grid; gap: var(--mg-space-1); }
.device-title h3 { overflow-wrap: anywhere; }
.device-title .note { font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); color: var(--mg-mute); }
.ready-bar { display: flex; gap: 6px; max-width: 280px; }
.ready-seg { flex: 1 1 0; min-width: 8px; height: 6px; border-radius: var(--mg-pill); background: color-mix(in srgb, var(--mg-white) 12%, transparent); }
.ready-seg.on { background: var(--mg-gold); }  /* a ready location is a light that is on */
/* fresh.js: the locations that came ready since the last look come on one after another, each at the slow step and a
   quick step after the one before; a device that became ready fades its codes in; a page that changed whole (the
   waiting card gave way to the account) fades in. Under reduced motion everything is simply there. */
.ready-seg.on.lit { animation: mg-light-on var(--mg-t-slow) var(--mg-ease) calc(var(--lit-k, 0) * var(--mg-t-quick)) both; }
@keyframes mg-light-on { from { background-color: color-mix(in srgb, var(--mg-white) 12%, transparent); } }
.device.arrived > :not(.device-head):not(.done), .account-shell.arrived > * { animation: mg-words-in var(--mg-t-standard) var(--mg-ease) both; }
/* the line after Add, New link or Remove (DONE_LINES): a quiet line where the reader is looking, in ink, not a box and
   not the red error line; it fades in once at the standard step. fresh.js carries it across its swaps while the new
   device is prepared (.held: already seen, so it does not fade in again). Reduced motion: simply there. */
.done { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-ink); animation: mg-words-in var(--mg-t-standard) var(--mg-ease) both; }
.done.held { animation: none; }
.device-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--mg-space-5); align-items: start; }
details.qr-pick { min-width: 0; }
details.qr-pick > summary {
  list-style: none; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 38px; padding: 6px 8px; border-radius: var(--mg-control-corner);
  font-size: 0.875rem; font-weight: 550; white-space: nowrap; color: var(--mg-mute); background: color-mix(in srgb, var(--mg-white) 5%, transparent);
  box-shadow: inset 0 0 0 1px var(--mg-glass-edge); transition: background-color var(--mg-t-standard) var(--mg-ease), color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade);
}
details.qr-pick > summary::-webkit-details-marker { display: none; }
details.qr-pick[open] > summary {
  color: var(--mg-ink); background: color-mix(in srgb, var(--mg-white) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-ink) 26%, transparent);
}
details.qr-pick > .qr { margin-top: 10px; }
.account-shell .qr { width: 204px; max-width: 100%; padding: 12px; border-radius: var(--mg-control-corner); background: var(--mg-qr-tile); }  /* flat: the same moonlight as the action */
/* QR V1 (2026-11-12, the owner's pick): one Clash | Hiddify switch per device, a radio group drawn as one segmented
   control; the chosen app's panel (its code, Add button and link) shows. Without :has() both panels show. */
.device { container: device / inline-size; }
.device-body { display: block; }
.app-switch { display: grid; gap: var(--mg-space-4); }
.app-seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, auto); justify-self: start; min-height: var(--mg-control-glass);
  padding: 4px; gap: 0; border-radius: var(--mg-control-corner); background: color-mix(in srgb, var(--mg-white) 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-white) 10%, transparent); }
.app-radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.app-seg label { display: flex; align-items: center; justify-content: center; padding: 0 var(--mg-space-5); border-radius: var(--mg-row); cursor: pointer;
  font-size: var(--mg-fs-ui); font-weight: var(--mg-weight-medium); color: var(--mg-mute); transition: color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade); }
.app-radio:checked + label { color: var(--mg-act); font-weight: var(--mg-weight-strong); background: color-mix(in srgb, var(--mg-white) 16%, transparent); }  /* the thumb */
/* where :has() works the thumb is one surface that slides to the chosen app (--mg-t-standard); the two sides are equal */
@supports selector(:has(*)) {
  .app-seg { grid-auto-columns: minmax(96px, 1fr); }
  .app-seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: var(--mg-row);
    background: color-mix(in srgb, var(--mg-white) 16%, transparent); transition: translate var(--mg-t-standard) var(--mg-ease); }
  .app-seg:has(.app-r2:checked)::before { translate: 100% 0; }
  .app-seg label { position: relative; }
  .app-radio:checked + label { background: none; }
}  /* the chosen app's code swaps at once: a fade from nothing blinked the code area dark for ~60 ms */
.app-radio:focus-visible + label { outline: 2px solid var(--mg-act-ring); outline-offset: 2px; }
.app-switch:has(.app-r1:checked) .app-p2, .app-switch:has(.app-r2:checked) .app-p1 { display: none; }
.app-panel { display: grid; gap: var(--mg-space-4); min-width: 0; }
.app-act { display: grid; gap: var(--mg-space-3); min-width: 0; align-content: start; }
.app-act > .btn { width: 100%; }
.app-install { margin: 0; }
.app-install a { color: var(--mg-ink); text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; }
.qr-body { position: relative; }
.qr-how { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
.qr-how .on-wide { display: none; }
.app-act .qr-how { display: none; }
details.qr-show > summary, details.qr-big > summary { list-style: none; cursor: pointer; }
details.qr-show > summary::-webkit-details-marker, details.qr-big > summary::-webkit-details-marker { display: none; }
details.qr-show > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: var(--mg-space-2) 0;
  box-shadow: 0 -1px 0 var(--mg-line); font-size: var(--mg-fs-ui); font-weight: var(--mg-weight-medium); color: var(--mg-ink); }
details.qr-show > summary::after { content: ""; width: 7px; height: 7px; margin: -3px 4px 0 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
details.qr-show[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
/* Show QR code, Manage this device, Remove device: the content eases open (--mg-t-standard) and shut (--mg-t-quick)
   instead of cutting in one frame; where ::details-content is unknown they still open at once. Not "Trouble scanning?":
   it swaps one code for the other in the same place, and easing it showed both codes stacked for a moment (agy M-05) */
:is(details.qr-show, details.device-manage, details.remove, details.redeem-fold)::details-content {
  block-size: 0; opacity: 0; overflow: clip;
  transition: block-size var(--mg-t-quick) var(--mg-ease), opacity var(--mg-t-quick) var(--mg-ease), content-visibility var(--mg-t-quick) allow-discrete; }
:is(details.qr-show, details.device-manage, details.remove, details.redeem-fold)[open]::details-content { block-size: auto; opacity: 1; transition-duration: var(--mg-t-standard); }
details.qr-show > summary::after, .device-manage > summary::after { transition: transform var(--mg-t-quick) var(--mg-ease), margin-top var(--mg-t-quick) var(--mg-ease); }
.when-open { display: none; }
details[open] > summary > .when-open { display: inline; }
details[open] > summary > .when-closed { display: none; }
.qr-body { display: grid; gap: var(--mg-space-3); justify-items: center; padding: var(--mg-space-2) 0 var(--mg-space-3); }
.account-shell .qr-body .qr { width: 220px; padding: 12px; }  /* 220 px or more for a real-length link (second reader) */
details.qr-big > summary { font-size: var(--mg-fs-ui); color: var(--mg-mute); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--mg-mute) 45%, transparent); text-underline-offset: 3px; }
/* Put the summary's click target behind the scrollable sheet. Its visible Done control is above the sheet. */
details.qr-big[open] > summary { min-height: 0; padding: 0; text-decoration: none; }
details.qr-big[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 70; }
details.qr-big[open] > summary:focus-visible > .when-open { outline: 2px solid var(--mg-act-ring); outline-offset: 4px; }
details.qr-big[open] > summary > .when-open { position: fixed; z-index: 72; left: 0; right: 0; margin-inline: auto; bottom: calc(2 * var(--mg-space-5));
  display: inline-flex; align-items: center; justify-content: center; width: calc(min(360px, 100vw - 32px) - 2 * var(--mg-space-5)); min-height: var(--mg-control-glass);
  border-radius: var(--mg-control-corner); color: var(--mg-ink); font-weight: var(--mg-weight-medium); background: color-mix(in srgb, var(--mg-white) 9%, var(--mg-sheet)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-white) 14%, transparent); }
/* centred by its insets and auto margins, never by a -50% transform: a transform leaves the code on a fractional
   pixel whenever the sheet's width or height is odd, and the browser then resamples it (soft on a 2x screen) */
details.qr-big > .qr-sheet { position: fixed; z-index: 71; left: 0; right: 0; margin-inline: auto; bottom: var(--mg-space-5); color-scheme: dark; overscroll-behavior: contain;
  width: min(360px, calc(100vw - 32px)); max-width: calc(100% - 32px); max-height: calc(100svh - 32px); overflow-y: auto; display: grid; gap: var(--mg-space-3); justify-items: center; padding: var(--mg-space-5) var(--mg-space-5) calc(var(--mg-space-5) + var(--mg-control-glass) + var(--mg-space-4));
  border-radius: var(--mg-card); background: var(--mg-sheet); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-white) 10%, transparent), 0 0 0 100vmax color-mix(in srgb, var(--mg-bg) 92%, transparent); }
details.qr-big::details-content { transition: content-visibility var(--mg-t-quick) allow-discrete; }
details.qr-big > .qr-sheet { opacity: 0; translate: 0 8px; transition: opacity var(--mg-t-quick) var(--mg-ease), translate var(--mg-t-quick) var(--mg-ease); }
details.qr-big[open]::details-content { transition-duration: var(--mg-t-standard); }
details.qr-big[open] > .qr-sheet { opacity: 1; translate: 0 0; transition-duration: var(--mg-t-standard); }
@starting-style { details.qr-big[open] > .qr-sheet { opacity: 0; translate: 0 8px; } }
details.qr-big[open] > summary > .when-open { animation: mg-say-in var(--mg-t-standard) var(--mg-ease); }  /* Done arrives with its sheet */
@keyframes mg-say-in { from { opacity: 0; } }
/* with copy.js, Done is a button inside the sheet (agy M-03: the summary's Done stood still while the sheet rose
   behind it, and vanished in one frame while the sheet faded out); the summary is then only the scrim, under the sheet */
.qr-done[hidden] { display: none; }
.qr-sheet > .qr-done { justify-self: stretch; margin-top: var(--mg-space-2); }
details.qr-big.with-done[open] > summary > .when-open { display: none; }
details.qr-big.with-done > .qr-sheet { z-index: 73; padding-bottom: var(--mg-space-5); }
details.qr-big[open] { min-block-size: calc(var(--mg-fs-ui) * 1.6); }  /* its summary leaves the flow as the scrim: the line it held (16 px type, 1.6) stays (issue #269) */
.qr-sheet-title { justify-self: start; font-size: var(--mg-fs-heading); line-height: var(--mg-lh-heading); font-weight: var(--mg-weight-medium); letter-spacing: var(--mg-track-heading); }
.account-shell .qr-sheet .qr { width: min(280px, 100%); padding: 16px; }
.qr-sheet .qr-how { text-align: center; }
/* QR Q1 "lights on navy" (the owner's pick): moonlight round dots and ring finders on a deep navy tile that falls slightly
   darker to the edge, with a hairline (a light-on-dark code). The plain code (dark modules on moonlight) is one
   tap away under it, a <details> with no script; the Enlarge sheet follows that choice. */
.account-shell .qr.qr-art { padding: 10px; background: radial-gradient(farthest-corner at 50% 50%, var(--mg-qr-art-tile) 50%, var(--mg-qr-art-tile-edge));
  box-shadow: inset 0 0 0 1px var(--mg-qr-art-line); }
.account-shell .qr-sheet .qr.qr-art { padding: 14px; }
.qr svg.qr-dots { shape-rendering: geometricPrecision; }
.qr svg.qr-dots path { fill: none; stroke: var(--mg-qr-art-dot); }
details.qr-alt { text-align: center; }
details.qr-alt[open] { display: flex; flex-direction: column-reverse; align-items: center; gap: var(--mg-space-3); }  /* the code, the way back under it */
details.qr-alt > summary { list-style: none; cursor: pointer; text-wrap: balance; font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute);
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--mg-mute) 45%, transparent); text-underline-offset: 3px; }
details.qr-alt > summary::-webkit-details-marker { display: none; }
.qr-body:has(> details.qr-alt[open]) > .qr-art { display: none; }
.qr-sheet .qr-plain { display: none; }
.qr-body:has(> details.qr-alt[open]) .qr-sheet .qr-art { display: none; }
.qr-body:has(> details.qr-alt[open]) .qr-sheet .qr-plain { display: block; }
/* a laptop (the device is wide): the code is open beside the button, the how-to line under the link */
/* On a phone the code waits behind "Show QR code" (copy.js folds it). The page arrives with it open (no script: open is
   right), so until copy.js has folded it (html.mg-folds) an open fold on a phone-width device is drawn as a closed one:
   the code is never painted for a moment and then folded away on a slow first load. That drawing is held for 1.5 s at
   most (--mg-fold-hold, a clock on the page, not motion): if copy.js never runs (a failed or blocked load) the code is
   then simply open, as without scripts, and the fold opens and shuts by itself. A browser without style queries skips
   the hold and folds as before. */
details.qr-show.mg-instant::details-content { transition: none; }
details.qr-show.mg-instant > summary::after { transition: none; }
@keyframes mg-fold-hold { from, to { --mg-fold-hold: on; } }
@media (scripting: enabled) {
  html:not(.mg-folds):has(main.app) { animation: mg-fold-hold 1.5s linear; }  /* the app pages only: the public pages run no such clock */
  @container device (width < 520px) {
    @container style(--mg-fold-hold: on) {
      html:not(.mg-folds) details.qr-show[open] > :not(summary) { display: none; }
      html:not(.mg-folds) details.qr-show[open] > summary > .when-open { display: none; }
      html:not(.mg-folds) details.qr-show[open] > summary > .when-closed { display: inline; }
      html:not(.mg-folds) details.qr-show[open] > summary::after { margin-top: -3px; transform: rotate(45deg); }
      /* stage 3: every card but the kept one is drawn as its name row from the first paint */
      html:not(.mg-folds) .device[data-fold="shut"] > .fold-body { display: none; }
      html:not(.mg-folds) .device[data-fold] .device-title { flex: 1; }
      html:not(.mg-folds) .device[data-fold] > .device-head { min-height: 24px; }
      html:not(.mg-folds) .device[data-fold="shut"] .fold-state { display: block; }
      html:not(.mg-folds) .device[data-fold="shut"] .device-title > .note { display: none; }
      html:not(.mg-folds) .device[data-fold] > .device-head::after { content: ""; flex-shrink: 0; width: 7px; height: 7px; margin: -3px 4px 0 0;
        border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
      html:not(.mg-folds) .device[data-fold="open"] > .device-head::after { margin-top: 3px; transform: rotate(-135deg); }
    }
  }
}
@container device (min-width: 520px) {
  /* the code's column keeps one width open and shut (16rem: the code and its "Trouble scanning?" line), so the
     actions beside it never move while the code eases open or shut */
  .app-panel { grid-template-columns: 16rem minmax(0, 1fr); gap: var(--mg-space-6); align-items: start; }
  .app-panel > details.qr-show { order: -1; }
  details.qr-show { position: relative; }
  details.qr-show > summary { box-shadow: none; min-height: 0; padding: 0; justify-content: flex-start; font-size: var(--mg-fs-ui); font-weight: var(--mg-weight-regular); color: var(--mg-mute);
    text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--mg-mute) 45%, transparent); text-underline-offset: 3px; }
  /* 44 px tall as the other text toggles (209): padding given back by an equal negative margin, so nothing moves */
  details.qr-show > summary { --mg-hit-pad: max(0px, (44px - 1lh) / 2); padding-block: var(--mg-hit-pad); margin-block: calc(-1 * var(--mg-hit-pad)); }
  details.qr-show > summary:active { color: var(--mg-ink); transition-duration: var(--mg-t-quick); }
  /* Show and Hide stay where they were pressed, at the top of the column; the code opens under them */
  details.qr-show > summary::after { display: none; }
  .qr-body { justify-items: start; padding: var(--mg-space-3) 0 0; }
  details.qr-alt { text-align: left; }  /* its own line under the code; Enlarge and Hide share the last row */
  details.qr-alt[open] { align-items: flex-start; }
  .qr-body > .qr-how { display: none; }
  .app-act .qr-how { display: block; transition: opacity var(--mg-t-quick) var(--mg-ease), visibility var(--mg-t-quick) allow-discrete; }
  .app-panel:has(> details.qr-show:not([open])) > .app-act .qr-how { opacity: 0; visibility: hidden; }  /* "Scan it" only beside a code */
  .qr-how .on-wide { display: inline; } .qr-how .on-narrow { display: none; }
  .app-act > .btn { width: auto; justify-self: start; }
  details.qr-big[open] > summary > .when-open { top: 0; bottom: 0; height: var(--mg-control-glass); margin-block: auto; width: calc(420px - 2 * var(--mg-space-5)); transform: translateY(calc(var(--qr-sheet-h) / 2 - var(--mg-space-5) - var(--mg-control-glass) / 2)); }
  details.qr-big { --qr-sheet-h: min(520px, calc(100svh - 32px)); }
  details.qr-big > .qr-sheet { top: 0; bottom: 0; margin-block: auto; height: var(--qr-sheet-h); max-height: calc(100svh - 32px); width: min(420px, calc(100% - 32px)); overflow-y: auto; align-content: start; }
  details.qr-big.with-done > .qr-sheet { height: fit-content; }
}
@media (max-height: 560px) {
  details.qr-big > .qr-sheet, details.qr-big.with-done > .qr-sheet { gap: var(--mg-space-2); padding: var(--mg-space-4); }
  details.qr-big:not(.with-done) > .qr-sheet { padding-bottom: calc(var(--mg-space-4) + var(--mg-control-glass) + var(--mg-space-3)); }
  .account-shell .qr-sheet .qr, .account-shell .qr-sheet .qr.qr-art { width: min(280px, 100%, max(136px, calc(100svh - 248px))); padding: 10px; }
}
.copy-group { display: grid; gap: var(--mg-space-2); min-width: 0; }
.copy-group label { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
.copy-row { display: flex; flex-wrap: wrap; gap: var(--mg-space-2); align-items: center; }
.copy-row input.link { flex: 1 1 180px; min-width: 0; min-height: 46px; padding: 0 var(--mg-space-4); font-size: var(--mg-fs-ui); }
.copy-row .btn { width: auto; min-height: 46px; padding: var(--mg-space-2) var(--mg-space-5); font-size: var(--mg-fs-ui); flex-shrink: 0; }
.copy-row button[data-copy] { min-width: 6.5em; }  /* "Copy" and "Copied" take the same room: the field beside it never jumps */
.copy-row button[data-said] { animation: mg-said var(--mg-t-quick) var(--mg-ease); transition-duration: var(--mg-t-quick); }  /* copy.js: the new label fades in, and "Copy" fades back after 2 s */
.copy-row button[data-said="copied"] { background: color-mix(in srgb, var(--mg-white) 14%, transparent); }
@keyframes mg-said { from { color: color-mix(in srgb, var(--mg-ink) 35%, transparent); } }  /* from a faint label, never a blank button (agy M-06) */
.device-manage { padding-top: var(--mg-space-3); box-shadow: 0 -1px 0 var(--mg-line); }
.device-manage > summary { list-style: none; display: inline-flex; align-items: center; gap: var(--mg-space-2); min-height: 44px; cursor: pointer;
  font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); font-weight: var(--mg-weight-medium); color: var(--mg-mute); transition: color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade); }
.device-manage > summary:hover, .device-manage[open] > summary { color: var(--mg-ink); }
.device-manage > summary::-webkit-details-marker { display: none; }
.device-manage > summary::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.device-manage[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.manage-rows { display: grid; gap: var(--mg-space-4); padding: var(--mg-space-2) 0 var(--mg-space-2); }
.manage-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mg-space-2) var(--mg-space-4); }
.manage-row > form, .manage-row > details.remove { flex: none; max-width: 100%; }
.manage-row .hint { flex: 1 1 240px; min-width: 0; }
/* open, the confirmation says it: the hint folds away as the confirmation opens, and back as it shuts, instead of
   leaving in one frame (the row jumped 53 px on a phone, agy M-05); where height cannot ease to auto it still goes at once */
.manage-row .hint { interpolate-size: allow-keywords; overflow: clip;
  transition: height var(--mg-t-quick) var(--mg-ease), opacity var(--mg-t-quick) var(--mg-ease), visibility var(--mg-t-quick) allow-discrete; }
.manage-row:has(details.remove[open]) .hint { height: 0; opacity: 0; visibility: hidden; transition-duration: var(--mg-t-standard); }
.manage-row:has(> details.remove) { transition: row-gap var(--mg-t-quick) var(--mg-ease); }
.manage-row:has(> details.remove[open]) { row-gap: 0; transition-duration: var(--mg-t-standard); }  /* and the gap above it, on a phone */
.manage-row .btn, .account-shell details.remove > summary.btn { width: auto; min-height: 44px; padding: var(--mg-space-2) var(--mg-space-4); font-size: var(--mg-fs-ui); }
.account-shell details.remove > summary.btn { list-style: none; color: var(--mg-error); background: transparent; box-shadow: inset 0 0 0 1px var(--mg-error-edge); }
.account-shell details.remove > summary.btn::-webkit-details-marker { display: none; }
.account-shell details.remove > summary.btn:hover { background: var(--mg-error-bg); }
.account-shell details.remove:not([open]) > summary.btn:active { background: var(--mg-error-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-error) 60%, transparent); }  /* its edge stays red when pressed */
/* open, the summary says "Keep device": the safe way back, drawn as an ordinary button; the filled red one under the
   question is the only red thing that removes */
.account-shell details.remove[open] > summary.btn { color: var(--mg-ink); background: color-mix(in srgb, var(--mg-white) 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-white) 12%, transparent); }
.account-shell details.remove[open] > summary.btn:hover { background: color-mix(in srgb, var(--mg-white) 11%, transparent); }  /* open, it stays outlined: the filled button under it is the one that removes */
.account-shell details.remove > form { width: min(360px, 100%); padding-top: var(--mg-space-4); gap: var(--mg-space-3); }  /* padding, not margin: it folds with the content */  /* unboxed (agy U-08): the question and its button under the open summary */
.account-shell details.remove > form .btn { width: auto; justify-self: start; }  /* its natural width, like New link and the summary above: not the action to make easy */
.account-shell details.remove > form .note { font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); color: var(--mg-ink); }
.btn.danger { color: var(--mg-error); background: var(--mg-error-bg); box-shadow: inset 0 0 0 1px var(--mg-error-edge); width: auto; min-height: 44px; padding: var(--mg-space-2) var(--mg-space-4); font-size: var(--mg-fs-ui); }
.btn.danger:hover { background: color-mix(in srgb, var(--mg-error) 18%, transparent); }
/* pressed, it stays red, a step deeper: the glass press above (more specific) turned it grey (agy M-07) */
.btn.danger:not([disabled]):active { background: color-mix(in srgb, var(--mg-error) 26%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mg-error) 60%, transparent); transition-duration: var(--mg-t-quick); }
.account-shell form.add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--mg-space-2) var(--mg-space-3); align-items: end; padding-top: var(--mg-space-5); margin-top: var(--mg-space-5); box-shadow: 0 -1px 0 var(--mg-line); }
.account-shell .device + form.add { margin-top: 0; box-shadow: none; }  /* the device's own hairline is the one line (agy U-05: two ran 24 px apart) */
.account-shell form.add label { grid-column: 1 / -1; font-size: var(--mg-fs-small); color: var(--mg-mute); }
.account-shell form.add .btn { width: auto; min-height: 58px; }
.account-shell #devices > .note { font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
.empty-card { max-width: var(--mg-width-text); }
.empty-card .lead { margin-top: var(--mg-space-3); }
/* Sign out everywhere (quiet) then Sign out, one row at the right end; the hint says what "everywhere" includes, on its own line under both */
.account-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--mg-space-2) var(--mg-space-4); }
.account-foot form .quiet { background: none; border: 0; font: inherit; font-size: var(--mg-fs-ui); cursor: pointer; min-height: 44px; padding: 0 var(--mg-space-2); }
.account-password form .quiet { background: none; border: 0; font: inherit; font-size: var(--mg-fs-ui); cursor: pointer; min-height: 44px; padding: 0; justify-self: start; }  /* Remove password: quiet, as Delete my account; on the section's left edge */
/* Password saved / removed: a box in the page's own note tone, the same shape as the sign-in error box (not the account's unboxed line) */
.account-shell .account-password .notice { padding: var(--mg-space-3) var(--mg-space-4); border-radius: var(--mg-row); font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-note-text); background: var(--mg-note); box-shadow: inset 0 0 0 1px var(--mg-note-edge); }
.account-foot .note { flex-basis: 100%; text-align: right; margin: 0; font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); }
.account-foot form .btn { width: auto; min-height: 44px; padding: var(--mg-space-2) var(--mg-space-5); font-size: var(--mg-fs-ui); }
.account-delete { padding-top: var(--mg-space-5); box-shadow: 0 -1px 0 var(--mg-line); }
details.account-delete-fold > summary { list-style: none; display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-size: var(--mg-fs-small); color: var(--mg-mute); }
details.account-delete-fold > summary::-webkit-details-marker { display: none; }
details.account-delete-fold > summary:hover, details.account-delete-fold[open] > summary { color: var(--mg-ink); }
.account-delete-body { display: grid; gap: var(--mg-space-3); max-width: var(--mg-width-text); padding-top: var(--mg-space-3); }
.account-delete-body > h2, .account-delete-body > p { margin: 0; }
.account-delete-body > p strong { color: var(--mg-ink); }
.account-delete-body > form { justify-items: start; padding-top: var(--mg-space-1); }
.account-delete-body > form .btn { width: auto; min-height: 44px; padding: var(--mg-space-2) var(--mg-space-4); font-size: var(--mg-fs-ui); }
.deletion-panel .done { font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); color: var(--mg-ink); }
.deletion-panel .actions { display: flex; flex-wrap: wrap; gap: var(--mg-space-3); }
.deletion-panel .actions .btn { width: auto; min-height: 44px; padding: var(--mg-space-2) var(--mg-space-5); font-size: var(--mg-fs-ui); }

/* --- draft legal pages (/legal/*, linked from nowhere yet): long text at a reading measure --- */
.legal { max-width: 68ch; }
.legal > * + * { margin-top: 14px; }
main.page .legal h2 { margin-top: 40px; }
main.page .legal h3 { margin-top: 28px; }
.legal ul, .legal ol { padding-left: 1.4em; display: grid; gap: 6px; }
.legal a { color: var(--mg-ink); text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; }
.legal-blank { padding: 0 .25em; color: var(--mg-gold-hi); background: var(--mg-gold-haze); box-shadow: inset 0 -1px 0 var(--mg-gold-edge); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.legal-ref { line-height: normal; }
.legal-ref a { padding: 0 .1em; }
.legal-notes { margin-top: 48px; padding-top: 20px; box-shadow: 0 -1px 0 var(--mg-line); font-size: var(--mg-small); color: var(--mg-mute); }
main.page .legal-notes h2 { margin-top: 0; font-size: 1.125rem; color: var(--mg-ink); }
.legal-notes ol { list-style: none; padding-left: 0; margin-top: 12px; }
.legal-note-label { margin-right: .4em; font-weight: 600; color: var(--mg-ink); }

/* --- phone --- */
@media (max-width: 820px) {
  .nav { padding: 20px; }
  main.page { padding-top: 8px; }
  .home section { padding: var(--mg-space-8) 20px; }
  .home .hero { grid-template-columns: minmax(0, 1fr); align-content: start; padding: 92px 20px 52px; min-height: 100svh; }
  .hero .down { bottom: 8px; width: 44px; height: 44px; }  /* 44 x 44 tap target in the gap under the buttons, never on them */
  .hero::before { background: radial-gradient(70% 30% at 50% 22%, var(--mg-sky-glow), transparent 70%), radial-gradient(90% 26% at 50% 50%, var(--mg-horizon), transparent 75%), radial-gradient(130% 90% at 50% 40%, transparent 55%, var(--mg-vignette) 100%); }
  .stage { --stage: min(118vw, 500px, max(196px, calc(100svh - 384px))); order: -1; justify-self: start; width: var(--stage); margin: -8px 0 -12px calc(50% - var(--stage) / 2); }
  .hero .copy { padding-top: 0; }
  .hero h1 { font-size: clamp(2.75rem, 12.4vw, 3.5rem); }
  .hero .lede { margin-top: 18px; font-size: 1.0625rem; }
  .hero .ctas { margin-top: 26px; gap: 22px; }
  .home .cities .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pin { position: sticky; top: 0; z-index: 2; width: auto; max-width: none; aspect-ratio: auto; height: 300px; justify-self: stretch; order: -1; margin: -8px -20px 0; background: linear-gradient(var(--mg-bg) 82%, transparent); }
  .home .cities .pin { order: -1; }  /* the globe above the list, where it sticks (the laptop's order: 2 is more specific: agy L-01, U-04) */
  .pin canvas { left: 50%; right: auto; width: min(72vw, 280px); height: min(72vw, 280px); transform: translateX(-50%); }
  .pin .poster { left: 50%; right: auto; top: 0; bottom: auto; width: min(72vw, 280px); height: min(72vw, 280px); transform: translateX(-50%); }
  .pin.live:not(:has(canvas)) .poster { display: block; }  /* opened wider than 760 px then narrowed: the still, as without WebGL2 */
  .clist li { font-size: clamp(1.875rem, 9vw, 2.5rem); padding: 14px 0 14px 18px; }
  .clist li::before { left: 0; }
  .clist.two ol { column-gap: 14px; }
  .clist.two li { font-size: clamp(1.3125rem, 6.2vw, 1.625rem); padding: 10px 0 10px 14px; }
  .clist.two li small { font-size: 0.875rem; margin-top: 4px; }
  .clist.two li::before { width: 5px; height: 5px; top: calc(10px + .45em); }
  .home .steps .grid { grid-template-columns: 1fr; gap: 36px; }
  .home .steps .grid::before { left: 44px; right: auto; top: 44px; bottom: 44px; width: 1px; height: auto; background: linear-gradient(180deg, color-mix(in srgb, var(--mg-rim) 50%, transparent), color-mix(in srgb, var(--mg-rim) 10%, transparent)); }
  .home .steps .grid > li { display: grid; grid-template-columns: 88px 1fr; column-gap: 22px; align-items: start; }
  .home .steps .grid > li .tile { grid-row: span 3; }
  .home .steps .n { margin-top: 6px; }
  .plans, .plan-cities { grid-template-columns: 1fr; }
  .plans { row-gap: var(--mg-space-5); }
  .card.plan { padding: var(--mg-space-5) 0 0; }  /* rows: the same top hairline on each, Plus on the same left edge */
  .plan-cities li, .plan-cities li + li { padding: var(--mg-space-5) 0; box-shadow: 0 1px 0 var(--mg-line); }
  .home .join .orb { width: 96px; height: 96px; margin-bottom: var(--mg-space-5); }
  .help-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 24px; }
  .guide-pills { gap: 8px; margin-top: 20px; }
  .guide-steps > ol.steps { gap: 28px; }
  .guide-steps > ol.steps > li:not(:last-child)::before { bottom: calc(-28px - var(--step-col) / 2); }
  .step-num { font-size: 1.25rem; }
  .wait-inline, .device-body, .account-shell form.add { grid-template-columns: minmax(0, 1fr); }
  .wait-inline .tile { margin: 0; }  /* on the text's left edge, not centred over left-aligned words */
  .account-shell form.add .btn { width: 100%; margin-top: var(--mg-space-1); }
}

/* sign-in: the home globe (night.js) on the left on a laptop, running off the left and bottom edges and fading into
   black; on a phone it sits on top, small. The form is unboxed on clear black, on one left edge. Scoped to
   main.page.signin-globe so the other single-column pages keep their card. */
main.page.signin-globe > .panel { background: none; box-shadow: none; padding: 0; text-align: left; }
main.page.signin-globe .panel h1 { margin: 0; text-align: left; }
main.page.signin-globe .panel .or { text-align: left; }
body.signin-globe .foot { padding-top: var(--mg-space-4); }
@media (min-width: 821px) {
  main.page.signin-globe { position: relative; max-width: none; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    grid-template-rows: 1fr auto auto; align-items: center; column-gap: var(--mg-space-7); padding: var(--mg-space-5) var(--mg-edge) var(--mg-space-4) 0; }
  main.page.signin-globe > .panel { grid-column: 2; margin: 0; max-width: 30rem; }
  /* the live footer lines (support, Discord, GitHub; from the config) sit under the form on clear black, never over the globe */
  main.page.signin-globe > .note { grid-column: 2; position: relative; z-index: 1; max-width: 30rem; margin: var(--mg-space-3) 0 0; }
  main.page.signin-globe > .panel + .note.support,
  main.page.signin-globe > .panel + .note.github { margin-top: var(--mg-space-4); padding-top: var(--mg-space-3); box-shadow: 0 -1px 0 var(--mg-line); }
  main.page.signin-globe > .note.support + .note.github { margin-top: var(--mg-space-2); }
  /* the globe's window: the whole of main, so it ends above the footer; its lower edge fades into the page black.
     The globe is sized to the window's height (cqh) too, so a short laptop never cuts its top flat under the nav,
     and to the width left of the form, so a narrow one never puts the form over it. */
  main.page.signin-globe > .gl-left { position: sticky; top: 0; grid-column: 1; grid-row: 1 / -1; align-self: start; height: min(100%, calc(100svh - 8rem)); margin: 0; overflow: clip; pointer-events: none; container-type: size;
    -webkit-mask-image: linear-gradient(to top, transparent 0, var(--mg-bg) 34%); mask-image: linear-gradient(to top, transparent 0, var(--mg-bg) 34%); }
  body.signin-globe .foot { box-shadow: none; }  /* the globe fades into black over its last third: no hard line where the footer begins */
  main.page.signin-globe .gl-left .stage { --g: min(70vw, calc((100cqh - 24px) / .59), calc((100vw - 36rem) / .66)); position: absolute; left: calc(var(--g) * -.26); bottom: calc(var(--g) * -.3);
    width: var(--g); margin: 0; justify-self: auto;
    -webkit-mask-image: linear-gradient(to left, transparent 0, var(--mg-bg) 18%); mask-image: linear-gradient(to left, transparent 0, var(--mg-bg) 18%); }
}
@media (max-width: 820px) {
  main.page.signin-globe { display: flex; flex-direction: column; padding-top: 0; padding-bottom: var(--mg-space-4); }
  main.page.signin-globe > .gl-left { display: flex; justify-content: center; }
  main.page.signin-globe .gl-left .stage { --stage: min(64vw, 30svh); order: 0; width: var(--stage); margin: calc(var(--stage) * -.1) auto calc(var(--stage) * -.06); }
  main.page.signin-globe > .panel { margin-top: 0; margin-bottom: auto; }
  /* 560-820 px: the globe above is centred across main, while .panel (32rem) and the live footer lines under it are narrower
     than main's 680 px reading measure (and from 760 px body.has-travel main > .note would push the footer lines right) */
  main.page.signin-globe > .panel,
  main.page.signin-globe > .note { width: 100%; max-width: 32rem; margin-left: auto; margin-right: auto; }
  main.page.signin-globe > .panel + .note.support,
  main.page.signin-globe > .panel + .note.github { margin-top: var(--mg-space-4); padding-top: var(--mg-space-3); box-shadow: 0 -1px 0 var(--mg-line); }
  main.page.signin-globe > .note.support + .note.github { margin-top: var(--mg-space-2); }
  main.page.signin-globe .panel h1 { font-size: 1.875rem; }
  main.page.signin-globe .panel > * + * { margin-top: 12px; }
  main.page.signin-globe .panel form { margin-top: 14px; gap: var(--mg-space-3); }
}

/* F-02: on a short window (or zoomed), or at 320 px narrow phones, the sticky globe would cover the city rows it explains: it scrolls instead */
@media (max-width: 820px) and (max-height: 42.5rem), (max-width: 360px) { .pin { position: relative; top: auto; } }
@media (max-width: 360px) {
  .clist.two ol { grid-template-columns: 1fr; }
  .clist.two li:nth-child(2) { box-shadow: 0 -1px 0 var(--mg-line); }
  .app-seg { width: 100%; grid-auto-columns: minmax(0, 1fr); }
}
/* agy F-05: a short laptop window (1280 by 618, a browser's bars on a small screen): the cities section was 738 px tall,
   so its rest cut "Los Angeles / Top" at the window's edge (and under the trial's band) and the pinned globe ran past
   the window. On a window up to 820 px tall the air above and below, the city rows' spacing and the globe follow the
   window's height: the whole section fits, its last row clear of the band (1280 by 600 to 1536 by 820). */
@media (min-width: 821px) and (max-height: 820px) {
  .home section.cities { padding-block: min(var(--mg-section), 6svh); }
  .cities .clist { margin-top: min(var(--mg-space-6), 3svh); }
  .cities .clist li { padding-block: min(clamp(14px, 1.8vw, 26px), 1.2svh); }
  .cities .clist li::before { top: calc(min(clamp(14px, 1.8vw, 26px), 1.2svh) + .42em); }
  .pin { top: min(max(40px, calc(50svh - 290px)), 6svh); max-width: min(580px, 88svh); }
}
/* the hero's down arrow brings the cities heading up just under the sticky globe (a phone) and glides there */
@media (min-width: 361px) and (max-width: 820px) and (min-height: 42.5625rem) { #c-h { scroll-margin-top: 308px; } }
@media (prefers-reduced-motion: no-preference) { html:has(main.home) { scroll-behavior: smooth; } }
/* The phone hero, after the owner tried it ("the globe looks too small on the phone, make it larger, and you may let
   the text under covers some south part of the globe"): her reference's composition. The stage is a square 2.3 screens
   wide behind the words (the globe is 0.355 of it: 1.64 screens across), centred at 40 % of the height; the words sit
   over its dark southern half on a gradient from below and a soft halo, the button on the first screen. The stage keeps
   the drag (sideways) under the words; a vertical swipe still scrolls. Measured against the brightest globe pixel. */
@media (max-width: 820px) {
  .home .hero { padding-top: max(92px, calc(100svh - 440px)); }
  .home .hero .stage { position: absolute; z-index: 0; left: 50%; top: calc(40svh - 115vw); width: 230vw; margin: 0; transform: translateX(-50%); }
  /* the globe turns, so every longitude passes under the words: the gradient is strong enough for the brightest light at
     any angle (a pale gold light needs 69 % black under body text, 57 % under the headline, for 7:1 and 4.5:1) */
  .home .hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72%; z-index: 1; pointer-events: none;
    background: linear-gradient(to top, var(--mg-bg) 34%, color-mix(in srgb, var(--mg-bg) 93%, transparent) 56%, color-mix(in srgb, var(--mg-bg) 78%, transparent) 78%, transparent); }
  .home .hero .copy { position: relative; z-index: 2; text-shadow: 0 0 14px var(--mg-bg), 0 0 5px var(--mg-bg); }
  /* a sideways drag over the words' block turns the globe under it (agy L-04): only the headline's lines and the links
     keep the touch; the stage's pan-y keeps vertical swipes scrolling */
  .home .hero .copy { pointer-events: none; }
  .home .hero .copy :is(h1 span, a, button) { pointer-events: auto; }
  .home .hero .copy .act { text-shadow: none; }  /* the button has its own surface */
  .home .hero .down { z-index: 3; }
  /* The grip is 230vw wide here, so its own ring is cut at both screen edges and its top arc runs under the bar. Simplest
     whole indication: a transparent outline on the grip, and while it has :focus-visible the visible hero (the globe fills it) gets
     the same 2 px gold ring, inset 4 px so the hero's overflow clip keeps all four sides. Keyboard focus only. */
  .stage .grip:focus-visible { outline-color: transparent; }
  .home .hero:has(.grip:focus-visible) { outline: 2px solid var(--mg-act-ring); outline-offset: -4px; }
  .mg-home .nav { text-shadow: 0 0 14px var(--mg-bg), 0 0 5px var(--mg-bg); padding-bottom: 28px;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--mg-bg) 88%, transparent) 40%, transparent); }  /* the globe's top edge reaches the bar on short phones */
  .mg-home .nav a { color: var(--mg-ink); }  /* over the globe's rim: full ink, not the grey */
}
@media (max-width: 820px) and (max-height: 780px) {  /* a short phone lifts the words into the thinner part of the gradient:
  a little darker there, so the lead-in keeps 7:1 at every turn (360x740: 6.8 -> 7.3, agy L-02) */
  .home .hero::after { background: linear-gradient(to top, var(--mg-bg) 34%, color-mix(in srgb, var(--mg-bg) 95%, transparent) 56%, color-mix(in srgb, var(--mg-bg) 84%, transparent) 78%, transparent); }
}
/* F-06: without scripts a Copy button would do nothing; the field stays, selectable by hand */
@media (scripting: none) { .copy-row button[data-copy] { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .aglobe .gl.waiting { animation: none; opacity: .8; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  /* a rule of its own: in a list with the others, a browser that does not know ::details-content (Firefox, Safari
     before 18.4) would drop the whole rule and stop nothing (agy M-04) */
  ::details-content { transition: none !important; animation: none !important; }
  /* the fold's 1.5 s hold is a clock, not motion: it stays (it draws nothing that moves) */
  html:not(.mg-folds):has(main.app) { animation: mg-fold-hold 1.5s linear !important; }
}

/* Contrast themes (Windows high contrast, forced colours) drop box-shadow, which draws every edge in this skin.
   Give the fields, buttons and cards a real border there, in the theme's own colour; nothing changes otherwise. */
@media (forced-colors: active) {
  .qr { forced-color-adjust: none; }  /* a QR is data: it keeps its moonlight tile and ink in every theme, or it does not scan */
  input[type=email], input[type=text], input[type=password], input:not([type]), .account-shell .account-password input[type=password], .glassbtn, .btn, details.remove > summary.btn, details.qr-pick > summary,
  .account-shell details.remove > summary.btn,
  .notice, .error, .account-shell .qr,
  .panel.check-verdict .notice.is-through::before, .panel.check-verdict .notice.is-not-through::before { border: 1px solid transparent; }
  .account-shell .notice { border: 0; }  /* unboxed in the account: a line of text, as on screen */
  .panel:not(.check-verdict) .notice, main.page.wide > .notice { border: 0; }  /* lines there too */
  .account-shell .account-password .notice { border: 1px solid transparent; }  /* boxed there, as on screen */
  .account-foot form .quiet, .account-password form .quiet { border: 0; }  /* Sign out everywhere is a line of text, as on screen (the focus ring still shows) */
  .legal-blank { border: 1px dashed transparent; }
  .ready-seg { border: 1px solid transparent; }
  .ready-seg.on { background: Highlight; }
  details.qr-pick[open] > summary, .pill-link[aria-current="page"] { border: 2px solid Highlight; }  /* the chosen one is marked, not only lighter */
  .start-now input { appearance: auto; -webkit-appearance: auto; }  /* the system's own box where the theme draws edges */  /* the featured plan keeps its rule: the gold one is a box-shadow, which contrast themes drop */
  .act, .btn.primary { border: 2px solid transparent; }
  :focus-visible, .fold-toggle:focus-visible::before { outline-color: Highlight; }
  :where(a, button, input, summary, label, [tabindex]):not(:focus-visible) { outline-style: none; }  /* a transparent line shows there */
}
@media (forced-colors: active) {
  .step-pic { border: 1px solid transparent; }
}

/* The cursor prototype (cursor.js; night.js loads it only in the trial, ?travel=1, for a mouse): a moonlight dot on the
   pointer and a thin ring that follows with a short ease, larger over what can be pressed; each with a dark hairline so
   it stays seen on a light button. Fields and the globe keep the
   system cursor (the I-beam, grab); touch, reduced motion and forced colours never get it. No trails, no blending. */
@media not (forced-colors: active) { html.mg-cursor, html.mg-cursor * { cursor: none !important; } }
.mg-cur-dot, .mg-cur-ring { position: fixed; left: 0; top: 0; z-index: 2147483000; pointer-events: none; opacity: 0; transition: opacity .12s var(--mg-ease); }
html.mg-cursor .mg-cur-dot, html.mg-cursor .mg-cur-ring { opacity: 1; }
html.mg-cursor .mg-cur-dot.mg-cur-over { opacity: 0; }  /* over a link or a button: the ring only, the label stays whole */
.mg-cur-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--mg-ink); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--mg-bg) 85%, transparent); }
.mg-cur-ring { width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--mg-ink) 60%, transparent); will-change: transform;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--mg-bg) 55%, transparent); }  /* a dark hairline outside: the ring stays seen on the moonlight buttons */
@media (forced-colors: active) { .mg-cur-dot, .mg-cur-ring { display: none; } }

/* the trial (?travel=1): the words pass behind the band where the globe's horizon stands; nothing is read inside it.
   The fade is fixed to the window (a mask on main lags the compositor's scroll by a wheel step); the globe is above it */
.mg-band { position: fixed; left: 0; right: 0; bottom: 0; height: 50vh; transform: translateY(100%); z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, transparent, var(--mg-bg) 28px); }
body.mg-in-band .travel { z-index: 2; }
body.mg-in-band:not(.leaving):not(.returning) main.home { z-index: auto; }
body.mg-in-band .home :is(.steps .grid > li:last-child, .plans-home .plan-cities > li, .plans-home .center) { position: relative; z-index: 3; }
html:has(body.mg-in-band) { scroll-padding-bottom: 210px; }  /* a control reached by Tab stops above the band, its ring seen */

/* Stage 3 of "no device limit" (the parent's look 1b and the portal lead's words and rules, 2026-11-13): on a phone a
   list of two or more links folds every card but one (the line's, else the gold one, else the first) to its name row:
   the name, its state in a word, a chevron. copy.js makes each name a button inside its h3 (the disclosure pattern:
   the name stays a heading, the control reads "My phone, Ready, collapsed"); the whole row is the tap target and wears
   the focus ring. An open card shows the chevron turned and its own note under the name, not the word. Wide, or
   without script, nothing folds and the card is as it always was. */
.fold-toggle { appearance: none; margin: 0; padding: 0; border: none; background: none; font: inherit; letter-spacing: inherit; color: inherit;
  text-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fold-toggle::before { content: ""; position: absolute; inset: -12px -8px; border-radius: var(--mg-row); }  /* the row: at least 48 px tall; 8 px beside it so the ring clears the name and the chevron */
.fold-toggle:focus-visible { outline-color: transparent; }  /* the ring is the row's (::before), not the name's */
.fold-toggle:focus-visible::before { outline: 2px solid var(--mg-act-ring); outline-offset: 0; }
@container device (width < 520px) {
  .device.mg-fold-on > .device-head { position: relative; min-height: 24px; }
  .device.mg-fold-on .device-title { flex: 1; }
  .device.mg-fold-on > .device-head::after { content: ""; flex-shrink: 0; width: 7px; height: 7px; margin: 3px 4px 0 0;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-135deg);
    transition: transform var(--mg-t-quick) var(--mg-ease), margin-top var(--mg-t-quick) var(--mg-ease); }
  .device.mg-fold-on.mg-shut > .device-head::after { margin-top: -3px; transform: rotate(45deg); }
  .device.mg-fold-on.mg-shut .fold-state { display: block; flex-shrink: 0; font-size: var(--mg-fs-ui); line-height: var(--mg-lh-ui); color: var(--mg-mute); }
  .device.mg-fold-on.mg-shut.is-ready .fold-state { color: var(--mg-ink); }
  .account-shell.is-held .device.mg-fold-on.mg-shut .fold-state { color: var(--mg-mute); }
  .device.mg-fold-on.mg-shut .device-title > .note { display: none; }
  /* the body eases shut and open (rows 1fr <-> 0fr), then leaves the tree and the tab order (visibility) */
  .device.mg-fold-on > .fold-body { display: grid; grid-template-rows: 1fr; opacity: 1;
    transition: grid-template-rows var(--mg-t-standard) var(--mg-ease), opacity var(--mg-t-standard) var(--mg-ease), visibility var(--mg-t-standard); }
  .device.mg-fold-on > .fold-body > .fold-in { min-height: 0; overflow: clip; overflow-clip-margin: 8px; }  /* the rings inside still show */
  .device.mg-fold-on.mg-shut > .fold-body { grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition-duration: var(--mg-t-quick); }
  .device.mg-instant > .fold-body, .device.mg-instant > .device-head::after { transition: none; }
}

/* --- language switch and CJK typography (lane 294) --- */
.nav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mg-space-2) var(--mg-space-5); }
.lang-switch { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--mg-space-3); }
.lang-switch a { display: inline-block; font-size: var(--mg-fs-small); line-height: var(--mg-lh-small); color: var(--mg-mute); text-decoration: none;
  --mg-hit-pad: max(0px, (44px - 1lh) / 2); padding-block: var(--mg-hit-pad); margin-block: calc(-1 * var(--mg-hit-pad));
  transition: color var(--mg-t-standard) var(--mg-ease), var(--mg-ring-fade); }
.lang-switch a:hover, .lang-switch a:active { color: var(--mg-ink); }
/* narrow: the header wraps, and negative margins would let the 44 px hit areas overlap the brand: real height instead */
@media (max-width: 520px) {
  .lang-switch a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; margin-block: 0; }
  /* sign in, create an account, link sent: the header is two rows in every language (brand, then the switch), never one row in English */
  body:is(.signin-globe, .signin-sent) .nav-actions { flex-basis: 100%; min-width: 0; }
  /* the two links between /signin and /signin/create: a 44 px target, the same look */
  .note.switch-note a { display: inline-flex; align-items: center; min-height: 44px; }
}
.lang-switch a[aria-current="page"] { color: var(--mg-ink); font-weight: var(--mg-weight-medium); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.mg-home .lang-switch a { color: var(--mg-mute); }
.mg-home .lang-switch a:hover, .mg-home .lang-switch a[aria-current="page"] { color: var(--mg-ink); }
.guide-lang { font-size: var(--mg-fs-caption); font-weight: var(--mg-weight-regular); color: var(--mg-mute); margin-inline-start: var(--mg-space-1); }

:lang(zh-Hant) {
  --mg-font: "PortalLatin", "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  --mg-track-display: 0; --mg-track-section: 0; --mg-track-title: 0; --mg-track-heading: 0;
  --mg-lh-title: 1.24; --mg-lh-heading: 1.35; --mg-lh-subhead: 1.4; --mg-lh-body: 1.75; --mg-lh-ui: 1.5; --mg-lh-small: 1.65; --mg-lh-caption: 1.55;
  font-family: var(--mg-font); letter-spacing: 0; line-break: strict;
}
:lang(ja) {
  --mg-font: "PortalLatin", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", "Meiryo", sans-serif;
  --mg-track-display: 0; --mg-track-section: 0; --mg-track-title: 0; --mg-track-heading: 0;
  --mg-lh-title: 1.24; --mg-lh-heading: 1.35; --mg-lh-subhead: 1.4; --mg-lh-body: 1.75; --mg-lh-ui: 1.5; --mg-lh-small: 1.65; --mg-lh-caption: 1.55;
  font-family: var(--mg-font); letter-spacing: 0; line-break: strict;
}
:is(html:lang(zh-Hant), html:lang(ja)) .hero h1 { line-height: 1.18; letter-spacing: 0; }
:is(html:lang(zh-Hant), html:lang(ja)) .home h2 { line-height: 1.22; letter-spacing: 0; }
:is(html:lang(zh-Hant), html:lang(ja)) .brand a { letter-spacing: 0; }
:is(html:lang(zh-Hant), html:lang(ja)) .clist li { line-height: 1.25; letter-spacing: 0; }
/* CJK line ends (pages._tie_cjk): a number with its counter ("1か月", "10 分鐘") and the last characters of a paragraph
   stay on one line, so no number splits from its unit and no last line is one or two characters. */
.nw { white-space: nowrap; }

/* "Ready in three steps", the owner's pick of 2026-11-24 (preview c3 colours + p2 "one line" numerals): a black tile with a
   hairline edge and the icon in gold (the same SVG as a mask), the numeral larger and set before the heading on one baseline,
   the text hanging under the heading; balanced lines so no step ends on a stranded word or two. Placed last so it wins over
   the steps rules above; scoped to .home .steps (.tile elsewhere is unchanged). */
.home .steps .tile { background: var(--mg-bg); box-shadow: inset 0 0 0 1px var(--mg-line-strong); }
.home .steps .tile::before { content: ""; position: absolute; inset: 0; background: var(--mg-gold);
  -webkit-mask: url(icon-mail.svg) center / 44px no-repeat; mask: url(icon-mail.svg) center / 44px no-repeat; }
.home .steps .tile.plan::before { -webkit-mask-image: url(icon-plan.svg); mask-image: url(icon-plan.svg); }
.home .steps .tile.code::before { -webkit-mask-image: url(icon-code.svg); mask-image: url(icon-code.svg); }
.home .steps .n { font-size: calc(var(--mg-fs-heading) * 1.5); line-height: 1; font-weight: var(--mg-weight-regular);
  font-variant-numeric: tabular-nums; color: var(--mg-ink); }
.home .steps .grid { column-gap: var(--mg-space-5); }
.home .steps .grid::before { background: linear-gradient(90deg, var(--mg-line-strong), var(--mg-line)); }
.home .steps .grid > li { display: grid; grid-template-columns: 88px auto minmax(0, 1fr); column-gap: 0; align-items: start; align-content: start; }
.home .steps .grid > li .n { margin-right: var(--mg-space-3); align-self: baseline; }
.home .steps .grid > li h3 { align-self: baseline; }
.home .steps .grid > li p:last-child { text-wrap: balance; }
.home .steps h3 { text-wrap: balance; }
/* Headings h1 to h3 of the legal pages and of the help / guide pages: balanced lines, so no heading ends on a single word
   ("Refunds and / cancellation"). Scoped to those pages only. */
.legal :is(h1, h2, h3), main.page:has(.help-grid, .guide-card, .guide-steps, .guide-pills) :is(h1, h2, h3) { text-wrap: balance; }
@media (min-width: 821px) {
  .home .steps .grid > li { grid-template-columns: auto minmax(0, 1fr); }
  .home .steps .grid > li .tile { grid-area: 1 / 1 / 2 / -1; }
  .home .steps .grid > li .n { grid-area: 2 / 1; margin-top: var(--mg-space-5); }
  .home .steps .grid > li h3 { grid-area: 2 / 2; margin-top: var(--mg-space-5); }
  .home .steps .grid > li p:last-child { grid-area: 3 / 2; }
}
@media (max-width: 820px) {
  /* grid-row: 1 / 3 ends the vertical line's box at row 2's bottom, so -36px gap - half tile stops in tile 3's centre */
  .home .steps .grid::before { grid-row: 1 / 3; bottom: calc(-36px - 44px); background: linear-gradient(180deg, var(--mg-line-strong), var(--mg-line)); }
  .home .steps .grid > li .tile { grid-area: 1 / 1 / 3 / 2; }
  .home .steps .grid > li .n { grid-area: 1 / 2; margin-top: 0; margin-left: var(--mg-space-5); }
  .home .steps .grid > li h3 { grid-area: 1 / 3; margin-top: 0; }
  .home .steps .grid > li p:last-child { grid-area: 2 / 3; }
}
@media (max-width: 420px) {
  /* a 56 px tile (icon mask 28 px) so the text column is not squeezed to ~180 px */
  .home .steps .grid > li { grid-template-columns: 56px auto minmax(0, 1fr); }
  .home .steps .tile { width: 56px; height: 56px; }
  .home .steps .tile::before { -webkit-mask-size: 28px; mask-size: 28px; }
  .home .steps .grid::before { left: 28px; top: 28px; bottom: calc(-36px - 28px); }  /* the connecting line through the 56 px tiles' centres */
}
/* the Turnstile box (turnstile.js, size flexible): the form column's width, 300 px at the least, never wider than the column */
.ts-box { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.ts-box > iframe { max-width: 100%; }
