/*! FabricCraft design system 1.0.0, fabriccraft-ops 7b651f460d9e design-system/v1.0.0/components.css. Vendored copy: do not edit; copy a newer version instead. */
/*
 * FabricCraft design system 1.0.0: components.css
 *
 * Needs tokens.css (and fonts.css for the typefaces) loaded first.
 * Every class starts with fc- so it can sit next to an app's own CSS.
 * The base rules use :where() and have zero specificity, so any app rule
 * wins over them. demo.html shows every component in both themes.
 */

/* ---------- Base ---------- */

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

:where(body) {
    margin: 0;
    color: var(--fc-text);
    background: var(--fc-bg);
    font-family: var(--fc-font-text);
    font-size: var(--fc-ui-md);
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

:where([data-theme]) {
    /* A data-theme element switches the custom properties for its subtree.
       Colour and background are set again here because the values a child
       inherits from body were resolved with the outer theme. */
    color: var(--fc-text);
    background-color: var(--fc-bg);
}

:where([class^="fc-"], [class*=" fc-"], [class^="fc-"]::before, [class*=" fc-"]::before) {
    box-sizing: border-box;
}

:where(:focus-visible) {
    outline: var(--fc-focus-width) solid var(--fc-focus);
    outline-offset: var(--fc-focus-offset);
}

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

.fc-skip-link {
    position: absolute;
    left: var(--fc-gutter);
    top: -4rem;
    z-index: calc(var(--fc-z-masthead) + 1);
    padding: 0.6rem 0.9rem;
    color: var(--fc-on-accent);
    background: var(--fc-accent-fill);
    font-weight: 700;
    text-decoration: none;
}

.fc-skip-link:focus {
    top: 0.75rem;
}

/* ---------- Layout ---------- */

.fc-container {
    max-width: var(--fc-max);
    margin-inline: auto;
    padding-inline: var(--fc-gutter);
}

.fc-section {
    padding-block: var(--fc-space-7);
}

.fc-section + .fc-section {
    border-top: var(--fc-hairline) solid var(--fc-rule);
}

/* ---------- Type ---------- */

.fc-title-1,
.fc-title-2,
.fc-title-3 {
    margin: 0;
    font-weight: var(--fc-weight-heading);
}

.fc-title-1 {
    font-size: var(--fc-step-3);
    line-height: 1.08;
    letter-spacing: var(--fc-tracking-heading);
}

.fc-title-2 {
    font-size: var(--fc-step-2);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.fc-title-3 {
    font-size: var(--fc-step-0);
    line-height: 1.3;
}

.fc-lead {
    max-width: var(--fc-measure);
    color: var(--fc-text-soft);
    font-size: var(--fc-step-1);
    line-height: 1.45;
}

.fc-meta {
    color: var(--fc-text-soft);
    font-size: var(--fc-ui-sm);
}

/* Figures: counts, durations, timestamps, ids, build hashes. */
.fc-figure {
    font-family: var(--fc-font-figure);
    font-stretch: 87.5%;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.fc-link {
    color: var(--fc-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color var(--fc-duration-fast);
}

.fc-link:hover {
    color: var(--fc-text);
}

/* Long-form text (rules, policies, docs). */
.fc-prose {
    max-width: var(--fc-measure);
    font-size: var(--fc-step-0);
    line-height: var(--fc-leading-body);
}

.fc-prose h2 {
    margin: 3rem 0 0;
    padding-top: 1rem;
    border-top: var(--fc-hairline) solid var(--fc-rule);
    font-size: var(--fc-step-0);
    font-weight: var(--fc-weight-heading);
}

.fc-prose p,
.fc-prose ul,
.fc-prose ol {
    margin: 0.9rem 0 0;
}

.fc-prose ul {
    padding-left: 1.1rem;
    list-style: square;
}

.fc-prose li + li {
    margin-top: 0.5rem;
}

.fc-prose li::marker {
    color: var(--fc-text-faint);
}

.fc-prose a {
    color: var(--fc-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.fc-prose a:hover {
    color: var(--fc-text);
}

.fc-note {
    padding-left: 1rem;
    border-left: 2px solid var(--fc-accent);
    color: var(--fc-text-soft);
}

/* ---------- Wordmark ---------- */

.fc-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    font-family: var(--fc-font-figure);
    font-size: 0.95rem;
    font-weight: 600;
    font-stretch: var(--fc-figure-stretch-wide);
    letter-spacing: -0.01em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.fc-wordmark img,
.fc-wordmark svg {
    flex: none;
    width: 28px;
    height: 28px;
}

/* "Staff", "Status": the site or tool name after the wordmark. */
.fc-wordmark__suffix {
    padding-left: 0.6rem;
    border-left: var(--fc-hairline) solid var(--fc-rule);
    color: var(--fc-text-soft);
    font-family: var(--fc-font-text);
    font-stretch: normal;
    font-weight: 500;
    letter-spacing: 0;
}

/* ---------- Buttons ---------- */

.fc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--fc-control-md);
    padding: 0 1rem;
    border: var(--fc-hairline) solid var(--fc-rule);
    border-radius: var(--fc-radius);
    color: var(--fc-text);
    background: transparent;
    font: inherit;
    font-size: var(--fc-ui-md);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--fc-duration-fast), border-color var(--fc-duration-fast), color var(--fc-duration-fast);
}

.fc-button:hover {
    border-color: var(--fc-control-border-hover);
}

.fc-button svg {
    flex: none;
    width: 1em;
    height: 1em;
}

.fc-button--primary {
    border-color: transparent;
    color: var(--fc-on-accent);
    background: var(--fc-accent-fill);
}

.fc-button--primary:hover {
    border-color: transparent;
    background: var(--fc-accent-fill-hover);
}

.fc-button--danger {
    border-color: transparent;
    color: var(--fc-on-danger);
    background: var(--fc-danger);
}

.fc-button--danger:hover {
    border-color: transparent;
    background: var(--fc-danger-fill-hover);
}

.fc-button--ghost {
    border-color: transparent;
    color: var(--fc-text-soft);
}

.fc-button--ghost:hover {
    border-color: transparent;
    color: var(--fc-text);
    background: var(--fc-fill);
}

.fc-button--sm {
    min-height: var(--fc-control-sm);
    padding: 0 0.7rem;
    font-size: var(--fc-ui-sm);
}

.fc-button--lg {
    min-height: var(--fc-control-lg);
    padding: 0 1.25rem;
    font-size: 1rem;
}

/* Square, for an icon with an aria-label. */
.fc-button--icon {
    width: var(--fc-control-md);
    padding: 0;
}

.fc-button--icon.fc-button--sm {
    width: var(--fc-control-sm);
}

.fc-button--icon.fc-button--lg {
    width: var(--fc-control-lg);
}

/* pointer-events: none stops clicks on <a aria-disabled>, but not the
   keyboard: remove the href from a disabled link as well. */
.fc-button:disabled,
.fc-button[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.fc-button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

/* ---------- Form controls ---------- */

.fc-field {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.fc-field + .fc-field {
    margin-top: 1.1rem;
}

.fc-label {
    color: var(--fc-text);
    font-size: var(--fc-ui-sm);
    font-weight: 600;
    line-height: 1.3;
}

.fc-label__optional {
    color: var(--fc-text-soft);
    font-weight: 400;
}

.fc-input,
.fc-select,
.fc-textarea {
    width: 100%;
    min-height: var(--fc-control-md);
    margin: 0;
    padding: 0.45rem 0.7rem;
    border: var(--fc-hairline) solid var(--fc-control-border);
    border-radius: var(--fc-radius);
    color: var(--fc-text);
    background: var(--fc-raised);
    font: inherit;
    font-size: var(--fc-ui-md);
    line-height: 1.4;
    transition: border-color var(--fc-duration-fast);
}

/* .fc-figure on an input: font: inherit above would otherwise win. */
.fc-input.fc-figure {
    font-family: var(--fc-font-figure);
    font-stretch: 87.5%;
}

.fc-input--sm,
.fc-select--sm {
    min-height: var(--fc-control-sm);
    padding-block: 0.2rem;
    font-size: var(--fc-ui-sm);
}

.fc-input::placeholder,
.fc-textarea::placeholder {
    color: var(--fc-text-faint);
    opacity: 1;
}

.fc-input:hover,
.fc-select:hover,
.fc-textarea:hover {
    border-color: var(--fc-control-border-hover);
}

.fc-input:focus-visible,
.fc-select:focus-visible,
.fc-textarea:focus-visible {
    outline-offset: 1px;
}

.fc-input[aria-invalid="true"],
.fc-select[aria-invalid="true"],
.fc-textarea[aria-invalid="true"] {
    border-color: var(--fc-danger);
}

.fc-input:disabled,
.fc-select:disabled,
.fc-textarea:disabled {
    border-color: var(--fc-rule);
    color: var(--fc-text-faint);
    background: var(--fc-fill);
    cursor: not-allowed;
}

.fc-textarea {
    min-height: 6rem;
    resize: vertical;
}

/* The chevron is drawn in currentColor, so it follows the theme. */
.fc-select {
    padding-right: 2.2rem;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position:
        right 1.05rem center,
        right 0.75rem center;
    background-size: 0.3rem 0.3rem;
    background-repeat: no-repeat;
    cursor: pointer;
}

/* Range: a 4px track in the control-edge colour and a round thumb ringed in
   the accent. Put the current value in an <output class="fc-figure"> in
   .fc-field__head next to the label. The input is 24px tall, the minimum
   target size. */
.fc-field__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.fc-field__head output {
    color: var(--fc-text-soft);
    font-size: var(--fc-ui-sm);
}

.fc-range {
    display: block;
    width: 100%;
    height: 1.5rem;
    margin: 0;
    padding: 0;
    background: transparent;
    appearance: none;
    cursor: pointer;
}

.fc-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: var(--fc-control-border);
}

.fc-range::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: var(--fc-control-border);
}

.fc-range::-moz-range-progress {
    height: 4px;
    border-radius: 2px;
    background: var(--fc-accent-fill);
}

.fc-range::-webkit-slider-thumb {
    box-sizing: border-box;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: calc(2px - 0.5625rem);
    border: 2px solid var(--fc-accent-fill);
    border-radius: 50%;
    background: var(--fc-raised);
    appearance: none;
    transition: background-color var(--fc-duration-fast);
}

.fc-range::-moz-range-thumb {
    box-sizing: border-box;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--fc-accent-fill);
    border-radius: 50%;
    background: var(--fc-raised);
    transition: background-color var(--fc-duration-fast);
}

.fc-range:hover::-webkit-slider-thumb,
.fc-range:active::-webkit-slider-thumb {
    background: var(--fc-accent-fill);
}

.fc-range:hover::-moz-range-thumb,
.fc-range:active::-moz-range-thumb {
    background: var(--fc-accent-fill);
}

.fc-range:focus-visible {
    outline-offset: 2px;
}

.fc-range:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.fc-help {
    color: var(--fc-text-soft);
    font-size: var(--fc-ui-xs);
    line-height: 1.4;
}

.fc-error {
    color: var(--fc-danger);
    font-size: var(--fc-ui-xs);
    font-weight: 600;
    line-height: 1.4;
}

.fc-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.fc-fieldset legend {
    margin-bottom: 0.5rem;
    padding: 0;
}

.fc-choices {
    display: grid;
    gap: 0.55rem;
}

/* Checkbox and radio: a label wrapping the input and its text. */
.fc-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: var(--fc-ui-md);
    line-height: 1.4;
    cursor: pointer;
}

.fc-check input {
    box-sizing: border-box;
    flex: none;
    display: grid;
    place-content: center;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.06rem 0 0;
    border: var(--fc-hairline) solid var(--fc-control-border);
    border-radius: 4px;
    background: var(--fc-raised);
    appearance: none;
    cursor: pointer;
    transition: background-color var(--fc-duration-fast), border-color var(--fc-duration-fast);
}

.fc-check input[type="radio"] {
    border-radius: 50%;
}

.fc-check input::before {
    content: "";
    box-sizing: border-box;
    width: 0.7rem;
    height: 0.7rem;
    background: var(--fc-on-accent);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
    transform: scale(0);
    transition: transform var(--fc-duration-fast) var(--fc-ease-out);
}

.fc-check input[type="radio"]::before {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    clip-path: none;
}

.fc-check input:hover {
    border-color: var(--fc-control-border-hover);
}

/* :indeterminate also matches every radio in a group with nothing checked,
   so it is limited to checkboxes. */
.fc-check input:checked,
.fc-check input[type="checkbox"]:indeterminate {
    border-color: var(--fc-accent-fill);
    background: var(--fc-accent-fill);
}

.fc-check input:checked::before {
    transform: scale(1);
}

.fc-check input[type="checkbox"]:indeterminate::before {
    height: 0.14rem;
    clip-path: none;
    transform: scale(1);
}

.fc-check input:focus-visible {
    outline-offset: 2px;
}

.fc-check input[aria-invalid="true"] {
    border-color: var(--fc-danger);
}

.fc-check:has(input:disabled) {
    opacity: 0.45;
    cursor: not-allowed;
}

.fc-check input:disabled {
    cursor: not-allowed;
}

/* Windows high contrast: hand the controls back to the system. */
@media (forced-colors: active) {
    .fc-check input {
        appearance: auto;
    }

    .fc-check input::before {
        display: none;
    }

    /* The gradient chevron is dropped in forced colours; use the system one. */
    .fc-select {
        padding-right: 0.7rem;
        background-image: none;
        appearance: auto;
    }

    .fc-range {
        appearance: auto;
    }
}

/* ---------- Data tables ---------- */

/* A wrapper scrolls wide tables sideways. With --scroll it also caps the
   height, and the header sticks inside it. Without a wrapper the header
   sticks to the page at --fc-table-sticky-top (set it to the masthead
   height under a sticky masthead). */
.fc-table-wrap {
    max-width: 100%;
    overflow: auto;
}

.fc-table-wrap--scroll {
    max-height: var(--fc-table-max-height, 28rem);
}

.fc-table {
    --fc-table-bg: var(--fc-bg);
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--fc-ui-sm);
    line-height: 1.4;
}

