﻿/* ============================================================
   Commishu - Harbour, Sky and Concrete, brutalist
   Built on Bootstrap 5.2.3 with CSS custom properties.
   Brand: dark Harbour ground, Sky for the brand moment and the main
   action, Concrete for text. Square corners, hard borders, flat offset
   shadows. Fox gold (#F4A62A) belongs to the Kon mascot only, never UI.
   ============================================================ */

/* --- Palette --- */
:root {
    --bg: #0B1C31;
    --surface: #0F2540;
    --surface-raised: #1A3657;
    --border: #2C4A6E;
    /* Hard 2px edge on cards and panels. */
    --border-strong: #3A5878;
    --text: #ECECE9;
    --text-muted: #A9B8C9;
    --accent: #8CCBF0;
    --accent-hover: #B3DDF6;
    /* --accent as bare channels, for rgba(var(--accent-rgb), alpha) tints and glows. */
    --accent-rgb: 140, 203, 240;
    /* Text on an accent fill. A bright accent needs a dark value here. */
    --accent-contrast: #0F2540;
    --banner-deep: #0F2540;
    --banner-mid: #24476E;
    --success: #5BD6A0;
    --warning: #fbbf24;
    --danger: #FF8FA3;
    /* Money we are holding. Violet so it never reads as the brand blue. */
    --held: #B9A8FF;
    --party-buyer: #7FD8E8;
    --party-seller: #f472b6;
    --radius: 0;
    --shadow-flat: #050F1C;
    --shadow-card: 5px 5px 0 var(--shadow-flat);
    --shadow-card-hover: 5px 5px 0 var(--accent);
    --font-display: 'Bricolage Grotesque', 'Figtree', sans-serif;
    --transition: 150ms ease;
}

/* --- Base --- */
html {
    background: var(--bg);
    /* Native controls (plain checkboxes, date pickers, dropdown lists, scrollbars) draw dark too. */
    color-scheme: dark;
}

body {
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    /* A pasted URL or a run of characters with no spaces wraps instead of running off the card. */
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Bootstrap surfaces ---
   Bootstrap 5.2 hard-codes #fff into each component's own variables rather
   than reading --bs-body-bg, while text inherits our light --text. Any
   offcanvas, popover, toast, accordion or modal without its own override
   therefore rendered Concrete text on white (the Browse filter drawer did).
   Redefining the variables here themes every instance, present and future;
   the per-component rules further down still refine borders and spacing. */
:root {
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--border);
    --bs-border-color-translucent: var(--border);
}
.offcanvas,
.offcanvas-sm, .offcanvas-md, .offcanvas-lg, .offcanvas-xl, .offcanvas-xxl {
    --bs-offcanvas-bg: var(--surface);
    --bs-offcanvas-color: var(--text);
    --bs-offcanvas-border-width: 2px;
    --bs-offcanvas-border-color: var(--border-strong);
}
.offcanvas-header {
    border-bottom: 2px solid var(--border-strong);
}
.dropdown-menu {
    --bs-dropdown-bg: var(--surface);
    --bs-dropdown-color: var(--text);
    --bs-dropdown-link-color: var(--text-muted);
    --bs-dropdown-link-hover-color: var(--text);
    --bs-dropdown-link-hover-bg: var(--surface-raised);
    --bs-dropdown-link-active-color: var(--accent-contrast);
    --bs-dropdown-link-active-bg: var(--accent);
    --bs-dropdown-link-disabled-color: var(--text-muted);
    --bs-dropdown-header-color: var(--text-muted);
}
.popover {
    --bs-popover-bg: var(--surface-raised);
    --bs-popover-border-color: var(--border-strong);
    --bs-popover-header-bg: var(--surface);
    --bs-popover-header-color: var(--text);
    --bs-popover-body-color: var(--text);
}
.toast {
    --bs-toast-bg: var(--surface-raised);
    --bs-toast-color: var(--text);
    --bs-toast-border-color: var(--border-strong);
    --bs-toast-header-bg: var(--surface);
    --bs-toast-header-color: var(--text);
    --bs-toast-header-border-color: var(--border);
}
.accordion {
    --bs-accordion-bg: var(--surface);
    --bs-accordion-color: var(--text);
    --bs-accordion-btn-color: var(--text);
    --bs-accordion-active-bg: var(--surface-raised);
    --bs-accordion-active-color: var(--accent);
}
.modal {
    --bs-modal-bg: var(--surface);
    --bs-modal-color: var(--text);
}
.card {
    --bs-card-bg: var(--surface);
    --bs-card-cap-bg: var(--surface-raised);
}
.progress {
    --bs-progress-bg: var(--surface-raised);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

h1 { font-weight: 800; font-size: 2.2rem; letter-spacing: -0.04em; }
h2 { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; }
h3 { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }

p { color: var(--text-muted); }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

hr {
    border-color: var(--border);
    opacity: 1;
}

/* --- Layout --- */
/* The server form is a column (banners, the sticky top bar, then the content), and the
   content is itself a column, so the footer pins to the bottom of a short page. */
body > form {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.site-layout {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-main {
    flex: 1 0 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.body-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

@media (max-width: 575.98px) {
    .body-content {
        padding: 1.25rem 1rem;
    }
}

/* --- Buttons --- */
.btn {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-width: 2px;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
    box-shadow: 4px 4px 0 var(--shadow-flat);
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--accent-contrast);
}

.btn-outline-primary {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
}

.btn-secondary,
.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text);
    background: transparent;
}
.btn-secondary:hover,
.btn-outline-secondary:hover {
    background: var(--surface-raised);
    border-color: var(--text-muted);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #0d0d0d;
}
.btn-success:hover {
    background: #2dd4a0;
    border-color: #2dd4a0;
}

.btn-link {
    color: var(--accent);
    text-decoration: none;
    padding: 0;
}
.btn-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Ghost button - for navbar auth links */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.35rem 1rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.btn-ghost:hover {
    border-color: var(--text-muted);
    color: var(--text);
    background: transparent;
}
.btn-ghost-accent {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-ghost-accent:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
}

/* --- Forms --- */
.form-control,
.form-select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus,
.form-select:focus {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--text);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.25);
}
.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

/* Required-field asterisk. Pair with aria-required="true" on the input. */
.form-label-required::after {
    content: " *";
    color: var(--danger);
    font-weight: 600;
}

/* Override default max-width on inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="select"] {
    max-width: 100%;
}

/* ASP.NET textboxes that don't have form-control */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
textarea,
select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--text);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.25);
}

/* --- Cards --- */
.card {
    background: var(--surface);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-card-hover);
}

.card-body {
    padding: 1rem;
}

.card-title {
    color: var(--text);
    font-weight: 400;
    font-size: 1rem;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Category card --- */
a.category-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.category-card {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: var(--radius);
    aspect-ratio: 4 / 3;
}

.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-img {
    transform: scale(1.05);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,.15) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    transition: background var(--transition);
}

.category-card:hover .category-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 50%, rgba(0,0,0,.2) 100%);
}

.category-card-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.category-card-text {
    color: rgba(255,255,255,.7);
    font-size: 0.78rem;
    margin: 0;
    line-height: 1.4;
}

/* --- Listing card --- */
.listing-card {
    background: var(--surface);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    position: relative;
}
.listing-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.listing-card-img-link {
    display: block;
}

.listing-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.listing-card-body {
    padding: 0.85rem 1rem;
}

.listing-card-category {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.listing-card-category a {
    color: inherit;
    text-decoration: none;
}

.listing-card-category a:hover {
    color: var(--accent);
}

/* On a Browse card the title is a stretched-link covering the whole card (z-index 1);
   these links sit above it so they keep their own destinations. */
.listing-card-category a,
.listing-card-seller {
    position: relative;
    z-index: 2;
}

.listing-card-title {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-card-price {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.listing-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.listing-card-meta img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.listing-card-views {
    margin-left: auto;
    color: var(--text-muted);
    white-space: nowrap;
}

.listing-card-rating {
    margin-left: auto;
    color: var(--warning);
}

/* Views already carries margin-left: auto, so drop the rating's to keep the two together. */
.listing-card-views + .listing-card-rating {
    margin-left: 0;
}

/* --- Creator directory card (BrowseCreators.aspx) --- */
.creator-card {
    background: var(--surface);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}
.creator-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.creator-card-banner-link {
    display: block;
}

.creator-card-banner {
    width: 100%;
    aspect-ratio: 4 / 1;
    object-fit: cover;
    display: block;
    background: var(--border);
}

.creator-card-body {
    padding: 0 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.creator-card-avatar-link {
    display: inline-block;
    margin-top: -28px;
    margin-bottom: 0.5rem;
}

.creator-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--surface);
    background: var(--surface);
    display: block;
}

.creator-card-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.creator-card-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.creator-card-name:hover {
    color: var(--accent);
}

.creator-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.creator-card-rating {
    color: var(--warning);
    margin-left: auto;
}

.creator-card-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0 0 0.75rem;
    flex: 1;
}

.creator-card-stats {
    font-size: 0.8rem;
    color: var(--text);
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
}

/* --- Profile page --- */
.profile-banner {
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 250px;
}

.profile-banner-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
}

.profile-avatar-sm {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

/* One scrolling row so the portfolio can't push listings off the first screen. Negative margins bleed
   to the column edges so a cut-off card hints there's more. */
.portfolio-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.portfolio-scroll-item {
    flex: 0 0 280px;
    max-width: 280px;
    scroll-snap-align: start;
}

.portfolio-scroll-item .card {
    height: 100%;
}

/* Cap image/video height so a portrait item doesn't make its card taller than the rest. */
.portfolio-scroll-item img,
.portfolio-scroll-item video {
    max-height: 200px;
    width: 100%;
    object-fit: cover;
}

/* Positioning context for the strip's prev/next arrows. */
.portfolio-scroll-wrap {
    position: relative;
}

.portfolio-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition);
}

.portfolio-scroll-arrow:hover,
.portfolio-scroll-arrow:focus {
    background: rgba(0, 0, 0, 0.8);
    outline: none;
}

.portfolio-scroll-prev { left: -6px; }
.portfolio-scroll-next { right: -6px; }

