﻿/* CorpsGuide marketing site layout & components. Colors come from --mud-palette-* (theme.css), so
   everything below adapts to light/dark automatically. */

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

body {
    background-color: var(--mud-palette-background);
}

a {
    text-decoration: none;
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* FocusOnNavigate (Routes.razor) moves focus to the page <h1> on load/navigation so screen readers
   announce the new page. That leaves a visible focus ring on the heading until you click away. The
   <h1> is non-interactive, so suppress its outline — the focus move (and screen-reader announcement)
   still happens; only the ring is hidden. Interactive controls keep their focus rings. */
h1:focus,
h1:focus-visible {
    outline: none;
}

/* ---------- Brand logo light/dark swap (mirrors theme.css palette logic) ---------- */
.brand-logo.dark-mode,
.footer-logo.dark-mode {
    display: none;
}

.brand-logo.light-mode,
.footer-logo.light-mode {
    display: inline-block;
}

:root[data-theme="dark"] .brand-logo.light-mode,
:root[data-theme="dark"] .footer-logo.light-mode {
    display: none;
}

:root[data-theme="dark"] .brand-logo.dark-mode,
:root[data-theme="dark"] .footer-logo.dark-mode {
    display: inline-block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .brand-logo.light-mode,
    :root:not([data-theme]) .footer-logo.light-mode {
        display: none;
    }

    :root:not([data-theme]) .brand-logo.dark-mode,
    :root:not([data-theme]) .footer-logo.dark-mode {
        display: inline-block;
    }
}

/* ---------- Header ---------- */
.main-appbar {
    backdrop-filter: saturate(180%) blur(10px);
    background-color: color-mix(in srgb, var(--mud-palette-surface) 82%, transparent) !important;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.appbar-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}

.appbar-brand {
    align-items: center;
    display: inline-flex;
    gap: 0.6rem;
}

.appbar-brand .brand-logo {
    height: 38px;
    width: auto;
}

.appbar-links-desktop {
    align-items: center;
    gap: 0.35rem;
}

.appbar-link {
    border-radius: 8px;
    color: var(--mud-palette-text-primary);
    font-weight: 600;
    padding: 0.45rem 0.7rem;
    transition: background-color 120ms ease, color 120ms ease;
}

.appbar-link:hover {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
}

.download-button {
    font-weight: 700;
    margin-left: 0.35rem;
}

.theme-toggle {
    align-items: center;
    background: none;
    border: none;
    border-radius: 999px;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    transition: background-color 120ms ease, color 120ms ease;
}

.theme-toggle:hover {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
}

.theme-toggle .theme-toggle-dark {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-toggle-dark {
    display: inline-flex;
}

:root[data-theme="dark"] .theme-toggle .theme-toggle-light {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .theme-toggle-dark {
        display: inline-flex;
    }

    :root:not([data-theme]) .theme-toggle .theme-toggle-light {
        display: none;
    }
}

/* ---------- Mobile navigation (native details/summary, no circuit) ---------- */
.mobile-navigation summary {
    list-style: none;
    cursor: pointer;
}

.mobile-navigation summary::-webkit-details-marker {
    display: none;
}

.appbar-menu-button {
    align-items: center;
    color: var(--mud-palette-text-primary);
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
}

.mobile-navigation-panel {
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    position: absolute;
    right: 12px;
    top: 64px;
    width: min(320px, calc(100vw - 24px));
    z-index: 1300;
}

.mobile-drawer-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.mobile-drawer-header .brand-logo {
    height: 26px;
    width: auto;
}

.mobile-navigation-close {
    background: none;
    border: none;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
}

.mobile-drawer-links {
    display: flex;
    flex-direction: column;
}

.mobile-drawer-link {
    border-radius: 8px;
    color: var(--mud-palette-text-primary);
    font-weight: 600;
    padding: 0.7rem 0.6rem;
}

.mobile-drawer-link:hover {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}

.mobile-drawer-download {
    margin-top: 0.5rem;
}

/* ---------- Main content ---------- */
.web-main-content {
    min-height: 70vh;
}

.main-content {
    padding-left: 0;
    padding-right: 0;
}

section {
    scroll-margin-top: 80px;
}

.page-section {
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
    width: 100%;
}

.section-narrow {
    max-width: 860px;
}

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(circle at 12% 18%, rgba(var(--mud-palette-primary-rgb), 0.16), transparent 42%),
        linear-gradient(135deg,
            color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-surface)),
            var(--mud-palette-surface) 70%);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 28px;
    overflow: hidden;
}