.fc-table caption {
    padding-bottom: 0.6rem;
    font-weight: 600;
    text-align: left;
}

.fc-table th,
.fc-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: var(--fc-hairline) solid var(--fc-rule);
    text-align: left;
    vertical-align: middle;
}

.fc-table thead th {
    position: sticky;
    top: var(--fc-table-sticky-top, 0);
    z-index: 1;
    border-bottom-color: var(--fc-control-border);
    color: var(--fc-text-soft);
    background: var(--fc-table-bg);
    font-size: var(--fc-ui-xs);
    font-weight: 600;
    white-space: nowrap;
}

.fc-table tbody th {
    font-weight: 600;
}

.fc-table tbody tr {
    transition: background-color var(--fc-duration-fast);
}

.fc-table tbody tr:hover {
    background: var(--fc-fill);
}

/* The tint alone is faint (about 1.1:1 on calcite), so a selected row also
   gets a 2px accent bar on its first cell, drawn as an inset edge. */
.fc-table tbody tr.is-selected,
.fc-table tbody tr[aria-selected="true"] {
    background: var(--fc-accent-muted);
}

.fc-table tbody tr.is-selected > :first-child,
.fc-table tbody tr[aria-selected="true"] > :first-child {
    box-shadow: inset 2px 0 0 var(--fc-accent);
}

