/*
 * Theme layer over Bootstrap 5.3. Bootstrap still supplies the grid, the form
 * markup that yii\bootstrap5\ActiveForm emits, and the dropdown behaviour --
 * everything visual is redefined here, mostly by rebinding Bootstrap's own
 * --bs-* variables so its components inherit the theme instead of fighting it.
 */

/* ---------------------------------------------------------------- tokens -- */

:root {
    --paper: #fbf9f6;
    --surface: #ffffff;
    --surface-sunk: #f3efe9;
    --ink: #1f1b18;
    --muted: #6b635c;
    --line: #e7e1d9;
    --line-strong: #d3cabe;

    /* Berry, as in dyed yarn. One accent, used sparingly. */
    --accent: #9a3b62;
    --accent-hover: #7c2e4e;
    --accent-wash: #f6e9ee;

    --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
    --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --step-0: 1rem;
    --step-1: 1.15rem;
    --step-2: clamp(1.35rem, 2.2vw, 1.6rem);
    --step-3: clamp(1.7rem, 3.2vw, 2.3rem);
    --step-4: clamp(2.3rem, 5.5vw, 3.9rem);

    --gutter: clamp(1.25rem, 4vw, 3rem);
    --shell: 1220px;

    --shadow-card: 0 1px 2px rgba(31, 27, 24, 0.04), 0 8px 24px rgba(31, 27, 24, 0.06);

    /* A seam. Used as a rule, never as ornament for its own sake. */
    --stitch: repeating-linear-gradient(90deg, var(--line-strong) 0 9px, transparent 9px 17px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #141210;
        --surface: #1d1a17;
        --surface-sunk: #242019;
        --ink: #f0ebe4;
        --muted: #a79e95;
        --line: #2e2a26;
        --line-strong: #433c35;

        --accent: #e4879f;
        --accent-hover: #f0a3b6;
        --accent-wash: #2b1c22;

        --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    }
}

:root[data-theme="dark"] {
    --paper: #141210;
    --surface: #1d1a17;
    --surface-sunk: #242019;
    --ink: #f0ebe4;
    --muted: #a79e95;
    --line: #2e2a26;
    --line-strong: #433c35;

    --accent: #e4879f;
    --accent-hover: #f0a3b6;
    --accent-wash: #2b1c22;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Hand the tokens to Bootstrap so buttons, inputs and validation states follow
 * along without a separate override for each component. */
:root {
    --bs-body-font-family: var(--font-body);
    --bs-body-bg: var(--paper);
    --bs-body-color: var(--ink);
    --bs-emphasis-color: var(--ink);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--line);
    --bs-primary: var(--accent);
    --bs-link-color: var(--accent);
    --bs-link-hover-color: var(--accent-hover);
    --bs-border-radius: 4px;
    --bs-border-radius-sm: 3px;
    --bs-border-radius-lg: 6px;
    --bs-body-line-height: 1.6;
}

/* ------------------------------------------------------------------ base -- */

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-wrap: balance;
    color: var(--ink);
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

