/*
  The shell and the shared components (docs/DESIGN.md), on tokens.css. Mobile first: the phone layout is the default.
  Colours, sizes and spaces come from the tokens, never literals.
*/

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-body);
    font-weight: var(--weight-regular);
    -webkit-font-smoothing: antialiased;
}

/* Young Serif has one weight (041): headings are set at 400 and get their presence from the face. */
h1, h2, h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    line-height: var(--leading-tight);
    text-wrap: balance;
}
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-base); }

p { margin: 0; max-width: var(--measure); }

a { color: var(--link); text-underline-offset: 0.15em; }

/* A component's own display (a flex form, say) must never undo the hidden attribute. */
[hidden] { display: none !important; }

input, select, textarea, button { font: inherit; }
input, select, textarea { font-size: var(--text-base); }

:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }

/* FocusOnNavigate (Routes.razor) moves focus to the page's h1 for screen readers; that is not a keyboard focus to show. */
h1:focus, h1:focus-visible { outline: none; }

.label {
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-muted);
}

.code { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.06em; }

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: calc(env(safe-area-inset-top, 0px) - 4rem);
    z-index: var(--z-toast);
    background: var(--surface);
    color: var(--fg);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    box-shadow: var(--shadow-overlay);
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + var(--space-2)); }

/* ---- buttons: pills, at least 48px tall for a primary action ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: var(--button-height);
    padding: 0 var(--space-5);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-raised); }
.btn--quiet { background: transparent; color: var(--fg); border-color: var(--edge-control); }
.btn--quiet:hover { background: var(--surface-2); }
/* On the stage, the main action is the rose (040). */
.btn--stage { background: var(--stage-bright); color: var(--on-stage-bright); }

/* ---- the mark (043): an inline SVG, so it follows the surface it sits on ---- */
.mark { display: block; flex: none; width: 2.25rem; height: 2.25rem; }
.mark__stub { fill: var(--accent); }
.mark__cut { fill: var(--surface); }
.on-stage .mark__stub { fill: var(--stage-bright); }
.on-stage .mark__cut { fill: var(--stage); }

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--target-min);
    color: inherit;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: var(--text-lg);
}

/* ---- the stage: a dark band for headers and heroes, in both themes ---- */
.on-stage { background: var(--stage); color: var(--on-stage); }
.on-stage a { color: var(--on-stage); }
.on-stage .label { color: var(--stage-bright); }

.site-header {
    padding-block: var(--space-2);
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
}
.site-header__inner { max-width: var(--page-max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }

.page {
    display: grid;
    gap: var(--space-6);
    align-content: start;
    max-width: var(--page-max);
    margin: 0 auto;
    padding-block: var(--space-6) var(--space-8);
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
    min-width: 0;
}
.page:focus { outline: none; }

/* ---- the footer: the theme switch and the quiet gg (017) ---- */
.site-footer {
    border-top: 1px solid var(--line);
    padding-block: var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
    color: var(--fg-muted);
    font-size: var(--text-sm);
}
.site-footer__inner { max-width: var(--page-max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.gg { font-family: var(--font-display); font-size: var(--text-lg); color: var(--accent); }

.theme-switch fieldset { border: 0; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--space-3); }
.theme-switch legend { float: left; margin-right: var(--space-3); }
.segmented { display: inline-flex; border: 1px solid var(--edge-control); border-radius: var(--radius-pill); padding: 2px; gap: 2px; }
.segmented button {
    min-height: calc(var(--target-min) - 6px);
    padding: 0 var(--space-4);
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--fg-muted);
    font-size: var(--text-sm);
    cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--surface-2); color: var(--fg); font-weight: var(--weight-bold); }

/* ---- the home page ---- */
.hero {
    padding-block: var(--space-7) var(--space-8);
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
    background: radial-gradient(120% 100% at 85% 0%, var(--stage-2) 0%, var(--stage) 60%);
}
.hero__inner { max-width: var(--page-max); margin: 0 auto; display: grid; gap: var(--space-4); justify-items: start; }
.hero h1 { font-size: clamp(var(--text-xl), 6vw, 3rem); max-width: 18ch; }
.hero p { color: var(--on-stage-muted); font-size: var(--text-lg); }
.hero .mark { width: 4.5rem; height: 4.5rem; }

.points { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.point { display: grid; gap: var(--space-2); align-content: start; }
.point p { color: var(--fg-muted); }

/* ---- the ticket stub (DESIGN.md): notched sides and a perforation ---- */
.stub-rule { position: relative; height: 1.5rem; }
.stub-rule::before { content: ""; position: absolute; left: 0.9rem; right: 0.9rem; top: 50%; border-top: 2px dashed var(--line); }
.stub-rule::after,
.stub-rule > span { content: ""; position: absolute; top: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--bg); }
.stub-rule::after { right: -0.75rem; }
.stub-rule > span { left: -0.75rem; }