/* Numbers line up on the right in Martian Mono. */
.fc-table .fc-num {
    font-family: var(--fc-font-figure);
    font-size: 0.92em;
    font-stretch: var(--fc-figure-stretch);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    text-align: right;
    white-space: nowrap;
}

/* Header cells are words: tabular-nums would also widen the comma. */
.fc-table thead .fc-num {
    font-family: var(--fc-font-text);
    font-size: var(--fc-ui-xs);
    font-stretch: normal;
    font-variant-numeric: normal;
    letter-spacing: normal;
}

.fc-table--compact th,
.fc-table--compact td {
    padding: 0.3rem 0.6rem;
}

.fc-table--compact {
    font-size: var(--fc-ui-xs);
}

/* Below 640px each row becomes a block of label: value lines.
   Give every cell a data-label with its column name. */
@media (max-width: 640px) {
    .fc-table--stack thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .fc-table--stack tr {
        display: block;
        padding: 0.5rem 0;
        border-bottom: var(--fc-hairline) solid var(--fc-rule);
    }

    .fc-table--stack td,
    .fc-table--stack tbody th {
        display: grid;
        grid-template-columns: minmax(6rem, 38%) 1fr;
        justify-items: start;
        gap: 0.75rem;
        padding: 0.25rem 0;
        border: 0;
    }

    .fc-table--stack td::before,
    .fc-table--stack tbody th::before {
        content: attr(data-label);
        color: var(--fc-text-soft);
        font-family: var(--fc-font-text);
        font-size: var(--fc-ui-xs);
        font-stretch: normal;
        font-variant-numeric: normal;
        font-weight: 600;
        letter-spacing: normal;
    }

    .fc-table--stack .fc-num {
        text-align: left;
    }
}