/* --- Listing image carousel (Profile page) ---
   Sized like .listing-card-img so single- and multi-image cards match at rest. */
.listing-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.listing-carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.listing-carousel-slide.active {
    opacity: 1;
}

.listing-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition), background var(--transition);
}

.listing-carousel-arrow:hover,
.listing-carousel-arrow:focus {
    background: rgba(0, 0, 0, 0.75);
    outline: none;
}

.listing-card-media:hover .listing-carousel-arrow,
.listing-carousel-arrow:focus {
    opacity: 1;
}

.listing-carousel-prev { left: 6px; }
.listing-carousel-next { right: 6px; }

/* No hover on touch devices, so keep the arrows dimly visible. */
@media (hover: none) {
    .listing-carousel-arrow {
        opacity: 0.7;
    }
}

/* --- View listing gallery --- */
.listing-gallery-main {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}

/* Cap video height so a 9:16 turntable doesn't blow out the layout. */
video.listing-gallery-main {
    max-width: 100%;
    max-height: 480px;
    height: auto;
    aspect-ratio: auto;
}

.listing-gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color var(--transition);
}
.listing-gallery-thumb:hover {
    border-color: var(--accent);
}

.listing-gallery-thumb-video {
    width: 120px;
    max-height: 80px;
    border-radius: 0;
    border: 2px solid var(--border);
}

/* --- Alerts / panels --- */
.alert {
    border-radius: var(--radius);
    font-size: 0.85rem;
    border: none;
}
.alert-danger {
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
}
.alert-success {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
}
.alert-warning {
    background: rgba(251, 191, 36, 0.12);
    color: var(--warning);
}
.alert-info {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
}

/* --- Validation (ASP.NET validators) --- */
.text-danger {
    color: var(--danger) !important;
    font-size: 0.8rem;
}

/* A Display="Dynamic" validator on its own line. Never put Bootstrap's d-block on one:
   its !important beats the inline display:none that hides a passing validator, so the
   message shows permanently. This yields to that inline none, and only forces block
   over the inline display the validator script sets when it shows the message. */
.validator-block {
    display: block;
}
.validator-block:not([style*="none"]) {
    display: block !important;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

/* --- Badges --- */
.badge {
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    padding: 0.3em 0.6em;
    border-radius: 0;
}
.badge-accent {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
}
.badge-success {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success);
}
.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}
.badge-danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
}
.badge-founding {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(251,191,36,0.2));
    color: var(--warning);
}
.badge-vacation {
    background: rgba(52, 211, 153, 0.18);
    color: var(--success);
    padding: 0.15em 0.4em;
    font-size: 0.85rem;
    line-height: 1;
}

/* --- Tables --- */
.table {
    color: var(--text);
    border-color: var(--border);
}
.table > thead {
    border-bottom: 2px solid var(--border);
}
.table > thead th {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom-color: var(--border);
}
.table > tbody > tr > td {
    border-bottom-color: var(--border);
    vertical-align: middle;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.02);
}
.table-hover > tbody > tr:hover {
    background: var(--surface-raised);
}

/* --- Dropdown menus --- */
.dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.dropdown-item {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--surface-raised);
    color: var(--text);
}
.dropdown-divider {
    border-color: var(--border);
}

/* --- Pagination --- */
.page-link {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.page-link:hover {
    background: var(--surface-raised);
    border-color: var(--border);
    color: var(--text);
}
.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
}
.page-item.disabled .page-link {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-muted);
    opacity: 0.4;
}

/* --- Modal --- */
.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}
.modal-header {
    border-bottom-color: var(--border);
}
.modal-footer {
    border-top-color: var(--border);
}
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- Footer --- */
footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
}
footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* --- Notification badge --- */
.notification-badge {
    position: absolute;
    top: 2px;
    right: -4px;
    font-size: 0.65rem;
    padding: 0.2em 0.45em;
}

/* --- Notification list --- */
.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.notification-item:hover {
    background: var(--surface-raised);
}
.notification-item.unread {
    border-left: 3px solid var(--accent);
}
.notification-item-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text);
}
.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* --- Dashboard stat card --- */
.stat-card {
    background: var(--surface);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.25rem;
    text-align: center;
}
.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}
.stat-card-label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* --- Order status badges --- */
.badge-status-requested { background: rgba(251,191,36,0.15); color: var(--warning); }
.badge-status-accepted { background: rgba(var(--accent-rgb), 0.15); color: var(--accent); }
.badge-status-inprogress { background: rgba(var(--accent-rgb), 0.15); color: var(--accent); }
.badge-status-delivered { background: rgba(52,211,153,0.15); color: var(--success); }
.badge-status-completed { background: rgba(52,211,153,0.2); color: var(--success); }
.badge-status-revisionrequested { background: rgba(251,191,36,0.15); color: var(--warning); }
.badge-status-cancelled { background: rgba(248,113,113,0.15); color: var(--danger); }
.badge-status-disputed { background: rgba(248,113,113,0.2); color: var(--danger); }

/* --- Utility --- */
.text-accent { color: var(--accent) !important; }
.text-muted  { color: var(--text-muted) !important; }
.bg-surface  { background: var(--surface) !important; }
.bg-surface-raised { background: var(--surface-raised) !important; }
.border-subtle { border-color: var(--border) !important; }

/* Notification list items: override Bootstrap's dark list-group text on this dark surface. */
.notif-item, .notif-item small { color: var(--text) !important; }
.notif-item:hover, .notif-item:focus { color: var(--text) !important; background: var(--surface-raised) !important; }

/* Section spacing helper */
.section { padding: 3rem 0; }

/* Uppercase label style */
.label-upper {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ============================================================
   Marketing / landing sections
   ============================================================ */

/* --- Hero --- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-top: 1rem;
    margin-bottom: 3rem;
    min-height: 460px;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(11,28,49,.94) 0%, rgba(11,28,49,.78) 50%, rgba(15,37,64,.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 4rem 2.5rem;
    max-width: 640px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.12);
    padding: 0.4rem 0.85rem;
    border-radius: 0;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    color: #fff;
    margin-bottom: 1.25rem;
}

/* The highlighted word sits on a Sky block, like the sticky-note mark. */
.hero h1 .accent {
    color: var(--accent-contrast);
    background: var(--accent);
    padding: 0 0.12em;
}

.hero p.lead {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.78);
    max-width: 540px;
    margin-bottom: 1.75rem;
}

.hero .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
}

@media (max-width: 575px) {
    .hero { min-height: 380px; }
    .hero-content { padding: 2.5rem 1.5rem; }
    .hero h1 { font-size: 2.3rem; }
}

/* Compact hero variant for sub-pages */
.hero-compact {
    min-height: 280px;
    margin-top: 0.5rem;
    margin-bottom: 2.5rem;
}
.hero-compact .hero-content {
    padding: 2.5rem 2rem;
}
.hero-compact h1 {
    font-size: 2rem;
}

/* Welcome rate: live fee in accent beside a smaller struck-through anchor rate. */
.welcome-rate-value {
    color: var(--accent);
    font-weight: 500;
}

.welcome-rate-strike {
    display: inline-block;
    margin-left: 0.25rem;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    font-size: 0.6em;
    font-weight: 400;
    vertical-align: middle;
}

.welcome-rate-strike-inline {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.welcome-rate-tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0;
    vertical-align: middle;
}

.welcome-rate-banner {
    padding: 0.75rem 1rem;
    background: rgba(var(--accent-rgb), 0.08);
    border-left: 3px solid var(--accent);
    border-radius: 0;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

/* --- Feature row (image + text alternating) --- */
.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}
.feature-row.reverse .feature-row-media {
    order: 2;
}
.feature-row.reverse .feature-row-text {
    order: 1;
}

.feature-row-media img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.feature-row-text h2 {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text);
}
.feature-row-text h2 .accent {
    color: var(--accent);
}
.feature-row-text p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

@media (max-width: 767px) {
    .feature-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }
    .feature-row.reverse .feature-row-media,
    .feature-row.reverse .feature-row-text {
        order: initial;
    }
}

/* --- Final CTA panel --- */
.cta-panel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface-raised);
    padding: 3rem 2.5rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: var(--shadow-card);
}
.cta-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.18), transparent 60%);
    pointer-events: none;
}
.cta-panel > * { position: relative; }
.cta-panel h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}
.cta-panel p {
    max-width: 540px;
    margin: 0 auto 1.75rem;
    font-size: 0.95rem;
}

/* --- Step / how-it-works card --- */
.step-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    height: 100%;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition), transform var(--transition);
}
.step-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}
.step-card-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.step-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}
.step-card p {
    font-size: 0.85rem;
    margin: 0;
}

/* --- Seller safety guide: numbered steps and copyable commands --- */
.safety-steps {
    font-size: 0.85rem;
    padding-left: 1.25rem;
    margin-bottom: 0;
}
.safety-steps li {
    margin-bottom: 0.4rem;
}
.safety-code {
    background: var(--surface-raised);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    white-space: pre;
    overflow-x: auto;
}

/* --- Contact page ---
   One section: the form centered over a building photo, darkened so the white
   heading reads against a bright sky. */
.contact-hero {
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
    margin-bottom: 3rem;
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1rem;
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, rgba(11,28,49,.86) 0%, rgba(11,28,49,.70) 45%, rgba(11,28,49,.90) 100%),
        url('/Content/images/site/contact-building.jpg');
    background-size: cover;
    background-position: center;
}
.contact-hero-inner {
    position: relative;
    width: 100%;
    max-width: 640px;
}
.contact-hero-intro {
    text-align: center;
    margin-bottom: 1.75rem;
}
.contact-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    color: #fff;
    margin-bottom: 1rem;
}
.contact-hero h1 .accent {
    color: var(--accent-contrast);
    background: var(--accent);
    padding: 0 0.12em;
}
.contact-hero p.lead {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.78);
    max-width: 520px;
    margin: 0 auto;
}
.contact-form-card {
    box-shadow: 8px 8px 0 var(--accent);
}
@media (max-width: 575px) {
    .contact-hero { min-height: 0; padding: 2.5rem 0.75rem; }
    .contact-hero h1 { font-size: 2rem; }
    .contact-form-card { box-shadow: 4px 4px 0 var(--accent); }
}

