* {
    box-sizing: border-box;
}

:root {
    --ink: #111111;
    --ink-soft: #242424;
    --paper: #f7f1df;
    --paper-bright: #fffaf0;
    --gold: #ffb81c;
    --gold-dark: #9d6b00;
    --river: #263f4a;
    --steel: #474b4f;
    --muted: #6b6254;
    --line: rgba(17, 17, 17, 0.14);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.14);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 184, 28, 0.24), transparent 28rem),
        linear-gradient(135deg, #f8efd8 0%, #fffaf0 45%, #efe4ca 100%);
}

a {
    color: inherit;
}

.site-shell {
    width: min(1160px, calc(100% - 28px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 0;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--gold);
    background: var(--ink);
    font-weight: 900;
    letter-spacing: -0.08em;
    box-shadow: 8px 8px 0 var(--gold);
}

.brand-text strong {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.brand-text small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
}

.site-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.site-nav a,
.button-primary,
.button-secondary,
.filter-button,
.clear-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.52);
}

.hero-panel,
.section-block,
.split-section,
.merch-preview,
.word-detail {
    margin-top: 18px;
}

.hero-panel {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(17, 17, 17, 0.94), rgba(38, 63, 74, 0.92)),
        repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 184, 28, 0.2) 14px 16px);
    color: var(--paper-bright);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -40px -120px auto;
    width: 240px;
    height: 240px;
    border: 26px solid rgba(255, 184, 28, 0.2);
    border-radius: 50%;
}

.hero-copy,
.hero-card {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-panel h1,
.word-hero h1 {
    margin: 0;
    font-size: clamp(2.45rem, 13vw, 5.6rem);
    line-height: 0.87;
    letter-spacing: -0.08em;
    text-transform: uppercase;
}

.hero-lede {
    max-width: 780px;
    margin: 20px 0 0;
    color: rgba(255, 250, 240, 0.88);
    font-size: 1.05rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.button-primary,
.filter-button {
    color: var(--ink);
    background: var(--gold);
    border: 1px solid rgba(17, 17, 17, 0.18);
    cursor: pointer;
}

.button-secondary,
.clear-button {
    color: var(--paper-bright);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.clear-button {
    color: var(--ink);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.55);
}

.hero-card {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.card-label,
.word-status-card span,
.product-placeholder span,
.mini-merch-card span,
.tone-box span,
.result-pill,
.filter-label {
    display: block;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero-card h2 {
    margin: 8px 0;
    font-size: 3rem;
    letter-spacing: -0.08em;
}

.hero-card p {
    color: rgba(255, 250, 240, 0.82);
    line-height: 1.55;
}

.hero-card a,
.word-card a,
.back-link {
    font-weight: 900;
}

.section-block {
    padding: 28px 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 18px;
}

.section-heading.compact {
    margin-bottom: 12px;
}

.section-heading h2,
.split-section h2,
.merch-preview h2,
.definition-panel h2,
.usage-panel h2,
.future-product-panel h2,
.related-panel h2,
.directory-panel h2 {
    margin: 0;
    font-size: clamp(1.8rem, 8vw, 3.4rem);
    line-height: 0.95;
    letter-spacing: -0.065em;
}

.section-heading p,
.split-section p,
.merch-preview p,
.definition-panel p,
.future-product-panel p,
.directory-panel p {
    color: var(--muted);
    line-height: 1.7;
}

.directory-panel {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 250, 240, 0.88), rgba(255, 184, 28, 0.14));
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}

.directory-toolbar {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.search-form {
    display: grid;
    gap: 12px;
}

.filter-grid {
    display: grid;
    gap: 12px;
}

.filter-field {
    display: grid;
    gap: 7px;
}

.filter-label {
    color: var(--muted);
}

.search-input,
.category-select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--ink);
    font: inherit;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.alphabet-panel {
    margin-top: 16px;
}

.alphabet-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.letter-chip {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--ink);
    font-weight: 900;
    text-decoration: none;
}

.letter-chip.active {
    color: var(--ink);
    background: var(--gold);
    border-color: rgba(17, 17, 17, 0.2);
}

.letter-chip.disabled {
    opacity: 0.32;
}

.directory-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.result-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255,255,255,0.55);
}