.notice { display: grid; gap: var(--space-3); justify-items: start; }

/* ---- the stage, continued: focus, quiet buttons and the theme switch on the dark band ---- */
/* The accent ring is too dark on oxblood; on the stage, focus is the rose (3:1 or more against --stage and --stage-2). */
.on-stage :focus-visible { outline-color: var(--stage-bright); }
.on-stage .btn--quiet { color: var(--on-stage); border-color: var(--on-stage-muted); }
.on-stage .btn--quiet:hover { background: var(--stage-2); }
.on-stage .segmented { border-color: var(--on-stage-muted); }
.on-stage .segmented button { color: var(--on-stage-muted); }
.on-stage .segmented button[aria-pressed="true"] { background: var(--stage-2); color: var(--on-stage); }

.site-header__staff {
    display: inline-flex;
    align-items: center;
    min-height: var(--target-min);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
}

/* ---- buttons, continued ---- */
.btn--block { width: 100%; }
/* A row's action: still a 44px target. */
.btn--small { min-height: var(--target-min); padding: 0 var(--space-4); font-size: var(--text-sm); }
/* What removes something: outlined in the danger colour, never filled, so it is never the loudest thing on a page. */
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); }

/* ---- forms (DESIGN.md, Sign-in screens): the label above, the input, a hint, then the error ---- */
.form { display: grid; gap: var(--space-4); }
.form--narrow { max-width: 28rem; }
.field { display: grid; gap: var(--space-1); border: 0; margin: 0; padding: 0; min-width: 0; }
.field__label {
    padding: 0;
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg);
}
.field__input {
    width: 100%;
    min-height: var(--target-min);
    padding: var(--space-2) var(--space-3);
    background: var(--surface);
    color: var(--fg);
    border: 1px solid var(--edge-control);
    border-radius: var(--radius);
    font-size: var(--text-base); /* 16px, so iOS never zooms on focus */
}
.field__input--mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.field__input--compact { width: auto; min-width: 9rem; }
.field__input[readonly] { background: var(--surface-2); }
.field__hint { font-size: var(--text-sm); color: var(--fg-muted); }
.field__error { font-size: var(--text-sm); color: var(--danger); }
.field__value { color: var(--fg-muted); overflow-wrap: anywhere; }
.check { display: flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); font-size: var(--text-sm); }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.form__or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-3); color: var(--fg-muted); font-size: var(--text-sm); max-width: none; }
.form__or::before, .form__or::after { content: ""; border-top: 1px solid var(--line); }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

/* A choice among a few, each with a line saying what it means: the role on an invite. */
.choices { display: grid; gap: var(--space-2); }
.choice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-height: var(--target-min);
    padding: var(--space-3);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); }
.choice input { flex: none; width: 1.25rem; height: 1.25rem; margin: 2px 0 0; accent-color: var(--accent); }
.choice__text { display: grid; gap: 2px; }
.choice__title { font-weight: var(--weight-bold); }
.choice__hint { font-size: var(--text-sm); color: var(--fg-muted); }