/* 5-star rating on LeaveReview. The RadioButtonList renders high to low; labels float right so they read
   1 to 5, and ~ lights a star plus its lower-value siblings (which float to its left). */
.star-rating-list {
    display: inline-block;     /* establishes a BFC so the floats are contained */
    position: relative;        /* anchor for the visually-hidden inputs */
    line-height: 1;
    direction: ltr;
}

.star-rating-list input[type="radio"] {
    /* Not display:none: keeps keyboard focus, the postback value and the validator working. */
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.star-rating-list label {
    float: right;
    cursor: pointer;
    font-size: 2rem;
    padding: 0 0.1rem;
    color: var(--border);      /* empty/unselected star */
    transition: color 0.12s ease, transform 0.08s ease;
}

.star-rating-list label:hover,
.star-rating-list label:hover ~ label,
.star-rating-list input[type="radio"]:checked ~ label {
    color: #f5b301;            /* filled star (gold) */
}

.star-rating-list label:hover {
    transform: scale(1.12);
}

/* Keyboard focus ring (each input is immediately followed by its label). */
.star-rating-list input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 0;
}

.star-rating-readout {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    vertical-align: middle;
}

/* AI disclosure radio rows on Create/Edit Listing. */
.ai-disclosure-radios {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-disclosure-radios label {
    cursor: pointer;
    color: var(--text);
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0;
    display: block;
    transition: border-color 0.15s, background 0.15s;
}

.ai-disclosure-radios label:hover {
    border-color: var(--accent);
}

.ai-disclosure-radios input[type="radio"] {
    accent-color: var(--accent);
    margin-right: 0.5rem;
}

.ai-disclosure-radios input[type="radio"]:checked + label {
    border-color: var(--accent);
    background: var(--surface);
}

/* AI disclosure as selectable option cards on SellerSetup.
   A separate class from .ai-disclosure-radios so Create/Edit Listing keep
   their rows. The RadioButtonList renders (Flow) input, label, <br> as
   siblings: the inputs are visually hidden (not display:none, so focus, the
   postback value and the RequiredFieldValidator keep working), the <br>s are
   dropped, and the labels become the grid items. One column on phones,
   three across from 576px. The 2px edge is in "Brutalist edges". */
.ai-disclosure-cards {
    position: relative;        /* anchor for the visually-hidden inputs */
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .ai-disclosure-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

.ai-disclosure-cards br {
    display: none;
}

.ai-disclosure-cards input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.ai-disclosure-cards label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    min-height: 44px;          /* full-width tap target on phones */
    margin: 0;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    background: var(--bg);
    border-radius: var(--radius);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

/* The radio dot, drawn so it can sit inside the card. */
.ai-disclosure-cards label::before {
    content: "";
    flex: none;
    width: 1rem;
    height: 1rem;
    margin-top: 0.1rem;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: transparent;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.ai-disclosure-cards label:hover {
    border-color: var(--accent);
}

.ai-disclosure-cards input[type="radio"]:checked + label {
    border-color: var(--accent);
    background: var(--surface-raised);
    box-shadow: 4px 4px 0 var(--accent);
}

.ai-disclosure-cards input[type="radio"]:checked + label::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 2px var(--surface-raised);
}

.ai-disclosure-cards input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================================
   Top bar and menu
   A sticky bar at every width, with the rest of the navigation in a
   Bootstrap offcanvas opened from the avatar (or the menu button when
   signed out). Breakpoints: the search goes inline at 768px, the
   category scope joins it at 1200px, the primary links show at 992px
   (below that they are in the menu). Site.js mirrors the 768px one.
   ============================================================ */

.site-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    /* Must stay --surface: .brand-mark cuts its folded corner with it. */
    background: var(--surface);
    border-bottom: 2px solid var(--border-strong);
}
.site-topbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    max-width: 1400px;
    min-height: 3.5rem;
    margin: 0 auto;
    padding: 0.4rem 1.5rem;
}
@media (max-width: 575.98px) {
    .site-topbar-inner {
        gap: 0.5rem;
        padding: 0.4rem 1rem;
    }
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
    color: var(--text) !important;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.04em;
    line-height: 1;
    text-decoration: none;
    transition: color var(--transition);
}
.site-brand:hover,
.site-brand:focus-visible {
    color: var(--accent) !important;
}
.site-brand .brand-mark {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 1.35rem;
}

/* The sticky-note mark: a Sky square with a folded corner. The fold is
   cut from the bar background, so it reads as the page behind. */
.brand-mark {
    position: relative;
    flex: none;
    width: 1.9rem;
    height: 1.9rem;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.2rem;
    background: var(--accent);
    color: var(--accent-contrast);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1;
}
.brand-mark::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0.55rem;
    height: 0.55rem;
    background: linear-gradient(to top left, var(--surface) 50%, #5FA9D6 50%);
}

/* Inline SVG icons draw in the text colour. */
.site-icon {
    display: block;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: square;
    stroke-linejoin: miter;
}

/* --- Primary links --- */
.site-topbar-nav {
    display: none;
    align-items: center;
    gap: 0.15rem;
}
@media (min-width: 992px) {
    .site-topbar-nav {
        display: flex;
    }
}
.site-topbar-link {
    padding: 0.45rem 0.6rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: inset 0 -2px 0 transparent;
    transition: color var(--transition), box-shadow var(--transition);
}
.site-topbar-link:hover,
.site-topbar-link:focus {
    color: var(--text);
}
.site-topbar-link.active {
    color: var(--accent);
    box-shadow: inset 0 -2px 0 var(--accent);
}

/* --- Search --- */
.site-search {
    display: none;
    align-items: stretch;
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 36rem;
}
@media (min-width: 768px) {
    .site-search {
        display: flex;
    }
}
/* Below 768px: a full-width row under the bar, revealed by the toggle. */
@media (max-width: 767.98px) {
    .site-search.open {
        display: flex;
        order: 10;
        flex-basis: 100%;
        max-width: none;
        margin-bottom: 0.25rem;
    }
}
.site-search-scope,
.site-search-input,
.site-search-button {
    background: var(--surface-raised);
    border: 2px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
}
.site-search-scope {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 11rem;
    border-right: 0;
    padding: 0.35rem 1.6rem 0.35rem 0.6rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                      linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}
@media (max-width: 767.98px) {
    .site-search-scope {
        max-width: 40%;
    }
}
/* Between 768px and 1200px the bar has no room for the scope; the search covers every category. */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .site-search-scope {
        display: none;
    }
}
.site-search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.35rem 0.6rem;
    border-right: 0;
}
.site-search-input::placeholder { color: var(--text-muted); }
.site-search-scope:focus,
.site-search-input:focus {
    outline: none;
    border-color: var(--accent);
    position: relative;
    z-index: 1;
}
.site-search-scope:focus + .site-search-input {
    border-left-color: var(--accent);
}
.site-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    padding: 0 0.7rem;
    color: var(--accent);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.site-search-button:hover,
.site-search-button:focus {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
    outline: none;
}

/* --- Right-hand cluster --- */
.site-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}
@media (max-width: 575.98px) {
    .site-topbar-actions {
        gap: 0.2rem;
    }
}
.site-icon-button,
.site-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
}
.site-icon-button:hover,
.site-icon-button:focus,
.site-icon-link:hover,
.site-icon-link:focus {
    border-color: var(--border-strong);
    color: var(--accent);
}
.site-icon-link.active {
    color: var(--accent);
    box-shadow: inset 0 -2px 0 var(--accent);
}
.site-icon-link .notification-badge {
    top: -0.2rem;
    right: -0.3rem;
    pointer-events: none;
}
@media (min-width: 768px) {
    .site-search-toggle {
        display: none;
    }
}
.site-search-toggle[aria-expanded="true"] {
    border-color: var(--border-strong);
    color: var(--accent);
}

.site-avatar-button {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: 0.15rem;
    padding: 0;
    background: var(--surface-raised);
    border: 2px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition);
}
.site-avatar-button:hover,
.site-avatar-button:focus {
    border-color: var(--accent);
}
.site-avatar-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-topbar .btn {
    padding: 0.35rem 0.8rem;
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .site-icon-button,
    .site-icon-link,
    .site-avatar-button {
        width: 2.25rem;
        height: 2.25rem;
    }
    /* Log in moves into the menu; Sign up stays in the bar. */
    .site-topbar-login {
        display: none;
    }
}

/* --- Menu (Bootstrap offcanvas) --- */
.site-menu.offcanvas {
    --bs-offcanvas-width: 320px;
    --bs-offcanvas-bg: var(--surface);
    --bs-offcanvas-color: var(--text);
    --bs-offcanvas-border-width: 2px;
    --bs-offcanvas-border-color: var(--border-strong);
    --bs-offcanvas-box-shadow: none;
    max-width: 100%;
}
.site-menu-header {
    padding: 0.6rem 1rem;
    border-bottom: 2px solid var(--border-strong);
}
.site-menu-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}
.site-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-left: auto;
    padding: 0;
    background: transparent;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.site-menu-close:hover,
