/* ==========================================================================
   Design tokens
   One visual language for the platform and every event: a brand bar, plain pages, cards with a
   coloured left edge, bold headings in the brand colour and solid rounded buttons.

   Light and dark: every colour is a light-dark() pair, so one definition serves both themes.
   <html data-theme> (App.razor, from the visitor's choice) sets color-scheme: "auto" follows the
   device, "light" and "dark" force one. No script runs and nothing flashes while the page loads.

   Brand: an event replaces --tr-brand (EventBrandingStyle) with a colour that keeps 4.5:1 on
   white, on #f6f8fb and on #ced4da, and --tr-brand-on-dark with one that keeps 4.5:1 on the dark
   page (#10171e) and the lightest dark surface (#1f2b37) (ColorContrast). --tr-brand is the raw
   colour (top bar, hero, white text on it); --tr-primary is the one for text, links, borders and
   buttons on the page, the brand in light and its lighter twin in dark. Nothing names an event's
   colours. The platform host (.page-platform, LayoutChrome) has a palette of its own.
   ========================================================================== */
:root {
    color-scheme: light dark;
    --tr-brand: #082a44;
    --tr-brand-rgb: 8, 42, 68;
    /* Replaced per event by EventBrandingStyle; this is #082a44 made lighter. */
    --tr-brand-on-dark: #2d96e6;
    --tr-text: light-dark(#16202a, #e6edf3);
    --tr-page: light-dark(#fff, #10171e);
    /* Cards and the footer: #f6f8fb is what every brand colour is checked against. */
    --tr-surface: light-dark(#f6f8fb, #18222c);
    /* The lightest surface text sits on (hovered rows, card headers): #1f2b37 is the dark check. */
    --tr-surface-hover: light-dark(#eef2f6, #1f2b37);
    /* Secondary text: 5.6:1 on #f6f8fb; 7.8:1 on #1f2b37. */
    --tr-muted: light-dark(#5c636a, #b3c1ce);
    --tr-border: light-dark(#dee2e6, #33414f);
    --tr-border-subtle: light-dark(#e5e7eb, #2c3a48);
    /* Borders of form fields: 3.9:1 on white, 4.8:1 on the dark cards (WCAG 1.4.11). */
    --tr-control-border: light-dark(#758393, #7d8fa1);
    /* Placeholders: grey and italic, never mistaken for a typed value; 5.4:1 and 7.4:1. */
    --tr-placeholder: light-dark(#646b75, #9aa7b4);
    /* The focus ring, dark on light pages and light on dark ones. */
    --tr-focus-ring: light-dark(#0b3a5f, #e6edf3);
    /* Link blue for the few places that are not brand coloured. */
    --tr-link: light-dark(#0a58ca, #8ab4f8);
    --tr-danger-text: light-dark(#b02a37, #ea868f);
    --tr-success-text: light-dark(#146c43, #75b798);
    --tr-highlight: light-dark(#ffe066, #5c4a00);
    --tr-radius: 0.5rem;
    --tr-radius-lg: 1rem;
    --tr-font: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="light"] {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

/* Derived tokens, computed again inside .page-platform so they follow its brand. */
:root,
.page-platform {
    --tr-primary: light-dark(var(--tr-brand), var(--tr-brand-on-dark));
    /* Text on a --tr-primary background: white on the brand, the dark page colour on its twin. */
    --tr-on-primary: light-dark(#fff, #10171e);
    --tr-primary-hover: light-dark(color-mix(in srgb, var(--tr-brand) 82%, #000), color-mix(in srgb, var(--tr-brand-on-dark) 82%, #fff));
    --tr-primary-tint: color-mix(in srgb, var(--tr-primary) 9%, transparent);
    --tr-heading: var(--tr-primary);
    --tr-brand-hover: var(--tr-primary-hover);
    /* The bottom of the hero gradient: the brand made darker, so white text only gains contrast. */
    --tr-brand-deep: color-mix(in srgb, var(--tr-brand) 72%, #000);
    /* Decorative only (card edges, the bar under the top bar): never carries text or state. */
    --tr-accent: light-dark(color-mix(in srgb, var(--tr-brand) 45%, #fff), color-mix(in srgb, var(--tr-brand-on-dark) 70%, #10171e));
    --bs-primary: var(--tr-primary);
    --bs-primary-rgb: var(--tr-brand-rgb);
    --bs-link-color: var(--tr-primary);
    --bs-link-color-rgb: var(--tr-brand-rgb);
    --bs-link-hover-color: var(--tr-primary-hover);
    --bs-link-hover-color-rgb: var(--tr-brand-rgb);
    --bs-body-color: var(--tr-text);
    --bs-body-bg: var(--tr-page);
    --bs-body-font-family: var(--tr-font);
    --bs-emphasis-color: var(--tr-text);
    --bs-secondary-color: var(--tr-muted);
    --bs-tertiary-color: var(--tr-muted);
    --bs-secondary-bg: light-dark(#e9ecef, #253240);
    --bs-tertiary-bg: light-dark(#f8f9fa, #18222c);
    --bs-border-color: var(--tr-border);
    --bs-border-color-translucent: light-dark(rgba(0, 0, 0, 0.175), rgba(255, 255, 255, 0.15));
    --bs-border-radius: var(--tr-radius);
    --bs-border-radius-lg: 0.75rem;
    --bs-focus-ring-color: color-mix(in srgb, var(--tr-primary) 35%, transparent);
    --bs-highlight-color: var(--tr-text);
    --bs-highlight-bg: light-dark(#fff3cd, #664d03);
    --bs-form-valid-color: var(--tr-success-text);
    --bs-form-valid-border-color: var(--tr-success-text);
    --bs-form-invalid-color: var(--tr-danger-text);
    --bs-form-invalid-border-color: var(--tr-danger-text);
    /* Alerts, subtle backgrounds and emphasis texts: Bootstrap 5.3's own light and dark values. */
    --bs-primary-text-emphasis: var(--tr-primary);
    --bs-primary-bg-subtle: light-dark(color-mix(in srgb, var(--tr-brand) 10%, #fff), color-mix(in srgb, var(--tr-brand-on-dark) 14%, #10171e));
    --bs-primary-border-subtle: light-dark(color-mix(in srgb, var(--tr-brand) 30%, #fff), color-mix(in srgb, var(--tr-brand-on-dark) 40%, #10171e));
    --bs-secondary-text-emphasis: light-dark(#2b2f32, #a7acb1);
    --bs-secondary-bg-subtle: light-dark(#e2e3e5, #161719);
    --bs-secondary-border-subtle: light-dark(#c4c8cb, #41464b);
    --bs-success-text-emphasis: light-dark(#0a3622, #a9dfc1);
    --bs-success-bg-subtle: light-dark(#d1e7dd, #051b11);
    --bs-success-border-subtle: light-dark(#a3cfbb, #0f5132);
    --bs-info-text-emphasis: light-dark(#055160, #6edff6);
    --bs-info-bg-subtle: light-dark(#cff4fc, #032830);
    --bs-info-border-subtle: light-dark(#9eeaf9, #087990);
    --bs-warning-text-emphasis: light-dark(#664d03, #ffda6a);
    --bs-warning-bg-subtle: light-dark(#fff3cd, #332701);
    --bs-warning-border-subtle: light-dark(#ffe69c, #997404);
    --bs-danger-text-emphasis: light-dark(#58151c, #ea868f);
    --bs-danger-bg-subtle: light-dark(#f8d7da, #2c0b0e);
    --bs-danger-border-subtle: light-dark(#f1aeb5, #842029);
    --bs-light-text-emphasis: light-dark(#495057, #f8f9fa);
    --bs-light-bg-subtle: light-dark(#fcfcfd, #343a40);
    --bs-light-border-subtle: light-dark(#e9ecef, #495057);
}

/* Meetamorph's own pages: a navy and turquoise palette with tinted cards, turquoise for links and
   buttons in dark mode. After the derived tokens, so its accent and gradient end win. */
.page-platform {
    --tr-brand: #1b2b3a;
    --tr-brand-rgb: 27, 43, 58;
    --tr-brand-on-dark: #5cd3db;
    --tr-brand-deep: #092c4c;
    --tr-accent: #5cd3db;
    --tr-page: light-dark(#fff, #0f1a24);
    --tr-surface: light-dark(#f0f9fa, #14282f);
    --tr-surface-hover: light-dark(#e3f4f6, #1a3038);
}

/* Images drawn for a light background (Bootstrap's select arrow, close button and switch knob)
   swap for light ones in dark mode: url() cannot go in light-dark(), so these two rules say it twice. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .form-select {
        --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    :root:not([data-theme="light"]) .form-switch .form-check-input:not(:checked) {
        --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.9%29'/%3e%3c/svg%3e") !important;
    }

    /* On the light primary colour of dark mode the ticks and dots are dark. */
    :root:not([data-theme="light"]) .form-check-input:checked[type=checkbox] {
        --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2310171e' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    }

    :root:not([data-theme="light"]) .form-check-input[type=checkbox]:indeterminate {
        --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2310171e' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
    }

    :root:not([data-theme="light"]) .form-check-input:checked[type=radio] {
        --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%2310171e'/%3e%3c/svg%3e");
    }

    :root:not([data-theme="light"]) .form-switch .form-check-input:checked {
        --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2310171e'/%3e%3c/svg%3e");
    }

    :root:not([data-theme="light"]) .btn-close {
        --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
    }
}

:root[data-theme="dark"] .form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

:root[data-theme="dark"] .form-switch .form-check-input:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.9%29'/%3e%3c/svg%3e") !important;
}

/* On the light primary colour of dark mode the ticks and dots are dark. */
:root[data-theme="dark"] .form-check-input:checked[type=checkbox] {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2310171e' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

:root[data-theme="dark"] .form-check-input[type=checkbox]:indeterminate {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2310171e' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

:root[data-theme="dark"] .form-check-input:checked[type=radio] {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%2310171e'/%3e%3c/svg%3e");
}

:root[data-theme="dark"] .form-switch .form-check-input:checked {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2310171e'/%3e%3c/svg%3e");
}

:root[data-theme="dark"] .btn-close {
    --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
}

/* Bootstrap paints these from rgb triplets, which light-dark() cannot give: use the tokens. */
.bg-body {
    background-color: var(--tr-page) !important;
}

.bg-body-tertiary {
    background-color: var(--bs-tertiary-bg) !important;
}

/* .bg-light boxes (the edit profile introduction) hold body text: they follow the theme. */
.bg-light {
    background-color: var(--bs-tertiary-bg) !important;
}

.text-body {
    color: var(--tr-text) !important;
}

.toast {
    --bs-toast-bg: var(--tr-page);
    --bs-toast-header-bg: var(--tr-surface);
    --bs-toast-color: var(--tr-text);
}

/* The speakers' reactions to a feedback (FeedbackReactions.razor): six buttons in three even columns
   (two on a narrow screen), so none is left alone on a row. Over the toolbar's d-flex. */
.feedback-reactions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767.98px) {
    .feedback-reactions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.consent-dialog {
    background: var(--tr-page);
    color: var(--tr-text);
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-lg);
    padding: 1.5rem;
    width: min(28rem, calc(100vw - 2rem));
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
    /* On the dark page the dialog is as dark as what it covers: a lighter surface and edge set it apart. */
    background: light-dark(var(--tr-page), #1f2b37);
    border-color: light-dark(var(--tr-border), #7d8fa1);
}

/* A form in a modal dialog (FormDialog, design 3.61): wide enough for two fields side by side, never
   taller than the window, and scrolling as a whole, buttons included, so nothing is pinned over what
   is being read. On a phone, and in a browser zoomed in, it fills the window. */
.form-dialog {
    color: var(--tr-text);
    background: light-dark(var(--tr-page), #1f2b37);
    border: 1px solid light-dark(var(--tr-border), #7d8fa1);
    border-radius: var(--tr-radius-lg);
    padding: 1.5rem;
    width: min(56rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}

/* The element a server-drawn form dialog lives in (FormDialog.razor): only there to keep Blazor's merge
   out of the dialog while it is open, so it takes no room of its own wherever the page puts it. */
.form-dialog-host {
    display: contents;
}

/* The element around the fields of a form the browser checks as each field is left (CommandForm.razor):
   only there for its behaviour (checked-fields), so it takes no room and the form lays out as before. */
.checked-fields {
    display: contents;
}

.form-dialog h2 {
    color: var(--tr-heading);
}

/* The title takes the focus when the dialog opens; the ring would only say so twice. */
.form-dialog h2:focus {
    outline: none;
}

/* The announcer's toasts come into the open dialog (Scripts/dialogs.ts), to be seen over the dimmed
   page. Only the newest shows there: the dialog is what is being worked on, and a pile of them
   would cover its fields. */
.form-dialog .status-toasts .toast:not(:last-child) {
    display: none;
}

@media (max-width: 575.98px) {
    .form-dialog {
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
        padding: 1rem;
    }
}

.form-dialog::backdrop,
.consent-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.consent-dialog h2 {
    color: var(--tr-heading);
}

/* The consent dialog's heading takes the focus when it opens; the ring would only say so twice. */
.consent-dialog h2:focus {
    outline: none;
}

.consent-dialog {
    width: min(34rem, calc(100vw - 2rem));
}

html, body {
    font-family: var(--tr-font);
}

body {
    margin: 0;
    color: var(--tr-text);
    background-color: var(--tr-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* A word longer than its line (an address, an email, a code) goes on in the next line instead
       of widening the page: at 320 px every page reads without scrolling sideways. */
    overflow-wrap: break-word;
}

/* A flex item that may shrink below its content, so that the text inside wraps or truncates
   instead of pushing its neighbours out of the row. */
.min-w-0 {
    min-width: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--tr-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

h5, h6, .h5, .h6 {
    font-weight: 600;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Headings on a coloured background take the colour of their container. */
.page-hero :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
.text-white :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
[class*="text-bg-"] :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
.alert :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
.toast :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
    color: inherit;
}

.lead {
    font-weight: 400;
    line-height: 1.6;
}

a, .btn-link {
    color: var(--tr-primary);
    text-underline-offset: 0.18em;
}

a:hover, .btn-link:hover {
    color: var(--tr-brand-hover);
    text-decoration-thickness: 2px;
}

.bg-primary {
    background-color: var(--tr-brand) !important;
}

.text-primary {
    color: var(--tr-primary) !important;
}

.text-muted,
.text-body-secondary,
.text-secondary {
    color: var(--tr-muted) !important;
}

/* Bootstrap's own red and green reach only 4.3:1 on the tinted surfaces; these keep 5.9:1 and more. */
.text-danger {
    color: var(--tr-danger-text) !important;
}

.text-success {
    color: var(--tr-success-text) !important;
}

.link-primary {
    color: var(--tr-primary) !important;
    text-decoration-color: var(--tr-primary) !important;
}

/* ==========================================================================
   Buttons: solid, rounded, semibold; every size keeps a target of at least 24 px.
   ========================================================================== */
.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 1.1rem;
    --bs-btn-padding-y: 0.5rem;
    --bs-btn-border-radius: var(--tr-radius);
    letter-spacing: 0.01em;
}

.btn-sm {
    --bs-btn-padding-x: 0.75rem;
    --bs-btn-padding-y: 0.3rem;
    --bs-btn-border-radius: 0.4rem;
}

.btn-lg {
    --bs-btn-padding-x: 1.75rem;
    --bs-btn-padding-y: 0.75rem;
    --bs-btn-font-size: 1.125rem;
    --bs-btn-border-radius: var(--tr-radius);
    letter-spacing: 0.03em;
}

.btn-primary {
    --bs-btn-color: var(--tr-on-primary);
    --bs-btn-bg: var(--tr-primary);
    --bs-btn-border-color: var(--tr-primary);
    --bs-btn-hover-color: var(--tr-on-primary);
    --bs-btn-hover-bg: var(--tr-primary-hover);
    --bs-btn-hover-border-color: var(--tr-primary-hover);
    --bs-btn-active-color: var(--tr-on-primary);
    --bs-btn-active-bg: var(--tr-primary-hover);
    --bs-btn-active-border-color: var(--tr-primary-hover);
    --bs-btn-disabled-color: var(--tr-on-primary);
    --bs-btn-disabled-bg: var(--tr-primary);
    --bs-btn-disabled-border-color: var(--tr-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--tr-primary);
    --bs-btn-border-color: var(--tr-primary);
    --bs-btn-bg: var(--tr-page);
    --bs-btn-hover-color: var(--tr-on-primary);
    --bs-btn-hover-bg: var(--tr-primary);
    --bs-btn-hover-border-color: var(--tr-primary);
    --bs-btn-active-color: var(--tr-on-primary);
    --bs-btn-active-bg: var(--tr-primary-hover);
    --bs-btn-active-border-color: var(--tr-primary-hover);
    --bs-btn-disabled-color: var(--tr-primary);
    --bs-btn-disabled-border-color: var(--tr-primary);
    --bs-btn-disabled-bg: transparent;
}

.btn-outline-secondary {
    --bs-btn-color: var(--tr-text);
    --bs-btn-border-color: var(--tr-control-border);
    --bs-btn-bg: var(--tr-page);
    --bs-btn-hover-color: var(--tr-page);
    --bs-btn-hover-bg: var(--tr-muted);
    --bs-btn-hover-border-color: var(--tr-muted);
    --bs-btn-active-color: var(--tr-page);
    --bs-btn-active-bg: light-dark(#495057, #ced4da);
    --bs-btn-active-border-color: light-dark(#495057, #ced4da);
    --bs-btn-disabled-color: var(--tr-muted);
    --bs-btn-disabled-border-color: var(--tr-control-border);
}

/* A button's text goes to a second line between words, never inside one: the cards let long
   addresses break anywhere (overflow-wrap: anywhere), and a squeezed button would otherwise read
   "Añadi / r Red". */
.btn {
    overflow-wrap: normal;
}

.btn-outline-danger {
    --bs-btn-color: var(--tr-danger-text);
    --bs-btn-border-color: var(--tr-danger-text);
    --bs-btn-bg: var(--tr-page);
    --bs-btn-hover-color: var(--tr-page);
    --bs-btn-hover-bg: var(--tr-danger-text);
    --bs-btn-hover-border-color: var(--tr-danger-text);
    --bs-btn-active-color: var(--tr-page);
    --bs-btn-active-bg: light-dark(#842029, #f1aeb5);
    --bs-btn-active-border-color: light-dark(#842029, #f1aeb5);
    --bs-btn-disabled-color: var(--tr-danger-text);
    --bs-btn-disabled-border-color: var(--tr-danger-text);
}

.btn-danger {
    --bs-btn-bg: #b02a37;
    --bs-btn-border-color: #b02a37;
    --bs-btn-hover-bg: #842029;
    --bs-btn-hover-border-color: #842029;
    --bs-btn-active-bg: #842029;
    --bs-btn-active-border-color: #842029;
    --bs-btn-disabled-bg: #b02a37;
    --bs-btn-disabled-border-color: #b02a37;
}

.btn-success {
    --bs-btn-bg: #146c43;
    --bs-btn-border-color: #146c43;
    --bs-btn-hover-bg: #0f5132;
    --bs-btn-hover-border-color: #0f5132;
    --bs-btn-active-bg: #0f5132;
    --bs-btn-active-border-color: #0f5132;
}

/* ==========================================================================
   Focus: a ring that shows on white, on the tinted surfaces and on any brand colour.
   ========================================================================== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus,
.form-select:focus, .btn:focus-visible, .nav-link:focus-visible {
    box-shadow: 0 0 0 0.125rem var(--tr-page), 0 0 0 0.3rem var(--tr-focus-ring);
    outline: none;
}

a:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 3px solid var(--tr-focus-ring);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-control,
.form-select,
.form-check-input {
    border-color: var(--tr-control-border);
}

/* The knob of a switch that is off, in the colour of the field borders (Bootstrap's is a pale 25% black). */
.form-switch .form-check-input:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23758393'/%3e%3c/svg%3e");
}

.form-control,
.form-select {
    border-radius: var(--tr-radius);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tr-primary);
}

/* Placeholders must not pass for a typed value: italic and grey (--tr-placeholder: 5.4:1 on white,
   4.5:1 on a disabled field; 7.4:1 on the dark page), while what the person types is near black or
   near white (15:1 and more). A placeholder is only ever an example: every field has a visible label. */
.form-control::placeholder {
    color: var(--tr-placeholder);
    font-style: italic;
    opacity: 1;
}

/* The "choose file" button inside file fields: a surface of the theme with body text. */
.form-control::file-selector-button {
    background-color: var(--tr-surface-hover);
    color: var(--tr-text);
}

.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
    background-color: var(--bs-secondary-bg);
}

.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--tr-primary);
    border-color: var(--tr-primary);
}

.form-label,
.col-form-label {
    font-weight: 600;
}

/* A short value (a date) in a column made wide for its label and help: the field keeps the width
   the fields beside it have. */
.form-control.field-narrow {
    max-width: 22rem;
}

/* The icon after a link that opens in a new tab (NewTabIcon): as tall as the letters beside it, in their colour. */
.new-tab-icon {
    flex: none;
    width: 0.8em;
    height: 0.8em;
    margin-left: 0.3em;
    vertical-align: -0.02em;
}

/* The icon of a NewWindowLink stays on the line of the link's last word. A browser may break before an
   icon even after a no-break character, but not between a word joiner and what follows it inside a box
   that does not wrap: the joiner (generated, so it is in no text a reader or a test gets) ties the box to
   the word before it, and the icon to the joiner. Nothing moves where the line has room for both. */
.new-tab-mark {
    white-space: nowrap;
}

.new-tab-mark::before {
    content: "\2060";
}

/* A date typed as text and its Calendar button (DateTimeField): as wide as a date with its hour needs,
   however wide the column it sits in. They are two pieces with a gap, not a joined group: where the
   column is too narrow for a whole date and hour beside the button (a phone, a page at 400%), the
   button goes below the field instead of cutting the hour off. */
.date-field {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 24rem;
}

.date-field > .form-control {
    flex: 1 1 11.5rem;
    width: auto;
    min-width: 0;
}

/* .NET 11 marks a format error with `invalid`; match Bootstrap's `is-invalid`
   appearance for the same date field when the server refuses it. */
.date-field > .form-control.invalid {
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.date-field > .form-control.invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25);
}

.date-field > .btn {
    flex: 0 0 auto;
}

fieldset > legend {
    font-weight: 600;
}

/* ==========================================================================
   Cards: a tinted surface with a coloured left edge, the same for every card.
   ========================================================================== */
.card,
.card.border-0 {
    --bs-card-spacer-y: 1.25rem;
    --bs-card-spacer-x: 1.5rem;
    --bs-card-bg: var(--tr-surface);
    --bs-card-cap-bg: var(--tr-primary-tint);
    --bs-card-border-radius: var(--tr-radius);
    --bs-card-inner-border-radius: calc(var(--tr-radius) - 1px);
    border: 1px solid var(--tr-border-subtle) !important;
    border-left: 4px solid var(--tr-accent) !important;
}

.card.shadow-sm,
.card.shadow {
    box-shadow: none !important;
}

/* In the organisers' console a page is mostly forms, and a tinted card around each of them weighed
   too much: there a card is a thin frame on the page's own background, and only the page's header
   (console-header) keeps the tinted surface with the coloured edge. Sections with an h2 are never
   framed; a frame groups the blocks inside one (a form under an h3, one item of a list). */
.console-page .card:not(.console-header) {
    --bs-card-bg: var(--bs-body-bg);
    border: 1px solid var(--tr-border-subtle) !important;
}

.card .card-header {
    font-weight: 600;
}

.list-group {
    --bs-list-group-border-color: var(--tr-border-subtle);
    --bs-list-group-border-radius: var(--tr-radius);
    --bs-list-group-active-bg: var(--tr-primary);
    --bs-list-group-active-border-color: var(--tr-primary);
    --bs-list-group-active-color: var(--tr-on-primary);
}

/* Bootstrap's leftovers in its own blue: menus, progress bars and pages follow the primary colour. */
.dropdown-menu {
    --bs-dropdown-link-active-bg: var(--tr-primary);
    --bs-dropdown-link-active-color: var(--tr-on-primary);
}

.progress,
.progress-stacked {
    --bs-progress-bar-bg: var(--tr-primary);
    --bs-progress-bar-color: var(--tr-on-primary);
}

.pagination {
    --bs-pagination-color: var(--tr-primary);
    --bs-pagination-active-bg: var(--tr-primary);
    --bs-pagination-active-border-color: var(--tr-primary);
    --bs-pagination-active-color: var(--tr-on-primary);
}

/* Badges built on Bootstrap's fixed light, dark, grey and primary backgrounds follow the theme:
   a neutral pill with an edge, the muted grey and the primary colour, reversed on the dark page. */
.text-bg-light {
    color: var(--tr-text) !important;
    background-color: var(--bs-secondary-bg) !important;
    border: 1px solid var(--tr-border);
}

.text-bg-dark {
    color: light-dark(#fff, #10171e) !important;
    background-color: light-dark(#212529, #e6edf3) !important;
}

.text-bg-secondary {
    color: light-dark(#fff, #10171e) !important;
    background-color: var(--tr-muted) !important;
}

.text-bg-primary {
    color: var(--tr-on-primary) !important;
    background-color: var(--tr-primary) !important;
}

/* Information notes in the brand's tint, not Bootstrap's cyan; warnings, errors and successes keep their colours. */
.alert-info {
    --bs-alert-color: var(--tr-text);
    --bs-alert-bg: var(--bs-primary-bg-subtle);
    --bs-alert-border-color: var(--bs-primary-border-subtle);
    --bs-alert-link-color: var(--tr-primary);
}

/* Identifiers and codes: a neutral chip in body text, not Bootstrap's pink. */
code {
    color: var(--tr-text);
    background-color: var(--bs-secondary-bg);
    padding: 0.1em 0.35em;
    border-radius: 0.25rem;
}

pre code {
    padding: 0;
    background-color: transparent;
}

.modal-content {
    border-radius: 0.75rem;
    border: 0;
    border-top: 4px solid var(--tr-accent);
}

/* ==========================================================================
   Page hero: the brand band at the top of a landing page, white text on a gradient.
   ========================================================================== */
.page-hero {
    color: #fff;
    background: linear-gradient(180deg, var(--tr-brand) 0%, var(--tr-brand-deep) 100%);
    border-radius: var(--tr-radius-lg);
    padding: 3rem 1.25rem;
}

@media (min-width: 768px) {
    .page-hero {
        padding: 4rem 3rem;
    }
}

.page-hero a {
    color: #fff;
}

.page-hero a:hover {
    color: #fff;
}

.page-hero a:focus-visible {
    outline-color: #fff;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
    --bs-table-bg: transparent;
}

/* A table wider than a phone scrolls inside its wrapper, never the page. Without a positioned
   wrapper the .visually-hidden texts in its cells (position: absolute) escape the scroll and
   widen the whole page. Wrappers that scroll get the focus (Scripts/scroll-regions.ts). */
.table-responsive {
    position: relative;
}

/* On a phone, where the table scrolls anyway, a row's buttons stay on one line: squeezed into a
   narrow cell they stack and make every row several screens tall. On wider screens they wrap so
   the table fits. */
@media (max-width: 991.98px) {
    .table-responsive td > .d-flex.flex-wrap:has(> .btn) {
        flex-wrap: nowrap !important;
    }
}

/* On a narrow screen a table keeps the width its columns need to read well, up to that of a
   tablet, and scrolls inside its wrapper: squeezed to fit the phone, a column of text ends up a
   few letters wide and each row several screens tall. */
@media (max-width: 991.98px) {
    .table-responsive > .table {
        width: max-content;
        min-width: 100%;
        max-width: 46rem;
    }

    /* Running text, including a title in a row header, keeps a readable width. */
    .table-responsive > .table :is(td, th[scope="row"]).text-break {
        min-width: 14rem;
    }
}

/* The venue tree's place names keep a width that reads well beside their indentation, and a long
   one goes on in a second line instead of pushing the other columns out of the table. */
.venue-tree [role="rowheader"] {
    min-width: 12rem;
    max-width: 24rem;
}

.table-responsive td .btn {
    white-space: nowrap;
}

/* "Delete this?" inside a row: room for the question beside its buttons, the table scrolls if needed. */
.table .inline-delete-confirm {
    min-width: 20rem;
}

/* Cells keep words whole: the wrapper scrolls instead (the cards' overflow-wrap would cut emails and codes mid-word). */
.table-responsive > .table :is(th, td) {
    overflow-wrap: normal;
}

/* The row being moved and hovered rows: a tint of the primary colour, visible on both themes
   (Bootstrap's translucent black disappears on the dark page). */
.table {
    --bs-table-active-bg: color-mix(in srgb, var(--tr-primary) 16%, transparent);
    --bs-table-active-color: var(--tr-text);
    --bs-table-hover-bg: var(--tr-primary-tint);
    --bs-table-hover-color: var(--tr-text);
}

/* .table-light headers follow the theme: a light grey band in light mode, a dark one in dark mode. */
.table-light,
.table > thead.table-light {
    --bs-table-bg: var(--bs-secondary-bg);
    --bs-table-color: var(--tr-text);
    --bs-table-border-color: var(--tr-border);
    color: var(--tr-text);
}

.table > thead:not(.table-light) th {
    color: var(--tr-heading);
    font-weight: 700;
    border-bottom: 2px solid var(--tr-primary);
}

.content {
    padding-top: 1.1rem;
}

/* Headings and notes the page moves the focus to (tabindex="-1") are not controls: the screen
   reader says them and they are already on screen, so they show no ring (the browser's would box
   the whole width). Controls always keep theirs. */
h1:focus,
:is(h2, h3, h4, h5, h6, p, span, div:not(.chat-list-item):not(.validation-summary))[tabindex="-1"]:focus {
    outline: none;
}

.request-details-list {
    margin: 0;
    padding: 0;
}

.request-details-item + .request-details-item {
    margin-top: 1rem;
}

.request-details-list dt {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bs-secondary-color);
    margin-bottom: 0.15rem;
}

.request-details-list dt::after {
    content: ":";
    margin-left: 0.25rem;
}

.request-details-list dd {
    margin-bottom: 0;
}

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

/* Blazor marks edited fields "valid" by its own rules only; the server may still refuse the value,
   so a green edge would say the opposite of the error next to it. Only the invalid ones are marked. */
.form-control.invalid,
.form-select.invalid {
    border-color: var(--tr-danger-text);
}

.validation-message {
    color: var(--tr-danger-text);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background-color: #6c757d;
}

.social-icon-linkedin {
    background-color: #0a66c2;
}

.social-icon-mastodon {
    background-color: #563acc;
}

.social-icon-bluesky {
    background: linear-gradient(135deg, #009ad8, #72eaff);
    color: #003049;
}

/* X's black, reversed on the dark page so the circle does not vanish. */
.social-icon-x {
    background-color: light-dark(#111, #e6edf3);
    color: light-dark(#fff, #111);
}

/* Accessible validation summary (AccessibleValidationSummary): the focus ring of the summary the page lands on after an invalid submit. */
.validation-summary:focus {
    outline: 2px solid #e50000;
    outline-offset: 2px;
}

/* The directory rows that "show more" just added light up for a moment. */
@keyframes highlightNewProfile {
    0% {
        background-color: var(--tr-highlight);
    }
    100% {
        background-color: transparent;
    }
}

.profile-row-new {
    animation: highlightNewProfile 1.5s ease-out;
}

/* On phones the row is a card: the card lights up. */
.profile-row-new .card {
    animation: highlightNewProfile 1.5s ease-out;
}

/* The message list of a chat (help requests, private messages, a group's conversation; design 3.27).
   It scrolls on its own and the field to write in sits right under it. Scripts/chat-follow.ts gives
   it the height the screen leaves (an inline max-height), so that field stays in sight; the heights
   here are what a page without scripts gets. */
.chat-list {
    max-height: 24rem;
    overflow-y: auto;
}

/* On a narrow screen the field to write in is two lines tall, not three: more room for the messages. */
@media (max-width: 575.98px) {
    .chat-composer textarea {
        max-height: 4.75rem;
    }
}

.chat-list-item {
    outline: none;
}

.chat-list-item:focus-visible {
    outline: 3px solid var(--tr-focus-ring);
    /* Inside the item: the list scrolls and would cut a ring drawn outside. */
    outline-offset: -3px;
}

/* The message the arrows are on: shown by the focus ring only, so no band runs beside a short bubble. */
.chat-list-item-active {
    border-radius: 0.5rem;
}

.chat-list-item-placeholder {
    padding: 0.5rem 0;
}

.chat-bubble {
    white-space: pre-line;
    max-width: min(40rem, 100%);
}

/* ProfileCard on phones: a column with the photo first. */
.profile-card-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-card-mobile .profile-photo {
    order: -1;
}

/* ProfileCard from md up: one grid row. */
.profile-card-desktop {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    grid-template-areas: "photo heading badge button";
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
}

.profile-card-desktop .profile-avatar {
    grid-area: photo;
}

.profile-card-desktop .profile-heading {
    grid-area: heading;
}

.profile-card-desktop .profile-role {
    grid-area: badge;
}

.profile-card-desktop .profile-action {
    grid-area: button;
}

/* Directory rows: separated by a rule on desktop; on phones each ProfileCard is already a card */
@media (min-width: 768px) {
    .profile-row {
        border-bottom: 1px solid var(--tr-border);
    }

    .profile-row:last-child {
        border-bottom: none;
    }
}

.validation-summary h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.validation-summary ul {
    margin-bottom: 0;
}

.validation-summary .alert-link {
    color: var(--bs-danger-text-emphasis);
    font-weight: 600;
    text-decoration: underline;
}

.validation-summary .alert-link:hover,
.validation-summary .alert-link:focus {
    color: light-dark(#58151c, #f1aeb5);
}

/* On phones the summary is only for screen readers: the messages under each field do the visible work. */
@media (max-width: 767.98px) {
    .validation-summary.d-none.d-md-block {
        position: absolute;
        left: -10000px;
        width: 1px;
        height: 1px;
        overflow: hidden;
    }
}

/* Buttons that fill the row on phones and shrink to content from md up */
@media (min-width: 768px) {
    .w-md-auto {
        width: auto !important;
    }
}

@media (min-width: 992px) {
    .w-lg-auto {
        width: auto !important;
    }
}

/* Long user-provided values must never force horizontal scrolling */
.card-body,
.list-group-item,
.toast-body,
.alert {
    overflow-wrap: anywhere;
}

/* Attendee messaging */
/* Own messages in the primary colour: the brand in light mode, its lighter twin with dark text in dark mode. */
.chat-bubble-mine {
    background-color: var(--tr-primary);
    color: var(--tr-on-primary);
}

.chat-bubble-mine time,
.chat-bubble-mine .chat-read-receipt {
    color: light-dark(rgba(255, 255, 255, 0.85), rgba(16, 23, 30, 0.85));
}

.chat-bubble-theirs {
    background-color: var(--tr-page);
    color: var(--tr-text);
    border: 1px solid var(--tr-border);
}

.chat-bubble-theirs time {
    color: var(--tr-muted);
}

.attendee-chat-list {
    max-height: 32rem;
}

/* In a two-person chat the bubbles already say who is who: no row highlight, only the focus ring. */
.attendee-chat-list .chat-list-item-active {
    background-color: transparent;
}

.attendee-chat-list .chat-list-item:focus-visible {
    outline: 3px solid var(--tr-focus-ring);
    outline-offset: -3px;
    border-radius: 0.5rem;
}

.inbox-list .list-group-item {
    border-color: var(--tr-border);
}

.inbox-item {
    color: inherit;
}

.inbox-item:hover,
.inbox-item:focus {
    background-color: var(--tr-surface-hover);
}

.inbox-item:focus-visible {
    outline: 3px solid var(--tr-focus-ring);
    outline-offset: -3px;
}

/* On a phone the last message's date and hour go under the texts, lined up with them: kept on one line at the
   row's end, a message from another day ("19/11/2026, 23:56") took the room of a long name and squeezed it into
   77 px and four lines at 320 (long-content.spec, 2026-11-19). The 48 px are the avatar's, the 1rem its gap. */
@media (max-width: 575.98px) {
    .inbox-item {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }

    /* The texts take what is left beside the avatar, from nothing up: from their own width they went under it. */
    .inbox-item > .flex-grow-1 {
        flex-basis: 0;
    }

    .inbox-item > time {
        flex-basis: 100%;
        padding-left: calc(48px + 1rem);
    }
}

.inbox-unread .inbox-name,
.inbox-unread .inbox-snippet {
    font-weight: 700;
    color: var(--tr-primary);
}

/* The form's trap for scripts: far off screen at its natural size (a 1px box with hidden overflow would read as
   clipped text to the layout checks), while aria-hidden and tabindex=-1 in the markup keep it from everyone else. */
/* The admin key of a development machine: the QR code in the very corner of the screen, which the
   page's text names so anyone can aim a phone at it, on white whatever the theme. The text comes
   first for screen readers and goes beside the code, or under it on a narrow screen. */
.admin-key-page {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.admin-key-qr {
    order: -1;
    display: block;
    width: 50vmin;
    height: 50vmin;
    background-color: #fff;
}

.admin-key-text {
    flex: 1 1 20rem;
    max-width: 45rem;
    padding: 1.5rem;
}

.admin-key-secret {
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    overflow-wrap: anywhere;
}

.honeypot {
    position: absolute;
    left: -10000px;
    top: 0;
}

.unread-badge {
    background-color: #ffd166;
    color: var(--tr-brand);
    font-weight: 700;
}

.inbox-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* The recorded greeting (design 3.36): the recorder panel of the profile forms and the countdown
   while it records; the listen button keeps its width while its word changes. */
.voice-panel {
    background-color: var(--bs-tertiary-bg);
}

.voice-timer {
    min-width: 3.5ch;
    font-variant-numeric: tabular-nums;
}

.voice-button {
    white-space: nowrap;
}

/* A photo in its circle (FramedPhoto, PhotoFraming): the span clips, the image inside is sized by
   its width (tall) or height (wide) at the zoom, inline, and translated by percentages of itself.
   A photo without a known framing is plain cover showing its upper part, where a face usually is. */
.photo-frame {
    position: relative;
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
}

.photo-frame-img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    max-width: none;
    -webkit-user-drag: none;
}

.photo-frame-tall {
    width: 100%;
    height: auto;
}

.photo-frame-wide {
    height: 100%;
    width: auto;
}

.photo-frame-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}

/* The editable circle of the profile forms (PhotoFrameEditor): dragged with the pointer, moved with the keys. */
.photo-frame-stage {
    display: inline-block;
    border-radius: 50%;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.photo-frame-stage.dragging {
    cursor: grabbing;
}

.photo-frame-stage:focus-visible {
    border-radius: 50%;
    outline-offset: 4px;
}

.profile-avatar-placeholder {
    background-color: light-dark(#f0f0f0, #253240);
    color: var(--tr-muted);
}

/* Product page tabs: underlined like the top bar, the selected one bold with a brand bar under it. */
.product-landing-tabs {
    --bs-nav-tabs-border-width: 0;
    border-bottom: 1px solid var(--tr-border-subtle);
    gap: 0.5rem;
}

.product-landing-tabs .nav-link {
    color: var(--tr-primary);
    font-weight: 600;
    border: 0;
    border-radius: var(--tr-radius) var(--tr-radius) 0 0;
    padding: 0.6rem 1.1rem;
}

.product-landing-tabs .nav-link:hover {
    background-color: var(--tr-surface);
}

.product-landing-tabs .nav-link.active {
    color: var(--tr-primary);
    background-color: transparent;
    box-shadow: inset 0 -4px 0 var(--tr-primary);
}

/* Menus of pills (the console's sections, the pages of "My group"): the brand colour, never Bootstrap's blue. */
.nav-pills {
    gap: 0.35rem;
}

.nav-pills .nav-link {
    color: var(--tr-primary);
    font-weight: 600;
    border-radius: var(--tr-radius);
}

.nav-pills .nav-link:hover {
    background-color: var(--tr-surface-hover);
}

.nav-pills .nav-link.active {
    color: var(--tr-on-primary);
    background-color: var(--tr-primary);
    /* Switch the foreground and its brand surface together when the theme changes. */
    transition: none;
}

/* The pages inside one console section (the group networking's): a second row under the pills, so it is
   a line of underlined links and the current one carries a thick edge instead of another filled pill. */
.nav-subsections {
    gap: 0.25rem 1.25rem;
    border-bottom: 1px solid var(--tr-border);
}

.nav-subsections .nav-link {
    padding: 0.4rem 0.15rem;
    color: var(--tr-primary);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.nav-subsections .nav-link:hover {
    border-bottom-color: var(--tr-control-border);
}

.nav-subsections .nav-link.active {
    color: var(--tr-heading);
    border-bottom-color: var(--tr-primary);
}

/* Badge sheet (console): cards of 9 x 6 cm, two per row on A4, nothing else on paper. */
.badge-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
}

.badge-card {
    border: 1px solid #6c757d;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    background: #fff;
    color: #1b1b1b;
    break-inside: avoid;
}

.badge-card p {
    margin-bottom: 0.25rem;
}

.badge-card-event {
    font-size: 0.875rem;
    text-transform: uppercase;
}

.badge-card-name {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.badge-card-org,
.badge-card-role,
.badge-card-id {
    font-size: 1rem;
}

.badge-card-qr {
    display: block;
    margin: 0.5rem auto;
}

@media print {
    .layout-header,
    .site-footer,
    .no-print,
    #blazor-error-ui {
        display: none !important;
    }

    .badge-sheet {
        grid-template-columns: repeat(2, 9cm);
        gap: 0.5cm;
    }

    .badge-card {
        width: 9cm;
        min-height: 6cm;
    }
}

/* Event logo: any shape fits the square it is given. */
.navbar-brand img,
.brand-logo-preview {
    object-fit: contain;
}

/* Console, branding: a sample of a suggested colour and the page background of the preview. */
.brand-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.35rem;
    vertical-align: -0.15em;
    border: 1px solid var(--tr-muted);
    border-radius: 0.25rem;
}

/* The light-mode preview stays light in dark mode: white, the tinted surface and the grey margin
   the colour is checked on (ColorContrast). */
.brand-preview-light {
    color-scheme: light;
    background-color: #fff;
    color: #16202a;
    border: 1px solid #ced4da;
}

.brand-preview-page {
    background-color: #f6f8fb;
}

.brand-preview-footer {
    background-color: #ced4da;
}

/* The dark-mode preview: the dark page and the lightest dark surface the colour is checked on. */
.brand-preview-dark {
    background-color: #10171e;
}

.brand-preview-dark-card {
    background-color: #1f2b37;
}

/* Top bar links: solid white, so every brand colour the console accepts keeps 4.5:1 with them,
   and the current page is underlined rather than only brighter. Global because NavLink is a
   child component that scoped CSS does not reach. */
.layout-navbar {
    --bs-navbar-color: #fff;
    --bs-navbar-hover-color: #fff;
    --bs-navbar-active-color: #fff;
}

.layout-navbar .navbar-nav .nav-link {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0 0.375rem 0.375rem 0;
}

.layout-navbar .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

/* The current page: a white bar on the left of the link in the folded menu, under it on the bar. */
.layout-navbar .navbar-nav .nav-link.active {
    box-shadow: inset 4px 0 0 #fff;
}

@media (min-width: 1200px) {
    .layout-navbar .navbar-nav .nav-link {
        display: inline-flex;
        border-radius: 0.375rem 0.375rem 0 0;
    }

    .layout-navbar .navbar-nav .nav-link.active {
        box-shadow: inset 0 -3px 0 #fff;
    }
}

/* On the dark bar the ring is white, so it shows on every brand colour. */
.layout-navbar a:focus-visible,
.layout-navbar button:focus-visible,
.layout-navbar .nav-link:focus-visible,
.layout-navbar .btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: none;
}

/* ==========================================================================
   Footer: a light band under a coloured edge, centred columns, underlined links.
   ========================================================================== */
.site-footer {
    background-color: var(--tr-surface);
    border-top: 4px solid var(--tr-accent);
    color: var(--tr-text);
}

.site-footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 5rem;
    text-align: center;
}

.site-footer a {
    font-weight: 600;
    text-decoration: underline;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

/* Platform legal links in the footer: 24px tall targets even when they wrap on a narrow screen (WCAG 2.5.8). */
.footer-platform-legal {
    border-top: 1px solid var(--tr-border-subtle);
}

.footer-platform-legal a {
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-platform,
.footer-sponsors {
    border-top: 1px solid var(--tr-border-subtle);
}

/* The footer's contact links (design 3.46): the same 24px targets as the legal links when they wrap. */
.footer-contact a {
    display: inline-block;
    padding: 0.25rem 0;
}

/* Sponsor logos are drawn for a light background: they keep one in dark mode too. */
.footer-sponsors img {
    background-color: #fff;
    padding: 2px;
    border-radius: 4px;
}

/* Platform product page: keep the intro paragraph to a readable line length. */
.product-landing-lead {
    max-width: 46rem;
}

/* Profile forms: the network name labels. */
.social-network-name {
    min-width: 150px;
}

/* On a phone the network's name is a band on top and the address gets the whole row under it,
   next to Remove; side by side the three left about 30 px for the address. */
@media (max-width: 575.98px) {
    .social-network-row {
        flex-wrap: wrap;
    }

    .social-network-row > .social-network-name {
        flex: 1 0 100%;
        border-radius: var(--tr-radius) var(--tr-radius) 0 0 !important;
    }

    .social-network-row > .form-control {
        margin-left: 0 !important;
        margin-top: -1px;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: var(--tr-radius) !important;
    }

    .social-network-row > .btn {
        margin-top: -1px;
        border-top-right-radius: 0 !important;
    }
}

/* The public profile's photo: the circle keeps its size on narrow screens too. */
/* The portrait of a profile: 250 px where there is room, never wider than its column (the inline
   size FramedPhoto sets is the largest it gets; the image inside is placed by percentages). */
.profile-portrait {
    width: 250px !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 1;
}

/* A badge is three quarters of the text around it, and never smaller than 12 px: inside small
   print Bootstrap's own size would leave it at 10.5 px. */
.badge {
    font-size: max(0.75em, 0.75rem);
}

/* Role badges: the role gives the colour, the text is always dark. */
.role-badge {
    color: #333;
}

/* Console venue tree: drag and drop marks (the actions menu is the accessible way to do the same). */
.venue-tree tr[draggable="true"] > th {
    cursor: grab;
}

.venue-tree tr.dragging > * {
    opacity: 0.5;
}

.venue-tree tr.drop-before > * {
    box-shadow: inset 0 3px 0 0 var(--bs-primary);
}

.venue-tree tr.drop-after > * {
    box-shadow: inset 0 -3px 0 0 var(--bs-primary);
}

.venue-tree tr.drop-inside > * {
    background-color: var(--bs-primary-bg-subtle);
}

/* "Open in the app" offer on event pages seen from a phone's browser. */
.open-in-app {
    background-color: var(--bs-primary-bg-subtle);
    border-bottom: 1px solid var(--bs-border-color);
}

/* QR sticker sheets (VenueTagsPrint): a grid of cut-out cards. */
.sticker-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 1rem;
}

.sticker-sheet li {
    break-inside: avoid;
    text-align: center;
    border: 1px dashed var(--bs-border-color);
    padding: .5rem;
}

.sticker-sheet img {
    width: 100%;
    max-width: 9rem;
    height: auto;
}

@media print {
    .sticker-sheet {
        gap: .5rem;
    }
}

/* The lightning talks counter (LightningTalkCounter.razor): the figure large on the event's tint, so the number is
   seen at a glance, and the organisation's message beside it; under it, with the figure first, on a phone. */
.lightning-counter {
    padding: 0.75rem 1rem;
    background: var(--tr-primary-tint);
    border-left: 0.25rem solid var(--tr-primary);
    border-radius: var(--tr-radius);
}

.lightning-counter-figure {
    min-width: 4.5rem;
    line-height: 1;
    color: var(--tr-heading);
}

@media (min-width: 576px) {
    .lightning-counter-figure {
        text-align: center;
    }
}

.lightning-counter-number {
    display: block;
    font-size: 1.5rem; /* the call's own heading (h4): above the text, never above the page's title */
    font-weight: 700;
}

.lightning-counter-unit {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.lightning-counter-message > :last-child {
    margin-bottom: 0;
}

/* Long texts rendered from Markdown (the privacy notice, the legal documents, the event's own texts). */
.event-content p {
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Bold is only bold: in the brand colour it passed for a link. */
.event-content strong,
.event-content b {
    font-weight: 700;
}

.privacy-contact {
    border-left: 4px solid var(--tr-primary);
}

@media (max-width: 768px) {
    .event-content p {
        font-size: 1rem;
    }
}

/* Badge mailing: a progress bar tall enough for its percentage text. */
.send-mail-progress {
    height: 1.25rem;
}

/* Confirmations (StatusToasts): above everything, out of the way of the footer, hidden from assistive tech (the live region says them). */
.status-toasts {
    z-index: 1090;
    pointer-events: none;
}

.status-toasts .toast {
    pointer-events: auto;
}

/* The suggestions of OptionCombobox, over what follows the field. */
.option-combobox-list {
    z-index: 1050;
    max-height: 16rem;
    overflow-y: auto;
}

/* Questions and answers keep the line breaks people type. */
.question-text {
    white-space: pre-wrap;
}

/* Long dates ("viernes, 20 de noviembre de 2026") start with a capital and keep "de" in lower case. */
.text-capitalize-first::first-letter {
    text-transform: uppercase;
}

/* Questions' day switcher on a phone: the day on top, the two buttons side by side under it.
   Only the heading moves; the Tab order of the buttons stays the same. */
@media (max-width: 767.98px) {
    .day-nav > h2 {
        order: -1;
        flex-basis: 100%;
    }

    .day-nav > .btn {
        flex: 1 1 0;
    }
}

/* Sections of a long text breathe above their heading, also right under the page's h1. */
.event-content :is(h2, h3) {
    margin-top: 1.5em;
}

.event-content:first-child > :is(h2, h3):first-child {
    margin-top: 0;
}

/* Live captions, the attendee view (design 3.20): the transcript scrolls inside the page and
   grows with the reader's chosen size; the provisional line is told apart without colour alone. */
.captions-transcript {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid var(--tr-border);
    border-radius: 0.5rem;
    background: var(--tr-surface);
    line-height: 1.5;
}

.captions-transcript:focus-visible {
    outline: 3px solid var(--tr-focus-ring);
    outline-offset: 2px;
}

.captions-transcript p {
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
}

.captions-transcript p:last-child {
    margin-bottom: 0;
}

.captions-transcript.captions-size-1 { font-size: 1rem; }
.captions-transcript.captions-size-2 { font-size: 1.375rem; }
.captions-transcript.captions-size-3 { font-size: 1.875rem; }

.captions-transcript .captions-partial {
    font-style: italic;
    color: var(--tr-muted);
}

/* ==========================================================================
   Design review of November 2026
   ========================================================================== */

/* The console's ten sections fit one row on a laptop, and wrap evenly below. */
.console-sections .nav-link {
    padding: 0.45rem 0.8rem;
}

/* A table that scrolls sideways says so: a shadow on the side where columns are hidden
   (Scripts/scroll-regions.ts marks the wrapper while there is more that way). */
.table-responsive[data-scroll-more~="end"] {
    box-shadow: inset -0.9rem 0 0.6rem -0.6rem light-dark(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.7));
}

.table-responsive[data-scroll-more~="start"] {
    box-shadow: inset 0.9rem 0 0.6rem -0.6rem light-dark(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.7));
}

.table-responsive[data-scroll-more="start end"] {
    box-shadow: inset -0.9rem 0 0.6rem -0.6rem light-dark(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.7)),
        inset 0.9rem 0 0.6rem -0.6rem light-dark(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.7));
}

/* The pages of "My group" on a phone: the three pills share one row, each as wide as its name in
   a slightly smaller letter, instead of the third one alone on a second row; only on the
   narrowest screens does the longest name go on in a second line inside its pill. */
@media (max-width: 575.98px) {
    .nav-pages {
        flex-wrap: nowrap;
        gap: 0.25rem;
    }

    .nav-pages .nav-item {
        flex: 0 1 auto;
        min-width: 0;
    }

    .nav-pages .nav-link {
        height: 100%;
        padding: 0.45rem 0.5rem;
        font-size: 0.875rem;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* On a small or zoomed window only the two newest confirmations show: a pile of them would cover the page. */
@media (max-width: 575.98px), (max-height: 480px) {
    .status-toasts .toast:not(:nth-last-child(-n + 2)) {
        display: none;
    }

    .status-toasts {
        padding: 0.5rem !important;
    }
}

/* A breadcrumb that wraps ends its line with the "/" and starts the next with a name: the
   separator is drawn after each item but the last, not before each but the first. */
.breadcrumb-item + .breadcrumb-item {
    padding-left: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: none;
}

.breadcrumb-item:not(:last-child)::after {
    content: "/";
    content: "/" / "";
    padding: 0 0.5rem;
    color: var(--bs-breadcrumb-divider-color);
}


/* The organiser's own text above the programme sits under the page's title: its headings stay
   smaller than that title, whatever level they were written with. */
.event-content-sessions :is(h1, h2) {
    font-size: 1.35rem;
}

.event-content-sessions :is(h3, h4) {
    font-size: 1.15rem;
}

/* The title of a long text keeps its distance from the first paragraph. */
.event-content > h1 {
    margin-bottom: 1.25rem;
}

/* A switch that is off shows its whole track, not only a thin outline that passes for a disabled or missing control. */
.form-switch .form-check-input:not(:checked) {
    background-color: light-dark(#e1e6ec, #2a3846);
}

/* The console's sections are a grid, so the rows line up in columns instead of ending with one
   or two pills on their own. ConsoleEventHeader says how many columns make full rows at each
   width (--tabs-md, --tabs-lg, --tabs-xl): one row on a laptop when they fit, two or three even
   rows below. On a phone the cells are as wide as the longest name needs. */
.console-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.75rem, 1fr));
}

.console-sections .nav-link {
    height: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .console-sections {
        grid-template-columns: repeat(var(--tabs-md, 5), minmax(0, 1fr));
    }

    .console-sections .nav-link {
        padding: 0.45rem 0.35rem;
    }
}

@media (min-width: 992px) {
    .console-sections {
        grid-template-columns: repeat(var(--tabs-lg, 5), minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .console-sections {
        grid-template-columns: repeat(var(--tabs-xl, 10), auto);
        justify-content: start;
    }

    .console-sections .nav-link {
        padding: 0.45rem 0.8rem;
    }
}

/* The order of the favourites: the name keeps whole words and the two buttons go under it when
   the row is too narrow for both (a phone, a window zoomed to 400%). */
.menu-favourites .list-group-item {
    flex-wrap: wrap;
}

.menu-favourites .list-group-item > .flex-grow-1 {
    min-width: min(100%, 8rem);
    overflow-wrap: normal;
}

/* A row of checkboxes whose label comes first (the event's languages): each pair stays together
   and apart from the next, so a box is not taken for the next word's. */
.form-check-inline.form-check-reverse {
    margin-right: 2rem;
    white-space: nowrap;
}


/* A heading of two lines splits them evenly instead of leaving one word alone on the second. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand {
    text-wrap: balance;
}

/* The small headings (the title of a card, of a block inside a section) are as bold as the labels under them. */
h5, h6, .h5, .h6 {
    font-weight: 700;
}

/* A text cut to two lines, with an ellipsis: a preview of something that can be read whole elsewhere. */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* The lists of a long text read like its paragraphs, not smaller and tighter. */
.event-content li {
    line-height: 1.8;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .event-content li {
        font-size: 1rem;
    }
}

/* An identifier or a code in a table stays in one piece: broken at a hyphen it reads as two. */
.table code {
    white-space: nowrap;
}

/* A role's pill keeps an edge, so the palest ones still read as pills on a pale card. */
.role-badge {
    border: 1px solid rgba(0, 0, 0, 0.22);
}

/* The suggestions of a person field stand off the field and off what they cover. */
.person-combobox-list {
    margin-top: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
}

/* A sticker's code keeps its distance from the white box of its QR. */
.sticker-sheet img {
    margin-bottom: 0.4rem;
}

/* Badges on a sheet: the QR and the number sit at the bottom of every card, whatever the lines above them take. */
.badge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-card-qr {
    margin-top: auto;
}

/* The footer on a narrow screen: the block of social links is centred, its lines start together so
   the icons line up; the link to donate is not cut in two; sponsors with and without a logo sit on one line. */
@media (max-width: 767.98px) {
    .footer-social ul {
        width: fit-content;
        margin-inline: auto;
        align-items: flex-start !important;
    }
}

.footer-platform a {
    display: inline-block;
}

.footer-sponsors .list-inline-item {
    vertical-align: middle;
}

.footer-sponsors {
    margin-top: 2rem !important;
}

/* Between 1200 and 1400 px the menu of somebody with many entries (team, organisation) is tighter, so it fits one row. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .layout-navbar .navbar-nav .nav-link {
        padding: 0.5rem 0.5rem;
        gap: 0.3rem;
        font-size: 0.95rem;
    }
}
/* The field for a sticker's or a badge's code (badge day, placement walk): as wide as a code from a
   small tablet up; on a phone it takes the row and its buttons go under it, each at full width. */
@media (min-width: 576px) {
    .code-field {
        max-width: 14rem;
    }
}

/* The order of a participant in the console's table: room for the name of its source under the
   code, so that name reads in two lines at most instead of five. */
.order-cell {
    min-width: 13rem;
}

/* The colour pickers and the dark preview of the branding page keep an edge of their own: on the
   dark page a dark sample or a page-coloured panel had none and read as an empty box. */
.form-control-color {
    border-color: var(--tr-control-border);
}

.brand-preview-dark {
    border: 1px solid #7d8fa1;
}

/* A row of facts about one thing (when, where, who, how many): a middle dot between them, drawn
   and never read (the items are a list, which a screen reader already says one by one). */
.list-inline-sep > .list-inline-item:not(:last-child) {
    margin-right: 0;
}

.list-inline-sep > .list-inline-item:not(:last-child)::after {
    content: "·";
    content: "·" / "";
    margin: 0 0.5rem;
    color: var(--tr-muted);
}

/* The title block of a page header (PageHeader): it asks for a width a title reads well in, so
   that a group of actions too wide to sit beside it goes under it instead of squeezing it. */
@media (min-width: 768px) {
    .page-header-main {
        flex: 1 1 18rem;
    }
}

/* The frame of a chat bubble has line breaks of its own in the markup: only the text of the
   message keeps the lines its writer typed, or a blank line opens between the name and the text. */
.chat-bubble {
    white-space: normal;
}

.chat-bubble > div:nth-child(2) {
    white-space: pre-line;
}

/* The colon of a label of the help request's details sits against its word. */
.request-details-list dt::after {
    margin-left: 0;
}

/* Where a group gathers: the one fact its people come to the page for, framed so it is not lost among the notes. */
.group-point {
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--tr-primary);
    border-radius: var(--tr-radius);
    background-color: var(--tr-surface);
    font-weight: 600;
    font-size: 1.1rem;
}

/* The four feature cards of the product page share a row on a wide screen: a title of one line
   keeps the room of one of two, so every card's text starts at the same height. */
@media (min-width: 992px) {
    .product-feature-title {
        min-height: 2.5em;
    }
}

/* A switch that is off: a grey track with a dark knob and edge, clearly there and clearly off
   (the pale outline it had passed for a disabled control, or for none). */
.form-switch .form-check-input:not(:checked) {
    background-color: light-dark(#d5dbe2, #33424f);
    border-color: light-dark(#5c636a, #9fb0c0);
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2338434e'/%3e%3c/svg%3e");
}

/* A text cut to three lines, with an ellipsis. */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* An identifier with no spaces (a request id) fills its lines to the end instead of breaking after each hyphen. */
.break-all {
    word-break: break-all;
}

/* A failure's text on the error page (administrators only): its long lines wrap inside the card instead of scrolling it. */
.error-detail {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* The profile inside the directory's dialog is not a card of its own: no frame, no coloured edge. */
.card.profile-embedded {
    border: 0 !important;
    background: transparent;
    box-shadow: none;
}

/* The name of a place that opens its children (the venue tree) is written like its siblings': the
   size of the row, from the left, in as many lines as it needs. */
.venue-tree [data-treegrid-toggle] {
    font-size: inherit;
    line-height: 1.3 !important;
    text-align: start;
}

/* The question that confirms deleting a row keeps the width of a sentence; its buttons follow it. */
.inline-delete-confirm > span {
    flex: 1 1 14rem;
}

/* The two buttons that move a favourite stay together: under the name, both, when the row is narrow. */
.menu-favourites .favourite-moves {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Sponsors with and without a logo share one line: each takes the height of a logo and centres its name in it. */
.footer-sponsors .list-inline-item > * {
    min-height: 2.5rem;
    vertical-align: middle;
}

/* The edit menu of text fields with "Insert placeholder" (edit-context-menu.ts, design 3.43): a dropdown
   menu placed where it was asked for. The submenu opens to the right, or to the left when there is no room. */
.ctx-menu {
    position: fixed;
    z-index: 2000;
    min-width: 15rem;
    margin: 0;
}

.ctx-menu[hidden] {
    display: none;
}

.ctx-menu [role="menuitem"] {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    cursor: default;
    white-space: normal;
}

.ctx-menu [role="menuitem"][aria-disabled="true"] {
    color: var(--tr-muted);
}

.ctx-shortcut,
.ctx-arrow {
    margin-left: auto;
    opacity: 0.85;
}

.ctx-key {
    font-family: var(--bs-font-monospace);
    opacity: 0.85;
    font-size: 0.875em;
}

.ctx-has-sub {
    position: relative;
}

.ctx-submenu {
    position: absolute;
    left: 100%;
    top: -0.3rem;
}

.ctx-submenu.ctx-flip {
    left: auto;
    right: 100%;
}

@media (forced-colors: active) {
    .ctx-menu [role="menuitem"]:focus,
    .ctx-menu [role="menuitem"][aria-expanded="true"] {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
    }
}

/* The calendar of DateTimeField (Scripts/date-picker.ts): a small dialog with the month as a grid. Each day
   is a square big enough for a finger; the day chosen is filled, today is underlined, and the day in focus
   has the site's ring. */
.date-picker {
    width: min(22rem, calc(100vw - 2rem));
    padding: 1rem;
    color: var(--tr-text);
    background: light-dark(var(--tr-page), #1f2b37);
    border: 1px solid light-dark(var(--tr-border), #7d8fa1);
    border-radius: var(--tr-radius-lg);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}

.date-picker::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.date-picker h2 {
    color: var(--tr-heading);
}

.date-picker-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.date-picker-month {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    text-align: center;
    font-weight: 600;
}

.date-picker table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 2px;
}

.date-picker th {
    padding: 0.25rem 0;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tr-muted);
}

.date-picker td {
    height: 2.75rem;
    text-align: center;
    border-radius: var(--tr-radius);
}

.date-picker td[data-date] {
    cursor: pointer;
}

.date-picker td[data-date]:hover {
    background: var(--tr-surface-hover);
}

.date-picker td[aria-current="date"] {
    font-weight: 700;
    text-decoration: underline;
}

.date-picker td[aria-selected="true"] {
    color: var(--tr-on-primary);
    background: var(--tr-primary);
    font-weight: 600;
}

.date-picker td[data-date]:focus-visible {
    outline: 3px solid var(--tr-focus-ring);
    outline-offset: -3px;
}

.date-picker-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

/* The agenda (design 3.52): one table per day, its columns the rooms and nothing else, as the
   agenda of a11yconf.com (design 3.59): each cell begins with its own hours. Every room column has
   the same width and at least 10rem, so a day with more rooms than fit scrolls sideways inside
   .table-responsive. A session for everyone (a plenary, a break without a room) spans every column.
   The content of a cell sits at its top, so a long session's text starts beside the short one next
   to it rather than floating in the middle of its rows.

   Each session is drawn on a soft tone of its own with round corners, apart from the next by a gap
   (design 3.78, Juanjo: «que se vea la separación entre charlas»); an empty cell stays the page. The
   tone is the session's (AgendaTones), the same in the table and in the phone's list. Light tones
   keep every text of the page above 4.5:1 (the muted grey 5.5:1 at worst, an event's brand is
   checked on #ced4da, darker than all of them); dark ones are no lighter than #1f2b37, the surface
   the brand's dark twin is checked on. */
.agenda-tone-0 { --agenda-tone: light-dark(#fde8ec, #33222a); }
.agenda-tone-1 { --agenda-tone: light-dark(#e2f0fb, #1c2a38); }
.agenda-tone-2 { --agenda-tone: light-dark(#fdf6d8, #2a291a); }
.agenda-tone-3 { --agenda-tone: light-dark(#eee8fb, #2a2338); }
.agenda-tone-4 { --agenda-tone: light-dark(#e3f6ea, #1b2c23); }
.agenda-tone-5 { --agenda-tone: light-dark(#fff0e0, #32271d); }

.agenda-cell {
    background-color: var(--agenda-tone, var(--tr-surface));
    border-radius: var(--tr-radius);
}

.agenda-table {
    table-layout: fixed;
    min-width: calc(10rem * var(--agenda-columns, 1));
    border-collapse: separate;
    border-spacing: 0.5rem;
}

/* The gap also goes round the table's edge: its box steps out by as much, so the cells start where the
   headings above them start, at the left (Juanjo, 2026-11-16). */
.table-responsive:has(> .agenda-table) {
    margin-inline: -0.5rem;
}

.agenda-table > :not(caption) > * > * {
    vertical-align: top;
    border-bottom-width: 0;
}

/* Bootstrap paints a table's cells with --bs-table-bg: the session's tone is given there. */
.agenda-table > tbody > tr > td.agenda-cell {
    --bs-table-bg: var(--agenda-tone, var(--tr-surface));
    border-radius: var(--tr-radius);
}

/* A session of the day's table is a heading (its hours and its title) that looks as the two lines did before:
   body size, the hours in bold in the text's colour, the title a link of normal weight. */
.session-cell-heading {
    font-size: 1rem;
    font-weight: 600;
    line-height: var(--bs-body-line-height);
    color: var(--tr-text);
}

.agenda-table .session-line .list-inline {
    margin-top: 0.25rem;
}

/* A column cannot grow for a word in a fixed table: a word longer than its column (a room or a title of one long
   word) breaks inside it instead of running over the next one. Any other word stays whole. */
.table-responsive > .agenda-table :is(th, td) {
    overflow-wrap: break-word;
}

/* On a tablet the general rule lets a table grow to its content, no narrower than its wrapper; the agenda keeps
   its fixed columns, the width of its wrapper and its 10rem a room, and scrolls only when the rooms need more than
   that. The minimum is said again here because the general rule's min-width: 100% outranks .agenda-table's: eight
   rooms at 768 px got columns 80 px wide, and their names and buttons stuck out of them (2026-11-19). */
@media (max-width: 991.98px) {
    .table-responsive > .agenda-table {
        width: 100%;
        min-width: calc(10rem * var(--agenda-columns, 1));
        max-width: none;
    }
}

/* The team's tasks (design 3.63). In the panel's table the name keeps a width a title can be read
   in while the other columns stay on one line; on the home page a description keeps its lines. */
.team-task-name {
    min-width: 14rem;
}

/* The status carries how the task goes and what it waits for under it: room for a line of each. */
.team-task-status {
    min-width: 13rem;
}

/* Correos > Enviados (design 2026-11-16-correos-enviados): the subject keeps a width it reads in while
   the date, the address and the kind stay on one line (at 768 px it was squeezed to «Enviad / os…»). */
.sent-mail-subject {
    min-width: 14rem;
}

/* Its wrapper scrolls sideways only. A row of a single mail has no link, and the table's rounded height
   left a pixel to scroll up and down: a scrolling box with nothing to take the keyboard (axe
   scrollable-region-focusable), which scroll-regions.ts only fixes for sideways scrolling. */
.table-responsive:has(> .table .sent-mail-subject) {
    overflow-y: hidden;
}

.my-task-text {
    white-space: pre-line;
}

/* The people a filter asks for: a list as wide as a name with its Remove button, not as the whole card. */
.task-people-filter {
    max-width: 32rem;
}

.category-name-field,
.task-search-field {
    max-width: 24rem;
}

/* A document read in the session's page (design 3.65): someone else's text, so a long address
   breaks instead of widening the page, and code wraps instead of scrolling it. */
.material-page {
    overflow-wrap: anywhere;
}

.material-page pre {
    white-space: pre-wrap;
}

.material-page > :last-child,
.material-page > .table-responsive:last-child > table {
    margin-bottom: 0;
}

/* Its headings stay under the title that heads it (an h2 drawn as an h4), whatever the document made of them. */
.material-page h3 {
    font-size: 1.25rem;
}

.material-page h4 {
    font-size: 1.1rem;
}

.material-page :is(h5, h6) {
    font-size: 1rem;
}

.material-page > :first-child {
    margin-top: 0;
}

/* A favourite session (designs 3.68 and 3.78): a toggle with a star. Its look follows aria-pressed alone, so
   the script that flips the state touches nothing else. Not pressed: an outline and an empty star; the
   mouse over it only tints it, never fills it, so hovering is never taken for marked (Juanjo, 2026-11-16:
   «hasta que quitas el ratón, no lo sabes»). Pressed: filled, with a filled star; the mouse over it makes
   it darker, still filled. In forced colours the backgrounds go, and the star tells the two apart. */
.agenda-toggle {
    --bs-btn-color: var(--tr-primary);
    --bs-btn-bg: var(--tr-page);
    --bs-btn-border-color: var(--tr-primary);
    --bs-btn-hover-color: var(--tr-primary);
    --bs-btn-hover-bg: color-mix(in srgb, var(--tr-primary) 14%, var(--tr-page));
    --bs-btn-hover-border-color: var(--tr-primary);
    --bs-btn-active-color: var(--tr-primary);
    --bs-btn-active-bg: color-mix(in srgb, var(--tr-primary) 22%, var(--tr-page));
    --bs-btn-active-border-color: var(--tr-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.agenda-toggle[aria-pressed="true"] {
    --bs-btn-color: var(--tr-on-primary);
    --bs-btn-bg: var(--tr-primary);
    --bs-btn-hover-color: var(--tr-on-primary);
    --bs-btn-hover-bg: var(--tr-primary-hover);
    --bs-btn-hover-border-color: var(--tr-primary-hover);
    --bs-btn-active-color: var(--tr-on-primary);
    --bs-btn-active-bg: var(--tr-primary-hover);
    --bs-btn-active-border-color: var(--tr-primary-hover);
}

.favourite-star {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linejoin: round;
}

.agenda-toggle[aria-pressed="true"] .favourite-star,
.favourite-star-filled {
    fill: currentColor;
}

/* The meetings of the team (design 2026-11-17-reuniones-del-equipo). A day of a proposal is a group
   of its own, framed, so the days read apart in the dialog. */
.meeting-day-fields {
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius);
    padding: 1rem;
}

.meeting-name {
    min-width: 14rem;
}

.meeting-information {
    white-space: pre-line;
}

/* The table of slots to mark: as wide as its days need and no wider, scrolling sideways inside its
   box on a phone, with the column of hours kept in sight while it does. Each box is a 24 px target
   (WCAG 2.5.8) centred in its cell; a cell whose slot is marked is tinted, one without a slot that
   day is the colour of a surface. The first row, the whole day, is set apart from the hours under
   it by a heavier line; its box half ticked shows Bootstrap's dash, a tick when the day is whole. */
.meeting-slots {
    width: auto;
}

.meeting-slots > :not(caption) > * > * {
    padding: 0.375rem 0.5rem;
    text-align: center;
    vertical-align: middle;
}

.meeting-slots .meeting-slots-time {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    background-color: var(--tr-page);
    color: var(--tr-muted);
    text-align: start;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.meeting-slots .meeting-slots-day {
    min-width: 4.75rem;
    line-height: 1.25;
    white-space: nowrap;
}

.meeting-slot > div {
    justify-content: center;
}

.meeting-slots > tbody > tr.meeting-slots-whole > * {
    border-bottom: 2px solid var(--tr-control-border);
}

/* Tinted as its box is ticked, in the browser, before anything is saved. */
.meeting-slots > tbody > tr > .meeting-slot:has(:checked) {
    background-color: var(--tr-primary-tint);
}

.meeting-slots > tbody > tr > .meeting-slot-none {
    background-color: var(--tr-surface);
}

.meeting-slot-check.form-check {
    padding-left: 0;
    margin-bottom: 0;
    min-height: 0;
    display: flex;
}

.meeting-slot-check .form-check-input {
    float: none;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
}

.meeting-slot-others {
    min-width: 1.75rem;
    color: var(--tr-muted);
    font-size: 0.875rem;
    text-align: start;
}

/* The slot of a row of results keeps a width it reads in; the names wrap beside it. */
.meeting-result-slot {
    min-width: 13rem;
}

/* Surveys (design 2026-11-30-encuestas). The two buttons that move a question stay together. */
.survey-moves {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

/* A question being dragged, and the place it would land on. */
.survey-editor-questions [data-drag-item] {
    cursor: grab;
}

.survey-editor-questions [data-drag-item].is-dragging {
    opacity: 0.5;
}

.survey-editor-questions [data-drag-item].is-drop-target {
    outline: 2px dashed var(--tr-primary);
    outline-offset: 2px;
}

/* A question under a section's title is drawn further in, where there is room for it (design 2026-12-02-encuestas-por-secciones). */
@media (min-width: 576px) {
    .survey-editor-questions .survey-editor-under {
        margin-inline-start: 1.5rem;
    }
}

/* Answering: a section apart from the one before, more than a question from the next. */
.survey-section + .survey-section {
    margin-top: 3rem;
}

/* Answering: each question apart from the next, its text as strong as a label, its help and its error under it. */
.survey-questions > li + li {
    margin-top: 2rem;
}

.survey-question-label {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    overflow-wrap: anywhere;
}

.survey-question legend.survey-question-label {
    float: none;
    width: auto;
}

.survey-required {
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.survey-question-help {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.survey-question-error {
    color: var(--bs-form-invalid-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.survey-question .form-check {
    margin-bottom: 0.375rem;
}

.survey-question .form-check-label {
    overflow-wrap: anywhere;
}

/* The points of a scale: numbers in cells of one width, as many in a row as fit (all of a 0 to 10 on a
   laptop, six on a phone), so the rows wrap evenly; the names of its ends under them, one at each side. */
.survey-scale {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(3.5rem, 1fr));
    gap: 0.25rem 0.5rem;
    max-width: calc(var(--points, 5) * 4rem);
}

.survey-scale .survey-point {
    margin-bottom: 0;
}

.survey-scale-ends {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    max-width: calc(var(--points, 5) * 4rem);
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.survey-intro {
    white-space: pre-line;
}

.survey-thanks {
    border-inline-start: 4px solid var(--bs-success-border-subtle);
    padding-inline-start: 1rem;
}

.survey-answer-text {
    white-space: pre-line;
}

/* A question's counts in the results: as wide as a short table needs. */
.survey-counts {
    max-width: 36rem;
}
