/* SecretGift design system: the October 2026 "Design 2" (theme2) tokens. See docs/design-system.md. */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter/InterVariable.woff2") format("woff2");
}

/* ===== Tokens ===== */

:root {
    --ink: #17324d;
    --ink-2: #4a5d70;
    --ink-3: #7f8e9d;

    --human-check-accent: #0d604d;
    --green: #0d604d;
    --green-dk: #0a4f3f;
    --green-deep: #0d604d;
    --green-lt: #e7f3ef;

    --red: #d83a3a;
    --red-dk: #b92f2f;
    --red-lt: #fdecec;

    --gold: #e9b949;
    --gold-lt: #fff5d6;
    --gold-dk: #8d7f59;
    --gold-line: #f1deac;

    --blue: #3b7fc4;
    --sky: #e3f0f7;
    --sky-2: #cfe3ef;

    --cream: #f5fbfd;
    --paper: #fff;
    --line: #e3edf2;
    --mist: #eef3f6;

    --stk: 0 2px 8px rgba(23, 50, 77, .08);
    --stk-sm: 0 1px 3px rgba(23, 50, 77, .08);
    --stk-soft: 0 4px 16px rgba(23, 50, 77, .07);

    --bw: 1px;
    --r: 14px;
    --r-lg: 16px;
    --r-btn: 9px;
    --r-pill: 999px;

    --focus: var(--green);
    --focus-ring: 0 0 0 3px rgba(13, 96, 77, .15);
    --candy: repeating-linear-gradient(135deg, var(--red) 0 9px, #fff 9px 18px);

    --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --disp: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

    --page-width: 1120px;

    /* Chart series colors, checked for color-blind separation on white with the dataviz palette check. Every chart
       also prints its numbers, because the lighter ones are below 3:1 against white. */
    --chart-1: #3b7fc4;
    --chart-2: #eb6834;
    --chart-3: #1baf7a;
    --chart-4: #eda100;
    --chart-5: #e87ba4;
    --chart-6: #008300;
}

/* ===== Base ===== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--sans);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--cream);
    overflow-wrap: break-word;
    /* The viewport covers the whole screen (viewport-fit=cover), so a phone on its side keeps the page clear of its
       notch. These are 0 everywhere else. */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    -webkit-font-smoothing: antialiased;
    /* Every checkbox and radio button is the site's green, also on a page without its own rule for them. */
    accent-color: var(--green-dk);
}

h1,
h2,
h3,
h4,
h5 {
    margin: 0;
    font-family: var(--disp);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -.01em;
    color: var(--ink);
    /* A group name can be one long word. Break it rather than let a card cut it off. */
    overflow-wrap: break-word;
    text-wrap: balance;
}

p {
    margin: 0 0 12px;
}

a {
    color: var(--green);
}

img,
svg {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

/* Grey hint text in an empty box goes away when the box has focus, so nobody takes it for a typed value. */
::placeholder {
    /* Lighter than typed text (13:1) but still 4.85:1 on white, which meets WCAG AA. --ink-3 is only 3.4:1. */
    color: #637387;
    opacity: 1;
}

:focus::placeholder {
    color: transparent;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* FocusOnNavigate and the skip link move focus by script; no ring is needed there. */
h1:focus,
main:focus {
    outline: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skiplink {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 8px 14px;
    border-radius: var(--r-btn);
    background: var(--green);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.skiplink:focus {
    top: 12px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Shell ===== */

main {
    flex: 1 0 auto;
}

.pad {
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 22px 28px 44px;
}

.brandlink {
    display: block;
    flex: none;
    line-height: 0;
}

.brand {
    display: block;
    width: auto;
    height: 44px;
}

/* Public pages */
.sitenav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 26px;
    padding: 12px 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.freechip {
    padding: 2px 11px;
    border: 1px solid var(--gold-line);
    border-radius: var(--r-pill);
    background: var(--gold-lt);
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 700;
}

.pubnav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}

.pubnav a:not(.btn) {
    padding: 7px 11px;
    border-radius: 10px;
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}

.pubnav a:not(.btn):hover {
    background: var(--green-lt);
    color: var(--green);
}

/* Signed-in pages */
.sitehead {
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 12px 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.mainnav {
    display: flex;
    gap: 26px;
    margin-left: 30px;
}

.mainnav a {
    margin-bottom: -13px;
    padding: 12px 2px;
    border-bottom: 3px solid transparent;
    color: var(--ink-2);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.mainnav a:hover {
    color: var(--green);
}

.mainnav a.on {
    color: var(--green);
    border-bottom-color: var(--green);
}

.acct {
    position: relative;
    margin-left: auto;
}

.acct > summary,
.burger > summary {
    list-style: none;
    cursor: pointer;
}

.acct > summary::-webkit-details-marker,
.burger > summary::-webkit-details-marker {
    display: none;
}

.acct > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px;
    border-radius: 12px;
}

.acct .ini {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--green-lt);
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
}

.acct .who b {
    display: block;
    font-size: 14px;
}

.acct .who small {
    color: var(--ink-2);
    font-size: 12px;
}

.acct .chev {
    color: var(--ink-3);
    font-size: 12px;
}

.menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    min-width: 200px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--stk-soft);
}

.menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.menu a:hover,
.menu a.on {
    background: var(--green-lt);
    color: var(--green);
}

.menu .menuuser {
    padding: 9px 12px 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
    color: var(--ink-2);
    font-size: 13px;
}

.burger {
    display: none;
    margin-left: auto;
}

.burger > summary {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
}

.burger .menu {
    left: 16px;
    right: 16px;
    top: calc(100% + 1px);
}

.sitefoot {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 28px 22px;
    border-top: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 12.5px;
}

.sitefoot nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
}

.sitefoot a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: var(--ink-2);
    text-decoration: none;
}