.site-menu-close:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}
.site-menu-body {
    padding: 0.75rem;
}
.site-menu-group {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.site-menu-section {
    padding: 0 0.75rem 0.35rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.site-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.site-menu .site-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.site-menu .site-nav-link:hover,
.site-menu .site-nav-link:focus {
    background: var(--surface-raised);
    color: var(--text);
}
.site-menu .site-nav-link.active {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
    box-shadow: inset 2px 0 0 var(--accent);
}
.site-menu .site-nav-link-admin {
    color: var(--warning) !important;
}
/* The link's space-between already right-aligns the badge, so undo the global absolute positioning. */
.site-menu .notification-badge {
    position: static;
}
.site-menu-cta {
    margin: 0.25rem 0 0.6rem;
}

.site-menu-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.25rem 0.75rem 0.25rem;
    color: inherit;
    text-decoration: none;
}
.site-menu-user:hover,
.site-menu-user:focus {
    color: inherit;
}
.site-menu-user:hover .site-menu-user-name,
.site-menu-user:focus .site-menu-user-name {
    color: var(--accent);
}
.site-menu-user .user-menu-avatar {
    width: 2.75rem;
    height: 2.75rem;
    flex: none;
    object-fit: cover;
    border: 2px solid var(--border-strong);
}
.site-menu-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.site-menu-user-name {
    color: var(--text);
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition);
}
.user-menu-set-username {
    color: var(--accent);
    text-decoration: underline;
}
.site-menu-user-email {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-menu-auth {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-lang {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.8rem;
}
.site-lang-label {
    color: var(--text-muted);
}
.site-lang .site-lang-link {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
}
/* The currency picker marks the reader's current choice. */
.site-currency .site-lang-link[aria-pressed="true"] {
    font-weight: 700;
    text-decoration: underline;
}
/* "≈ US$18.25" under a CAD price box (Scripts/fx-hint.js). */
.fx-hint:empty {
    display: none;
}

/* --- Footer --- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 1.25rem;
    margin-top: 4rem;
}
.site-footer-brand {
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.04em;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}
.site-footer-tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    max-width: 320px;
    margin: 0;
}
.site-footer-heading {
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.site-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer-links li { margin-bottom: 0.4rem; }
.site-footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.site-footer-links a:hover,
.site-footer-links a:focus-visible {
    color: var(--accent);
}
.site-footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ============================================================
   Accessibility + focus polish
   ============================================================ */

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 0;
}
.btn:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 3px;
}
.site-nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    color: var(--text);
}

/* ============================================================
   Marketing polish
   ============================================================ */

/* Hero: make secondary button legible on the photo background. */
.hero .btn-outline-primary {
    background: rgba(13, 13, 13, 0.55);
    border-color: var(--accent-hover);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.hero .btn-outline-primary:hover,
.hero .btn-outline-primary:focus {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
}
.hero-eyebrow {
    background: rgba(var(--accent-rgb), 0.22);
    color: #fff;
}

/* Category tile affordance. */
.category-card-cta {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(var(--accent-rgb), 0.9);
    color: var(--accent-contrast);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity var(--transition), transform var(--transition);
    z-index: 1;
}
.category-card:hover .category-card-cta,
.category-card:focus-visible .category-card-cta {
    opacity: 1;
    transform: translateY(0);
}
.category-card-count {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(var(--accent-rgb), 0.4);
    padding: 0.1rem 0.5rem;
    border-radius: 0;
    margin-top: 0.4rem;
}

/* Listing card extra metadata. */
.listing-card-meta-bottom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    flex-wrap: wrap;
}
.listing-card-turnaround::before {
    content: "\23F1\0020";
    margin-right: 0.15rem;
    opacity: 0.7;
}

/* Fee comparison mini-table inside a feature row. */
.fee-compare {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.fee-compare th,
.fee-compare td {
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    text-align: left;
    color: var(--text);
}
.fee-compare th {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.fee-compare td.fee-us { color: var(--accent); font-weight: 500; }

/* ============================================================
   Seller onboarding checklist (Dashboard)
   ============================================================ */

.onboarding-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-card);
}
.onboarding-header {
    margin-bottom: 0.75rem;
}
.onboarding-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.onboarding-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.25rem;
    border-top: 1px solid var(--border);
}
.onboarding-item:first-child { border-top: 0; }
.onboarding-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    line-height: 1;
}
.onboarding-icon-done {
    background: var(--accent);
    color: var(--accent-contrast);
}
.onboarding-icon-todo {
    background: transparent;
    border: 1.5px solid var(--text-muted);
}
.onboarding-item-body { flex-grow: 1; min-width: 0; }
.onboarding-item-title {
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.2;
}
.onboarding-item-done .onboarding-item-title {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(160, 160, 168, 0.4);
}
.onboarding-item-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}
.onboarding-action {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}
.onboarding-action:hover { color: var(--accent-hover); }
.onboarding-badge {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--success);
    background: rgba(52, 211, 153, 0.12);
    padding: 0.2rem 0.55rem;
    border-radius: 0;
}

/* Narrow readable column; the heading stays aligned with the container edge. */
.page-narrow {
    max-width: 700px;
}

/* Bootstrap's white active tab clashes with the dark theme; use the accent. */
.nav-tabs {
    border-bottom-color: var(--border);
}
.nav-tabs .nav-link {
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-bottom-color: var(--border);
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    margin-bottom: -1px;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
}
.nav-tabs .nav-link:hover {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border) var(--border) transparent var(--border);
}
.nav-tabs .nav-link.active {
    color: var(--accent);
    background: var(--surface);
    border-color: var(--border) var(--border) var(--surface) var(--border);
    border-bottom-width: 1px;
    font-weight: 500;
}
.nav-tabs .nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    color: var(--text);
}

/* Fold btn-outline-light into the accent palette rather than a third brand color. */
.btn-outline-light {
    color: var(--text);
    border-color: var(--border);
    background: transparent;
}
.btn-outline-light:hover,
.btn-outline-light:focus {
    color: var(--accent-contrast);
    background: var(--accent);
    border-color: var(--accent);
}

/* Map Bootstrap's primary/info blue badges to the accent: one brand color. */
.badge.bg-primary,
.badge.bg-info {
    background-color: rgba(var(--accent-rgb), 0.18) !important;
    color: var(--accent) !important;
}

/* Collapsed message from a banned user; styled to read as deliberate, not broken. */
.message-banned {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    background: rgba(248, 113, 113, 0.05);
}
.message-banned[open] {
    background: transparent;
    border-style: solid;
}
.message-banned > .message-banned-summary {
    cursor: pointer;
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    list-style: none;
    user-select: none;
}
.message-banned > .message-banned-summary::-webkit-details-marker { display: none; }
.message-banned > .message-banned-summary::before {
    content: "\25B8"; /* triangle right */
    display: inline-block;
    margin-right: 0.4rem;
    transition: transform var(--transition);
    color: var(--danger);
}
.message-banned[open] > .message-banned-summary::before {
    transform: rotate(90deg);
}
.message-banned > .border-bottom {
    margin-top: 0.5rem;
    opacity: 0.75;
}

/* width: auto overrides the asp:Image width="300" attribute so max-width/max-height clamp with the aspect
   ratio intact; min() avoids horizontal scroll on narrow phones. */
.message-attachment-img {
    width: auto;
    height: auto;
    max-width: min(100%, 300px);
    max-height: 400px;
}

/* Read-only secret output (new API key on Account/ApiKeys): rendered as <code>, not <input>, so a form
   submit can't transmit it; styled as a readonly input. */
code.secret-output {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-all;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    user-select: all;
    cursor: text;
}
code.secret-output:empty::before {
    content: '\00a0';
    color: var(--text-muted);
}
/* Masked: no user-select, or copying the bullets would look like a saved key. Copy reads the real value. */
code.secret-output.is-masked {
    user-select: none;
    cursor: default;
    color: var(--text-muted);
}
/* inline-flex so the icon-only SVG doesn't ride low on the text baseline. */
button.secret-reveal-toggle {
    display: inline-flex;
    align-items: center;
}

/* --- Maintenance banner --- amber for upcoming, red for active. */
.maintenance-banner {
    color: #ffffff;
    padding: 0.65rem 1.25rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 6;
    animation: maintenance-pulse 2s infinite;
}