.hero-brand-lockup {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.hero-app-icon {
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    height: 56px;
    width: 56px;
}

.hero-title {
    font-size: clamp(2.1rem, 5vw, 3.4rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    line-height: 1.08 !important;
}

.hero-eyebrow {
    color: var(--mud-palette-primary);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    line-height: 1.15 !important;
}

.card-title {
    font-size: 1.14rem !important;
    font-weight: 700 !important;
}

/* ---------- Trust strip ---------- */
.trust-strip {
    align-items: center;
    color: var(--mud-palette-text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
}

.trust-item {
    align-items: center;
    display: inline-flex;
    font-weight: 700;
    gap: 0.4rem;
}

/* ---------- Feature cards ---------- */
.feature-card {
    border-radius: 18px !important;
    height: 100%;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.feature-card:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 45%, transparent);
    transform: translateY(-3px);
}

.feature-icon {
    align-items: center;
    background-color: color-mix(in srgb, var(--mud-palette-primary) 16%, transparent);
    border-radius: 12px;
    color: var(--mud-palette-primary);
    display: inline-flex;
    height: 46px;
    justify-content: center;
    width: 46px;
}

/* Inline brand icons from the app (AppIcon). currentColor = brand; the cutout parts read
   --mud-palette-background, which we pin to the card surface so they blend on the card. */
.app-icon {
    display: inline-flex;
    line-height: 0;
}

.app-icon svg {
    display: block;
    height: 100%;
    width: 100%;
}

.feature-app-icon {
    --mud-palette-background: var(--mud-palette-surface);
    color: var(--mud-palette-primary);
    height: 56px;
    width: 56px;
}

.cta-panel {
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--mud-palette-primary) 18%, var(--mud-palette-surface)),
            color-mix(in srgb, var(--mud-palette-secondary) 16%, var(--mud-palette-surface)));
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 28px;
}

/* ---------- App screenshot frame ---------- */
.app-screenshot {
    margin: 0;
}

.app-screenshot-frame {
    align-items: center;
    background: linear-gradient(160deg, var(--mud-palette-background-gray), var(--mud-palette-surface));
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 26px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}

.app-screenshot-img {
    border-radius: 18px;
    display: block;
    height: auto;
    max-width: 100%;
}