a { text-underline-offset: 0.16em; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.eyebrow {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.lede {
    font-size: var(--step-1);
    color: var(--muted);
    max-width: 58ch;
}

/* ---------------------------------------------------------------- header -- */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.header-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding-block: 1.1rem;
}

.wordmark {
    grid-column: 2;
    justify-self: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.wordmark:hover { color: var(--accent); }
.wordmark .dot { color: var(--accent); }

.header-left {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.header-right {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

/* Icon-only controls: a consistent hit area regardless of glyph width. */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    border-radius: 50%;
    color: var(--ink);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
    background: var(--accent-wash);
    color: var(--accent);
}

.icon-btn svg { width: 20px; height: 20px; }

.header-account {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 0;
    background: transparent;
}

.header-account:hover { background: var(--accent-wash); color: var(--accent); }

.header-account.is-primary {
    background: var(--accent);
    color: #fff;
}

.header-account.is-primary:hover { background: var(--accent-hover); color: #fff; }

.category-nav {
    border-top: 1px solid var(--line);
}

.category-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 2.4rem);
    list-style: none;
    margin: 0;
    padding: 0.7rem 0;
}

.category-nav a {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    padding-block: 0.2rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.category-nav a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.lang-menu .dropdown-toggle {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: transparent;
    border: 0;
    padding: 0.45rem 0.6rem;
}

.lang-menu .dropdown-toggle:hover { color: var(--accent); }

.dropdown-menu {
    --bs-dropdown-bg: var(--surface);
    --bs-dropdown-color: var(--ink);
    --bs-dropdown-link-color: var(--ink);
    --bs-dropdown-link-hover-bg: var(--accent-wash);
    --bs-dropdown-link-hover-color: var(--accent);
    --bs-dropdown-link-active-bg: var(--accent-wash);
    --bs-dropdown-link-active-color: var(--accent);
    --bs-dropdown-border-color: var(--line);
    box-shadow: var(--shadow-card);
}

@media (max-width: 767.98px) {
    .header-bar { padding-block: 0.75rem; }
    .wordmark { font-size: 1.3rem; }
    .category-nav ul {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-inline: var(--gutter);
        scrollbar-width: none;
    }
    .category-nav ul::-webkit-scrollbar { display: none; }
    .header-account .label { display: none; }
}

/* ------------------------------------------------------------------ hero -- */

.hero {
    background: var(--surface-sunk);
    border-bottom: 1px solid var(--line);
    padding-block: clamp(3.5rem, 9vw, 7rem);
    position: relative;
    overflow: hidden;
}

/* A seam along the bottom edge -- the join between two panels, not a flourish. */
.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 2px;
    background-image: var(--stitch);
}

.hero-inner {
    display: grid;
    gap: 1.4rem;
    max-width: 46rem;
    justify-items: start;
}

.hero h1 { margin: 0; }
.hero .lede { margin: 0; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

/* --------------------------------------------------------------- buttons -- */

.btn {
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-hover);
    --bs-btn-hover-border-color: var(--accent-hover);
    --bs-btn-active-bg: var(--accent-hover);
    --bs-btn-active-border-color: var(--accent-hover);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
}

.btn-quiet {
    border: 1px solid var(--line-strong);
    color: var(--ink);
    background: transparent;
}

.btn-quiet:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

/* ------------------------------------------------------------- sections -- */

.section {
    padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-head h2 { margin: 0; }
.section-head .lede { margin: 0.5rem 0 0; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1.25rem;
}

.craft-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.5rem 1.4rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    min-height: 200px;
}

.craft-card h3 { margin: 0; font-size: var(--step-1); }

.craft-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.craft-card .glyph {
    width: 32px;
    height: 32px;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.craft-card .status {
    margin-top: auto;
    padding-top: 0.8rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

/* --------------------------------------------------------------- promise -- */

.promise {
    background: var(--surface);
    border-block: 1px solid var(--line);
}

.promise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: clamp(1.5rem, 4vw, 3rem);
}

.promise-item h3 {
    font-size: var(--step-1);
    margin: 0 0 0.5rem;
}

.promise-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.promise-item .glyph {
    width: 30px;
    height: 30px;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

/* ----------------------------------------------------------- designer cta -- */

.cta {
    background: var(--ink);
    /* Set explicitly: descendants inherit from here, and inheriting --ink onto an
     * --ink ground is invisible text. */
    color: var(--paper);
    border-radius: 14px;
    padding: clamp(2rem, 5vw, 3.5rem);
    display: grid;
    gap: 1.1rem;
    justify-items: start;
}

.cta h2 { color: var(--paper); margin: 0; }

.cta .eyebrow { color: var(--paper); opacity: 0.65; }

.cta p {
    color: var(--line-strong);
    margin: 0;
    max-width: 52ch;
}

.cta .btn-quiet {
    border-color: var(--muted);
    color: var(--paper);
}

.cta .btn-quiet:hover {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
}

/* ------------------------------------------------------------------ auth -- */

.narrow-page {
    max-width: 30rem;
    margin-inline: auto;
    padding-block: clamp(2.5rem, 7vw, 4.5rem);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.panel h1 {
    font-size: var(--step-3);
    margin: 0 0 0.4rem;
}

.panel .sub {
    color: var(--muted);
    margin-bottom: 1.6rem;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.form-control {
    background: var(--paper);
    border: 1px solid var(--line-strong);
    color: var(--ink);
    padding: 0.7rem 0.9rem;
    border-radius: 6px;
}

.form-control:focus {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-wash);
    color: var(--ink);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

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

.panel .btn-primary { width: 100%; margin-top: 0.4rem; }

/* Except in a button row: the full-width rule above is meant for the one button
   under a login form, and it pushes every neighbour onto its own line. */
.panel .hero-actions .btn-primary { width: auto; margin-top: 0; }

.panel-foot {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: space-between;
}

/* ---------------------------------------------------------------- alerts -- */

.alert {
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    background: var(--surface);
    color: var(--ink);
    border-radius: 8px;
}

.alert-danger { border-left-color: #c0392b; }
.alert-success { border-left-color: #2f7d51; }

/* Bootstrap's own red is illegible on the dark surface, and its is-invalid
 * border colour does not follow --bs-danger once the surfaces change. */
.invalid-feedback { color: #d9534f; }
.form-control.is-invalid { border-color: #d9534f; }

/* ---------------------------------------------------------------- footer -- */

.site-footer {
    margin-top: auto;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
}

.footer-grid {
    display: grid;
    /* min(100%, X) keeps a single track from exceeding the container. It is not
     * enough here: two tracks of 220 and 150 still want 370px, which is more than
     * a phone has, and a grid track never shrinks below its minimum. Hence the
     * explicit breakpoints below rather than relying on auto-fit alone. */
    grid-template-columns: minmax(min(100%, 220px), 1.4fr) repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: 2rem;
}

.footer-grid h4 {
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.9rem;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-grid a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.94rem;
}

.footer-grid a:hover { color: var(--accent); text-decoration: underline; }

.footer-wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.footer-wordmark .dot { color: var(--accent); }

.footer-blurb {
    color: var(--muted);
    font-size: 0.94rem;
    max-width: 34ch;
    margin: 0.7rem 0 0;
}

.footer-base {
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 0.84rem;
}

/* ------------------------------------------------------------- utilities -- */

.breadcrumb {
    --bs-breadcrumb-divider-color: var(--muted);
    --bs-breadcrumb-item-active-color: var(--muted);
    font-size: 0.86rem;
    margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.placeholder-note {
    background: var(--accent-wash);
    border: 1px dashed var(--line-strong);
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    color: var(--ink);
    font-size: 0.94rem;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ------------------------------------------------------------- catalogue -- */

:root {
    /* Placeholder covers are drawn from a per-product hue; only the lightness
     * changes between themes, so one hue works on both grounds. */
    --cover-l1: 88%;
    --cover-l2: 78%;
    --cover-s: 40%;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --cover-l1: 28%;
        --cover-l2: 20%;
        --cover-s: 30%;
    }
}

:root[data-theme="dark"] {
    --cover-l1: 28%;
    --cover-l2: 20%;
    --cover-s: 30%;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: clamp(1rem, 2.5vw, 1.75rem);
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.product-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg,
            hsl(var(--h) var(--cover-s) var(--cover-l1)),
            hsl(calc(var(--h) + 38) var(--cover-s) var(--cover-l2)));
    transition: transform 0.18s ease;
}

/* The seam again, this time as texture across the placeholder. */
.product-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    /* A soft vignette instead of the seam motif: tiled, the dashes stack
     * into columns and read as striped wallpaper. The seam stays where it
     * works, as a single rule along the hero edge. */
    background: radial-gradient(120%% 90%% at 30%% 15%%, rgba(255,255,255,0.28), transparent 60%%);
}

.product-card:hover .product-cover { transform: translateY(-3px); }

.product-type {
    position: absolute;
    z-index: 1;
    left: 0.7rem;
    top: 0.7rem;
    background: var(--surface);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.product-title {
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
    margin: 0;
}

.product-title a { color: var(--ink); text-decoration: none; }
.product-title a:hover { color: var(--accent); }

.product-designer { margin: 0; font-size: 0.85rem; }
.product-designer a { color: var(--muted); text-decoration: none; }
.product-designer a:hover { color: var(--accent); text-decoration: underline; }

.product-price {
    margin: 0.2rem 0 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- filters -- */

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.filter-row-quiet { margin-bottom: 2rem; }

/* The search form sits directly above its facets and needs the air. */
.search-form + .filter-row { margin-top: 1.75rem; }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.95rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    background: transparent;
}

.chip:hover { border-color: var(--accent); color: var(--accent); }

.chip.is-on {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.chip-count {
    margin-left: 0.4rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
}

.count {
    color: var(--muted);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------- product detail -- */

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

@media (max-width: 800px) {
    .product-detail { grid-template-columns: 1fr; }
}

.product-detail-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg,
            hsl(var(--h) var(--cover-s) var(--cover-l1)),
            hsl(calc(var(--h) + 38) var(--cover-s) var(--cover-l2)));
}

.product-detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    /* A soft vignette instead of the seam motif: tiled, the dashes stack
     * into columns and read as striped wallpaper. The seam stays where it
     * works, as a single rule along the hero edge. */
    background: radial-gradient(120%% 90%% at 30%% 15%%, rgba(255,255,255,0.28), transparent 60%%);
}

.product-detail-body { display: flex; flex-direction: column; gap: 1rem; }
.product-detail-body h1 { font-size: var(--step-3); margin: 0; }
.product-detail-body .lede { margin: 0; }

.product-detail-designer { margin: 0; color: var(--muted); }
.product-detail-designer a { color: var(--ink); font-weight: 600; }

.spec {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    margin: 0.5rem 0 0;
    padding: 1rem 0;
    border-block: 1px solid var(--line);
}

.spec dt {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.spec dd { margin: 0; font-size: 0.95rem; }

.buybox {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.buybox-price {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-right: 0.5rem;
}

.buybox-note { margin: 0; font-size: 0.88rem; color: var(--muted); }

.prose {
    max-width: 66ch;
    margin-top: clamp(2.5rem, 6vw, 4rem);
    color: var(--ink);
}

.prose h2 { margin: 0 0 0.8rem; }

/* ------------------------------------------------------------ shop header -- */

.shop-header {
    background: var(--surface-sunk);
    border-bottom: 1px solid var(--line);
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.shop-header h1 { margin: 0.4rem 0 0.6rem; font-size: var(--step-3); }
.shop-header .lede { margin: 0; }

.shop-bio { margin-top: 0; margin-bottom: 2.5rem; }

/* ------------------------------------------------------------- pagination -- */

.pagination {
    --bs-pagination-color: var(--ink);
    --bs-pagination-bg: transparent;
    --bs-pagination-border-color: var(--line);
    --bs-pagination-hover-color: var(--accent);
    --bs-pagination-hover-bg: var(--accent-wash);
    --bs-pagination-hover-border-color: var(--line-strong);
    --bs-pagination-active-bg: var(--accent);
    --bs-pagination-active-border-color: var(--accent);
    --bs-pagination-disabled-color: var(--muted);
    --bs-pagination-disabled-bg: transparent;
    --bs-pagination-disabled-border-color: var(--line);
}

/* -------------------------------------------------------- category tiles -- */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

.category-tile {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    text-decoration: none;
    transition: transform 0.18s ease;
}

.category-tile:hover { transform: translateY(-3px); }

.category-tile-art {
    display: block;
    aspect-ratio: 5 / 3;
    background:
        linear-gradient(135deg,
            hsl(var(--h) var(--cover-s) var(--cover-l1)),
            hsl(calc(var(--h) + 38) var(--cover-s) var(--cover-l2)));
    position: relative;
}

.category-tile-art::after {
    content: "";
    position: absolute;
    inset: 0;
    /* A soft vignette instead of the seam motif: tiled, the dashes stack
     * into columns and read as striped wallpaper. The seam stays where it
     * works, as a single rule along the hero edge. */
    background: radial-gradient(120%% 90%% at 30%% 15%%, rgba(255,255,255,0.28), transparent 60%%);
}

.category-tile-name {
    display: block;
    padding: 0.85rem 1rem;
    background: var(--surface);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.category-tile:hover .category-tile-name { color: var(--accent); }

/* --------------------------------------------------------- static pages -- */

.page-doc { max-width: 52rem; }
.page-doc h1 { font-size: var(--step-3); margin-bottom: 1.5rem; }

.page-doc .prose { margin-top: 0; max-width: none; }
.page-doc .prose h2 { font-size: var(--step-2); margin: 2.2rem 0 0.6rem; }
.page-doc .prose h2:first-child { margin-top: 0; }
.page-doc .prose p { margin: 0 0 1rem; }
.page-doc .prose ul,
.page-doc .prose ol { margin: 0 0 1rem; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; }
.page-doc .prose li::marker { color: var(--accent); }

/* Deliberately loud. These pages must not reach production looking finished
 * while the text that makes them lawful is still missing. */
.needs-input {
    border-style: solid;
    border-color: var(--accent);
    margin-bottom: 2rem;
}

.legal-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
    margin: 0;
    padding: 0;
}

.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------- basket and lists -- */

.icon-btn { position: relative; }

.icon-btn.has-badge::after {
    content: attr(data-count);
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.line-items {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.line-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.line-item-art {
    flex: 0 0 auto;
    width: 64px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg,
            hsl(var(--h) var(--cover-s) var(--cover-l1)),
            hsl(calc(var(--h) + 38) var(--cover-s) var(--cover-l2)));
}

.line-item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }

.line-item-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.line-item-title:hover { color: var(--accent); }

.line-item-meta { font-size: 0.85rem; color: var(--muted); }

.line-item-price {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.line-item-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.line-item-actions .btn { padding: 0.45rem 1rem; font-size: 0.88rem; }
.line-item-actions .num { opacity: 0.6; font-size: 0.8rem; margin-left: 0.35rem; }

.line-item-remove { margin: 0; }

.link-button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--muted);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
}

.link-button:hover { color: var(--accent); }

.cart-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2rem;
}

.cart-total-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
}

.cart-total {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------- checkout -- */

.checkout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

@media (max-width: 800px) {
    .checkout { grid-template-columns: 1fr; }
}

.checkout-main h1 { font-size: var(--step-3); margin-bottom: 1.5rem; }

.checkout-summary {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.4rem;
    position: sticky;
    top: 7rem;
}

.checkout-summary h2 { font-size: var(--step-1); margin: 0 0 1rem; }

.checkout-summary ul {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkout-summary li,
.checkout-summary dl > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
}

.checkout-summary dl { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.checkout-summary dt, .checkout-summary dd { margin: 0; }
.checkout-summary dt { color: var(--muted); }
.checkout-summary .num { font-variant-numeric: tabular-nums; }

.checkout-summary .is-total {
    border-top: 1px solid var(--line);
    padding-top: 0.6rem;
    margin-top: 0.2rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.checkout-summary .is-total dt { color: var(--ink); }

.receipt { width: 100%; border-collapse: collapse; }
.receipt td { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.receipt .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt tfoot .is-total td { font-weight: 700; border-bottom: 0; }

.dropdown-header {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.5rem 1rem 0.3rem;
}

/* The logout control is a submit button inside the menu, so it needs the same
 * shape as the links beside it. */
.dropdown-menu form { margin: 0; }
.dropdown-menu button.dropdown-item {
    border: 0;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

/* ---------------------------------------------------------- seller area -- */

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.stat {
    background: var(--surface);
    padding: 1.3rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat-note { font-size: 0.86rem; color: var(--muted); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 560px;
}

.data-table th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-sunk);
    padding: 0.6rem 0.9rem;
    white-space: nowrap;
}

.data-table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
}

.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }

.badge-state {
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
}

.badge-state.is-live {
    color: var(--accent);
    border-color: var(--accent);
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 0 1.25rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 0.35rem 1rem;
}

.checkbox-grid label { font-weight: 400; font-size: 0.92rem; }

.lang-heading {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.lang-optional {
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    opacity: 0.8;
}

/* ------------------------------------------------------------- course -- */

.course-facts { color: var(--muted); font-size: 0.92rem; margin: 0.4rem 0 1.2rem; }

.curriculum { list-style: none; margin: 1rem 0 0; padding: 0; }

.curriculum-section + .curriculum-section { margin-top: 1.75rem; }

.curriculum-section h3 {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.6rem;
}

.lesson-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.lesson {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.94rem;
}

.lesson.is-current { background: var(--accent-wash); border-radius: 6px; }
.lesson.is-current .lesson-name { font-weight: 700; }

.lesson-mark {
    flex: 0 0 1.1rem;
    color: var(--accent);
    font-weight: 700;
}

.lesson-name { flex: 1 1 auto; min-width: 0; }
.lesson-name a { color: var(--ink); text-decoration: none; }
.lesson-name a:hover { color: var(--accent); text-decoration: underline; }

/* A lesson nobody may play yet is plain text, so it reads as listed-but-locked
 * rather than as a broken link. */
.lesson:not(.is-current) .lesson-name:not(:has(a)) { color: var(--muted); }

.lesson-badge {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    white-space: nowrap;
}

.lesson-length {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- player -- */

.watch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 22rem);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.watch-main h1 { font-size: var(--step-3); margin: 1.25rem 0 0; }

.player {
    aspect-ratio: 16 / 9;
    background: #14110f;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player video { width: 100%; height: 100%; display: block; }

.player-empty {
    text-align: center;
    color: #cdc4bb;
    padding: clamp(1rem, 4vw, 2.5rem);
    max-width: 34rem;
}

.player-empty p { margin: 0; max-width: none; }

.player-empty-mark {
    display: block;
    font-size: 2rem;
    opacity: 0.5;
    margin-bottom: 0.75rem;
}

.player-empty-note { font-size: 0.85rem; opacity: 0.65; margin-top: 0.6rem !important; }

.watch-actions { margin-top: 1.25rem; }

.watch-side {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.25rem;
    position: sticky;
    top: 7rem;
    max-height: calc(100vh - 9rem);
    overflow-y: auto;
}

.watch-side h2 { font-size: var(--step-1); margin: 0; }

@media (max-width: 900px) {
    .watch { grid-template-columns: 1fr; }
    /* Sticky and scroll-capped only makes sense beside the player, not under it. */
    .watch-side { position: static; max-height: none; }
}

/* --------------------------------------------------- narrow-screen header -- */

/* Grid items default to min-width:auto, so the three header columns refused to
 * shrink below their content and pushed the page sideways on a phone. */
.header-bar > * { min-width: 0; }

@media (max-width: 560px) {
    .header-bar { gap: 0.15rem; }

    .wordmark { font-size: 1.05rem; letter-spacing: -0.04em; }

    .icon-btn { width: 36px; height: 36px; }
    .icon-btn svg { width: 18px; height: 18px; }

    .lang-menu .dropdown-toggle { padding: 0.4rem 0.3rem; font-size: 0.74rem; }

    .header-account { padding: 0.4rem 0.7rem; font-size: 0.82rem; }

    /* The badge sits on a smaller target now. */
    .icon-btn.has-badge::after { top: 0; min-width: 15px; height: 15px; line-height: 15px; font-size: 0.6rem; }
}

/* Below this the two account buttons and five icons cannot all fit; signing up is
 * one tap further away rather than off the edge of the screen. */
@media (max-width: 420px) {
    .header-account:not(.is-primary) { display: none; }
}

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

@media (max-width: 460px) {
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .footer-base { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------ narrow-screen rows -- */

/* The sales table sets a min-width so its columns stay readable; without this it
 * dragged the whole page sideways instead of scrolling inside its own box. */
.scroller {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

@media (max-width: 560px) {
    /* A row is thumbnail + title + price + state + button. Below this it cannot
     * be one line without squeezing the title to nothing, so the trailing parts
     * drop to a second line. */
    .line-item {
        flex-wrap: wrap;
        row-gap: 0.6rem;
    }

    .line-item-body { flex: 1 1 55%; }
    .line-item-price { order: 3; }
    .badge-state { order: 4; }
    .line-item-actions,
    .line-item-remove,
    .line-item > .btn { order: 5; flex: 0 0 auto; }

    .line-item-art { width: 52px; height: 40px; }

    /* Section heads put a title and an action side by side; at this width the
     * action belongs under the title. */
    .section-head { flex-direction: column; align-items: flex-start; }

    .cart-foot { flex-direction: column; align-items: flex-start; }
    .cart-foot .btn { width: 100%; text-align: center; }
}

.footer-languages a { font-weight: 700; letter-spacing: 0.06em; }
.footer-languages a.is-on { color: var(--accent); }

@media (max-width: 560px) {
    /* Loosened from the first pass: at 0.15rem the wordmark and the language
     * toggle touched. */
    .header-bar { gap: 0.45rem; }
}

@media (max-width: 480px) {
    /* No room beside the wordmark and four icons. It stays reachable in the
     * footer, which is where a shop usually keeps it anyway. */
    .lang-menu { display: none; }
}

/* --------------------------------------------------------------- gallery -- */

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: clamp(1rem, 2.5vw, 1.75rem);
}

.work-card { display: flex; flex-direction: column; gap: 0.6rem; }

.work-card-image {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-sunk);
    transition: transform 0.18s ease;
}

.work-card:hover .work-card-image { transform: translateY(-3px); }

/* Photographs arrive in every shape a phone can produce; a fixed ratio keeps the
 * grid from turning into a staircase. */
.work-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.work-card-blank {
    display: block;
    aspect-ratio: 4 / 3;
    background:
        linear-gradient(135deg,
            hsl(var(--h) var(--cover-s) var(--cover-l1)),
            hsl(calc(var(--h) + 38) var(--cover-s) var(--cover-l2)));
}

.work-card h3 {
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
    margin: 0;
}

.work-card h3 a { color: var(--ink); text-decoration: none; }
.work-card h3 a:hover { color: var(--accent); }

.work-card-meta { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--muted); }

.work-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.work-images img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.work-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-top: 1.5rem;
}

/* The count is the label, so the button has to look pressable at rest and
   clearly held down once it is yours. */
.like-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}

.like-button::before { content: "\2661"; font-size: 1.1em; line-height: 1; }
.like-button:hover { border-color: var(--accent); color: var(--accent); }
.like-button.is-on { border-color: var(--accent); color: var(--accent); }
.like-button.is-on::before { content: "\2665"; }

.comments {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.comment {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.comment-meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.35rem; }

/* Still there for the person who wrote it, and visibly not for anyone else. */
.comment.is-hidden { opacity: 0.55; }

/* One level, and only one: the indent says "this answers the line above" and
   nothing deeper ever needs a second step. */
.comment.is-reply {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--line);
    border-bottom: 0;
}

.thread { border-bottom: 1px solid var(--line); }
.thread .comment { border-bottom: 0; }
.thread .comment:first-child { padding-bottom: 0.4rem; }

.comment-actions {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    margin: 0.4rem 0 0;
}

.comment-delete { margin: 0; }
.comment-note { color: var(--muted); font-size: 0.8rem; }

#comment-form { margin-top: 1.2rem; }

.comment-report {
    margin-top: 0.8rem;
    padding: 0.8rem 0 0.2rem;
    border-top: 1px dashed var(--line);
}

.comment-report .form-group { margin-bottom: 0.8rem; }

/* Indented like the answers it will join. */
.reply-form {
    margin: 0.6rem 0 1rem 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--line);
}

/* A queue row carries more than a name: the reports against a post and the
   reason box for taking it down both have to fit without the row collapsing. */
.queue-item { align-items: flex-start; flex-wrap: wrap; }

.report-list {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0.6rem 0 0 0.8rem;
    border-left: 2px solid var(--accent);
    font-size: 0.85rem;
    color: var(--muted);
}

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

.hide-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.hide-form .form-control { min-width: min(100%, 16rem); }

/* Folded away by default: reporting is a rare act, and a permanent accusation
   button under every post changes how the gallery reads. */
.report-box {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.report-box > summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 0.9rem;
}

.report-box > summary:hover { color: var(--accent); }

.report-box[open] > summary { margin-bottom: 1rem; }

.report-box .form-group { margin-bottom: 1rem; }

/* One reason per line: they run together as inline labels otherwise, and a
   radio button squeezed between two sentences is hard to hit on a phone. */
.choice-list label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.15rem 0;
    font-weight: 400;
}

.made-from {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.made-from a { font-weight: 600; }

/* The moderation list reuses the row thumbnail slot for a real photo. */
img.line-item-art { object-fit: cover; }

/* ---------------------------------------------------------------- search -- */

.header-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    max-width: 15rem;
    color: var(--muted);
}

.header-search:focus-within { border-color: var(--accent); }
.header-search svg { width: 17px; height: 17px; flex: 0 0 auto; }

.header-search input {
    border: 0;
    background: none;
    outline: none;
    min-width: 0;
    width: 100%;
    font: inherit;
    font-size: 0.88rem;
    color: var(--ink);
}

.header-search-link { display: none; }

@media (max-width: 900px) {
    /* No room for a field beside the wordmark; the icon opens the search page,
     * which has one. */
    .header-search { display: none; }
    .header-search-link { display: inline-flex; }
}

.search-form {
    display: flex;
    gap: 0.6rem;
    max-width: 34rem;
}

.search-form .form-control { flex: 1 1 auto; }
.search-form .btn { flex: 0 0 auto; }

/* A saved item reads as already done rather than as another thing to press. */
.btn-quiet.is-on {
    border-color: var(--accent);
    color: var(--accent);
}

/* The code field and its Apply button sit on one line; the button aligns with the
 * input rather than with the label above it. */
.coupon-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.coupon-row .form-group,
.coupon-row .mb-3 { flex: 1 1 auto; margin-bottom: 0; }
.coupon-row .btn { margin-top: 1.55rem; flex: 0 0 auto; }

@media (max-width: 480px) {
    .coupon-row { flex-direction: column; }
    .coupon-row .btn { margin-top: 0.5rem; width: 100%; }
}

/* ---------------------------------------------------------------- topics -- */

.topic-hero {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg,
            hsl(var(--h) var(--cover-s) var(--cover-l1)),
            hsl(calc(var(--h) + 38) var(--cover-s) var(--cover-l2)));
}

.topic-hero h1 { margin: 0.4rem 0 0.6rem; font-size: var(--step-3); }
.topic-hero .lede { margin: 0; color: var(--ink); opacity: 0.75; }
.topic-hero .eyebrow { color: var(--ink); opacity: 0.55; }

.topic-intro { margin-top: 0; margin-bottom: 2.5rem; }

/* --------------------------------------------------------------- reviews -- */

.stars {
    color: var(--accent);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.rating-summary,
.rating-inline {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
}

.rating-summary .count,
.rating-inline .count { color: var(--muted); font-size: 0.88rem; }

.product-rating {
    margin: 0.1rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.product-rating .stars { font-size: 0.8rem; }

.reviews { margin-top: clamp(2rem, 5vw, 3rem); }

.review-form { margin-bottom: 2rem; max-width: 34rem; }
.review-form h3 { font-size: var(--step-1); margin: 0 0 1rem; }

.review-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    max-width: 46rem;
}

.review {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
}

.review-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
}

.review-meta { font-size: 0.85rem; color: var(--muted); }

/* Earned, not decorative: only an entitlement lets a review exist at all. */
.verified { color: var(--accent); font-weight: 600; }

.review p { margin: 0; }

.sort-input { width: 5rem; flex: 0 0 auto; text-align: center; }

/* --------------------------------------------------------- gift vouchers -- */

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.preset { cursor: pointer; font-variant-numeric: tabular-nums; }

.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.voucher-balance {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
}

.voucher-balance-amount {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
}