.maintenance-banner.upcoming {
    background: linear-gradient(90deg, #b06d10 0%, #d68910 50%, #b06d10 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.maintenance-banner.active {
    background: linear-gradient(90deg, #a93226 0%, #d63b2f 50%, #a93226 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.maintenance-banner .icon {
    margin-right: 0.4rem;
    font-size: 1rem;
}

.maintenance-banner .time {
    font-family: monospace;
    background-color: rgba(255, 255, 255, 0.18);
    padding: 0.1rem 0.35rem;
    border-radius: 0;
    margin: 0 0.2rem;
}

.maintenance-banner .countdown {
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.95;
    margin-left: 0.5rem;
}

@keyframes maintenance-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@media (max-width: 768px) {
    .maintenance-banner {
        padding: 0.55rem 0.9rem;
        font-size: 0.8rem;
    }

    .maintenance-banner .countdown {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

/* --- Email-confirmation banner ---
   Amber, not purple: a task, not an announcement. No close button because it is a gate. */
.confirm-banner {
    background: linear-gradient(90deg, #4a3208 0%, #8a5d0d 50%, #4a3208 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 5;
}

.confirm-banner-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.confirm-banner-eyebrow {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    padding: 0.25rem 0.6rem;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    white-space: nowrap;
}

.confirm-banner-text {
    flex: 1 1 auto;
    color: rgba(255, 255, 255, 0.92);
}

.confirm-banner-cta {
    flex: 0 0 auto;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius);
    transition: background var(--transition);
    white-space: nowrap;
}

.confirm-banner-cta:hover,
.confirm-banner-cta:focus {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

@media (max-width: 767.98px) {
    .confirm-banner-inner {
        flex-wrap: wrap;
        gap: 0.5rem 0.65rem;
        padding: 0.6rem 1rem;
    }
}

/* --- Payouts-needed banner ---
   Red, louder than the confirm banner: buyers are waiting on a seller who can't accept
   until Stripe onboarding is done, and only the seller is told. No close button. */
.payouts-banner {
    background: #7f1d1d;
    color: #ffffff;
    border-bottom: 2px solid #fca5a5;
    position: relative;
    z-index: 5;
}

.payouts-banner-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.payouts-banner-eyebrow {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #ffffff;
    color: #7f1d1d;
    padding: 0.25rem 0.6rem;
    border-radius: 0;
    white-space: nowrap;
}

.payouts-banner-text {
    flex: 1 1 auto;
    color: #ffffff;
}

.payouts-banner-cta {
    flex: 0 0 auto;
    color: #7f1d1d;
    text-decoration: none;
    font-weight: 800;
    background: #ffffff;
    border: 2px solid #0B1C31;
    padding: 0.45rem 1rem;
    border-radius: var(--radius);
    white-space: nowrap;
}

.payouts-banner-cta:hover,
.payouts-banner-cta:focus {
    background: #fee2e2;
    color: #7f1d1d;
}

@media (max-width: 767.98px) {
    .payouts-banner-inner {
        flex-wrap: wrap;
        gap: 0.5rem 0.65rem;
        padding: 0.7rem 1rem;
    }
}

/* --- Grand opening banner ---
   Sky on Harbour: the brand's own announcement. Closable, unlike the confirm banner. */
.opening-banner {
    background: var(--accent);
    color: var(--bg);
    border-bottom: 2px solid var(--bg);
    position: relative;
    z-index: 4;
}

.opening-banner-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.opening-banner-eyebrow {
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--bg);
    color: var(--accent);
    padding: 0.25rem 0.6rem;
    white-space: nowrap;
}

.opening-banner-text {
    flex: 1 1 auto;
    font-weight: 600;
}

.opening-banner-cta {
    flex: 0 0 auto;
    color: var(--bg);
    text-decoration: none;
    font-weight: 700;
    border: 2px solid var(--bg);
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.opening-banner-cta:hover,
.opening-banner-cta:focus {
    background: var(--bg);
    color: var(--accent);
}

.opening-banner-close {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    color: var(--bg);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 0.25rem;
    cursor: pointer;
}

.opening-banner-close:hover,
.opening-banner-close:focus-visible {
    opacity: 0.7;
}

@media (max-width: 767.98px) {
    .opening-banner-inner {
        flex-wrap: wrap;
        gap: 0.5rem 0.65rem;
        padding: 0.6rem 1rem;
    }

    .opening-banner-text {
        flex-basis: calc(100% - 3rem);
        order: 2;
    }

    .opening-banner-close {
        margin-left: auto;
    }

    .opening-banner-cta {
        order: 3;
    }
}

/* --- Order Timeline --- */
.order-timeline {
    position: relative;
    padding-left: 1.5rem;
}
.order-timeline::before {
    content: '';
    position: absolute;
    left: 0.4rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    padding-bottom: 1rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.1rem;
    top: 0.35rem;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
}
.timeline-item .timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.timeline-item .timeline-status {
    font-weight: 600;
}

/* --- Admin Event Timeline (horizontal, clickable) --- */
.event-timeline-wrap {
    overflow-x: auto;
    padding: 1.25rem 0 0.5rem;
}
.etl-track {
    display: flex;
    align-items: flex-start;
    position: relative;
    min-width: min-content;
    padding: 0 0.5rem;
}
/* the connecting line runs through the dot row */
.etl-track::before {
    content: '';
    position: absolute;
    left: 1.75rem;
    right: 1.75rem;
    top: calc(1.25rem + 11px); /* date row height + half the dot */
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.etl-node {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 112px;
    padding: 0 0.25rem;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    color: var(--text-muted);
}
.etl-node .etl-date {
    height: 1.25rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.etl-node .etl-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-raised);
    border: 2px solid var(--etl-c, var(--text-muted));
    color: var(--etl-c, var(--text-muted));
    font-size: 0.7rem;
    transition: transform .12s ease, box-shadow .12s ease;
}
.etl-node:hover .etl-dot,
.etl-node:focus-visible .etl-dot {
    transform: scale(1.25);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18);
}
.etl-node .etl-label {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    line-height: 1.15;
    text-align: center;
    max-width: 104px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Vertical variant (admin Disputes): one row per event, the line runs down
   through the dot column and labels get the full width instead of two lines. */
.event-timeline-vertical {
    overflow-x: visible;
    padding: 0.5rem 0 0;
}
.event-timeline-vertical .etl-track {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    padding: 0;
}
.event-timeline-vertical .etl-track::before {
    left: calc(7.5rem + 0.75rem + 11px - 1px); /* date column + gap + half the dot */
    right: auto;
    top: 0.75rem;
    bottom: 0.75rem;
    width: 2px;
    height: auto;
}
.event-timeline-vertical .etl-node {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
    text-align: left;
}
.event-timeline-vertical .etl-node .etl-date {
    flex: 0 0 7.5rem;
    height: auto;
    text-align: right;
}
.event-timeline-vertical .etl-node .etl-dot { flex: 0 0 22px; }
.event-timeline-vertical .etl-node .etl-label {
    margin-top: 0;
    font-size: 0.85rem;
    text-align: left;
    max-width: none;
    display: block;
    color: var(--text);
}
.event-timeline-vertical .etl-node:hover .etl-label,
.event-timeline-vertical .etl-node:focus-visible .etl-label { text-decoration: underline; }

/* category colors as a custom property shared by the dot and the legend swatch */
.etl-cat-created   { --etl-c: var(--text-muted); }
.etl-cat-status    { --etl-c: var(--accent); }
.etl-cat-dispute   { --etl-c: var(--danger); }
.etl-cat-financial { --etl-c: var(--warning); }
.etl-cat-milestone { --etl-c: var(--accent); }
.etl-cat-extension { --etl-c: var(--warning); }
.etl-cat-delivery  { --etl-c: var(--accent-hover); }
.etl-cat-completed { --etl-c: var(--success); }
.etl-cat-cancelled { --etl-c: var(--danger); }
.etl-cat-system    { --etl-c: var(--text-muted); }
.etl-cat-reference { --etl-c: var(--danger); }
.etl-cat-download  { --etl-c: var(--party-buyer); }

/* Admin "What Was Agreed" card (Controls/AgreementRecord.ascx). URLs and
   hashes are long unbroken strings, so they wrap anywhere. */
.agreement-table td { word-break: break-word; vertical-align: top; }
.agreement-reference { padding: 0.5rem 0; border-top: 1px solid var(--border); }
.agreement-reference:first-of-type { border-top: 0; }
.agreement-reference-url { word-break: break-all; font-size: 0.875rem; }
.agreement-changes { margin: 0.25rem 0 0; padding-left: 1.1rem; font-size: 0.875rem; }
.agreement-changes li { margin-bottom: 0.2rem; }

/* Admin order messages on the dispute page (Controls/OrderCorrespondence.ascx). */
.order-record-scroll { max-height: 36rem; overflow-y: auto; padding-right: .25rem; }
.order-record-divider {
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    color: var(--danger);
    border-top: 1px dashed var(--danger);
    padding-top: .35rem;
}

.etl-legend { flex-wrap: wrap; }
.etl-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--etl-c, var(--text-muted));
    vertical-align: middle;
    margin-right: 0.3rem;
}

/* event detail modal */
.etl-modal .modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}
.etl-modal .modal-header,
.etl-modal .modal-footer { border-color: var(--border); }
.etl-detail-table { width: 100%; font-size: 0.85rem; }
.etl-detail-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.25rem 0.75rem 0.25rem 0;
    white-space: nowrap;
    vertical-align: top;
    width: 1%;
}
.etl-detail-table td {
    padding: 0.25rem 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.etl-hash { font-family: var(--bs-font-monospace); font-size: 0.8rem; }
.etl-summary { white-space: pre-wrap; }
/* hover card on a timeline node: wider than Bootstrap's 200px default, left-aligned rows */
.etl-tooltip .tooltip-inner {
    max-width: 320px;
    text-align: left;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}
.etl-tooltip .etl-tip-title { font-weight: 600; }
.etl-tooltip .etl-tip-summary { margin: 0.25rem 0; white-space: pre-wrap; }
.etl-tooltip .etl-tip-since { margin-top: 0.25rem; font-weight: 600; }
.etl-meta-badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
    border-radius: 0;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.etl-badge-yes { color: var(--success); border-color: var(--success); }
.etl-badge-no { color: var(--text-muted); }

/* --- Payment Progress Stepper --- */
.payment-stepper {
    display: flex;
    gap: 0;
    align-items: center;
}
.payment-stepper .step {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    border-bottom: 3px solid var(--border);
    color: var(--text-muted);
}
.payment-stepper .step.active {
    border-bottom-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}
.payment-stepper .step.completed {
    border-bottom-color: var(--success);
    color: var(--success);
}

/* --- Blocked checkout card (OrderDetail) ---
   Replaces the Pay button. -todo: the buyer's move; -hold: waiting on the seller or us. Deliberately not
   an .alert, which would read as more boilerplate among the checkout's existing alerts. */
.payment-blocked {
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: 0;
    background: var(--surface-raised);
    padding: 1rem 1.15rem;
}
.payment-blocked-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}
.payment-blocked-icon {
    flex: 0 0 auto;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
}
.payment-blocked-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}
.payment-blocked-body {
    margin: 0 0 0.9rem 0;
    color: var(--text-muted);
    font-size: 0.925rem;
}
.payment-blocked-todo {
    border-left-color: var(--accent);
}
.payment-blocked-todo .payment-blocked-icon {
    background: var(--accent);
    color: var(--accent-contrast);
}
.payment-blocked-hold {
    border-left-color: var(--warning);
}
.payment-blocked-hold .payment-blocked-icon {
    background: var(--warning);
    color: #1a1a1a;
}

/* --- Bulk Actions Bar --- */
.bulk-actions-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

/* --- Inbox conversation rows --- */
.conversation-item {
    transition: var(--transition);
}
.conversation-item:hover {
    background: var(--surface-raised);
}
.conversation-item-unread {
    background: rgba(var(--accent-rgb), 0.07);
}