/* ---------- Badges, dots and chips ---------- */

.fc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.08rem 0.5rem;
    border-radius: var(--fc-radius-sm);
    color: var(--fc-text-soft);
    background: var(--fc-fill);
    font-size: var(--fc-ui-xs);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.fc-badge--accent { color: var(--fc-accent); background: var(--fc-accent-muted); }
.fc-badge--ok { color: var(--fc-ok); background: var(--fc-ok-muted); }
.fc-badge--info { color: var(--fc-info); background: var(--fc-info-muted); }
.fc-badge--warning { color: var(--fc-warning); background: var(--fc-warning-muted); }
.fc-badge--danger { color: var(--fc-danger); background: var(--fc-danger-muted); }

/* The default state label: a dot in the state colour and a word in the text
   colour, with no fill. Badges are for short tags (sanction type, role)
   where a compact tinted block reads better in a dense table. */
.fc-status {
    --fc-tone: var(--fc-text-faint);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--fc-text);
    font-weight: 500;
    white-space: nowrap;
}

.fc-status::before {
    content: "";
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--fc-tone);
}

.fc-status--ok { --fc-tone: var(--fc-ok); }
.fc-status--info { --fc-tone: var(--fc-info); }
.fc-status--warning { --fc-tone: var(--fc-warning); }
.fc-status--danger { --fc-tone: var(--fc-danger); }