.sitefoot a:hover {
    color: var(--green);
    text-decoration: underline;
}

.sitefoot .ver-pill,
.sitehead .ver-pill,
.sitenav .ver-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sitefoot .ver-pill:hover,
.sitehead .ver-pill:hover,
.sitenav .ver-pill:hover {
    border-color: var(--green);
    text-decoration: none;
}

.sitehead .ver-pill,
.sitenav .ver-pill {
    flex: none;
    color: var(--ink-2);
    font-size: 11.5px;
    text-decoration: none;
}

/* ===== Page header ===== */

.backlink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--green);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
}

.backlink:hover {
    text-decoration: underline;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--red);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.lede {
    max-width: 640px;
    margin: 0;
    color: var(--ink-2);
    font-size: 14.5px;
    line-height: 1.5;
}

.lede b {
    color: var(--ink);
    font-weight: 600;
}

.herocard {
    position: relative;
    min-height: 176px;
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--stk-sm);
}

.herocard::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 3;
    height: 6px;
    background: var(--candy);
}

.herocard .copy {
    position: relative;
    z-index: 2;
    max-width: 58%;
    padding: 24px 28px 26px;
}

.herocard.noart .copy {
    max-width: none;
}

.herocard .headrow {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.herocard .headrow > .title {
    flex: 1 1 auto;
    /* Without this the row keeps a long word whole and the card cuts it off. */
    min-width: 0;
}

.herocard .title {
    margin: 0 0 8px;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
}

.herocard .art {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 62%;
}

.herocard .art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

.herocard .art::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, .92) 18%, rgba(255, 255, 255, 0) 55%);
}

/* ===== Tab strip and step bar ===== */

.tabstrip,
.stepbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    box-shadow: var(--stk-sm);
}