/* --- Conversation thread (chat bubbles) --- */
/* Scrolling variant for /Conversation, whose send form sits below the thread. */
.message-thread-scroll {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.conversation-message {
    display: flex;
    margin-bottom: 0.75rem;
}
.conversation-message-own {
    justify-content: flex-end;
}
.message-bubble {
    max-width: 75%;
    padding: 0.6rem 0.9rem;
    border-radius: 0;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    overflow-wrap: break-word;
    min-width: 0;
}
.conversation-message-own .message-bubble {
    background: rgba(var(--accent-rgb), 0.16);
    border-color: rgba(var(--accent-rgb), 0.35);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 4px;
}
/* Brief flash on newly arrived messages. */
.conversation-message-new .message-bubble {
    animation: message-arrive 1.8s ease-out;
}
@keyframes message-arrive {
    0% { background: rgba(var(--accent-rgb), 0.45); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.5); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}
/* Flat-row variant of the arrival flash (OrderDetail message thread). */
.message-row-new {
    animation: message-arrive-flat 1.8s ease-out;
}
@keyframes message-arrive-flat {
    0% { background: rgba(var(--accent-rgb), 0.25); }
    100% { background: transparent; }
}

/* --- Mobile-Responsive Messaging --- */
@media (max-width: 576px) {
    .conversation-item {
        padding: 0.75rem !important;
        gap: 0.5rem !important;
    }
    .message-bubble {
        max-width: 90%;
        font-size: 0.85rem;
    }
    .message-send-form .row {
        flex-direction: column;
    }
    .message-send-form .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    .message-thread {
        -webkit-overflow-scrolling: touch;
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* --- Collapsible form-section toggles --- */
.section-collapse-toggle {
    flex-shrink: 0;
}
.section-collapse-toggle .section-chevron {
    display: inline-block;
    transition: transform var(--transition);
}
.section-collapse-toggle.collapsed .section-chevron {
    transform: rotate(-90deg);
}

/* --- Saved Search Chips --- */
.saved-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.saved-search-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   FindACommissioner.aspx
   Guided onramp: one question per screen, answers as big square cards.
   ============================================================ */
.finder-shell {
    max-width: 900px;
    margin: 1.5rem auto 4rem;
    padding: 0 1rem;
}

.finder-step {
    animation: finder-fade-in 220ms ease;
}

@keyframes finder-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.finder-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    color: var(--accent);
    margin: 0 0 0.4rem;
    font-weight: 600;
}

.finder-question {
    font-weight: 800;
    font-size: 2.4rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 0.6rem;
    color: var(--text);
}

.finder-sub {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0 0 1.75rem;
}

.finder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* Lanes stay on one row on a laptop, dropping to two then one as the viewport narrows. */
.finder-grid-lanes {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.finder-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    aspect-ratio: 1 / 1;
    width: 100%;
    padding: 1rem;
    overflow: hidden;
    color: var(--text);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 0;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.finder-card:hover,
.finder-card:focus-visible {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
    transform: translateY(-2px);
    outline: none;
}
.finder-card:active {
    transform: translateY(0);
}

.finder-card-label {
    position: relative;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.finder-card-note {
    position: relative;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--text-muted);
}

.finder-card-muted {
    background: transparent;
    border-style: dashed;
}
.finder-card-muted .finder-card-label {
    color: var(--text-muted);
    font-weight: 400;
}
.finder-card-muted:hover .finder-card-label,
.finder-card-muted:focus-visible .finder-card-label {
    color: var(--text);
}

/* Photo tiles, matching the landing page's category cards. */
.finder-card-photo {
    align-items: flex-start;
    justify-content: flex-end;
    text-align: left;
    padding: 1.25rem;
    background: var(--surface);
}
.finder-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.finder-card-photo:hover .finder-card-img,
.finder-card-photo:focus-visible .finder-card-img {
    transform: scale(1.05);
}
.finder-card-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 55%, rgba(0,0,0,.15) 100%);
}
.finder-card-photo .finder-card-label {
    font-size: 2rem;
    font-weight: 500;
    color: #fff;
}
.finder-card-photo .finder-card-note {
    color: rgba(255, 255, 255, 0.75);
}

.finder-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.25rem 0;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: color var(--transition);
}
.finder-back::before {
    content: '\2190\00a0\00a0';
}
.finder-back:hover,
.finder-back:focus {
    color: var(--accent);
    outline: none;
}

.finder-footnote {
    margin: 1.5rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.finder-skip {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    transition: color var(--transition);
}
.finder-skip:hover,
.finder-skip:focus {
    color: var(--accent);
    outline: none;
}

@media (max-width: 575.98px) {
    .finder-question { font-size: 1.9rem; }
    .finder-card-photo .finder-card-label { font-size: 1.5rem; }
    .finder-grid { gap: 0.75rem; }
    /* Letterbox so full-width squares don't push later lanes off screen. */
    .finder-grid-lanes .finder-card { aspect-ratio: 16 / 9; }
}

/* ===== Live password requirements (Controls/PasswordRequirements.ascx) =====
   Instructions, not errors: unmet rows are muted, never red. */
.pw-req {
    margin-top: 0.5rem;
}

.pw-req-heading {
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.pw-req-item {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.75;
    transition: color var(--transition), opacity var(--transition);
}

.pw-req-mark {
    flex: 0 0 auto;
    width: 1em;
    text-align: center;
    color: var(--text-muted);
    transition: color var(--transition);
}
.pw-req-mark::before { content: '\25CB'; }

.pw-req-note {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.pw-req-item.is-met {
    color: var(--text);
    opacity: 1;
}
.pw-req-item.is-met .pw-req-mark {
    color: var(--success);
}
.pw-req-item.is-met .pw-req-mark::before {
    content: '\2713';
    display: inline-block;
    animation: pw-req-tick 200ms ease-out;
}

/* Short pop so a flip is noticed from the input box. */
@keyframes pw-req-tick {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .pw-req-item.is-met .pw-req-mark::before { animation: none; }
}

/* ============================================================
   Dark-theme gaps in Bootstrap's light defaults

   Components Site.css doesn't override keep a light palette under near-white text.
   ============================================================ */

/* Bootstrap's #e9ecef disabled background under var(--text) is about 1:1, so a value reads as empty. */
.form-control:disabled,
.form-select:disabled {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-muted);
    opacity: 1;
}

/* Prefix/suffix chips sit flush against a themed input, so a #e9ecef chip
   next to a #161618 field looks like a rendering fault. */
.input-group-text {
    background: var(--surface-raised);
    border-color: var(--border);
    color: var(--text);
}

/* Bootstrap's helper text is #6c757d, a grey chosen against white. On this
   background it drops to about 4:1. */
.form-text {
    color: var(--text-muted);
}

/* Redefine the list-group custom properties so every variant picks up the theme at once. */
.list-group {
    --bs-list-group-color: var(--text);
    --bs-list-group-bg: var(--surface);
    --bs-list-group-border-color: var(--border);
    --bs-list-group-action-color: var(--text);
    --bs-list-group-action-hover-color: var(--text);
    --bs-list-group-action-hover-bg: var(--surface-raised);
    --bs-list-group-action-active-color: var(--text);
    --bs-list-group-action-active-bg: var(--surface-raised);
    --bs-list-group-active-color: var(--accent-contrast);
    --bs-list-group-active-bg: var(--accent);
    --bs-list-group-active-border-color: var(--accent);
    --bs-list-group-disabled-color: var(--text-muted);
    --bs-list-group-disabled-bg: var(--surface);
}

/* Bootstrap's #e2e3e5 alert-secondary is a near-white slab, and any <p> or link inside it
   picks up the theme's light text, which all but disappears on it. */
.alert-secondary,
.alert-light,
.alert-primary,
.alert-dark {
    background: var(--surface-raised);
    color: var(--text);
}
.alert-secondary p,
.alert-light p,
.alert-primary p,
.alert-dark p {
    color: var(--text);
}

/* Bootstrap darkens .alert-link per variant (#523e02 on warning and so on), which
   assumes a pale alert. Ours are translucent over near-black, so follow the alert's text. */
.alert .alert-link {
    color: inherit;
    text-decoration: underline;
}

/* The "Choose files" button inside a file input is a #e9ecef chip otherwise. */
.form-control::file-selector-button {
    background-color: var(--surface-raised);
    color: var(--text);
    border-color: var(--border);
}
.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
    background-color: var(--border);
}

.progress {
    --bs-progress-bg: var(--surface-raised);
    --bs-progress-bar-bg: var(--accent);
}

/* Unticked boxes were bright white squares, and the switch knob is drawn at 25% black,
   which is invisible here. */
.form-check-input {
    background-color: var(--surface);
    border-color: var(--text-muted);
}
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--accent);
    border-color: var(--accent);
}
.form-check-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.25);
}
.form-switch .form-check-input,
.form-switch .form-check-input:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23a0a0a8'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.btn-outline-danger {
    border-color: var(--danger);
    color: var(--danger);
    background: transparent;
}
.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

/* --- Order draft: decision bar (OrderDetail) --- */
.draft-decision {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}
.draft-decision-pending {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .25);
}

/* --- Dispute thread (admin Disputes, DisputeDetail) --- */
.dispute-turn {
    background: var(--surface-raised);
    border-left: 3px solid var(--warning);
    border-radius: var(--radius);
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}
.dispute-turn-you { border-left-color: var(--accent); }
.dispute-thread { display: flex; flex-direction: column; gap: .75rem; }
.dispute-entry {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem 1rem;
}
.dispute-entry-arbiter { border-left: 3px solid var(--accent); }
.dispute-entry-decision { border-left: 3px solid var(--success); }
.dispute-entry-system {
    background: transparent;
    border-style: dashed;
    color: var(--text-muted);
    font-size: .9rem;
}
.dispute-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: baseline;
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: .35rem;
}
.dispute-entry-author { color: var(--text); font-weight: 600; }
.dispute-entry-body { overflow-wrap: anywhere; }
.dispute-entry-seen { font-size: .8rem; color: var(--text-muted); margin-top: .4rem; }
.dispute-evidence { list-style: none; padding: 0; margin: .5rem 0 0; font-size: .9rem; }
.dispute-evidence li { overflow-wrap: anywhere; }
.dispute-evidence-meta { color: var(--text-muted); font-size: .8rem; margin-left: .35rem; }
.dispute-kind {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 0 .4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.dispute-kind-request { border-color: var(--warning); color: var(--warning); }

/* Buyer and seller colours on the admin dispute page. Everything a party wrote
   or uploaded, and everything that lands with them (an input request, the
   Release or Refund outcome, its transaction), carries the same colour. Kept
   clear of --accent (arbiter), --success (decision) and --warning (request). */
.party-tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.4;
    padding: 0 .4rem;
    border-radius: var(--radius);
    border: 1px solid currentColor;
    vertical-align: .08em;
}
.party-tag-buyer, .party-text-buyer { color: var(--party-buyer); }
.party-tag-seller, .party-text-seller { color: var(--party-seller); }
.party-tag-buyer { background: rgba(56,189,248,.12); }
.party-tag-seller { background: rgba(244,114,182,.12); }
.dispute-entry-buyer, .dispute-turn-buyer { border-left: 3px solid var(--party-buyer); }
.dispute-entry-seller, .dispute-turn-seller { border-left: 3px solid var(--party-seller); }
.dispute-kind-request.party-text-buyer { border-color: var(--party-buyer); }
.dispute-kind-request.party-text-seller { border-color: var(--party-seller); }
.party-select-buyer { border-color: var(--party-buyer); box-shadow: inset 4px 0 0 var(--party-buyer); }
.party-select-seller { border-color: var(--party-seller); box-shadow: inset 4px 0 0 var(--party-seller); }
.party-key { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin-bottom: 1rem; font-size: .9rem; }