/* A status dot in currentColor, or a state colour with a modifier.
   Never the only signal: pair it with a word. */
.fc-dot {
    flex: none;
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
}

.fc-dot--ok { background: var(--fc-ok); }
.fc-dot--info { background: var(--fc-info); }
.fc-dot--warning { background: var(--fc-warning); }
.fc-dot--danger { background: var(--fc-danger); }
.fc-dot--none { background: var(--fc-text-faint); }

.fc-dot--live {
    background: var(--fc-ok);
    animation: fc-live 2.4s ease-out infinite;
}

@keyframes fc-live {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fc-ok) 55%, transparent); }
    70%, 100% { box-shadow: 0 0 0 0.45rem transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .fc-dot--live {
        animation: none;
    }
}

/* Filter and toggle chips: buttons with aria-pressed. */
.fc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.875rem;
    padding: 0 0.75rem;
    border: var(--fc-hairline) solid var(--fc-rule);
    border-radius: var(--fc-radius-pill);
    color: var(--fc-text-soft);
    background: transparent;
    font: inherit;
    font-size: var(--fc-ui-sm);
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--fc-duration-fast), border-color var(--fc-duration-fast), color var(--fc-duration-fast);
}

.fc-chip:hover {
    border-color: var(--fc-control-border-hover);
    color: var(--fc-text);
}

.fc-chip[aria-pressed="true"] {
    border-color: var(--fc-accent);
    color: var(--fc-accent);
    background: var(--fc-accent-muted);
    font-weight: 600;
}

/* A removable chip: a span holding text and a small remove button. */
.fc-chip--removable {
    padding-right: 0.3rem;
    cursor: default;
}

.fc-chip__remove {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: inherit;
    background: none;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.fc-chip__remove:hover {
    color: var(--fc-text);
    background: var(--fc-fill);
}

.fc-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Segmented control: one choice out of a few, as a group of buttons with
   aria-pressed (or radios styled the same way, see the README). The pressed
   segment takes the primary-button fill. */
.fc-segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 2px;
    border: var(--fc-hairline) solid var(--fc-rule);
    border-radius: var(--fc-radius);
}

.fc-segmented > button {
    min-height: calc(var(--fc-control-md) - 6px);
    padding: 0 0.85rem;
    border: 0;
    border-radius: calc(var(--fc-radius) - 2px);
    color: var(--fc-text-soft);
    background: none;
    font: inherit;
    font-size: var(--fc-ui-sm);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--fc-duration-fast), color var(--fc-duration-fast);
}

.fc-segmented > button:hover {
    color: var(--fc-text);
    background: var(--fc-fill);
}

.fc-segmented > button[aria-pressed="true"] {
    color: var(--fc-on-accent);
    background: var(--fc-accent-fill);
}

.fc-segmented > button:focus-visible {
    outline-offset: 1px;
}

.fc-segmented > button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.fc-segmented--sm > button {
    min-height: calc(var(--fc-control-sm) - 6px);
    padding: 0 0.6rem;
    font-size: var(--fc-ui-xs);
}

@media (forced-colors: active) {
    .fc-segmented > button[aria-pressed="true"] {
        outline: 2px solid ButtonText;
        outline-offset: -2px;
    }
}

/* ---------- Tabs ---------- */

/* role="tablist" with role="tab" buttons, or a nav of links using
   aria-current="page". Scrolls sideways on narrow screens. */
.fc-tabs {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    border-bottom: var(--fc-hairline) solid var(--fc-rule);
    scrollbar-width: none;
}

.fc-tab {
    flex: none;
    margin: 0 0 -1px;
    padding: 0.6rem 0.35rem;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--fc-text-soft);
    background: none;
    font: inherit;
    font-size: var(--fc-ui-md);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--fc-duration-fast), border-color var(--fc-duration-base);
}