/* A line of feedback after a form (StatusMessage): neutral, or the danger colour when it starts with "Error". */
.status {
    max-width: none;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--fg);
    font-size: var(--text-sm);
}
.status[data-error] { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* Words for screen readers that the eye gets from the layout. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---- the signed-out pages: one card on paper (DESIGN.md, Sign-in screens) ---- */
.account {
    display: grid;
    place-items: start center;
    min-height: 70dvh;
    padding-block: var(--space-6) var(--space-8);
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
}
.account:focus { outline: none; }
.account__card {
    width: min(100%, 26rem);
    display: grid;
    gap: var(--space-4);
    padding: var(--space-6) var(--space-5);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.account__note { font-size: var(--text-sm); color: var(--fg-muted); }

/* ---- staff pages: a header, sections, rows ---- */
.page-header { display: grid; gap: var(--space-1); }
.page-header__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.page-header__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.section { display: grid; gap: var(--space-3); align-content: start; }
.lede { color: var(--fg-muted); }

/* Lists of things (staff, invites, passkeys, companies): one bordered surface, rows divided by the line. */
.rows, .link-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.row + .row, .link-list li + li { border-top: 1px solid var(--line); }
.row--stack { display: grid; justify-content: stretch; }
.row__main { display: grid; gap: 2px; min-width: 0; }
.row__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: var(--weight-bold); }
a.row__title { color: var(--link); }
.row__meta { font-size: var(--text-sm); color: var(--fg-muted); overflow-wrap: anywhere; }
.row__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.link-list a { display: flex; align-items: center; gap: var(--space-3); min-height: var(--target-min); padding: var(--space-2) var(--space-4); color: var(--fg); text-decoration: none; }
.link-list a:hover { background: var(--surface-2); }
.link-list__meta { margin-left: auto; font-size: var(--text-sm); color: var(--fg-muted); }
.chip {
    display: inline-flex;
    align-items: center;
    padding: 1px var(--space-2);
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--fg-muted);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* An empty state: a ticket stub with its perforation (DESIGN.md, Idea), saying what will appear and the first action. */
.empty-state {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: var(--space-3);
    justify-items: start;
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.empty-state > .stub-rule { justify-self: stretch; margin-inline: calc(-1 * var(--space-5)); order: 1; }
.empty-state > h2 { order: 0; }
.empty-state__body { order: 2; display: grid; gap: var(--space-3); color: var(--fg-muted); }

/* The company switcher (044). */
.company-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.company-card {
    display: grid;
    gap: var(--space-1);
    justify-items: start;
    min-height: var(--target-min);
    padding: var(--space-4) var(--space-5);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--fg);
    text-decoration: none;
    transition: border-color var(--duration-fast) var(--ease);
}
.company-card:hover { border-color: var(--edge-control); }
.company-card__name { font-family: var(--font-display); font-size: var(--text-lg); }
.company-card__meta { font-size: var(--text-sm); color: var(--fg-muted); }

/* ---- two-step sign-in (042) ---- */
.qr { display: block; width: min(100%, 12rem); height: auto; margin-block: var(--space-3); border-radius: var(--radius); }
.qr__light { fill: var(--qr-light); }
.qr__dark { fill: var(--qr-dark); }
.key { font-family: var(--font-mono); background: var(--surface-2); color: var(--fg); padding: 1px var(--space-2); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.steps { margin: 0; padding-left: var(--space-5); display: grid; gap: var(--space-5); max-width: var(--measure); }
.steps > li { display: grid; gap: var(--space-2); }
.recovery-codes {
    list-style: none;
    margin: 0;
    padding: var(--space-4);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: var(--space-2);
    max-width: 32rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.recovery-codes code { font-family: var(--font-mono); font-size: var(--text-base); }

/* ---- the staff shell (DESIGN.md, Staff layout; 050) ----
   Phones: a stage top bar with the mark and a <details> menu, so it needs no script.
   From 48rem: a sidebar on the stage with the company, the nav and, at its foot, the person. */
.staff-side { display: none; }

.staff-bar {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding-top: max(var(--space-2), env(safe-area-inset-top, 0px));
    padding-bottom: var(--space-2);
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
}

.staff-menu { position: relative; }
.staff-menu > summary { list-style: none; }
.staff-menu > summary::-webkit-details-marker { display: none; }
.staff-menu__button {
    display: inline-flex;
    align-items: center;
    min-height: var(--target-min);
    padding: 0 var(--space-4);
    border: 1px solid var(--on-stage-muted);
    border-radius: var(--radius-pill);
    color: var(--on-stage);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    cursor: pointer;
}
.staff-menu[open] > .staff-menu__button { background: var(--stage-2); }
.staff-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + var(--space-2));
    z-index: var(--z-overlay);
    width: min(20rem, calc(100vw - 2 * var(--space-4)));
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    display: grid;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--stage-2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-overlay);
}

.staff-company { display: grid; gap: var(--space-1); }
.staff-company__name { font-family: var(--font-display); font-size: var(--text-lg); line-height: var(--leading-tight); overflow-wrap: anywhere; }
.on-stage .staff-company__switch { color: var(--stage-bright); font-size: var(--text-sm); justify-self: start; min-height: var(--target-min); display: inline-flex; align-items: center; }

.staff-nav { display: grid; gap: 2px; }
.staff-nav__item {
    display: grid;
    align-content: center;
    min-height: var(--target-min);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: var(--weight-bold);
}
.staff-nav__item:hover { background: var(--stage-2); }
.staff-nav__item[aria-current="page"] { background: var(--stage-2); box-shadow: inset 3px 0 0 var(--stage-bright); }

.staff-you { display: grid; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--stage-2); }
.staff-you__name { font-weight: var(--weight-bold); }
.staff-you__meta { font-size: var(--text-sm); font-weight: var(--weight-regular); color: var(--on-stage-muted); }
.staff-you .theme-switch fieldset { display: grid; gap: var(--space-2); }
.staff-you .theme-switch legend { float: none; margin: 0 0 var(--space-2); }
.staff-you .segmented { display: flex; }
.staff-you .segmented button { flex: 1; padding: 0 var(--space-2); }