/* --- Written decisions (admin Disputes, ArbitrationDecisions) --- */
.rule-picker {
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .5rem .75rem;
}
.rule-picker-list label { margin-left: .4rem; }
.log-admin-entry {
    border-left: 3px solid var(--border);
    padding-left: .75rem;
    overflow-wrap: anywhere;
}
.decision-filter { color: var(--text-muted); }
.decision-card { max-width: 52rem; }
.decision-card h3 { margin-top: .5rem; }
.decision-card p { overflow-wrap: anywhere; }
.decision-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .85rem;
    color: var(--text-muted);
}
.decision-outcome { color: var(--text); font-weight: 600; }
.decision-card-retracted { opacity: .6; }

/* --- Listing media picker (CreateListing) and cover badge (EditListing) --- */
.media-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: .5rem;
}
.media-pick-grid:empty { display: none; }
.media-pick-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--surface-raised);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    overflow: hidden;
    text-align: left;
}
button.media-pick-tile { cursor: pointer; }
button.media-pick-tile:hover { border-color: var(--accent-hover); }
.media-pick-tile.is-cover { border-color: var(--accent); }
.media-pick-tile.is-rejected { opacity: .55; border-style: dashed; }
.media-pick-tile img,
.media-pick-video {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.media-pick-video {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: .8rem;
}
.media-pick-name {
    padding: .15rem .35rem;
    font-size: .7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.media-pick-tile.is-rejected .media-pick-name { color: var(--danger); }
.media-pick-badge {
    position: absolute;
    top: .3rem;
    left: .3rem;
}

/* ---- Buyer request flow: ViewListing mobile bar, RequestCommission price and total ---- */
.mobile-request-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-top: .75rem;
    padding: .5rem .75rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 0;
}

.price-fixed-view {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .75rem;
}

.pay-after-accept-line {
    font-size: .9rem;
}

/* ===== Return-to-task prompts (Manage, ContactSeller) ===== */
.return-prompt {
    border-color: var(--warning);
    border-width: 2px;
}

/* ===== Account settings (Account/Manage and its tabs) =====
   A settings row is the label and help on the left, the current state's action on
   the right. Below 576px the action drops under the text at full width, so every
   button is a full-width tap target. */
.manage-page {
    max-width: 760px;
    margin: 0 auto;
}

.manage-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.settings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}
.settings-row:first-of-type,
.alert + .settings-row {
    border-top: 0;
    padding-top: .25rem;
}
.settings-row:last-child {
    padding-bottom: 0;
}

/* Something here needs doing (an unconfirmed or missing email). */
.settings-row-attention {
    border-left: 3px solid var(--warning);
    padding-left: .85rem;
}

.settings-row-text {
    flex: 1 1 18rem;
    min-width: 0;
}

.settings-row-title {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .15rem;
}
.form-switch .settings-row-title {
    display: inline;
}

.settings-row-value {
    color: var(--text);
    overflow-wrap: anywhere;
}

.settings-row-help {
    font-size: .85rem;
    color: var(--text-muted);
    margin: .15rem 0 0;
}

.settings-row-action {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

/* An inline form that opens inside a row takes the whole width. */
.settings-row-edit {
    flex: 1 1 100%;
}

.settings-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.settings-inline-form .settings-input {
    flex: 1 1 14rem;
}

.settings-input {
    max-width: 28rem;
}

.settings-select {
    width: auto;
    min-width: 9rem;
}

/* Settings tabs (Controls/ManageNav): the site's hard-edged buttons, not Bootstrap's
   blue pills. The current tab is the Sky accent with the flat offset shadow .btn-primary
   uses. The strip scrolls sideways on a phone instead of wrapping, and overflow clips,
   so the padding leaves room for that shadow. */
.manage-nav {
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0 4px 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.manage-nav::-webkit-scrollbar {
    display: none;
}
.manage-nav .nav-link {
    white-space: nowrap;
    padding: 0.45rem 1rem;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.manage-nav .nav-link:hover,
.manage-nav .nav-link:focus {
    border-color: var(--accent);
    color: var(--accent);
}
.manage-nav .nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.manage-nav .nav-link.active,
.manage-nav .nav-link.active:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
    box-shadow: 4px 4px 0 var(--shadow-flat);
}

@media (max-width: 575.98px) {
    .manage-header .btn {
        width: 100%;
    }
    .settings-row-action {
        flex: 1 1 100%;
    }
    .settings-row-action .btn,
    .settings-row-action .settings-select,
    .settings-inline-form .btn {
        flex: 1 1 auto;
    }
    .settings-input {
        max-width: none;
    }
}

.contact-sent {
    max-width: 600px;
}

/* --- Order detail: buyer next step (OrderDetail) --- */
.next-step {
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 0;
    background: var(--surface-raised);
    padding: 0.85rem 1.1rem;
}
.next-step-text {
    font-size: 1.05rem;
}
.order-more-toggle::after {
    content: " \25BE";
    font-size: 0.8em;
}

/* --- Browse storefront: top bar, toggle, pills, load-more --- */
.browse-topbar {
    margin-bottom: 1.25rem;
}
.browse-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.browse-search {
    flex: 1 1 220px;
    min-width: 150px;
}
.browse-sort {
    flex: 0 0 auto;
    width: auto;
}
.browse-filters-btn {
    flex: 0 0 auto;
}

/* Listings | Creators segmented toggle */
.browse-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.browse-toggle-btn {
    padding: 0.35rem 0.9rem;
    border-radius: calc(var(--radius) - 2px);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}
.browse-toggle-btn:hover {
    color: var(--text);
}
.browse-toggle-btn.is-active {
    background: var(--accent);
    color: var(--accent-contrast);
}

/* Category / subcategory pills */
.browse-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}
.browse-pills-sub {
    margin-top: 0.5rem;
}
.browse-pill {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 0;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.2;
    cursor: pointer;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.browse-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.browse-pill.is-active,
.browse-pill.is-active:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
}
.browse-pills-sub .browse-pill {
    padding: 0.28rem 0.7rem;
    font-size: 0.8rem;
}

/* Category criteria facet: one select per criterion, under the subcategory pills */
.browse-criteria {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
    margin-top: 0.6rem;
}
.browse-criteria-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 9rem;
}

/* Load more */
.browse-loadmore-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}
.browse-loadmore {
    min-width: 200px;
}
.browse-loadmore.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Secondary listing-card meta: freshness and views, deliberately small and muted
   so they read as background signal rather than headline (see BrowseCardRenderer). */
.listing-card-meta-secondary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.listing-card-meta-secondary .badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25em 0.5em;
}

/* Last-seen pill (Helper.FormatFreshnessBadge) everywhere it appears: Browse cards,
   creator cards, ViewListing, Profile. */
.freshness-badge {
    font-weight: 600;
}

