/*
  Layout and components. Refers to theme tokens only (theme.css); names no colour of its own.
*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
}

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

a:hover {
    text-decoration: underline;
}

/* The accent ring reads on white; the bright focus colour only reads on navy. */
:focus-visible {
    outline: var(--focus-width) solid var(--color-accent);
    outline-offset: 2px;
}

.site-header :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--color-focus);
}

h1,
h2,
h3 {
    line-height: var(--line-height-heading);
    margin: 0 0 var(--space-md);
}

h1 {
    font-size: var(--font-size-h1);
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

.lede {
    color: var(--color-text-muted);
}

/* Parts: .container, .section, .section--centered, .section--alt, .hero, .card, .card-grid */
.container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

.section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

/* main already pads the page, so a section at either end does not pad it again */
.site-main > .section:first-child {
    padding-top: 0;
}

.section > :last-child {
    margin-bottom: 0;
}

.section--centered {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section--alt {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: var(--space-xl) var(--space-lg);
}

.site-main > .section--alt:last-child {
    margin-bottom: 0;
}

.site-main {
    flex: 1 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.hero {
    background: var(--color-background);
    color: var(--color-text);
    text-align: center;
    padding-top: var(--space-xl);
    /* the band is the page colour, so main's own top padding is the gap below it */
    padding-bottom: 0;
}

/* The Hook: the one line that holds a visitor, as large as it goes on about two lines */
.hero-tagline {
    font-size: var(--font-size-hook);
    font-weight: var(--font-weight-strong);
    line-height: var(--line-height-heading);
    max-width: var(--hook-width);
    margin: 0 auto var(--space-md);
}

/* The lead paragraph: smaller than the Hook, larger than body copy */
.hero .lede {
    font-size: var(--font-size-lead);
    max-width: var(--lead-width);
    margin-left: auto;
    margin-right: auto;
}

.hero-text {
    margin-bottom: var(--space-lg);
}

/* The demo button: under the home page's lead paragraph and closing Highlights, as product sites
   put their "Try" button under the pitch and again at the end (pps-portal issue 480). */
.call-to-action {
    margin-top: var(--space-lg);
}

.hero img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto var(--space-lg);
}

.card,
.panel {
    background: var(--color-tint);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    overflow-x: auto;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(var(--card-min-width), 100%), 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.card-grid > .card {
    margin-bottom: 0;
}

/* Four cards as a neat two by two; one column on phones (below) */
.card-grid--pairs {
    grid-template-columns: repeat(2, 1fr);
}

/* Benefit bullets and numbered steps: a picture beside a bold line and a short paragraph */
.benefits {
    display: grid;
    gap: var(--space-xl);
}

.benefit,
.step {
    display: grid;
    grid-template-columns: var(--benefit-image-width) 1fr;
    gap: var(--space-lg);
    align-items: center;
}

/* every second picture sits on the right, so the narrow column moves with it */
.benefit:nth-child(even) {
    grid-template-columns: 1fr var(--benefit-image-width);
}

.benefit:nth-child(even) > figure {
    order: 1;
}

/* Each picture carries a small label saying whose screen it is: the kiosk or Grand Marshal. */
.benefit-shot {
    margin: 0;
}

.benefit-shot figcaption {
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.benefit img,
.step img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.benefit h2 {
    font-size: var(--font-size-h3);
}

.benefit p,
.step p {
    margin-bottom: 0;
}

/* Short-sentence copy (_Lines): one sentence per paragraph, with room between them. */
.lines {
    display: grid;
    gap: calc(var(--space-md) / 6);
}

.section-link {
    text-align: center;
    margin-top: var(--space-xl);
}

/* One counter for all three parts (pps-portal issue 101), so the steps number 1-8 across them. */
.step-parts {
    counter-reset: step;
    display: grid;
    gap: var(--space-xl);
}

.step-part > h3 {
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: var(--font-size-small);
}

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-lg);
}

.step {
    counter-increment: step;
    grid-template-columns: var(--step-image-width) 1fr;
}

.step h4 {
    font-size: var(--font-size-h3);
    margin-top: 0;
}

.step h4::before {
    content: counter(step) ". ";
    color: var(--color-accent);
}

/* A step's capture opened full size over the page (lightbox.js); without script the link opens the image */
.lightbox {
    border: none;
    border-radius: var(--radius);
    padding: 0;
    max-width: min(95vw, 1200px);
    max-height: 95vh;
    background: var(--color-background);
    box-shadow: var(--shadow);
    overflow: visible;
}

.lightbox::backdrop {
    background: var(--color-overlay);
}

.lightbox img {
    display: block;
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    border-radius: var(--radius);
}

/* The usual close control: a filled circle with an X drawn from two crossed bars */
.lightbox-close {
    position: absolute;
    top: calc(-1 * var(--space-md));
    right: calc(-1 * var(--space-md));
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 2px solid var(--color-on-navy);
    border-radius: 50%;
    background: var(--color-navy);
    color: var(--color-on-navy);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.lightbox-close::before,
.lightbox-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.1rem;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
}

.lightbox-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox-close:hover {
    background: var(--color-accent-hover);
}

.lightbox-close:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Header and footer */
.site-header,
.site-footer {
    background: var(--color-navy);
    color: var(--color-on-navy);
}

.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md) var(--space-lg);
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
}

.brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-on-navy);
    text-decoration: none;
    font-weight: var(--font-weight-strong);
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    height: var(--logo-height);
    width: auto;
}

.brand-name {
    font-size: var(--font-size-h3);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-lg);
}

.site-nav a,
.site-link,
.site-footer a {
    color: var(--color-on-navy);
}

.site-nav a,
.site-link,
.footer-nav a {
    text-decoration: none;
}

.site-nav a:hover,
.site-link:hover,
.site-link:focus-visible,
.site-nav a:focus-visible,
.footer-nav a:hover,
.footer-nav a:focus-visible {
    text-decoration: underline;
}

.footer-nav a {
    color: var(--color-on-navy);
}

.site-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    margin-left: auto;
}

/* The phone menu (issue 482): hidden on wide screens, where the nav shows inline. */
.nav-menu {
    display: none;
    position: relative;
}

.nav-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    color: var(--color-on-navy);
    cursor: pointer;
    list-style: none;
}

.nav-menu-button::-webkit-details-marker {
    display: none;
}

.nav-menu-button:hover,
.nav-menu[open] .nav-menu-button {
    background: var(--color-accent);
}

.nav-menu-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.nav-menu-list {
    position: absolute;
    left: 0;
    top: calc(100% + var(--space-xs));
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 13rem;
    padding: var(--space-xs) 0;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 6px 18px var(--color-overlay);
}

.nav-menu-list a {
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    text-decoration: none;
}

.nav-menu-list a:hover {
    background: var(--color-tint);
}

.sign-out {
    margin: 0;
}

/* The business switcher (pps-portal issue 207), beside My account for somebody in several businesses. */
.business-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0;
}

.business-switcher label {
    color: var(--color-on-navy);
}

.business-switcher select {
    max-width: 14rem;
}

.business-choices {
    list-style: none;
    margin: 0;
    padding: 0;
}

.business-choices li + li {
    margin-top: var(--space-md);
}

.site-header .button--secondary,
.site-header .button-quiet {
    color: var(--color-on-navy);
    border-color: var(--color-on-navy-muted);
}

.site-footer {
    padding: var(--space-xl) 0;
}

.site-footer p {
    margin: 0 0 var(--space-md);
}

.footer-company {
    font-weight: var(--font-weight-strong);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-md);
}

.footer-legal {
    color: var(--color-on-navy-muted);
    font-size: var(--font-size-small);
}

/* Buttons */
.button,
.button-quiet {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius);
    background: var(--color-accent);
    color: var(--color-accent-text);
    font: inherit;
    font-weight: var(--font-weight-strong);
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    text-decoration: underline;
}

.button--secondary,
.button-quiet {
    background: transparent;
    color: var(--color-accent);
}

.button--secondary:hover,
.button-quiet:hover {
    background: var(--color-tint);
    color: var(--color-accent-hover);
}

.site-header .button--secondary:hover,
.site-header .button-quiet:hover {
    background: transparent;
    color: var(--color-on-navy);
}

.button-danger,
.button.button-danger:hover {
    border-color: var(--color-danger);
    background: var(--color-danger);
    color: var(--color-danger-text);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-md) 0 0;
}

/* Notices */
.notice {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-tint);
}