.app-screenshot-placeholder {
    align-items: center;
    aspect-ratio: 9 / 19;
    color: var(--mud-palette-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

.app-screenshot-caption {
    color: var(--mud-palette-text-secondary);
    font-size: 0.9rem;
    margin-top: 0.6rem;
    text-align: center;
}

/* ---------- Footer ---------- */
.footer-divider {
    margin-top: 3rem;
}

.footer {
    margin: 0 auto;
    max-width: 1200px;
    padding: 2.5rem 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

.footer-brand {
    max-width: 420px;
}

.footer-logo {
    height: 28px;
    width: auto;
}

.footer-tagline {
    color: var(--mud-palette-text-secondary);
    margin: 0.75rem 0 0.5rem;
}

.footer-disclaimer {
    color: var(--mud-palette-text-secondary);
    font-size: 0.82rem;
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col-title {
    color: var(--mud-palette-text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.footer-copyright {
    color: var(--mud-palette-text-secondary);
    font-size: 0.85rem;
    margin-top: 1.5rem;
    text-align: center;
}

/* ---------- FAQ (native details/summary) ---------- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    overflow: hidden;
}

.faq-question {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-weight: 700;
    gap: 1rem;
    justify-content: space-between;
    list-style: none;
    padding: 1.1rem 1.25rem;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-chevron {
    color: var(--mud-palette-text-secondary);
    flex: 0 0 auto;
    transition: transform 160ms ease;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    border-top: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
    padding: 1rem 1.25rem 1.25rem;
}

/* ---------- Legal / long-form content ---------- */
.legal-content {
    color: var(--mud-palette-text-primary);
    margin: 0 auto;
    max-width: 820px;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 2.25rem 0 0.75rem;
}

.legal-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
}

.legal-content p,
.legal-content li {
    color: var(--mud-palette-text-secondary);
    line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
}

.legal-content li {
    margin-bottom: 0.4rem;
}

.legal-content a {
    color: var(--mud-palette-primary);
    text-decoration: underline;
}

/* ---------- Stub pages ---------- */
.stub-page {
    margin: 4rem auto;
    max-width: 620px;
    padding: 0 20px;
    text-align: center;
}

.stub-page h1 {
    font-size: 2rem;
    font-weight: 800;
}

/* ---------- Blazor error UI (created by js/blazor-error-ui.js) ---------- */
#blazor-error-ui {
    background: #b02a37;
    bottom: 0;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.3);
    color: #fff;
    display: none;
    left: 0;
    padding: 0.9rem 1.4rem;
    position: fixed;
    right: 0;
    z-index: 3000;
}

#blazor-error-ui .reload {
    color: #fff;
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.75rem;
}

/* ---------- Tools hub (/tools) ---------- */
.tool-card-link {
    color: inherit !important;
    display: block;
    height: 100%;
}

.tool-card-link:hover {
    color: inherit !important;
}

.tool-card-head {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
}

.tool-badge {
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.6rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.tool-badge-live {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 16%, transparent);
    color: var(--mud-palette-primary);
}

.tool-badge-soon {
    background-color: color-mix(in srgb, var(--mud-palette-text-secondary) 16%, transparent);
    color: var(--mud-palette-text-secondary);
}

/* Upcoming tools: muted and non-interactive (no hover lift). */
.tool-card-soon {
    opacity: 0.72;
}

.tool-card-soon:hover {
    border-color: var(--mud-palette-lines-default);
    transform: none;
}

/* ---------- Tool pages (calculators) ---------- */
/* Prose blocks for the explanatory SEO content around a calculator widget. */
.tool-prose p {
    color: var(--mud-palette-text-secondary);
    line-height: 1.7;
}

/* Interactive calculator card (the InteractiveServer island). */
.calc-card {
    border-radius: 20px !important;
}

.calc-grid {
    display: grid;
    gap: 1rem 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .calc-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calc-label {
    color: var(--mud-palette-text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calc-segment {
    display: flex;
    gap: 0.5rem;
}

.calc-segment .mud-button-root {
    flex: 1 1 0;
}

.calc-event {
    padding: 1rem 0;
}

.calc-event-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.calc-event-title-group {
    align-items: center;
    display: inline-flex;
    gap: 0.6rem;
}

/* App brand event glyph next to each event title (currentColor = brand primary). Sized by height so
   each glyph keeps its natural aspect ratio (the plank is wider/flatter than pull-up and run). */
.calc-event-glyph {
    color: var(--mud-palette-primary);
    flex: 0 0 auto;
}

.app-icon.calc-event-glyph svg {
    height: 28px;
    width: auto;
}

.calc-event-title {
    font-weight: 700 !important;
}

/* App brand glyph inside the tinted square on the three "PFT events" cards (height-sized, centered). */
.feature-icon .app-icon.calc-card-glyph svg {
    height: 24px;
    width: auto;
}

.calc-readout {
    color: var(--mud-palette-primary);
    font-weight: 700;
}

/* Results block */
.calc-results {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 7%, var(--mud-palette-surface));
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    margin-top: 1rem;
    padding: 1.25rem 1.4rem;
}

.calc-result-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
}

.calc-result-total {
    align-items: baseline;
    border-top: 1px solid var(--mud-palette-lines-default);
    display: flex;
    /* Wrap rather than collide: a value too wide to sit beside its label drops below it. */
    flex-wrap: wrap;
    gap: 0.2rem 0.75rem;
    justify-content: space-between;
    margin-top: 0.6rem;
    padding-top: 0.8rem;
}

/* For a headline that is a word rather than a number — it gets its own centred line, because at
   2rem it is far too wide to sit opposite a label on a phone. */
.calc-result-total--stacked {
    display: block;
    text-align: center;
}

.calc-result-total--stacked .calc-total-value {
    display: block;
    margin-top: 0.15rem;
    overflow-wrap: anywhere;
}

.calc-total-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.calc-class {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-align: center;
    margin-top: 0.4rem;
}

.calc-note {
    color: var(--mud-palette-text-secondary);
    font-size: 0.82rem;
    margin-top: 0.75rem;
}

/* Standards / class-band table */
.calc-table {
    border-collapse: collapse;
    width: 100%;
}

.calc-table caption {
    text-align: left;
}

.calc-table th,
.calc-table td {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

.calc-table th {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.calc-table td:last-child {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.calc-table-wrap {
    overflow-x: auto;
}

/* ---------- Narrow-screen tables ----------
   Tables with more than about three columns cannot be read on a phone: they either scroll sideways
   inside their container — hiding the columns that matter behind a drag — or squeeze prose into a
   90px column that breaks two words to a line.

   Below the breakpoint each row becomes its own block and each cell a "label: value" pair, with the
   header text carried in via data-label. The <table> markup is untouched, so the SSR output stays
   the same crawlable table it always was; only the presentation changes. */
@media (max-width: 599px) {
    .calc-table--stacked thead {
        border: 0;
        clip-path: inset(50%);
        height: 1px;
        overflow: hidden;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }

    .calc-table--stacked tr {
        display: block;
    }

    .calc-table--stacked tbody tr {
        border-bottom: 1px solid var(--mud-palette-lines-default);
        padding: 0.6rem 0;
    }

    /* Portion headings ("Destroys", "Drills") keep spanning the row. */
    .calc-table--stacked tbody th {
        border: 0;
        display: block;
        padding: 0.9rem 0 0.2rem;
    }

    .calc-table--stacked td {
        border: 0;
        display: grid;
        gap: 0.25rem 0.9rem;
        grid-template-columns: minmax(5.5rem, 34%) 1fr;
        padding: 0.15rem 0;
    }

    /* The column heading, repeated per cell — the only way a stacked row stays self-describing. */
    .calc-table--stacked td::before {
        color: var(--mud-palette-text-secondary);
        content: attr(data-label);
        font-size: 0.8rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    /* Undo the last-column emphasis: in a stacked row it lands on a citation, not a figure. */
    .calc-table--stacked td:last-child {
        font-variant-numeric: normal;
        font-weight: 400;
    }
}

/* Standards tables whose every column after the first is a number (body composition), not just the
   last one — keeps the digits aligned across all of them. */
.calc-table-numeric td:not(:first-child) {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* ---------- Ribbon rack builder ----------
   The rack is centered and the rows stack tight, the way a rack is actually worn. Ribbon art is a
   fixed 150x42 aspect, so widths are set per row-count and height follows. */
.rack-preview {
    align-items: center;
    background-color: color-mix(in srgb, var(--mud-palette-primary) 6%, var(--mud-palette-surface));
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 0.75rem;
    min-height: 132px;
    justify-content: center;
    padding: 1.1rem 1rem;
}

.rack-empty {
    color: var(--mud-palette-text-secondary);
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
}

.rack-row {
    display: flex;
    gap: 2px;
    justify-content: center;
}

/* Each ribbon is a button so removal works by keyboard as well as pointer. */
.rack-ribbon {
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    display: block;
    line-height: 0;
    padding: 0;
}

.rack-ribbon:hover,
.rack-ribbon:focus-visible {
    border-color: var(--mud-palette-primary);
}

.rack-ribbon img {
    display: block;
    height: auto;
    width: 88px;
}

.rack-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 0.9rem;
}

/* Picker list: one scrollable column so the rack above stays in view while choosing. */
.ribbon-picker {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    list-style: none;
    margin: 0;
    max-height: 26rem;
    overflow-y: auto;
    padding: 0;
}

.ribbon-option + .ribbon-option {
    border-top: 1px solid var(--mud-palette-lines-default);
}

.ribbon-option-button {
    align-items: center;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 0.85rem;
    padding: 0.6rem 0.85rem;
    text-align: left;
    width: 100%;
}

.ribbon-option-button:hover,
.ribbon-option-button:focus-visible {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
}

.ribbon-option-button img {
    flex: 0 0 auto;
    height: auto;
    width: 64px;
}

.ribbon-option-name {
    flex: 1 1 auto;
    font-size: 0.92rem;
    min-width: 0;
}

.ribbon-option.is-selected .ribbon-option-name {
    font-weight: 700;
}

/* Cutting scores table: MOS codes read as data, and the change column keeps its icon and text on
   one line. Long MOS titles wrap rather than forcing the table wider than its scroll container. */
.scores-head {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
}

.scores-table {
    min-width: 34rem;
}

.scores-table td {
    vertical-align: top;
}

.scores-mos {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}

.scores-change {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    white-space: nowrap;
}

/* ---------- Ad slots ----------
   Space is reserved here, in CSS, so an injected ad lands in a pre-sized box and costs no layout
   shift. Heights are the standard unit sizes plus room for the label; if a slot is ever served a
   different size, change the height here to match or CLS comes straight back. The container is
   centered and overflow-hidden so an oversized creative cannot widen the page. */
.ad-slot {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    justify-content: center;
    margin-inline: auto;
    max-width: 100%;
    overflow: hidden;
}

.ad-slot-label {
    color: var(--mud-palette-text-secondary);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    opacity: 0.75;
    text-transform: uppercase;
}

.ad-slot-fill {
    max-width: 100%;
    width: 100%;
}

/* 300x250 rectangle inside prose. */
.ad-slot-inarticle .ad-slot-fill {
    height: 250px;
    width: 300px;
}

/* 320x100 on mobile, 728x90 from the small breakpoint up. */
.ad-slot-leaderboard .ad-slot-fill {
    height: 100px;
    width: 320px;
}

@media (min-width: 768px) {
    .ad-slot-leaderboard .ad-slot-fill {
        height: 90px;
        width: 728px;
    }
}

/* Small uppercase qualifier under a card title (e.g. a category's point maximum). */
.card-eyebrow {
    color: var(--mud-palette-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin: 0.35rem 0 0;
    text-transform: uppercase;
}

/* Checkbox group inside a calculator section (JEPES bonus billets). */
.calc-checks {
    display: grid;
    gap: 0.1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .calc-checks {
        grid-template-columns: 1fr 1fr;
    }
}

/* Standard-version marker centered above the calculator inputs. */
.calc-badge-row {
    display: flex;
    justify-content: center;
    margin-bottom: 1.1rem;
}

/* Numbered step badge, reusing the tinted .feature-icon square instead of a brand glyph. */
.step-number {
    font-size: 1.25rem;
    font-weight: 800;
}

/* Bulleted prose lists inside a tool article. */
.tool-list {
    color: var(--mud-palette-text-secondary);
    line-height: 1.7;
    margin: 0;
    padding-left: 1.25rem;
}

.tool-list li + li {
    margin-top: 0.5rem;
}

/* ---------- Installations ---------- */
.installations-count {
    color: var(--mud-palette-text-secondary);
}

.installations-map {
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    overflow: hidden;
}

.installations-map__svg {
    display: block;
    height: auto;
    width: 100%;
}

/* Land takes the theme's text colour so it inverts with light/dark. currentColor plus fill-opacity
   rather than color-mix — both are core SVG, so this does not need a modern-browser floor. */
.installations-map__land {
    color: var(--mud-palette-text-primary);
}

.installations-map__land path {
    fill: currentColor;
    fill-opacity: 0.12;
    stroke: currentColor;
    stroke-opacity: 0.22;
    stroke-width: 0.5;
    vector-effect: non-scaling-stroke;
}

.installations-map__halo {
    fill: var(--mud-palette-primary);
    fill-opacity: 0.28;
}

.installations-map__dot {
    fill: var(--mud-palette-primary);
    /* Ring in the map's own background colour, separating the marker from the land beneath it. */
    stroke: var(--mud-palette-surface);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

/* Pins are real links, so they need a real focus indicator for keyboard users. */
.installations-map__pins a:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.installations-map__pins a:hover .installations-map__halo {
    fill-opacity: 0.55;
}

.installations-map__note {
    color: var(--mud-palette-text-secondary);
    display: block;
    margin-top: 0.5rem;
}

.installations-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .installations-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.installation-card {
    background-color: color-mix(in srgb, var(--mud-palette-surface) 70%, transparent);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    /* Offsets the sticky header when a map pin jumps to this card. */
    scroll-margin-top: 5rem;
}

.installation-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.installation-card__meta {
    align-items: center;
    color: var(--mud-palette-text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem;
}

.installation-card__chip {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 45%, transparent);
    border-radius: 999px;
    color: var(--mud-palette-text-primary);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
}

.installation-card__overview {
    margin: 0 0 0.75rem;
}

.installation-card__note {
    color: var(--mud-palette-text-secondary);
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

.installation-card__label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0 0 0.3rem;
    text-transform: uppercase;
}

.installation-card__commands {
    margin: 0 0 0.85rem;
    padding-left: 1.15rem;
}

.installation-card__commands li + li {
    margin-top: 0.25rem;
}

.installation-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
}

/* ---------- Back to top ---------- */
/* Starts hidden and is revealed by js/scroll-to-top.js, so with scripting off it never appears. */
.scroll-to-top {
    align-items: center;
    background-color: var(--mud-palette-primary);
    border: none;
    border-radius: 50%;
    bottom: 1.5rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.32);
    color: var(--mud-palette-primary-text);
    cursor: pointer;
    display: flex;
    height: 3rem;
    justify-content: center;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    position: fixed;
    right: 1.5rem;
    transform: translateY(0.75rem);
    transition: opacity 160ms ease, transform 160ms ease, background-color 160ms ease;
    width: 3rem;
    z-index: 1200;
}

.scroll-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--mud-palette-primary-darken);
}

.scroll-to-top:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 3px;
}

/* Respect the OS setting: no slide-in for anyone who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
    .scroll-to-top {
        transform: none;
        transition: opacity 120ms ease;
    }
}

/* Clear of the safe area on phones with a home indicator. */
@supports (padding: env(safe-area-inset-bottom)) {
    .scroll-to-top {
        bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }
}

/* ---------- Utilities ---------- */
.d-none {
    display: none !important;
}

@media (min-width: 960px) {
    .d-md-flex {
        display: flex !important;
    }

    .d-md-none {
        display: none !important;
    }
}

/* ---------- In-widget result CTA (growth plan §3, item 1.1) ---------- */

/* Secondary by design. ui.md: the calculator result is the user's goal and the app download is
   incidental, so separation comes from whitespace and a hairline rather than a filled panel —
   anything heavier competes with the number the user came for. */
.result-cta {
    border-top: 1px solid var(--mud-palette-lines-default);
    margin-top: 1.25rem;
    padding-top: 1rem;
}

/* Deprioritized by weight and lightness, not by color alone (ui.md contrast rule), so the hierarchy
   still reads for anyone who cannot distinguish the primary hue. */
.result-cta-message {
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 0.6rem;
    max-width: 46ch;
}

/* Size.Small drops these text buttons under the 44px minimum touch target. Being secondary must not
   mean being hard to hit — ui.md: "Do not hide important actions behind tiny targets." */
.store-buttons-compact .mud-button-root {
    min-height: 44px;
}

/* ---------- MARADMIN pages (growth plan §4, item 2.1) ---------- */

/* Titles are published ALL CAPS and run to 270 characters, dense with long unbroken words
   (NONCOMMISSIONED). Left verbatim because they are official document titles, so the readability
   problem is solved typographically: smaller than a normal h1, looser leading, and an explicit wrap
   rule so a long word cannot overflow the viewport on a phone. */
.maradmin-title {
    font-size: clamp(1.35rem, 1.1rem + 1.4vw, 2rem);
    line-height: 1.25;
    overflow-wrap: break-word;
    text-wrap: pretty;
}

.maradmin-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
}

.maradmin-date {
    color: var(--mud-palette-text-secondary);
    font-size: 0.9rem;
}

/* Status is real information — a Marine must know they are reading a dead policy — but in a listing
   the titles are the content, and a saturated outlined pill out-shouts them. So: a soft filled chip,
   weight and a tinted ground instead of a bright border. The word itself still carries the meaning,
   so the distinction survives without colour (ui.md contrast rule). */
.maradmin-status {
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.7;
    padding: 0 0.4rem;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Mixed toward the text colour rather than used at full strength: alarm red reads as "error", and a
   cancelled MARADMIN is a status, not a fault. */
.maradmin-status.is-cancelled {
    background-color: color-mix(in srgb, var(--mud-palette-error) 14%, transparent);
    color: color-mix(in srgb, var(--mud-palette-error) 70%, var(--mud-palette-text-primary));
}

.maradmin-status.is-active {
    background-color: color-mix(in srgb, var(--mud-palette-success) 14%, transparent);
    color: color-mix(in srgb, var(--mud-palette-success) 70%, var(--mud-palette-text-primary));
}

/* The detail page has one status and it is a headline fact, so it keeps more presence than the
   listing chips do. */
.maradmin-meta .maradmin-status {
    font-size: 0.72rem;
    padding: 0.1rem 0.55rem;
}

/* The Marine Corps publishes these as fixed-width text: paragraph numbering and inline tables depend
   on the column alignment, so reflowing it as prose would corrupt the content. Scrolls inside itself
   rather than forcing the page sideways. */
.maradmin-body {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 5%, var(--mud-palette-surface));
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    overflow-x: auto;
    padding: 1.25rem;
    white-space: pre-wrap;
    word-break: normal;
}

/* ---- Listing ---- */
.maradmin-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.maradmin-list-item {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    justify-content: space-between;
    padding: 0.85rem 0;
}

.maradmin-list-link {
    color: inherit;
    display: flex;
    flex: 1 1 20rem;
    flex-direction: column;
    gap: 0.2rem;
    /* Comfortably past the 44px minimum target, since the whole row is the hit area. */
    min-height: 44px;
    text-decoration: none;
}

.maradmin-list-link:hover .maradmin-list-title,
.maradmin-list-link:focus-visible .maradmin-list-title {
    text-decoration: underline;
}

.maradmin-list-number {
    color: var(--mud-palette-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Clamped to two lines for scanability. Visual only: the full title stays in the DOM, so crawlers
   and screen readers still get all of it. */
.maradmin-list-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: break-word;
}

/* Status sits before the date, and the date gets a fixed lane, so the date column stays straight
   whether or not a row carries a chip. Previously a single CANCELLED badge shunted that row's date
   left out of alignment with every other row — the ragged edge read as a layout bug. */
.maradmin-list-meta {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
    justify-content: flex-end;
}

.maradmin-list-meta .maradmin-date {
    min-width: 6.25rem;
    text-align: right;
}

/* On a phone the row stacks, so the fixed lane would only push the date away from its title. */
@media (max-width: 599px) {
    .maradmin-list-meta {
        justify-content: flex-start;
    }

    .maradmin-list-meta .maradmin-date {
        min-width: 0;
        text-align: left;
    }
}

.maradmin-archive {
    display: grid;
    gap: 0.5rem 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------- Rank structure page (growth plan §4, item 2.2) ---------- */

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rank-entry {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
}

/* Insignia sit on a light plate regardless of theme: the artwork is mostly gold and dark navy, and
   several pieces vanish against a dark page background. */
.rank-entry__insignia {
    align-items: center;
    background-color: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
    border-radius: 12px;
    display: flex;
    flex: 0 0 auto;
    height: 96px;
    justify-content: center;
    width: 96px;
}

/* General officers: one star repeated, so a star is the same size at O-7 as at O-10.
   Single row, never wrapped — that is how the insignia is worn and how the app's rank grid draws it.
   Star size below is set so four plus their gaps fit the plate without wrapping. */
.rank-entry__stars {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    justify-content: center;
}

/* Selector carries the parent on purpose. ".rank-entry__insignia img" (0,1,1) outranks a bare
   ".rank-entry__star" (0,1,0), and it sets width/height auto with an 80px cap — so without this the
   stars render at 80px each and spill out of the plate. */
.rank-entry__insignia .rank-entry__star {
    /* 4 stars x 18px + 3 gaps x 3px = 81px, inside the 96px plate with room to spare. */
    height: 18px;
    max-height: 18px;
    max-width: 18px;
    object-fit: contain;
    width: 18px;
}

/* Stated in words, so the plate never reads as a failed image load. */
.rank-entry__no-insignia {
    color: var(--mud-palette-text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.2;
    padding: 0 0.4rem;
    text-align: center;
    text-transform: uppercase;
}

.rank-entry__insignia img {
    height: auto;
    max-height: 80px;
    max-width: 80px;
    object-fit: contain;
    width: auto;
}

.rank-entry__body {
    flex: 1 1 auto;
    min-width: 0;
}

.rank-entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0 0.75rem;
}

.rank-entry__grade,
.rank-entry__abbr {
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.45rem;
}

.rank-entry__grade {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 16%, transparent);
    color: color-mix(in srgb, var(--mud-palette-primary) 75%, var(--mud-palette-text-primary));
}

.rank-entry__abbr {
    background-color: color-mix(in srgb, var(--mud-palette-text-primary) 8%, transparent);
    color: var(--mud-palette-text-secondary);
}

.rank-entry__copy {
    line-height: 1.6;
    margin: 0 0 0.6rem;
}

/* Cross-service equivalents. Separated by a rule and set quieter than the description: it is
   supporting context for the rank above, not the point of the entry. */
/* Cross-service equivalents. Separated by a rule and set quieter than the description: it is
   supporting context for the rank above, not the point of the entry. */
.rank-entry__equivalents {
    border-top: 1px solid var(--mud-palette-lines-default);
    display: grid;
    gap: 0.55rem 0.75rem;
    /* Even columns so every service block is the same width and the insignia line up down the page.
       At E-9 a service can hold five ranks, so blocks must be able to grow downward, not sideways. */
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    margin: 0.9rem 0 0;
    padding-top: 0.8rem;
}

.rank-entry__equivalents-label {
    color: var(--mud-palette-text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    grid-column: 1 / -1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rank-equivalent {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    gap: 0.25rem;
    line-height: 1.35;
}

.rank-equivalent__branch {
    color: var(--mud-palette-text-secondary);
    font-size: 0.72rem;
}

/* A service can hold several ranks at one grade, so these stack rather than running on. */
.rank-equivalent__ranks {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rank-equivalent__rank {
    align-items: center;
    display: flex;
    gap: 0.4rem;
}

/* A fixed box, not just a height cap. Insignia aspect ratios vary enormously — narrow Army chevrons
   against wide Air Force devices — so capping only the height left every chip a different width and
   nothing lined up. object-fit keeps each image whole inside the same footprint, and the plate keeps
   gold and dark-navy artwork legible in both themes. */
.rank-equivalent__insignia {
    background-color: color-mix(in srgb, var(--mud-palette-text-primary) 7%, transparent);
    border-radius: 4px;
    flex: 0 0 auto;
    height: 24px;
    object-fit: contain;
    padding: 2px;
    width: 34px;
}

/* Star ranks get a row instead of a single image. Width is allowed to exceed the standard box: four
   stars squeezed into 34px would be four unreadable dots, and these chips stack vertically inside a
   service block, so a wider one does not knock anything out of column. */
.rank-equivalent__insignia.is-stars {
    align-items: center;
    background: none;
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    justify-content: flex-start;
    padding: 0;
    width: auto;
}

/* Parent in the selector for the same reason as the main plate: ".rank-equivalent__insignia" would
   otherwise not outrank the generic sizing rules. */
.rank-equivalent__insignia .rank-equivalent__star {
    flex: 0 0 auto;
    height: 13px;
    max-height: 13px;
    max-width: 13px;
    object-fit: contain;
    width: 13px;
}

/* Same footprint as a real insignia so the grid stays in column; the em dash reads as "nothing
   here" without pretending to be artwork. The rank name is on the chip's title attribute. */
.rank-equivalent__insignia.is-none {
    align-items: center;
    color: var(--mud-palette-text-secondary);
    display: flex;
    font-size: 0.8rem;
    justify-content: center;
}

.rank-equivalent__abbr {
    font-weight: 700;
}

/* On a phone the insignia moves above the text: side by side leaves the description too narrow for
   the long rank names these entries carry. */
@media (max-width: 599px) {
    .rank-entry {
        flex-direction: column;
        gap: 0.9rem;
    }

    .rank-entry__insignia {
        height: 80px;
        width: 80px;
    }
}

/* ---------- Rank page jump navigation ---------- */

.rank-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.rank-jump__link {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 28%, transparent);
    border-radius: 999px;
    color: var(--mud-palette-primary);
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    /* Full 44px target: these are the page's primary navigation on a phone, where the alternative is
       scrolling past 29 rank cards. */
    min-height: 44px;
    padding: 0 0.95rem;
    text-decoration: none;
}

.rank-jump__link:hover,
.rank-jump__link:focus-visible {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 20%, transparent);
}

/* The app bar is Fixed, so an anchored section would land underneath it without this. */
.rank-section {
    scroll-margin-top: 6rem;
}

/* ---------- MOS list (growth plan §4, item 2.3) ---------- */

/* Visible by default, and hidden by a <noscript> style block on the page when scripting is off.
   The reverse — hidden by default, revealed by script — was tried twice and failed twice: an
   attribute cleared on load did not survive Blazor's enhanced navigation, and a class added to
   <html> depended on the script running before first paint. Defaulting to visible cannot fail,
   because it needs nothing to happen. */
.mos-filters {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 5%, var(--mud-palette-surface));
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    display: grid;
    gap: 0.85rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    padding: 1.1rem 1.25rem;
}

.mos-filter {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.mos-filter__label {
    color: var(--mud-palette-text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Native controls rather than MudBlazor's: those need an interactive render mode, and this page is
   static SSR by design. Styled to match, and they work with the browser's own behaviour. */
.mos-filter__input {
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 0.95rem;
    min-height: 44px;
    padding: 0 0.7rem;
    width: 100%;
}

.mos-filter__input:focus-visible {
    border-color: var(--mud-palette-primary);
    outline: 2px solid color-mix(in srgb, var(--mud-palette-primary) 45%, transparent);
    outline-offset: 1px;
}

/* Spans the grid so the count sits under the controls rather than becoming a fourth column. */
.mos-filter__count {
    color: var(--mud-palette-text-secondary);
    font-size: 0.82rem;
    grid-column: 1 / -1;
    margin: 0;
}

.mos-list {
    display: flex;
    flex-direction: column;
}

.mos-entry {
    align-items: baseline;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    display: flex;
    gap: 0.9rem;
    padding: 0.7rem 0;
}

.mos-entry:last-child {
    border-bottom: none;
}

/* The `hidden` attribute works by setting display:none in the UA stylesheet, which any author
   `display` rule outranks — so without this the filter would mark rows hidden and they would all stay
   on screen. Same trap as the filter panel above. */
.mos-entry[hidden] {
    display: none;
}

/* Fixed lane so a thousand codes form a straight column down the page — the thing that makes a list
   this long scannable at all. Tabular figures stop digits jittering between rows. */
.mos-entry__code {
    color: var(--mud-palette-primary);
    flex: 0 0 auto;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    width: 3.5rem;
}

.mos-entry__body {
    min-width: 0;
}

/* An h2 for document structure, but sized as body text: a thousand headings at heading size would
   be unreadable, and the visual hierarchy here comes from the code column. */
.mos-entry__name {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    overflow-wrap: break-word;
}

.mos-entry__meta {
    align-items: center;
    color: var(--mud-palette-text-secondary);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 0.3rem 0.6rem;
    margin: 0.15rem 0 0;
}

.mos-entry__field::before,
.mos-entry__tag::before {
    content: "·";
    margin-right: 0.4rem;
}

.mos-entry__tag {
    color: var(--mud-palette-secondary);
}

/* Retired MOSs are kept in the list because people search old codes, so the marker has to be
   unmissable without shouting — same treatment as a cancelled MARADMIN. */
.mos-entry__inactive {
    background-color: color-mix(in srgb, var(--mud-palette-warning) 16%, transparent);
    border-radius: 5px;
    color: color-mix(in srgb, var(--mud-palette-warning) 70%, var(--mud-palette-text-primary));
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0 0.35rem;
    text-transform: uppercase;
}

.mos-empty {
    color: var(--mud-palette-text-secondary);
    padding: 1.5rem 0;
    text-align: center;
}