/* The exact last-seen time under the pill on ViewListing. */
.freshness-exact {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.listing-card-meta-secondary .listing-card-views {
    margin-left: auto;
}

/* ============================================================
   Theme preview (admins only)
   Site.Master renders the picker and the <head> script that sets
   html[data-theme-preview] only for an admin, so these blocks never
   apply for anyone else. A theme is a set of token overrides on the
   root element; per-selector rules are kept to the few things tokens
   can't express. Remove the losers when a scheme is chosen.
   ============================================================ */
.site-theme-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.site-theme-preview select {
    flex: 1;
    min-width: 0;
    background: var(--surface-raised);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.2rem 0.4rem;
    font-size: 0.78rem;
}
.site-theme-swatch {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 0;
    border: 1px solid var(--border);
}

/* --- Brutalist edges ---
   Every card-like surface gets the same hard 2px edge. Kept in one place,
   after the component rules it overrides, so the look is one edit. */
.card,
.listing-card,
.creator-card,
.stat-card,
.cta-panel,
.step-card,
.contact-hero,
.onboarding-card,
.hero,
.ai-disclosure-cards label {
    border: 2px solid var(--border-strong);
}
.card:hover,
.listing-card:hover,
.creator-card:hover {
    transform: translate(-2px, -2px);
}
.form-control,
.form-select {
    border-width: 2px;
}

/* --- Mascots ---
   Rough placement sketches until the commissioned art arrives: Kon (the
   creator) on empty and lost pages, Rin (keeps the money) beside held
   payments. Swap the SVGs in Content/images/mascots/ for the real art. */
.mascot {
    display: block;
    flex: none;
    width: 72px;
    height: 72px;
}
.mascot-lg {
    width: 160px;
    height: 160px;
}
.hero-card {
    position: relative;
    z-index: 1;
    flex: none;
    width: 320px;
    margin: 2rem 2.5rem 2rem auto;
    padding: 1.25rem;
    background: var(--surface);
    border: 2px solid var(--border-strong);
    box-shadow: 8px 8px 0 var(--accent);
    transform: rotate(1.5deg);
}
.held-note {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border: 2px solid var(--held);
    background: rgba(185, 168, 255, 0.08);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.held-note .mascot {
    width: 56px;
    height: 56px;
}
.held-stamp {
    flex: none;
    border: 3px solid var(--held);
    color: var(--held);
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.1rem 0.5rem;
    transform: rotate(-10deg);
}

/* Orange primary. Warning moves from amber to yellow so an orange button
   and a warning don't read as the same thing. */
html[data-theme-preview="neon-orange"] {
    --bg: #0b0b10;
    --surface: #13131b;
    --surface-raised: #1b1b26;
    --border: #2a2a3a;
    --text: #ececf1;
    --text-muted: #a3a3b4;
    --accent: #ff7a1a;
    --accent-hover: #ff9447;
    --accent-rgb: 255, 122, 26;
    --accent-contrast: #0b0b10;
    --banner-deep: #2b1406;
    --banner-mid: #8a3a08;
    --warning: #facc15;
    --party-buyer: #22d3ee;
    --party-seller: #f472b6;
}

/* Cyan primary. Buyer moves off cyan, since buyer-coloured text would
   otherwise read as a link. */
html[data-theme-preview="neon-cyan"] {
    --bg: #080c10;
    --surface: #0f151b;
    --surface-raised: #161e26;
    --border: #22303b;
    --text: #e6f4f8;
    --text-muted: #9cb0ba;
    --accent: #00e5ff;
    --accent-hover: #66efff;
    --accent-rgb: 0, 229, 255;
    --accent-contrast: #04141a;
    --banner-deep: #04222a;
    --banner-mid: #00707e;
    --party-buyer: #ff9a3c;
    --party-seller: #f472b6;
}

/* Orange actions, cyan links, glow, sharp corners and a display face on
   headings. Orbitron loads only for admins (Site.Master head). */
html[data-theme-preview="cyberpunk"] {
    --bg: #07070d;
    --surface: #0f0f1c;
    --surface-raised: #171729;
    --border: #2a2a48;
    --text: #ecebff;
    --text-muted: #9e9cc4;
    --accent: #ff6b1a;
    --accent-hover: #ff8c47;
    --accent-rgb: 255, 107, 26;
    --accent-contrast: #07070d;
    --neon-link: #22e4ff;
    --neon-link-hover: #7af0ff;
    --banner-deep: #1a0830;
    --banner-mid: #c2185b;
    --warning: #facc15;
    --party-buyer: #a78bfa;
    --party-seller: #f472b6;
    --radius: 2px;
    --shadow-card-hover: 0 0 18px rgba(var(--accent-rgb), .25), 0 0 0 1px rgba(var(--accent-rgb), .45);
}
/* :where() keeps these at the specificity of the base rules they follow,
   so .btn and other classed links keep their own colours. */
:where(html[data-theme-preview="cyberpunk"]) a { color: var(--neon-link); }
:where(html[data-theme-preview="cyberpunk"]) a:hover { color: var(--neon-link-hover); }
:where(html[data-theme-preview="cyberpunk"]) :is(h1, h2, h3, .site-brand, .site-footer-brand) {
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
}
html[data-theme-preview="cyberpunk"] h1 {
    text-shadow: 0 0 14px rgba(var(--accent-rgb), .35);
}
html[data-theme-preview="cyberpunk"] .site-brand {
    text-shadow: 0 0 10px rgba(var(--accent-rgb), .55);
}
html[data-theme-preview="cyberpunk"] .btn-primary {
    box-shadow: 0 0 12px rgba(var(--accent-rgb), .45);
}
html[data-theme-preview="cyberpunk"] .btn-primary:hover,
html[data-theme-preview="cyberpunk"] .btn-primary:focus {
    box-shadow: 0 0 20px rgba(var(--accent-rgb), .7);
}
html[data-theme-preview="cyberpunk"] .form-control:focus,
html[data-theme-preview="cyberpunk"] .form-select:focus {
    box-shadow: 0 0 0 1px var(--neon-link), 0 0 12px rgba(34, 228, 255, .35);
    border-color: var(--neon-link);
}

/* Account/ApiKeyScopes: per-area access radios (RadioButtonList, Flow layout) */
.scope-levels input[type="radio"] {
    margin-right: .25rem;
}
.scope-levels label {
    margin-right: 1rem;
}

/* ============ Dens (cosmetic groups; docs/FOXFIRE_DENS_PLAN.md) ============
   Preset colour keys only (DenNameRules.Colours, permanent like slugs). Never fox gold
   (Kon's art only) and never violet --held (money); nothing in the gold-orange or violet
   range. Dark Harbour text on every fill, with the brutalist 2px edge. */
.den-chip {
    border: 2px solid var(--border-strong);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.8rem;
    white-space: normal;
}
.den-chip:hover { color: var(--bg); filter: brightness(1.08); }
.den-colour-sky { background: #8CCBF0; }
.den-colour-teal { background: #6FD3C7; }
.den-colour-moss { background: #9CC98A; }
.den-colour-rose { background: #F2A7BC; }
.den-colour-coral { background: #F49B8E; }
.den-colour-slate { background: #A9B8C9; }
.den-colour-sand { background: #E3D3B0; }
.den-colour-snow { background: #ECECE9; }
.den-lanterns { white-space: nowrap; }
.den-lantern { color: var(--text-muted); margin-right: 0.15em; }
.den-lantern-lit { color: var(--accent); }

/* Account/Admin/StripeTest: raw Stripe requests and responses */
.stripe-test-id { max-width: 22rem; }
.stripe-test-result { border-top: 2px solid var(--border-strong); padding-top: 0.75rem; }
.stripe-test-value { word-break: break-all; }
.stripe-test-pre {
    max-height: 26rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 0.8rem;
    color: var(--text);
    background: var(--bg);
    border: 2px solid var(--border-strong);
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0 0.5rem;
}
.stripe-test-badge { min-width: 3.5rem; }
.stripe-test-check { background: transparent; color: var(--text); border-color: var(--border); }

/* --- Not found (NotFound.html) ---
   A static page, served for ASP.NET's 404s and IIS's own, so it carries its
   own bar instead of Site.Master's. The bar is --surface, like the real top
   bar, so the brand mark's folded corner reads the same. */
.notfound-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.10) 0%, transparent 60%),
        var(--bg);
}
.notfound-top {
    padding: 0.85rem 1.25rem;
    background: var(--surface);
    border-bottom: 2px solid var(--border-strong);
}
.notfound-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}
.notfound-card {
    width: 100%;
    max-width: 560px;
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--surface);
    border: 2px solid var(--border-strong);
    box-shadow: 8px 8px 0 var(--accent);
}
.notfound-code {
    display: inline-flex;
    gap: 0.06em;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 6rem;
    line-height: 0.9;
    letter-spacing: -0.06em;
    color: var(--text);
}
.notfound-code-accent {
    padding: 0 0.08em;
    background: var(--accent);
    color: var(--accent-contrast);
}
.notfound-mascot {
    display: block;
    width: 120px;
    height: 120px;
    margin: 1.25rem auto 0.5rem;
}
.notfound-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.9rem;
    letter-spacing: -0.04em;
    margin-bottom: 0.6rem;
}
.notfound-text {
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 1.5rem;
}
.notfound-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.notfound-search .form-control { flex: 1; min-width: 0; }
.notfound-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
@media (max-width: 575px) {
    .notfound-card { padding: 2rem 1.25rem; box-shadow: 4px 4px 0 var(--accent); }
    .notfound-code { font-size: 4.5rem; }
    .notfound-title { font-size: 1.5rem; }
    .notfound-links .btn { flex: 1 1 100%; }
}

/* Eye button on a password box (see the pw-toggle handler in Site.js): the open eye
   while the password is hidden, the slashed eye once it is shown. The icon is a mask
   so it takes the button's text colour on hover and in dark mode. */
.pw-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 0.875rem;
    padding-right: 0.875rem;
}
.pw-eye {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z'/%3E%3Cpath d='M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z'/%3E%3Cpath d='M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pw-toggle-icon[aria-pressed="true"] .pw-eye {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755q-.247.248-.517.486z'/%3E%3Cpath d='M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829'/%3E%3Cpath d='M3.35 5.47q-.27.24-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755q-.247.248-.517.486z'/%3E%3Cpath d='M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829'/%3E%3Cpath d='M3.35 5.47q-.27.24-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12z'/%3E%3C/svg%3E");
}

/* --- Discord sign-in button ---
   Discord's own blurple and mark, so the button reads as Discord at a glance on a phone.
   The mark is a pseudo-element, so every Discord link only needs the class. */
.btn-discord,
.btn-discord:visited {
    background: #5865F2;
    border-color: #5865F2;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-discord:hover,
.btn-discord:focus,
.btn-discord:active {
    background: #4752C4;
    border-color: #4752C4;
    color: #ffffff;
}

.btn-discord::before {
    content: "";
    flex: 0 0 auto;
    width: 1.4em;
    height: 1.4em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.873-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.009c.12.1.246.198.373.292a.077.077 0 0 1-.006.127 12.3 12.3 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.331c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* A one-line pitch under a Discord button, for the crowd that lives there. */
.discord-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0.35rem 0 0;
}

/* --- Phones ---
   .section's 3rem padding, plus the inline margins many pages give it, put the first line
   of content a third of the way down a 812px screen under the bar and banner. */
@media (max-width: 575.98px) {
    .section {
        padding: 0.5rem 0 1.5rem;
        margin-top: 0 !important;
    }
}

/* Browse's category pills wrap to seven rows on a phone, pushing every listing below the
   fold; there they become one swipeable row (browse.js scrolls the chosen one into view). */
@media (max-width: 767.98px) {
    .browse-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 0 1rem 2px;
        scroll-padding-inline: 1rem;
    }

    .browse-pills::-webkit-scrollbar {
        display: none;
    }

    .browse-pill {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* ViewListing's request bar: on a phone the seller card and its Request button stack under
   the whole left column, so the bar is pinned to the bottom of the screen instead of sitting
   under the title, where it scrolled away and repeated the price shown just below it. */
@media (max-width: 767.98px) {
    .mobile-request-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1020;
        margin: 0;
        padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
        border: 0;
        border-top: 2px solid var(--border-strong);
        background: var(--surface);
    }

    .mobile-request-bar > span {
        font-size: 0.95rem !important;
        line-height: 1.25;
        min-width: 0;
    }

    .mobile-request-bar .btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    body:has(.mobile-request-bar) {
        padding-bottom: 4.5rem;
    }
}

/* The opening banner took three rows (about 150px) on a phone: there it drops the eyebrow
   and keeps text, button and close on one line. */
@media (max-width: 575.98px) {
    .opening-banner-eyebrow {
        display: none;
    }

    .opening-banner-inner {
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .opening-banner-text {
        flex: 1 1 auto;
        flex-basis: auto;
        order: 0;
    }

    .opening-banner-cta {
        order: 0;
        padding: 0.2rem 0.6rem;
    }

    .opening-banner-close {
        margin-left: 0;
    }
}