.fc-tab:hover {
    color: var(--fc-text);
}

.fc-tab[aria-selected="true"],
.fc-tab[aria-current="page"] {
    border-bottom-color: var(--fc-accent);
    color: var(--fc-text);
    font-weight: 600;
}

.fc-tab:focus-visible {
    outline-offset: -2px;
}

.fc-tab .fc-figure {
    margin-left: 0.3rem;
    color: var(--fc-text-faint);
    font-size: var(--fc-ui-xs);
}

.fc-tabpanel {
    padding-top: 1.25rem;
}

/* ---------- Dialogs ---------- */

/* Use on <dialog>, opened with showModal(). */
.fc-dialog {
    width: min(32rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 0;
    border: var(--fc-hairline) solid var(--fc-rule);
    border-radius: var(--fc-radius-lg);
    color: var(--fc-text);
    background: var(--fc-raised);
}

.fc-dialog[open] {
    display: flex;
    flex-direction: column;
}

/* A <form method="dialog"> wrapper must not break the column. */
.fc-dialog > form {
    display: contents;
}

.fc-dialog::backdrop {
    background: rgba(14, 15, 18, 0.6);
    background: var(--fc-backdrop, rgba(14, 15, 18, 0.6));
}

.fc-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem 0.9rem;
    border-bottom: var(--fc-hairline) solid var(--fc-rule);
}

.fc-dialog__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: var(--fc-weight-heading);
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.fc-dialog__body {
    flex: 1 1 auto;
    padding: 1.1rem 1.25rem;
    overflow: auto;
}

.fc-dialog__body > p {
    margin: 0;
}

.fc-dialog__body > * + * {
    margin-top: 0.9rem;
}

.fc-dialog__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.9rem 1.25rem;
    border-top: var(--fc-hairline) solid var(--fc-rule);
}

/* A full-height panel from the right edge, for longer forms. */
.fc-dialog--sheet {
    width: min(30rem, 100vw);
    height: 100dvh;
    max-height: 100dvh;
    margin: 0 0 0 auto;
    border-width: 0 0 0 var(--fc-hairline);
    border-radius: 0;
}

@media (max-width: 600px) {
    .fc-dialog__footer .fc-button {
        flex: 1 1 auto;
    }
}

/* ---------- Tooltips ---------- */

/* A short label for a control or a bar segment. The trigger and the tooltip
   share an .fc-tooltip-anchor; the trigger names the tooltip with
   aria-describedby, and the tooltip has role="tooltip". It shows on hover
   and on keyboard focus, stays open while the pointer is over it, and the
   app adds .is-dismissed to the anchor on Escape (WCAG 1.4.13). Never put
   the only copy of important information in a tooltip. */
.fc-tooltip-anchor {
    position: relative;
    display: inline-flex;
}

.fc-tooltip {
    --fc-tip-x: -50%;
    position: absolute;
    bottom: calc(100% + 0.45rem);
    left: 50%;
    z-index: var(--fc-z-popover);
    width: max-content;
    max-width: min(18rem, calc(100vw - 2rem));
    padding: 0.4rem 0.6rem;
    border: var(--fc-hairline) solid var(--fc-rule);
    border-radius: var(--fc-radius-sm);
    color: var(--fc-text);
    background: var(--fc-raised);
    font-family: var(--fc-font-text);
    font-size: var(--fc-ui-xs);
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translate(var(--fc-tip-x), 0.2rem);
    transition: opacity var(--fc-duration-fast), transform var(--fc-duration-fast) var(--fc-ease-out), visibility 0s linear var(--fc-duration-fast);
}

/* Bridges the gap so the pointer can move onto the tooltip. */
.fc-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.fc-tooltip--below {
    top: calc(100% + 0.45rem);
    bottom: auto;
    transform: translate(var(--fc-tip-x), -0.2rem);
}

/* Centred by default. Near the left or right edge of the screen, align the
   tooltip with the trigger's start or end instead, so it is not cut off. */
.fc-tooltip--start {
    --fc-tip-x: 0;
    left: 0;
}

.fc-tooltip--end {
    --fc-tip-x: 0;
    left: auto;
    right: 0;
}

.fc-tooltip--below::after {
    top: auto;
    bottom: 100%;
}

.fc-tooltip-anchor:hover > .fc-tooltip,
.fc-tooltip-anchor:focus-within > .fc-tooltip,
.fc-tooltip.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(var(--fc-tip-x), 0);
    transition-delay: 0s;
}