.word-grid {
    display: grid;
    gap: 14px;
}

.word-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 250, 240, 0.72);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.word-card-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.word-card-topline span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--paper-bright);
    background: var(--ink);
    font-size: 0.7rem;
    font-weight: 800;
}

.word-card h3 {
    margin: 0 0 6px;
    font-size: 2rem;
    letter-spacing: -0.06em;
}

.word-card p {
    color: var(--muted);
    line-height: 1.55;
}

.word-card .pronunciation {
    margin: 0;
    color: var(--gold-dark);
    font-weight: 900;
}

.empty-state {
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 250, 240, 0.66);
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 1.6rem;
    letter-spacing: -0.04em;
}

.empty-state p {
    color: var(--muted);
    line-height: 1.6;
}

.split-section,
.merch-preview,
.definition-panel,
.usage-panel,
.future-product-panel,
.related-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 240, 0.72);
}

.split-section,
.usage-panel,
.future-product-panel {
    display: grid;
    gap: 18px;
}

.stacked-copy p:first-child {
    margin-top: 0;
}

.stacked-copy p:last-child {
    margin-bottom: 0;
}

.merch-preview {
    margin-bottom: 22px;
    background:
        linear-gradient(135deg, rgba(255, 250, 240, 0.86), rgba(255, 184, 28, 0.18));
}

.merch-card-row {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.mini-merch-card {
    padding: 16px;
    border-radius: var(--radius-md);
    color: var(--paper-bright);
    background: var(--ink);
}

.mini-merch-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.1rem;
}

.site-footer {
    display: grid;
    gap: 16px;
    margin: 28px 0;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.site-footer strong {
    color: var(--ink);
}

.site-footer p {
    margin: 6px 0 0;
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-meta span {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    font-weight: 800;
}

.word-detail {
    display: grid;
    gap: 16px;
}

.back-link {
    display: inline-flex;
    width: fit-content;
    text-decoration: none;
}

.word-hero {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: var(--radius-lg);
    color: var(--paper-bright);
    background:
        linear-gradient(135deg, rgba(17, 17, 17, 0.94), rgba(71, 75, 79, 0.9)),
        repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 184, 28, 0.16) 18px 20px);
    box-shadow: var(--shadow);
}

.word-pronunciation {
    margin: 14px 0 0;
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: 900;
}

.word-status-card,
.product-placeholder,
.tone-box {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.09);
}

.word-status-card p {
    margin-bottom: 0;
    color: rgba(255, 250, 240, 0.78);
}

.definition-panel,
.usage-panel,
.future-product-panel,
.related-panel {
    margin-top: 0;
}

.large-definition {
    color: var(--ink) !important;
    font-size: 1.35rem;
    font-weight: 800;
}

blockquote {
    margin: 0;
    padding-left: 18px;
    border-left: 6px solid var(--gold);
    font-size: clamp(1.35rem, 7vw, 2.8rem);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -0.055em;
}

.tone-box {
    color: var(--paper-bright);
    background: var(--ink);
}

.tone-box strong {
    display: block;
    margin-top: 6px;
}

.product-placeholder {
    color: var(--paper-bright);
    background: linear-gradient(135deg, var(--ink), var(--river));
}

.product-placeholder p {
    color: rgba(255, 250, 240, 0.78);
}

.word-grid.small .word-card h3 {
    font-size: 1.55rem;
}

@media (min-width: 760px) {
    .site-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .hero-panel {
        grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
        align-items: end;
        padding: 34px;
    }

    .word-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .split-section,
    .future-product-panel,
    .usage-panel,
    .word-hero {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        align-items: start;
    }

    .merch-card-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .site-footer {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .filter-grid {
        grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr) auto;
        align-items: end;
    }
}


/* ==========================================================================
   Build Step 006 — Public Word Page Detail Polish
   ========================================================================== */

.word-detail-polished {
    gap: 18px;
}