.tabstrip a,
.stepbar a {
    flex: none;
    padding: 8px 13px;
    border-radius: var(--r-pill);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.tabstrip a:hover,
.stepbar a:hover {
    background: var(--green-lt);
    color: var(--green);
}

.tabstrip a.on,
.stepbar a.on {
    background: var(--green);
    color: #fff;
}

.stepbar a.done:not(.on) {
    color: var(--green);
}

.stepbar a.done::before {
    content: "✓\00a0";
    content: "✓\00a0" / "";
}

.tabstrip .of,
.stepbar .of {
    margin-left: auto;
    padding: 0 10px;
    color: var(--green);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* The tabs wrap, so no tab hides past the edge with no sign that it is there. */
.tabstrip {
    flex-wrap: wrap;
}

/* A phone shows a group's pages as a tab bar at the bottom of the screen, and the setup steps as one line with Back
   and Next (owner decision L36). The phone rules at the end of this file show these parts. */
.groupbar,
.stepbar .dir {
    display: none;
}

/* ===== Folds ===== */

/* PhoneFold: a part of a page that a phone folds away under its summary. */
.fold > summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 12px;
    min-height: 44px;
    list-style: none;
    cursor: pointer;
}

.fold > summary::-webkit-details-marker {
    display: none;
}

.fold .foldnote {
    flex: 1 1 200px;
    min-width: 0;
}

.fold .foldact {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-weight: 700;
}

.fold .foldword {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fold[open] > summary .chev {
    transform: rotate(180deg);
}

/* A computer has the room, so it shows every fold open and hides the summary. An older browser cannot open a
   <details> from CSS. It keeps the summary, and the part opens with a click. The query is every screen that the
   phone query at the end of this file leaves out. */
@media (min-width: 821px) and (min-height: 501px), (min-width: 821px) and (pointer: fine), (min-width: 821px) and (pointer: none) {
    @supports selector(::details-content) {
        .fold > summary {
            display: none;
        }

        .fold::details-content {
            display: block;
            content-visibility: visible;
        }
    }
}

/* ===== Buttons ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1px solid var(--green);
    border-radius: var(--r-btn);
    background: var(--green);
    color: #fff;
    font-family: var(--sans);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    text-wrap: balance;
    cursor: pointer;
    transition: background .12s;
}

.btn:hover {
    background: var(--green-dk);
}

.btn.ghost {
    border: 1.5px solid var(--green);
    background: #fff;
    color: var(--green);
}

.btn.ghost:hover {
    background: var(--green-lt);
}

.btn.red {
    border-color: var(--red);
    background: var(--red);
}

.btn.red:hover {
    background: var(--red-dk);
}

.btn.xs {
    padding: 4px 10px;
    font-size: 11.5px;
}

.btn.sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

.btn.lg {
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 15px;
}

.btn.block {
    width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== Pills ===== */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: #fff;
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.pill.ok {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.pill.sent {
    border-color: var(--sky);
    background: var(--sky);
}

.pill.none {
    border-color: var(--mist);
    background: var(--mist);
    color: var(--ink-2);
}

.pill.bad {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
}

/* The design uses --ink-3 here; white text on it falls below 4.5:1, so this is one step darker. */
.pill.dec {
    border-color: var(--ink-2);
    background: var(--ink-2);
    color: #fff;
}

.pill.wait {
    border-color: var(--gold);
    background: var(--gold-lt);
    color: var(--ink);
}

/* ===== Avatars ===== */

.av {
    display: grid;
    place-items: center;
    flex: none;
    width: 29px;
    height: 29px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.av.xs {
    width: 26px;
    height: 26px;
    font-size: 11px;
}

.av.s {
    width: 29px;
    height: 29px;
    font-size: 13px;
}

.av.m {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.av.big {
    width: 82px;
    height: 82px;
    font-size: 34px;
    box-shadow: var(--stk);
}

.av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The palette green #2f9e4f gives white initials only 3.4:1, so the swatch is darkened to pass 4.5:1. */
.av.c-green { background: #288443; }
.av.c-red { background: #e0322f; }
.av.c-berry { background: #b8231f; }
.av.c-purple { background: #7b5ea7; }
.av.c-pine { background: #0f6e6e; }

/* Light swatches carry dark text so initials stay readable. */
.av.c-gold { background: #ffc233; color: var(--ink); }
.av.c-sky { background: #6fc0e8; color: var(--ink); }
.av.c-pink { background: #f38cbe; color: var(--ink); }
.av.c-tan { background: #c08b4a; color: var(--ink); }

.faces {
    display: flex;
    align-items: center;
}

.faces > .av {
    margin-right: -8px;
    border: 2px solid #fff;
}

.faces > .av.xs {
    margin-right: -4px;
}

.faces > .av.more {
    margin-right: 0;
    background: #fff;
    color: var(--ink);
    font-size: 10px;
    border-color: var(--line);
}

/* ===== Checks and verdicts ===== */

.chk {
    display: flex;
    gap: 13px;
    margin-bottom: 10px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    box-shadow: var(--stk-sm);
}

.chk .ic,
.verdict .ic {
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-weight: 700;
}

.chk .ic {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 15px;
}

.chk .tx {
    flex: 1;
    min-width: 0;
}

.chk .head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
    margin-bottom: 3px;
}

.chk .head > strong {
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
}

.chk .tx p {
    margin: 0;
    color: var(--ink-2);
    font-size: 12.5px;
    line-height: 1.5;
}

.chk .fix {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chk .side {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-end;
    align-self: center;
    gap: 7px;
}

.chk .status {
    flex: none;
    color: var(--ink-2);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.chk.tight {
    background: var(--gold-lt);
}

.chk.bad {
    border-color: var(--red);
    background: var(--red-lt);
}

.chk.lock,
.verdict.lock {
    border-color: var(--ink);
    background: var(--ink);
    color: #e7f3ef;
}

.chk.lock .head > strong,
.verdict.lock .vt {
    color: #fff;
}

.chk.lock .tx p,
.chk.lock .status,
.verdict.lock .vb {
    color: var(--sky-2);
}

.verdict {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--stk-sm);
}

.verdict .ic {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 22px;
}

.verdict .vt {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
    font-weight: 700;
}

.verdict .vb {
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.55;
}

.verdict .vb b {
    color: var(--ink);
}

.verdict.ok {
    background: var(--green-lt);
}

.verdict.tight {
    background: var(--gold-lt);
}

.verdict.bad {
    background: var(--red-lt);
}

/* ===== Notices ===== */

.invariant {
    margin-top: 22px;
    padding: 15px 19px;
    border-radius: var(--r);
    background: var(--green);
    color: #e7f3ef;
    box-shadow: var(--stk-sm);
}

.invariant h2 {
    margin-bottom: 6px;
    color: #fff;
    font-size: 16px;
}

.invariant p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

.invariant b {
    color: #fff;
}

.lockstrip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 11px;
    border: 1px dashed var(--ink-3);
    border-radius: 10px;
    background: #f1f5f8;
    color: var(--ink-2);
    font-size: 11.5px;
    font-weight: 600;
}

.empty {
    padding: 38px 30px;
    border: 1px dashed var(--line);
    border-radius: 20px;
    background: #fff;
    text-align: center;
    box-shadow: var(--stk-soft);
}

.empty svg {
    width: 120px;
    height: 96px;
    margin-bottom: 8px;
}

.empty h2 {
    margin-bottom: 8px;
    font-size: 22px;
}

.empty p {
    max-width: 420px;
    margin: 0 auto 18px;
    color: var(--ink-2);
    font-size: 13.5px;
}

.empty .acts {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid var(--gold-line);
    border-radius: 12px;
    background: var(--gold-lt);
    font-size: 13.5px;
    font-weight: 500;
}

.banner .ic {
    flex: none;
    font-size: 18px;
    line-height: 1;
}

.banner .tx {
    flex: 1 1 200px;
    min-width: 0;
}

.banner .from {
    display: block;
    margin-bottom: 2px;
    color: var(--red-dk);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.banner .acts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* The text keeps a readable width. The banner itself fills the row, so it lines up with the cards around it, and
   its buttons go to the right end. */
.banner.gold .tx {
    max-width: 640px;
}

.banner.gold .acts {
    margin-left: auto;
}

.banner.unverified {
    border-left: 5px solid var(--gold);
}

.banner.unverified .ic {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
}

.banner.managing {
    font-weight: 600;
}

.confirm {
    margin-bottom: 15px;
    padding: 15px 17px;
    border: 1px dashed var(--ink-3);
    border-radius: var(--r);
    background: #fff;
}

.confirm.danger {
    border: 1px solid var(--red);
    background: var(--red-lt);
}

.confirm .ct {
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
    font-weight: 700;
}

.confirm ul {
    margin: 0 0 13px;
    padding-left: 19px;
}

.confirm li {
    margin-bottom: 5px;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.5;
}

.confirm li em {
    color: var(--red-dk);
    font-style: normal;
    font-weight: 700;
}

.confirm .acts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.footnote {
    margin: 0;
    color: var(--ink-2);
    font-size: 12.5px;
}

.savedchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border: 1px solid var(--green-lt);
    border-radius: var(--r-pill);
    background: var(--green-lt);
    color: var(--green);
    font-size: 11.5px;
    font-weight: 600;
}

.savedchip.busy {
    border-color: var(--gold-line);
    background: var(--gold-lt);
    color: var(--ink);
}

/* ===== Forms ===== */

.field {
    margin-bottom: 18px;
}

.field .labrow {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 6px;
}

.field .labrow .req,
.field .labrow .opt,
.field .labrow .auto {
    margin-left: 0;
}

.field .flabel {
    /* The label may be narrower than a long word in it, such as a group name, so the word breaks. */
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
}

.field .cnt {
    margin-left: auto;
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 600;
}

.req,
.opt,
.auto {
    margin-left: 8px;
    padding: 1px 7px;
    border: 1px solid;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.req {
    border-color: var(--red);
    background: var(--red-lt);
    color: var(--red-dk);
}

.opt {
    border-color: var(--line);
    background: var(--mist);
    color: var(--ink-2);
}

.auto {
    border-color: var(--sky-2);
    background: var(--sky);
    color: var(--ink);
}

.hint {
    margin: 6px 0 0;
    color: var(--ink-2);
    font-size: 12px;
}

.field input:not([type="checkbox"], [type="radio"], [type="hidden"]),
.field select,
.field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--ink-3);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
}

.field textarea {
    min-height: 96px;
    resize: vertical;
}

.checkline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
}

.checkline input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--green-dk);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    box-shadow: var(--focus-ring);
}

/* :disabled also matches the fields in a disabled fieldset. They carry no disabled attribute. */
.field input:disabled,
.field select:disabled,
.field textarea:disabled {
    opacity: .6;
}

.field .invalid,
.field input.invalid {
    border-color: var(--red);
    background: #fff6f5;
}

/* Blazor's ValidationMessage and CSLA's CslaValidationMessages render this class. It uses the design's .problem look. */
.validation-message,
.problem {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 7px;
    color: var(--red-dk);
    font-size: 12.5px;
    font-weight: 600;
}

.validation-message::before,
.problem::before {
    content: "";
    flex: none;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    background: url("images/icon-warning.svg") center / contain no-repeat;
}

.validation-errors {
    margin: 0 0 18px;
    padding: 11px 13px 11px 32px;
    border: 1px solid var(--red);
    border-radius: 12px;
    background: #fff6f5;
    color: var(--red-dk);
    font-weight: 600;
}

/* ===== Simple content pages ===== */

.prose {
    max-width: 720px;
    padding: 28px 30px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--stk-sm);
}

.prose h1 {
    position: relative;
    margin-bottom: 12px;
    font-size: 30px;
    font-weight: 800;
}

.prose p {
    color: var(--ink-2);
}

.prose .eyebrow {
    color: var(--red);
}

.nowrap {
    white-space: nowrap;
}

.prose .acts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.guide h2,
.legal h2 {
    margin: 24px 0 6px;
}

.guide h3 {
    margin: 16px 0 4px;
}

.guide-more {
    margin-top: 28px;
}

.guide-more a {
    display: inline-block;
    min-height: 24px;
}

.release-notes section {
    margin-top: 24px;
}

.release-notes h2 small {
    margin-left: 8px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 500;
}

.release-notes h3 {
    margin: 14px 0 4px;
    color: var(--ink-2);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.release-notes ul {
    display: grid;
    gap: 6px;
    padding-left: 20px;
}

.release-notes code {
    overflow-wrap: anywhere;
}

.release-notes .foryou {
    padding: 14px 18px;
    border-radius: var(--r-lg);
    background: var(--green-lt);
}

.release-notes .foryou h2 {
    margin-top: 0;
}

.release-notes .techdetails {
    margin-top: 14px;
}

.release-notes .techdetails summary {
    color: var(--ink-2);
    font-weight: 700;
    cursor: pointer;
}

/* ===== Admin pages ===== */

.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-cards li {
    position: relative;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    box-shadow: var(--stk-sm);
}

.admin-cards h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

/* The heading link covers the whole card, so a tap anywhere on the card opens it. */
.admin-cards h2 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.admin-cards p {
    margin: 0;
    color: var(--ink-2);
}

.prose .email-list + h2 {
    margin-top: 28px;
}

/* ===== Admin dashboard and charts ===== */

.dashboard section {
    margin-top: 28px;
}

.dashboard section > h2 {
    margin-bottom: 4px;
    font-size: 20px;
}

.dashboard section > .hint {
    margin: 0 0 10px;
    font-size: 13px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
    gap: 12px;
    margin-top: 12px;
}

.kpi-grid.small {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
}

.kpi-grid + .dash-grid {
    margin-top: 14px;
}

.admin-headline {
    margin-bottom: 18px;
}

.kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper);
    box-shadow: var(--stk-sm);
    color: var(--ink);
    text-decoration: none;
}

a.kpi:hover {
    border-color: var(--green);
}

.kpi-label {
    color: var(--ink-2);
    font-size: 13px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.kpi-note,
.kpi-trend {
    color: var(--ink-2);
    font-size: 12px;
}

.sparkline {
    display: block;
    width: 100%;
    height: 30px;
    margin-top: 6px;
}

.spark-line {
    fill: none;
    stroke: var(--chart-1);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.spark-area {
    fill: var(--chart-1);
    opacity: .1;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 14px;
}

.dash-grid.wide {
    grid-template-columns: 1fr;
}

.dash-grid.gauges {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
}

.dash-card {
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper);
    box-shadow: var(--stk-sm);
}

.chart {
    margin: 0;
}

.chart-title {
    display: block;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.chart-empty {
    margin: 0;
    padding: 18px 0;
    color: var(--ink-2);
    text-align: center;
}

.chart-note {
    margin: 10px 0 0;
    color: var(--ink-2);
    font-size: 12px;
}

.chart svg {
    display: block;
    overflow: visible;
}

.chart text {
    font-family: var(--sans);
    fill: var(--ink-2);
}

.chart .s1 {
    fill: var(--chart-1);
    stroke: var(--chart-1);
}

.chart .s2 {
    fill: var(--chart-2);
    stroke: var(--chart-2);
}

.chart .s3 {
    fill: var(--chart-3);
    stroke: var(--chart-3);
}

.chart .s4 {
    fill: var(--chart-4);
    stroke: var(--chart-4);
}

.chart .s5 {
    fill: var(--chart-5);
    stroke: var(--chart-5);
}

.chart .s6 {
    fill: var(--chart-6);
    stroke: var(--chart-6);
}

.chart .swatch.s1 {
    background: var(--chart-1);
}

.chart .swatch.s2 {
    background: var(--chart-2);
}

.chart .swatch.s3 {
    background: var(--chart-3);
}

.chart .swatch.s4 {
    background: var(--chart-4);
}

.chart .swatch.s5 {
    background: var(--chart-5);
}

.chart .swatch.s6 {
    background: var(--chart-6);
}

/* Bars carry no outline of their own; a 2px stroke in the surface color is the gap between touching parts. */
.chart rect.bar {
    stroke: none;
}

.stack rect.bar,
.columns.touching rect.bar {
    stroke: var(--paper);
    stroke-width: 2;
}

.legend {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-bottom: 10px;
}

.legend li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.swatch {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-value {
    color: var(--ink-2);
}

.donut-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
}

.donut {
    width: 132px;
    height: 132px;
}

.donut-track {
    fill: none;
    stroke: var(--mist);
    stroke-width: 16;
}

.donut .donut-arc {
    fill: none;
    stroke-width: 16;
}

.chart .donut-total {
    fill: var(--ink);
    font-size: 22px;
    font-weight: 700;
    text-anchor: middle;
}

.chart .donut-caption {
    font-size: 11px;
    text-anchor: middle;
}

.bars,
.stacks {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bars li,
.stacks li {
    display: grid;
    grid-template-columns: minmax(80px, 38%) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.stacks.tall li {
    grid-template-columns: minmax(0, 1fr);
}

.bar-label {
    overflow-wrap: anywhere;
}

.bar-track {
    width: 100%;
    height: 10px;
}

.bar-value {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.bar-share {
    color: var(--ink-2);
}

.stack {
    width: 100%;
    height: 12px;
}

.stacks.tall .stack {
    height: 28px;
}

.columns {
    width: 100%;
}

.columns .baseline {
    stroke: var(--line);
    stroke-width: 1;
}

.columns .hit {
    fill: transparent;
}

.columns .column:hover .bar {
    opacity: .8;
}

.chart .value-label {
    fill: var(--ink);
    font-size: 11px;
    font-weight: 600;
}

.chart .axis-label {
    font-size: 10.5px;
}

.gauge {
    width: 100%;
    max-width: 180px;
    height: auto;
    margin: 0 auto;
}

/* The gauges in a row sit at the same height, however many lines each title takes. */
.dash-grid.gauges .dash-card {
    display: flex;
}

.gauge-chart {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.gauge-chart .gauge {
    margin-top: auto;
}

.gauge-track,
.gauge-fill {
    fill: none;
    stroke-width: 12;
    stroke-linecap: butt;
}

.gauge-track {
    stroke: var(--green-lt);
}

.gauge-fill {
    stroke: var(--green);
}

.chart .gauge-value {
    fill: var(--ink);
    font-size: 20px;
    font-weight: 700;
    text-anchor: middle;
}

.gauge-count {
    margin: 4px 0 0;
    text-align: center;
    font-size: 13px;
}

.facts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    margin: 0;
    font-size: 13px;
}

.facts dt {
    color: var(--ink-2);
}

.facts dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.email-list {
    display: grid;
    gap: 10px;
    padding-left: 20px;
}

.email-list .hint {
    display: block;
    margin-top: 2px;
}

.email-form,
.email-preview {
    margin-top: 24px;
}

.email-variables dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 14px;
    margin: 12px 0 0;
}

.email-variables dd {
    margin: 0;
    color: var(--ink-2);
}

/* The site script marks a form busy while its post runs, and the button that was pressed. */
.is-pressed[aria-disabled="true"] {
    gap: 8px;
    border-color: var(--line);
    background: var(--line);
    color: var(--ink-2);
    cursor: progress;
}

form.is-busy button:not(.is-pressed) {
    opacity: .6;
    cursor: progress;
}

.is-pressed[aria-disabled="true"]::before {
    width: 14px;
    height: 14px;
    flex: none;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: busy-spin .8s linear infinite;
    content: "";
}

form.is-busy input:not([type="hidden"]) {
    opacity: .6;
}

/* A tick or menu in a form that saves on each change shows the same spinner while its change saves. */
.is-saving {
    cursor: progress;
}

.is-saving::after {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    flex: none;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: middle;
    animation: busy-spin .8s linear infinite;
    content: "";
}

/* The site script adds this under a field that stopped taking text at its limit. */
.limitnote {
    margin: 6px 0 0;
    color: var(--red-dk);
    font-size: 12.5px;
    font-weight: 700;
}

.limitnote:empty {
    margin: 0;
}

.busynote {
    margin: 8px 0 0;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
}

/* It stays in the page while empty, so screen readers announce the text when it appears. */
.busynote:empty {
    margin: 0;
}

@keyframes busy-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 560px) {
    .email-variables dl {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .email-variables dd {
        margin-bottom: 8px;
    }
}

.email-preview h3 {
    margin: 18px 0 6px;
}

.email-preview pre {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--mist);
    font: inherit;
    font-size: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ===== Wishlist picture dialog ===== */

.picture-dialog {
    width: min(520px, calc(100% - 24px));
    max-width: calc(100% - 24px);
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 18px 44px rgba(23, 50, 77, .26);
    overflow: hidden;
}

.picture-dialog::backdrop {
    background: rgba(23, 50, 77, .74);
    backdrop-filter: blur(3px);
}

.picture-dialog-panel {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}

.picture-dialog-media {
    position: relative;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 20px 20px 16px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
}

.picture-dialog-media img {
    display: block;
    max-width: 100%;
    max-height: min(512px, 55dvh);
    width: auto;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    object-fit: contain;
}

.picture-dialog [hidden] {
    display: none;
}

.picture-dialog-error {
    margin: 0;
    padding: 24px 16px;
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
}

.picture-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: #fff;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--stk-sm);
    transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}

.picture-dialog-close:hover {
    background: var(--green-lt);
    border-color: var(--green);
    color: var(--green-dk);
}

.picture-dialog-body {
    padding: 16px 18px 18px;
    background: var(--paper);
}

.picture-dialog-title {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.3;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.picture-dialog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    margin-bottom: 6px;
}

.picture-dialog-meta:empty {
    display: none;
}

.picture-dialog-chip {
    max-width: 100%;
    padding: 1px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 800;
    color: var(--ink);
    background: var(--paper);
    overflow-wrap: anywhere;
}

.picture-dialog-chip.host {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    background: var(--cream);
}

.picture-dialog-chip.price {
    background: var(--gold);
    font-size: 11.5px;
}

.picture-dialog-chip.price.over {
    background: var(--red-dk);
    color: #fff;
}

.picture-dialog-chip.price.free {
    background: var(--green);
    color: #fff;
}

/* Darkened from --blue so white text clears WCAG AA 4.5:1 contrast. */
.picture-dialog-chip.qty {
    background: #2864a3;
    color: #fff;
}

.picture-dialog-chip.attr {
    border: 2px solid var(--ink-3);
    background: var(--paper);
    font-weight: 700;
}

.picture-dialog-chip.attr i {
    margin-right: 4px;
    color: var(--ink-2);
    font-size: 9.5px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.picture-dialog-chip.pri.top {
    background: var(--gold);
}

.picture-dialog-chip.pri.love {
    background: var(--green-lt);
}

.picture-dialog-chip.pri.plain {
    background: var(--cream);
    color: var(--ink-2);
}

.picture-dialog-desc {
    margin: 6px 0 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.picture-dialog-note {
    margin: 6px 0 0;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.picture-dialog-desc:empty,
.picture-dialog-note:empty {
    display: none;
}

.picture-dialog-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.picture-dialog-foot .picture-dialog-store {
    margin-right: auto;
}

/* ===== Blazor ===== */

#blazor-error-ui {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    width: 100%;
    /* It shows above the phone tab bar, clear of an iPhone home bar. */
    padding: 10px 48px calc(12px + env(safe-area-inset-bottom)) 20px;
    background: var(--gold-lt);
    border-top: 1px solid var(--gold-line);
    box-shadow: var(--stk-soft);
    color: var(--ink);
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 16px;
    top: 8px;
    cursor: pointer;
}

.blazor-error-boundary {
    padding: 12px 16px;
    border: 1px solid var(--red);
    border-radius: 12px;
    background: var(--red-lt);
    color: var(--red-dk);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ===== Phone and tablet ===== */

/* iOS zooms in on a box whose text is under 16px, and stays zoomed. This rule wins over the size each page sets. It
   also covers a touch screen wider than 820px, such as an iPhone on its side. */
@media (max-width: 820px), (pointer: coarse) {
    input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* WCAG 2.5.5: a tap target is at least 44px tall. This also covers a touch screen that keeps the computer layout,
   such as a tablet. */
@media (max-width: 820px), (pointer: coarse) {
    .btn,
    .burger > summary,
    .picture-dialog-close,
    .sitefoot a {
        min-height: 44px;
    }

    .burger > summary,
    .picture-dialog-close {
        min-width: 44px;
    }

    .tabstrip a,
    .stepbar a,
    .menu a {
        display: flex;
        align-items: center;
        min-height: 44px;
    }
}

/* The phone layout (owner decision L36). The second part of the query is a phone on its side: the larger phones are
   wider than 820px there, but they have a touch screen and little height. Every scoped stylesheet uses this whole
   query for its phone rules. */
@media (max-width: 820px), (pointer: coarse) and (max-height: 500px) {
    :root {
        /* The height of the group tab bar above the phone's home bar: 4px, its 52px items and its 1px line. */
        --bar: 57px;
    }

    body {
        font-size: 16px;
    }

    .pad {
        padding: 14px 16px 32px;
    }

    .brand {
        height: 36px;
    }

    .sitenav {
        gap: 10px 12px;
        padding: 10px 16px;
    }

    .pubnav .wide {
        display: none;
    }

    .pubnav a:not(.btn) {
        padding-block: 12px;
        font-size: 15px;
    }

    /* Create an account shows here only on the sign-in page. Without the chip it stays on one row at 360px. */
    .sitenav:has(.pubnav .btn:not(.wide)) .freechip {
        display: none;
    }

    /* A phone header keeps one row. The footer still shows the version. */
    .sitehead .ver-pill,
    .sitenav .ver-pill {
        display: none;
    }

    .sitehead {
        gap: 12px;
        padding: 10px 16px;
    }

    .mainnav,
    .acct {
        display: none;
    }

    .burger {
        display: block;
    }

    .sitehead > .burger {
        position: static;
    }

    .burger .menu {
        left: 14px;
        right: 14px;
    }

    .menu .menuuser {
        font-size: 14px;
    }

    .sitefoot {
        gap: 4px 12px;
        padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
        font-size: 14px;
    }

    .sitefoot nav {
        gap: 0 16px;
    }

    .sitefoot .ver-pill {
        min-height: 32px;
    }

    /* On a phone the page header is the back link and the title, with no card and no picture, so the content of the
       page starts sooner. */
    .herocard {
        min-height: 0;
        margin-bottom: 14px;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
    }

    .herocard::before,
    .herocard .art {
        display: none;
    }

    .herocard .copy {
        max-width: 100%;
        padding: 0;
    }

    /* The negative margins keep the 44px tap area from moving the lines around the link. */
    .backlink {
        min-height: 44px;
        margin: -10px 0 -6px;
        font-size: 13px;
    }

    /* The back link says where the page is, so the eyebrow under it goes. */
    .backlink + .eyebrow {
        display: none;
    }

    /* The header has no white card here. On the page color, --red is under 4.5:1, so the eyebrow is one step darker. */
    .herocard .eyebrow {
        color: var(--red-dk);
    }

    .herocard .headrow {
        align-items: center;
        gap: 8px 12px;
    }

    .herocard .title {
        margin-bottom: 4px;
        font-size: 26px;
    }

    .lede {
        font-size: 15px;
    }

    .tabstrip,
    .stepbar {
        padding: 6px 8px;
        margin-bottom: 14px;
    }

    .tabstrip a {
        padding: 6px 12px;
    }

    /* ----- The group tab bar ----- */

    .tabstrip.hasbar {
        display: none;
    }

    .groupbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        display: flex;
        /* The home bar of an iPhone covers the bottom edge, and its notch covers a side edge in landscape. */
        padding: 4px max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
        border-top: 1px solid var(--line);
        background: #fff;
        box-shadow: 0 -2px 10px rgba(23, 50, 77, .08);
    }

    .groupbar > a,
    .groupbar .barmore {
        flex: 1 1 0;
        min-width: 0;
    }

    .groupbar > a,
    .groupbar .barmore > summary {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-height: 52px;
        padding: 2px;
        border-radius: 10px;
        color: var(--ink-2);
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
        white-space: nowrap;
    }

    .groupbar .barmore > summary {
        list-style: none;
        cursor: pointer;
    }

    .groupbar .barmore > summary::-webkit-details-marker {
        display: none;
    }

    .groupbar a.on,
    .groupbar .barmore.on > summary,
    .groupbar .barmore[open] > summary {
        background: var(--green-lt);
        color: var(--green);
    }

    /* The ring stays inside the item, because the screen edge would cut a ring outside it. */
    .groupbar a:focus-visible,
    .groupbar summary:focus-visible {
        outline-offset: -3px;
    }

    .navicon {
        display: block;
        flex: none;
    }

    /* More opens a sheet above the bar. The closed sheet has no box, so nothing measures or reaches into it. */
    .groupbar .barmore:not([open]) .sheet {
        display: none;
    }

    .groupbar .sheet {
        position: absolute;
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(100% + 8px);
        /* A browser without dvh keeps the line above it. The toolbars of a phone browser change the height. */
        max-height: calc(100vh - var(--bar) - 72px);
        max-height: calc(100dvh - var(--bar) - 72px);
        overflow-y: auto;
        padding: 6px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 8px 28px rgba(23, 50, 77, .22);
    }

    .groupbar .sheet a {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 48px;
        padding: 0 14px;
        border-radius: 10px;
        color: var(--ink);
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
    }

    /* The dimmed page above the bar is part of the More button, so a tap on it closes the sheet without a script. */
    .groupbar .barmore[open] > summary::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(23, 50, 77, .32);
    }

    /* The bar moves off the screen while the on-screen keyboard is open, so it does not ride on top of it. It is
       moved, not removed, so the Tab key still reaches its links. The site script sets kb-open on the page while the
       keyboard is open (kb-watch says the script runs), so the bar comes back when the keyboard closes and the box
       keeps the focus. Without the script, a box to type in that has the focus counts as an open keyboard. A menu
       (select) is left out: it opens no keyboard, and it keeps the focus after a choice. */
    html:not(.kb-watch) body:has(:is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="button"], [type="submit"], [type="reset"]), textarea):focus) .groupbar,
    html.kb-open .groupbar {
        transform: translateY(calc(100% + 12px));
    }

    /* The page ends above the bar, and a control that takes the focus scrolls clear of it (WCAG 2.4.11). */
    body:has(.groupbar) .sitefoot {
        padding-bottom: calc(16px + var(--bar) + env(safe-area-inset-bottom));
    }

    html:has(.groupbar) {
        scroll-padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom) + 16px);
    }

    /* ----- The setup steps: one line with Back, the current step and Next ----- */

    .stepbar {
        flex-wrap: nowrap;
        gap: 4px;
        padding: 4px;
    }

    .stepbar a,
    .stepbar .of {
        display: none;
    }

    .stepbar a.prev,
    .stepbar a.next,
    .stepbar a.on {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .stepbar .dir {
        display: inline;
    }

    .stepbar a.prev,
    .stepbar a.next {
        padding: 6px 12px;
        color: var(--green);
        font-size: 15px;
    }

    /* The names of the steps beside the current one stay for a screen reader. The words Back and Next show. */
    .stepbar a.prev .nm,
    .stepbar a.next .nm {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .stepbar a.prev::before {
        content: "‹\00a0";
        content: "‹\00a0" / "";
    }

    .stepbar a.next::before {
        content: none;
    }

    .stepbar a.next::after {
        content: "\00a0›";
        content: "\00a0›" / "";
    }

    .stepbar a.on {
        flex: 1 1 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        min-width: 0;
        padding: 4px 10px;
        border-radius: 10px;
        background: none;
        color: var(--ink);
        font-size: 15px;
        line-height: 1.25;
        white-space: normal;
    }

    .stepbar a.on:hover {
        background: var(--green-lt);
        color: var(--ink);
    }

    /* "Step 2 of 5" above the name of the step, with a tick when the step is done. */
    .stepbar a.on::before {
        content: attr(data-of);
        color: var(--green);
        font-size: 12.5px;
        font-weight: 700;
    }

    .stepbar a.on.done::before {
        content: attr(data-of) " ✓";
        content: attr(data-of) " ✓" / attr(data-of);
    }

    /* A reading card fills the row here. Its 720px limit left an odd strip on the right at tablet widths. */
    .prose {
        max-width: none;
        padding: 20px 18px;
    }

    .prose ul,
    .prose ol {
        padding-left: 20px;
    }

    /* The dashboard limits the axis labels of each chart, so 12px labels still fit at 360px. */
    .chart .value-label,
    .chart .axis-label {
        font-size: 12px;
    }

    /* A long word in a button, such as a group name, breaks instead of pushing the button past the screen edge. */
    .btn {
        overflow-wrap: anywhere;
    }

    .picture-dialog-media {
        padding: 16px 14px 12px;
    }

    .picture-dialog-media img {
        max-height: min(420px, 48dvh);
    }

    .picture-dialog-body {
        padding: 14px;
    }

    /* The buttons of a check take their own line under the text. Its status stays beside the title. */
    .chk {
        flex-wrap: wrap;
        gap: 10px 12px;
        padding: 12px;
    }

    .chk .head {
        flex-wrap: wrap;
    }

    .chk .side {
        flex-direction: row;
        align-items: center;
        width: 100%;
        padding-left: 42px;
    }

    .verdict {
        gap: 12px;
        margin-bottom: 16px;
        padding: 14px;
    }

    .invariant {
        margin-top: 16px;
        padding: 14px;
    }

    .banner {
        margin-bottom: 14px;
        padding: 12px 14px;
    }

    .field {
        margin-bottom: 14px;
    }

    .footbar {
        gap: 10px 14px;
        margin-top: 18px;
        padding-top: 14px;
    }

    .fold > summary {
        font-size: 15px;
    }

    /* ----- Phone type: body text is 15px or more, notes are 13.5px or more, and labels are 12.5px or more ----- */

    .btn,
    .btn.lg {
        font-size: 16px;
    }

    .btn.sm {
        font-size: 15px;
    }

    .btn.xs {
        padding: 6px 12px;
        font-size: 14px;
    }

    .chk .head > strong,
    .confirm .ct {
        font-size: 16px;
    }

    .banner,
    .chk .tx p,
    .verdict .vb,
    .invariant p,
    .confirm li,
    .empty p {
        font-size: 15px;
    }

    .field .flabel {
        font-size: 15px;
    }

    .hint,
    .footnote,
    .busynote,
    .limitnote,
    .validation-message,
    .problem,
    .kpi-note,
    .kpi-trend,
    .chart-note {
        font-size: 14px;
    }

    .freechip,
    .eyebrow,
    .pill,
    .chk .status,
    .banner .from,
    .savedchip,
    .field .cnt,
    .req,
    .opt,
    .auto {
        font-size: 12.5px;
    }

    .lockstrip {
        align-items: flex-start;
        font-size: 13.5px;
        font-weight: 500;
    }

    .kpi-label {
        min-height: 3em;
    }
}

/* On a setup page of a phone held upright, the main action stays in view above the tab bar, with its note, which can
   hold a warning. A phone on its side has too little height for that, so there the action stays in the page. */
@media (max-width: 820px) and (min-height: 501px) {
    /* A menu that opens from a row of the page must show above this bar, so the bar takes the lowest level. */
    main:has(.stepbar) .footbar {
        position: sticky;
        bottom: calc(var(--bar) + env(safe-area-inset-bottom));
        z-index: 1;
        gap: 6px 12px;
        margin-top: 16px;
        padding: 10px 0;
        background: var(--cream);
        box-shadow: 0 -8px 10px -8px rgba(23, 50, 77, .18);
    }

    /* The action goes back into the page while the on-screen keyboard is open, because it leaves little room. */
    html:not(.kb-watch) body:has(:is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="button"], [type="submit"], [type="reset"]), textarea):focus) .footbar,
    html.kb-open .footbar {
        position: static;
    }

    html:has(.stepbar) {
        scroll-padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom) + 140px);
    }
}

/* On the narrowest phones five labels share 320px. A smaller label keeps a word such as "Purchases" whole. */
@media (max-width: 359px) {
    .groupbar > a,
    .groupbar .barmore > summary {
        font-size: 11px;
    }
}

/* A phone on its side has little height, so each icon of the group tab bar shares a line with its label. Under 480px
   wide there is no room for that, for example when an on-screen keyboard leaves an upright phone a short screen. */
@media (min-width: 480px) and (max-width: 820px) and (orientation: landscape) and (max-height: 500px), (min-width: 821px) and (pointer: coarse) and (max-height: 500px) {
    :root {
        --bar: 49px;
    }

    .groupbar > a,
    .groupbar .barmore > summary {
        flex-direction: row;
        gap: 6px;
        min-height: 44px;
    }

    .navicon {
        width: 20px;
        height: 20px;
    }
}