.notice-warning {
    background: var(--color-warning-background);
    border-color: var(--color-warning-border);
}

.notice-success {
    background: var(--color-success-background);
    border-color: var(--color-success-border);
}

.notice-critical {
    border-color: var(--color-danger);
}

/* The header bell and its list of notices (issue 419) */
.notices {
    position: relative;
}

.notices-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm);
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--color-on-navy);
    cursor: pointer;
}

.notices-bell:hover,
.notices-bell[aria-expanded="true"] {
    background: var(--color-accent-hover);
}

.notices-bell-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.notices-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 1.15rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--color-danger);
    color: var(--color-danger-text);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-strong);
    line-height: 1.15rem;
    text-align: center;
}

.notices-count[hidden],
.notices-panel[hidden],
.notices-empty[hidden],
.notices-failed[hidden] {
    display: none;
}

.notices-panel {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 20;
    width: 24rem;
    max-width: calc(100vw - 2 * var(--space-md));
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-background);
    color: var(--color-text);
}

.notices-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notices-list .notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.notices-list .notice:last-child {
    margin-bottom: 0;
}

.notices-empty,
.notices-failed {
    margin: 0 0 var(--space-sm);
}

.notices-empty {
    color: var(--color-text-muted);
}

.notices-failed {
    color: var(--color-danger);
}

.notice-body {
    flex: 1 1 auto;
}

.notice-text {
    margin: 0;
}

.notice-dismiss {
    margin: 0;
}

.notice-x {
    padding: 0 var(--space-sm);
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    line-height: 1.5;
    cursor: pointer;
}

.notice-x-icon {
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
}

.notice-x:hover {
    color: var(--color-danger);
}

.site-header {
    position: relative;
}

/* The most urgent notice, a second time, under the menu */
.notice-strip {
    background: var(--color-danger);
    color: var(--color-danger-text);
}

.notice-strip-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
}

.notice-strip .notice-text {
    flex: 1 1 auto;
}

.notice-strip-link {
    color: var(--color-danger-text);
    text-decoration: underline;
}

.notice-strip .notice-x,
.notice-strip .notice-x:hover {
    color: var(--color-danger-text);
}

.empty {
    color: var(--color-text-muted);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--color-border);
    font-size: var(--font-size-small);
    background: var(--color-background);
}

table th,
table td {
    text-align: left;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

table th {
    font-weight: var(--font-weight-strong);
    color: var(--color-text-muted);
}

table tbody tr:nth-child(even) {
    background: var(--color-surface);
}

/* Forms */
.form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: var(--form-width);
    width: 100%;
}

.form input,
.form textarea,
.form select {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-background);
    color: var(--color-text);
    font: inherit;
}

.form input:focus-visible,
.form textarea:focus-visible,
.form select:focus-visible {
    outline: var(--focus-width) solid var(--color-focus);
    border-color: var(--color-accent);
}

/* A longer form in groups, with short fields side by side on wide screens */
.form--wide {
    max-width: var(--form-wide-width);
    gap: var(--space-lg);
}

.form-group {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group legend {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-strong);
    padding: 0;
    margin-bottom: var(--space-sm);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
}

.form-field[hidden] {
    display: none;
}

.form-field > p {
    margin: 0;
}

.form-note {
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    /* a label that wraps onto two lines does not push its box below its neighbours' */
    align-items: end;
}

/* The validation summary is always rendered; it shows only when it has something to say */
.validation-summary-valid {
    display: none;
}

.form-row--city {
    grid-template-columns: 2fr 1fr 1fr;
}

/* Account pages */
.device-group + .device-group {
    margin-top: var(--space-md);
}

.device-group h3 {
    font-size: var(--font-size-base);
    margin: 0 0 var(--space-xs);
}

dl.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-xs) var(--space-md);
    margin: 0 0 var(--space-md);
}

dl.facts dt {
    font-weight: var(--font-weight-strong);
    color: var(--color-text-muted);
}

dl.facts dd {
    margin: 0;
}

.machine-name {
    font-weight: var(--font-weight-strong);
}

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

.copied {
    color: var(--color-text-muted);
}

.release-stamp {
    color: var(--color-accent);
    font-weight: var(--font-weight-strong);
}