.word-hero-polished {
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.word-hero-polished::after {
    content: "";
    position: absolute;
    right: -76px;
    bottom: -98px;
    width: 260px;
    height: 260px;
    border: 28px solid rgba(255, 184, 28, 0.18);
    border-radius: 999px;
}

.word-hero-main,
.word-snapshot-card {
    position: relative;
    z-index: 1;
}

.word-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.word-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: var(--paper-bright);
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    font-weight: 900;
}

.word-snapshot-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(10px);
}

.word-snapshot-card span,
.word-meta-card span,
.usage-side-card span {
    display: block;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.word-snapshot-card strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(2rem, 12vw, 4rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
}

.word-snapshot-card p {
    color: rgba(255, 250, 240, 0.82);
    line-height: 1.55;
}

.word-definition-layout {
    display: grid;
    gap: 16px;
}

.definition-panel-polished {
    background:
        linear-gradient(135deg, rgba(255, 250, 240, 0.88), rgba(255, 184, 28, 0.12));
}

.definition-panel-polished .eyebrow,
.local-note-panel .eyebrow,
.usage-panel-polished .eyebrow,
.future-product-panel-polished .eyebrow {
    color: var(--gold-dark);
}

.definition-body {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.definition-body p {
    font-size: 1.04rem;
}

.word-meta-stack {
    display: grid;
    gap: 10px;
}

.word-meta-card,
.usage-side-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 250, 240, 0.72);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.word-meta-card span,
.usage-side-card span {
    color: var(--muted);
}

.word-meta-card strong {
    display: block;
    margin-top: 7px;
    overflow-wrap: anywhere;
    font-size: 1.1rem;
    line-height: 1.22;
}

.usage-panel-polished {
    background:
        linear-gradient(135deg, rgba(17, 17, 17, 0.95), rgba(38, 63, 74, 0.92));
    color: var(--paper-bright);
}

.usage-panel-polished h2 {
    color: var(--paper-bright);
}

.usage-panel-polished blockquote {
    color: var(--paper-bright);
    border-left-color: var(--gold);
}

.usage-panel-polished .empty-state {
    color: var(--ink);
}

.usage-side-card {
    color: var(--paper-bright);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.09);
}

.usage-side-card span {
    color: var(--gold);
}

.usage-side-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.28rem;
    letter-spacing: -0.04em;
}

.usage-side-card p {
    color: rgba(255, 250, 240, 0.78);
    line-height: 1.6;
}

.local-note-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 250, 240, 0.86), rgba(255, 255, 255, 0.54));
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.local-note-panel h2 {
    margin: 0;
    font-size: clamp(1.8rem, 8vw, 3.2rem);
    line-height: 0.96;
    letter-spacing: -0.065em;
}

.local-note-panel p {
    color: var(--muted);
    line-height: 1.7;
}

.muted-note {
    border-style: dashed;
    opacity: 0.86;
}

.future-product-panel-polished {
    background:
        linear-gradient(135deg, rgba(255, 184, 28, 0.18), rgba(255, 250, 240, 0.8));
}

.product-placeholder-polished {
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.product-placeholder-polished::after {
    content: "PW";
    position: absolute;
    right: -12px;
    bottom: -18px;
    color: rgba(255, 184, 28, 0.14);
    font-size: 6rem;
    font-weight: 900;
    letter-spacing: -0.12em;
}

.product-placeholder-polished strong,
.product-placeholder-polished p,
.product-placeholder-polished span {
    position: relative;
    z-index: 1;
}

.related-panel-polished {
    background: rgba(255, 250, 240, 0.74);
}

.related-word-card {
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.related-word-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.1);
}

.compact-empty {
    margin-top: 14px;
    padding: 16px;
}

.compact-empty h3 {
    font-size: 1.25rem;
}

@media (min-width: 760px) {
    .word-hero-polished {
        grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
        min-height: 360px;
        align-items: end;
    }

    .word-definition-layout {
        grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
        align-items: start;
    }

    .word-meta-stack {
        position: sticky;
        top: 18px;
    }
}