.fc-tooltip-anchor.is-dismissed > .fc-tooltip {
    opacity: 0;
    visibility: hidden;
}

/* ---------- Toasts and alerts ---------- */

/* The region is fixed to the viewport. It sits under the top layer, so while
   a modal dialog is open put the toast region inside that dialog. */
.fc-toast-region {
    position: fixed;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    z-index: var(--fc-z-toast);
    display: grid;
    gap: 0.5rem;
    width: min(24rem, calc(100vw - 2rem));
}

.fc-toast,
.fc-alert {
    --fc-tone: var(--fc-text-faint);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.4rem 0.65rem;
    padding: 0.75rem 0.9rem;
    border: var(--fc-hairline) solid var(--fc-rule);
    border-radius: var(--fc-radius);
    color: var(--fc-text);
    background: var(--fc-raised);
    font-size: var(--fc-ui-sm);
    line-height: 1.4;
}

.fc-toast > .fc-dot,
.fc-alert > .fc-dot {
    margin-top: 0.38rem;
    background: var(--fc-tone);
}

.fc-toast__title,
.fc-alert__title {
    margin: 0;
    font-weight: 600;
}

.fc-toast__body,
.fc-alert__body {
    margin: 0.15rem 0 0;
    color: var(--fc-text-soft);
}

.fc-toast--ok, .fc-alert--ok { --fc-tone: var(--fc-ok); }
.fc-toast--info, .fc-alert--info { --fc-tone: var(--fc-info); }
.fc-toast--warning, .fc-alert--warning { --fc-tone: var(--fc-warning); }
.fc-toast--danger, .fc-alert--danger { --fc-tone: var(--fc-danger); }

/* Inline alerts sit in the page as a side rule in the state colour, like
   .fc-note: no box and no tint. */
.fc-alert {
    padding: 0.15rem 0 0.15rem 1rem;
    border: 0;
    border-left: 2px solid var(--fc-tone);
    border-radius: 0;
    background: none;
}

.fc-alert .fc-alert__body {
    color: var(--fc-text);
}

/* ---------- Empty and error states ---------- */

.fc-empty {
    display: grid;
    justify-items: start;
    gap: 0.4rem;
    max-width: 40rem;
    padding: 2.25rem 0;
    border-top: var(--fc-hairline) solid var(--fc-rule);
}

.fc-empty__title {
    margin: 0;
    font-size: var(--fc-step-0);
    font-weight: var(--fc-weight-heading);
}

.fc-empty__body {
    margin: 0;
    color: var(--fc-text-soft);
}

.fc-empty .fc-button-row {
    margin-top: 0.75rem;
}

.fc-empty--error {
    border-top: 2px solid var(--fc-danger);
}

.fc-empty__detail {
    color: var(--fc-text-faint);
    font-size: var(--fc-ui-xs);
}

/* ---------- Pagination ---------- */

.fc-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--fc-ui-sm);
}

.fc-pagination__summary {
    margin-right: auto;
    padding-right: 1rem;
    color: var(--fc-text-soft);
}

.fc-page {
    display: inline-grid;
    place-items: center;
    min-width: var(--fc-control-sm);
    height: var(--fc-control-sm);
    padding: 0 0.45rem;
    border: var(--fc-hairline) solid transparent;
    border-radius: var(--fc-radius);
    color: var(--fc-text-soft);
    background: none;
    font-family: var(--fc-font-figure);
    font-size: var(--fc-ui-xs);
    font-stretch: 87.5%;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--fc-duration-fast), color var(--fc-duration-fast);
}

.fc-page:hover {
    color: var(--fc-text);
    background: var(--fc-fill);
}

.fc-page[aria-current="page"] {
    border-color: var(--fc-accent);
    color: var(--fc-accent);
    background: var(--fc-accent-muted);
    font-weight: 600;
}

/* Previous and next carry words, so they use the text face. */
.fc-page--step {
    padding: 0 0.7rem;
    font-family: var(--fc-font-text);
    font-size: var(--fc-ui-sm);
    font-stretch: normal;
}

.fc-page[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.fc-pagination__gap {
    min-width: 1.5rem;
    color: var(--fc-text-faint);
    text-align: center;
}

/* ---------- Live figures ---------- */

.fc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0 1.5rem;
    margin: 0;
}

.fc-stat {
    min-width: 0;
    padding-top: 0.85rem;
    border-top: var(--fc-hairline) solid var(--fc-rule);
}