@media (max-width: 40rem) {
    .card-grid--pairs {
        grid-template-columns: 1fr;
    }

    .section,
    .site-main,
    .hero {
        padding-top: var(--space-lg);
        padding-bottom: var(--space-lg);
    }

    .site-actions {
        margin-left: 0;
    }

    /* The hamburger holds these on a phone (issue 482). */
    .nav-menu {
        display: block;
    }

    .site-nav,
    .site-actions > .site-link[href="/SignUp"],
    .site-actions > .site-link[href="/SignIn"] {
        display: none;
    }

    /* Heading, then picture, then text: the text block dissolves so its heading can lead (issue 482). */
    .step > div {
        display: contents;
    }

    .step h4 {
        order: 1;
    }

    .step > a {
        order: 2;
    }

    .step p {
        order: 3;
    }

    .notices,
    .account-menu {
        position: static;
    }

    /* Anchored to the header like the notices panel: right: 0 on the icon ran off the left of the screen. */
    .account-menu-list {
        left: var(--space-md);
        right: var(--space-md);
        min-width: 0;
    }

    .notices-panel {
        left: var(--space-md);
        right: var(--space-md);
        width: auto;
        max-width: none;
    }

    .card,
    .panel {
        padding: var(--space-md);
    }

    dl.facts {
        grid-template-columns: 1fr;
    }

    .form-row,
    .form-row--city {
        grid-template-columns: 1fr;
    }

    .benefit,
    .benefit:nth-child(even),
    .step {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    /* Heading, then picture, then text, as on the Highlights steps. */
    .benefit > div {
        display: contents;
    }

    .benefit h2 {
        order: 1;
        margin-bottom: 0;
    }

    .benefit > figure,
    .benefit:nth-child(even) > figure {
        order: 2;
    }

    .benefit .lines {
        order: 3;
    }
}

/* A form that sits on one line in a table cell: the staff contacts page (#95). */
.form-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

/* The staff backstop on a business page (issue 110): role, reason and the check of the caller
   stacked, so each field is wide enough to read what is typed in it. */
.staff-change {
    display: grid;
    gap: var(--space-xs);
    min-width: 16rem;
}

.staff-change input,
.staff-change select {
    width: 100%;
}

.staff-change .staff-change-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* The staff menu (#96): a gear in the top bar, for staff only, opening a list of the staff pages. */
.staff-menu {
    position: relative;
}

.staff-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--color-on-navy);
    cursor: pointer;
    list-style: none;
}

.staff-menu-button::-webkit-details-marker {
    display: none;
}

.staff-menu-button:hover,
.staff-menu[open] .staff-menu-button {
    background: var(--color-accent);
}

.staff-menu-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.staff-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + var(--space-xs));
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 13rem;
    padding: var(--space-xs) 0;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 6px 18px var(--color-overlay);
}

.staff-menu-list a {
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    text-decoration: none;
}

.staff-menu-list a:hover {
    background: var(--color-tint);
}

.staff-menu-list a[aria-current="page"] {
    font-weight: 600;
    color: var(--color-accent);
}

/* The account menu (issue 475): the photographer's counterpart of the staff menu, a person in the top bar. */
.account-menu {
    position: relative;
}

.account-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--color-on-navy);
    cursor: pointer;
    list-style: none;
}

.account-menu-button::-webkit-details-marker {
    display: none;
}

.account-menu-button:hover,
.account-menu[open] .account-menu-button {
    background: var(--color-accent);
}

.account-menu-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.account-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + var(--space-xs));
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 13rem;
    padding: var(--space-xs) 0;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 6px 18px var(--color-overlay);
}

.account-menu-list a,
.account-menu-list button {
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    text-decoration: none;
    text-align: left;
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.account-menu-list a:hover,
.account-menu-list button:hover {
    background: var(--color-tint);
}

.account-menu-list a[aria-current="page"] {
    font-weight: 600;
    color: var(--color-accent);
}

.account-menu-list .business-switcher {
    flex-wrap: wrap;
    padding: var(--space-sm) var(--space-md);
}

/* The switcher was styled for the navy header: on the menu's own background its label and button need the text colours. */
.account-menu-list .business-switcher label {
    color: var(--color-text);
}

.account-menu-list .business-switcher .button--secondary {
    color: var(--color-text);
    border: 1px solid var(--color-border);
    background: var(--color-tint);
}

/* A staff record page, such as one demo request (pps-portal issue 103): who at the top, then cards. */
.back-link {
    margin-bottom: var(--space-md);
}

.record-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.record-header h1 {
    margin: 0;
}

.record-kicker {
    margin: 0 0 var(--space-xs);
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-lg);
    margin: var(--space-xs) 0 0;
    color: var(--color-text-muted);
}