.staff-main:focus { outline: none; }

@media (min-width: 48rem) {
    .staff { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100dvh; }
    .staff-bar { display: none; }
    .staff-side {
        position: sticky;
        top: 0;
        height: 100dvh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: var(--space-5);
        padding: var(--space-5) var(--space-4);
        padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    }
    .staff-side > .staff-you { margin-top: auto; }
    .staff-main .page { padding-inline: var(--space-6); }
}

/* ---- a company's public pages (DESIGN.md, A company's brand kit; 018, 056): GG's shell and paper, with the
   company's --brand-* tokens set on .brand-page by the server, and nothing else of the company's ---- */
.brand-page h1, .brand-page h2, .brand-page h3,
.brand-heading { font-family: var(--brand-font-display); font-weight: var(--brand-display-weight); }

.brand-band {
    background: var(--brand-surface);
    color: var(--brand-on-surface);
    padding-top: max(var(--space-6), env(safe-area-inset-top, 0px));
    padding-bottom: var(--space-7);
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
}
.brand-band__inner { max-width: var(--page-max); margin: 0 auto; display: grid; gap: var(--space-4); justify-items: start; }
.brand-band h1 { font-size: clamp(var(--text-xl), 7vw, 3rem); max-width: 20ch; overflow-wrap: anywhere; }
.brand-band a { color: var(--brand-on-surface); }
/* GG picked --brand-on-surface to read at 4.5:1 on the band, so it is a visible focus ring there too. */
.brand-band :focus-visible { outline-color: var(--brand-on-surface); }
.brand-band .label { color: var(--brand-on-surface); }

/* A logo keeps its own shape: at most --logo-band tall and the column wide. */
.brand-logo { display: block; width: auto; height: auto; max-width: 100%; max-height: var(--logo-band); object-fit: contain; }
.brand-logo--small { max-height: var(--logo-small); max-width: 10rem; }

.btn--brand { background: var(--brand-accent); color: var(--brand-on-accent); box-shadow: var(--shadow-raised); }

.brand-footer__by { display: inline-flex; align-items: center; gap: var(--space-2); }
.brand-footer__by a { color: var(--fg-muted); }

/* ---- the brand page (/manage/{slug}/brand) ---- */
/* The preview: a show's header as patrons will see it, drawn with the saved --brand-* tokens. */
.brand-preview { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.brand-preview .brand-band { padding: var(--space-5); }
.brand-preview .brand-band__inner { gap: var(--space-3); }
.brand-preview__company { font-size: var(--text-sm); font-weight: var(--weight-bold); }
.brand-preview__title { font-size: clamp(var(--text-xl), 5vw, var(--text-2xl)); line-height: var(--leading-tight); max-width: 18ch; }
.brand-preview__when { font-size: var(--text-sm); }
/* A picture of a button, not a control: it does nothing. */
.brand-preview__button { pointer-events: none; }
.brand-preview__paper { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); }
.brand-preview__paper p { color: var(--fg-muted); font-size: var(--text-sm); }

.swatches { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.swatch { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--fg-muted); }
.swatch__chip {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: var(--target-min);
    height: var(--target-min);
    border: 1px solid var(--edge-control);
    border-radius: var(--radius);
    font-weight: var(--weight-bold);
}

/* A colour: the browser's picker beside its hex code, so it works without script. */
.colour-input { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.colour-input input[type="color"] {
    flex: none;
    width: calc(var(--target-min) + var(--space-3));
    height: var(--target-min);
    padding: 2px;
    background: var(--surface);
    border: 1px solid var(--edge-control);
    border-radius: var(--radius);
    cursor: pointer;
}
.colour-input .field__input { width: 10rem; }

.font-choices { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.choice__sample { font-size: var(--text-lg); line-height: var(--leading-tight); color: var(--fg); }

/* The current logo, on the company's own header colour, which it was made for. */
.logo-tile {
    display: inline-grid;
    place-items: center;
    justify-self: start;
    padding: var(--space-3) var(--space-4);
    background: var(--brand-surface);
    border-radius: var(--radius);
}
.logo-actions { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3); }
.file-input { font-size: var(--text-sm); max-width: 100%; }
.file-input::file-selector-button {
    min-height: var(--target-min);
    margin-right: var(--space-3);
    padding: 0 var(--space-4);
    border: 1px solid var(--edge-control);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--fg);
    font: inherit;
    font-weight: var(--weight-bold);
    cursor: pointer;
}

/* The company's logo in the staff sidebar and menu (018), on its own header colour. */
.staff-company .logo-tile { padding: var(--space-2) var(--space-3); margin-bottom: var(--space-1); }