.fc-stat dt {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--fc-text-soft);
    font-size: var(--fc-ui-sm);
}

.fc-stat dd {
    margin: 0.35rem 0 0;
    font-family: var(--fc-font-figure);
    font-size: clamp(1.2rem, 2vw, 1.75rem);
    font-weight: 500;
    font-stretch: var(--fc-figure-stretch);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1.1;
    white-space: nowrap;
}

/* ---------- Masthead (staff tools and public pages) ---------- */

/* Sticky bar in the surrounding theme. The staff version adds the
   "Staff" suffix and the cross-links; see snippets/staff-masthead.html.
   When the bar is narrower than 56rem (a container query, so it also works
   inside a panel) the links become a sideways-scrolling row under the
   wordmark, so none of them is hidden. */
.fc-masthead {
    position: sticky;
    top: 0;
    z-index: var(--fc-z-masthead);
    container-type: inline-size;
    border-bottom: var(--fc-hairline) solid var(--fc-rule);
    color: var(--fc-text);
    background: var(--fc-bg);
    background: color-mix(in srgb, var(--fc-bg) 90%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
}

.fc-masthead__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: clamp(1rem, 3vw, 2.25rem);
    min-height: var(--fc-masthead-height-staff);
    padding: 0 var(--fc-gutter);
}

.fc-masthead__nav {
    display: flex;
    align-self: stretch;
    gap: clamp(0.4rem, 1.4vw, 1rem);
}

.fc-masthead__nav a {
    display: flex;
    align-items: center;
    padding-inline: 0.3rem;
    border-bottom: 2px solid transparent;
    color: var(--fc-text-soft);
    font-size: var(--fc-ui-md);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--fc-duration-fast), border-color var(--fc-duration-base);
}

.fc-masthead__nav a:hover {
    color: var(--fc-text);
}

.fc-masthead__nav a[aria-current="page"] {
    border-bottom-color: var(--fc-accent);
    color: var(--fc-text);
    font-weight: 600;
}

.fc-masthead__nav a:focus-visible {
    outline-offset: -2px;
}

.fc-masthead__account {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    color: var(--fc-text-soft);
    font-size: var(--fc-ui-sm);
    white-space: nowrap;
}

.fc-masthead__account strong {
    color: var(--fc-text);
    font-weight: 600;
}

@container (max-width: 56rem) {
    .fc-masthead__inner {
        padding-top: 0.4rem;
    }

    .fc-masthead .fc-wordmark,
    .fc-masthead__account {
        min-height: 2.6rem;
    }

    .fc-masthead__nav {
        order: 3;
        flex: 1 0 100%;
        min-height: 2.75rem;
        margin: 0.4rem calc(var(--fc-gutter) * -1) 0;
        padding: 0 calc(var(--fc-gutter) - 0.3rem);
        overflow-x: auto;
        border-top: var(--fc-hairline) solid var(--fc-rule);
        scrollbar-width: none;
    }
}

@container (max-width: 30rem) {
    .fc-masthead__who {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .fc-masthead .fc-wordmark > span:not(.fc-wordmark__suffix) {
        display: none;
    }
}

/* ---------- Colophon ---------- */

/* Every page ends with one. It carries the Mojang disclaimer verbatim.
   The snippet sets data-theme="dark" so it is deepslate on any page. */
.fc-colophon {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    padding: 2.5rem var(--fc-gutter);
    border-top: var(--fc-hairline) solid var(--fc-rule);
    color: var(--fc-text-soft);
    background: var(--fc-bg);
    font-size: var(--fc-ui-sm);
    line-height: 1.5;
}

.fc-colophon__about {
    max-width: 36rem;
}

.fc-colophon__about p {
    margin: 0;
}

.fc-colophon__about p + p {
    margin-top: 0.4rem;
}

.fc-colophon .fc-wordmark {
    margin-bottom: 0.75rem;
    color: var(--fc-text);
}

.fc-colophon .fc-wordmark img,
.fc-colophon .fc-wordmark svg {
    width: 24px;
    height: 24px;
}

.fc-disclaimer {
    color: var(--fc-text-soft);
}

.fc-colophon__nav {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.5rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fc-colophon__nav a {
    color: var(--fc-text-soft);
    text-decoration: none;
}

.fc-colophon__nav a:hover {
    color: var(--fc-text);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.fc-colophon__meta {
    color: var(--fc-text-faint);
    font-family: var(--fc-font-figure);
    font-size: var(--fc-ui-xs);
    font-stretch: 87.5%;
}