.record-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.record-actions form {
    margin: 0;
}

.record-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.record-cards .panel h2,
.record-xml h2 {
    font-size: var(--font-size-h3);
    margin-top: 0;
}

.record-xml textarea {
    width: 100%;
    min-height: 12rem;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: var(--font-size-small);
}

.record-cards address {
    font-style: normal;
}

.record-comment {
    white-space: pre-wrap;
}

.record-warning {
    color: var(--color-danger);
}

.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-strong);
}

.badge-open {
    background: var(--color-warning-background);
    border: 1px solid var(--color-warning-border);
}

.badge-done {
    background: var(--color-success-background);
    border: 1px solid var(--color-success-border);
}

/* The staff photographers search (pps-portal issue 105): one box, a sort, and a wide table that scrolls on a phone. */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.search-bar input[type="search"] {
    flex: 1 1 20rem;
    min-width: 0;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-lead);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.search-bar select {
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.search-summary {
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
}

.data-table small {
    color: var(--color-text-muted);
}

.pager {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    margin-top: var(--space-md);
}

/* The contact form's honeypot (issue 129): off-screen rather than display:none, which some robots skip. */
.form-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* A checkbox with its words beside it, not above (issue 128). */
.form-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-sm);
    font-weight: normal;
}

.form .form-check input {
    width: auto;
    flex: none;
    margin: 0;
}

/* The Copy button under a box of text, with its "Copied" note beside it (issue 133). */
.record-copy {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

/* Staff pages are work screens (issue 140): less air between and inside panels and tables. */
.staff-main .panel {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.staff-main h2 {
    font-size: var(--font-size-h3);
    margin-bottom: var(--space-sm);
}

.staff-main .panel > p {
    margin-top: 0;
    margin-bottom: var(--space-sm);
}

.staff-main table th,
.staff-main table td {
    padding: var(--space-xs) var(--space-sm);
    vertical-align: top;
}

.staff-main .record-header {
    margin-bottom: var(--space-md);
}

.person-role {
    margin-left: var(--space-xs);
}

/* A person's change form, closed until staff open it for that row. */
.staff-change-toggle > summary {
    list-style: none;
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-small);
}

.staff-change-toggle > summary::-webkit-details-marker {
    display: none;
}

.staff-change-toggle[open] > summary {
    margin-bottom: var(--space-xs);
}

.site-main.staff-main {
    padding-top: var(--space-md);
}

.staff-main .back-link {
    margin: 0 0 var(--space-xs);
}


/* Unlock keys (issue 146): always fixed-width, every line kept, never wrapped. */
.unlock-key,
.unlock-key-input,
.form textarea.unlock-key-input {
    font-family: var(--font-family-code);
    font-size: var(--font-size-small);
    white-space: pre;
    overflow-x: auto;
}

.unlock-key {
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-background);
    margin: var(--space-sm) 0;
}

.key-email-text {
    white-space: pre-line;
}

.key-email-to,
.key-email-subject {
    margin-bottom: var(--space-sm);
}

.key-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.key-button-note {
    color: var(--color-text-muted);
}

.key-send-choose {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.key-send-choose select {
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-background);
    color: var(--color-text);
    font: inherit;
}

.key-template > summary {
    cursor: pointer;
}

.key-template > summary small {
    color: var(--color-text-muted);
    margin-left: var(--space-sm);
}

.form-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Suspended and deleted people (pps-portal issue 130): a badge each, and the list's filters. */
.badge-suspended {
    background: var(--color-warning-background);
    border: 1px solid var(--color-warning-border);
}

.badge-deleted {
    background: var(--color-danger);
    color: var(--color-danger-text);
    border: 1px solid var(--color-danger);
}

.filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.filter-link {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius);
}

.filter-link--current {
    font-weight: var(--font-weight-strong);
    background: var(--color-tint);
    border: 1px solid var(--color-border);
}

.batch-delete {
    margin-top: var(--space-sm);
    max-width: 32rem;
}
