/* ==========================================================================
   layout.css — shells, containers, grids, chat windows
   Shells: shell-auth · shell-public · shell-app · shell-shop
   ========================================================================== */

/* --------------------------------------------------------------------------
   Universal site wrap
   -------------------------------------------------------------------------- */

.site-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.site-main {
    flex: 1 1 auto;
}

/* --------------------------------------------------------------------------
   Containers
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--lg  { max-width: var(--container-lg); }
.container--2xl { max-width: var(--container-2xl); }

@media (max-width: 700px) {
    .container { padding-inline: var(--space-4); }
}

@media (max-width: 500px) {
    .container { padding-inline: var(--space-3); }
}

/* --------------------------------------------------------------------------
   Shell: auth — centered card, minimal chrome
   Used by: login, register, verify, forgot, reset
   -------------------------------------------------------------------------- */

body.shell-auth {
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, var(--primary-glow), transparent);
}

.auth-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: var(--space-8) var(--space-4);
}

.auth-shell__logo {
    margin-bottom: var(--space-8);
    text-align: center;
}

.auth-shell__logo a {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    text-decoration: none;
}

.auth-shell__logo a:hover {
    color: var(--primary-hi);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-10) var(--space-8);
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-6);
    text-align: center;
}

.auth-card__footer {
    margin-top: var(--space-6);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-3);
}

.auth-card__footer a {
    color: var(--text-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-card__footer a:hover {
    color: var(--primary);
}

/* Wider auth card for onboarding steps with avatar grid */
.auth-card--wide { max-width: 560px; }
.auth-shell--wide { align-items: center; }

.auth-card__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: var(--space-2);
    color: var(--text);
}

.auth-card__subtitle {
    font-size: var(--text-sm);
    color: var(--text-3);
    text-align: center;
    margin-bottom: var(--space-6);
    line-height: 1.5;
}

.auth-card__legal {
    margin-top: var(--space-5);
    font-size: var(--text-xs);
    color: var(--text-3);
    text-align: center;
    line-height: 1.5;
}

.auth-card__legal a {
    color: var(--text-2);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Google sign-in button
   -------------------------------------------------------------------------- */

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btn-google:hover {
    background: var(--surface-hi);
    border-color: var(--border-hi);
    box-shadow: 0 2px 6px rgba(0,0,0,0.20);
    color: var(--text);
}

.btn-google__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Onboarding step indicator
   -------------------------------------------------------------------------- */

.onboarding-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.onboarding-step {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.onboarding-step.is-active {
    color: var(--primary);
}

.onboarding-step.is-done {
    color: var(--green);
}

.onboarding-step-sep {
    color: var(--text-3);
    font-size: var(--text-xs);
}

/* OTP input — extra wide, centered, large digits */
.form-input--otp {
    text-align: center;
    font-size: var(--text-2xl);
    letter-spacing: 0.3em;
    font-family: var(--font-ui);
}

/* Resend form sits inline below OTP form */
.resend-form {
    margin-top: var(--space-4);
    text-align: center;
}

/* Avatar actions row at bottom of onboarding avatar step */
.onboarding-avatar-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
    justify-content: center;
}

@media (max-width: 500px) {
    .auth-card {
        border: none;
        background: transparent;
        box-shadow: none;
        padding: var(--space-6) var(--space-4);
    }
}

/* --------------------------------------------------------------------------
   Shell: unified master-detail — sidebar rail + workspace
   Used by all non-auth pages (public and authenticated)
   -------------------------------------------------------------------------- */

#program {
    display: flex;
    flex-direction: row;
    min-height: 100dvh;
}

#workspace {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100dvh;
}

.app-main {
    flex: 1 1 auto;
    padding-bottom: var(--space-16);
	padding-top: var(--space-10);
}

/* Padded page content wrapper */
.page {
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

.page-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: var(--text-3xl);
}

/* Two-column page layout with sidebar */
.page-with-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-8);
    align-items: start;
}

.page-sidebar {
    position: sticky;
    top: var(--space-8);
}

@media (max-width: 1000px) {
    .page-with-sidebar {
        grid-template-columns: 220px 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 700px) {
    .page-with-sidebar {
        grid-template-columns: 1fr;
    }
    .page-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 500px) {
    .app-main {
        padding-bottom: var(--space-12);
		padding-top: var(--space-2);
    }
    .page { padding-inline: var(--space-3); }
    .page-header { flex-direction: column; align-items: flex-start; }
}

/* Hero section */
.hero {
    padding: var(--space-24) var(--space-6) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, var(--primary-glow), transparent);
}

.hero__content {
    flex: 0 1 480px;
    min-width: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero__eyebrow {
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: var(--space-2);
}

.hero__title {
    font-size: var(--text-5xl);
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
    margin-bottom: var(--space-6);
}

.hero__title em {
    font-style: normal;
    color: var(--primary);
}

.hero__subtitle {
    font-size: var(--text-xl);
    color: var(--text-2);
    max-width: 560px;
    margin-inline: auto;
    margin-bottom: var(--space-4);
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
	margin-bottom: var(--space-6);
}

.hero__visual {
    flex: 0 0 400px;
    max-width: 400px;
    align-self: flex-end;
}

.hero__phone {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    filter: drop-shadow(0 12px 32px rgba(5, 31, 64, 0.20));
}

@media (max-width: 700px) {
    .hero {
        flex-direction: column;
        padding: var(--space-16) var(--space-4);
    }
    .hero__visual {
        flex: 0 0 auto;
        max-width: 220px;
        width: 100%;
        margin-inline: auto;
    }
    .hero__title { font-size: var(--text-4xl); }
}

@media (max-width: 500px) {
    .hero { padding: var(--space-12) var(--space-3); }
    .hero__visual { max-width: 180px; }
    .hero__title { font-size: var(--text-3xl); }
    .hero__subtitle { font-size: var(--text-base); }
	.hero__actions { flex-wrap: wrap; }
}

/* --------------------------------------------------------------------------
   Shell: shop — public storefront tied to user account
   -------------------------------------------------------------------------- */

body.shell-shop {
    background-color: var(--bg);
}

.shop-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.shop-main {
    flex: 1 1 auto;
    padding-top: var(--space-8);
    padding-bottom: var(--space-16);
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1000px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* Cart sidebar */
.shop-with-cart {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-8);
    align-items: start;
}

.cart-sidebar {
    position: sticky;
    top: var(--space-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

@media (max-width: 1000px) {
    .shop-with-cart { grid-template-columns: 1fr 280px; }
}

@media (max-width: 700px) {
    .shop-with-cart {
        grid-template-columns: 1fr;
    }
    .cart-sidebar {
        position: static;
        order: -1;
    }
}

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

.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: var(--space-8) var(--space-6);
    font-size: var(--text-sm);
    color: var(--text-3);
}

.site-footer__inner {
    max-width: var(--container-xl);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.site-footer__links {
    display: flex;
    gap: var(--space-6);
}

.site-footer__links a {
    color: var(--text-3);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-footer__links a:hover {
    color: var(--primary);
}

@media (max-width: 500px) {
    .site-footer__inner { flex-direction: column; text-align: center; }
    .site-footer__links { flex-wrap: wrap; justify-content: center; gap: var(--space-4); }
}

/* --------------------------------------------------------------------------
   Chat window — match thread
   Full-height panel, header pinned, input pinned to bottom
   -------------------------------------------------------------------------- */

.chat-window {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--space-8));
    min-height: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.chat-header__title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}

.chat-header__meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.chat-messages {
    flex: 1 1 0;
    overflow-y: auto;
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    scroll-behavior: smooth;
}

/* Scroll bar styling */
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }

/* Message bubbles */
.chat-msg {
    display: flex;
    gap: var(--space-3);
    max-width: 78%;
}

.chat-msg--self {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg--other {
    align-self: flex-start;
}

.chat-msg__avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    object-fit: cover;
    display: block;
}

.chat-msg__bubble {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.chat-msg--self .chat-msg__bubble {
    background: var(--primary-fill);
    color: var(--text-on-primary);
    border-radius: var(--radius-md) var(--radius-sm) var(--radius-md) var(--radius-md);
}

.chat-msg--other .chat-msg__bubble {
    background: var(--surface-hi);
    color: var(--text);
    border-radius: var(--radius-sm) var(--radius-md) var(--radius-md) var(--radius-md);
}

.chat-msg__time {
    font-size: 0.65rem;
    color: var(--text-3);
    margin-top: var(--space-1);
    text-align: right;
}

.chat-msg--other .chat-msg__time {
    text-align: left;
}

/* System messages — match events, status changes */
.chat-msg--system {
    align-self: center;
    max-width: 90%;
    text-align: center;
}

.chat-msg--system .chat-msg__bubble {
    background: var(--primary-wash);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-4);
}

/* Chat input area */
.chat-input-area {
    flex: 0 0 auto;
    display: flex;
    gap: var(--space-3);
    align-items: flex-end;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}

.chat-input {
    flex: 1 1 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    color: var(--text);
    font-size: var(--text-sm);
    resize: none;
    min-height: 42px;
    max-height: 120px;
    line-height: 1.5;
    transition: border-color var(--transition-fast);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-input::placeholder {
    color: var(--text-3);
}

@media (max-width: 500px) {
    .chat-window {
        height: calc(100dvh - var(--mobile-topbar-height));
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .chat-msg { max-width: 88%; }
}

/* --------------------------------------------------------------------------
   Direct message window — player-to-player
   Desktop: conversation list (left) + thread (right)
   Mobile: stacked, thread fills view
   -------------------------------------------------------------------------- */

.dm-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: calc(100dvh - var(--space-8));
    min-height: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Conversation list panel */
.dm-list {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dm-list__header {
    flex: 0 0 auto;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}

.dm-list__items {
    flex: 1 1 0;
    overflow-y: auto;
}

.dm-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-fast);
}

.dm-list__item:hover,
.dm-list__item.is-active {
    background: var(--primary-wash);
}

.dm-list__item.is-active {
    border-left: 2px solid var(--primary);
}

.dm-list__avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: var(--border-hi);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
}

.dm-list__info {
    flex: 1 1 auto;
    min-width: 0;
}

.dm-list__name {
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    truncate: clip;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-list__preview {
    font-size: var(--text-xs);
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-list__unread {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    background: var(--primary-fill);
    border-radius: var(--radius-pill);
}

/* Thread panel (reuses most chat-window styles) */
.dm-thread {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dm-thread .chat-messages {
    padding: var(--space-5);
}

/* Mobile: show list OR thread, never both */
@media (max-width: 700px) {
    .dm-shell {
        grid-template-columns: 1fr;
        height: calc(100dvh - var(--mobile-topbar-height));
        border-radius: 0;
    }

    .dm-list { display: none; }
    .dm-list.is-visible { display: flex; }
    .dm-thread { display: none; }
    .dm-thread.is-visible { display: flex; }
}

@media (max-width: 500px) {
    .dm-shell { height: calc(100dvh - var(--mobile-topbar-height)); }
}

/* --------------------------------------------------------------------------
   Contests grid / list
   -------------------------------------------------------------------------- */

.contest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

@media (max-width: 1000px) {
    .contest-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* --------------------------------------------------------------------------
   How-it-works grid
   -------------------------------------------------------------------------- */

.how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

.how-step {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.how-step__num {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--primary);
    opacity: 0.35;
    line-height: 1;
}

.how-step__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}

.how-step__text {
    font-size: var(--text-sm);
    color: var(--text-2);
    line-height: 1.7;
    max-width: 68ch;
    padding-right: var(--space-4);
}

@media (max-width: 1000px) {
    .how-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .how-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* --------------------------------------------------------------------------
   Games grid
   -------------------------------------------------------------------------- */

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.game-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.game-tile:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
}

.game-tile__name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}

.game-tile__platforms {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}

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

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
    max-width: 720px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.faq__item {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
}

.faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-ui);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text);
    transition: color var(--transition-fast);
}

.faq__question:hover { color: var(--primary); }

.faq__chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--text-3);
    transition: transform var(--transition-fast);
}

.faq__item.is-open .faq__chevron {
    transform: rotate(180deg);
}

.faq__answer {
    display: none;
    padding: 0 var(--space-6) var(--space-5);
    font-size: var(--text-sm);
    color: var(--text-2);
    line-height: 1.65;
}

.faq__item.is-open .faq__answer {
    display: block;
}

/* --------------------------------------------------------------------------
   Legal / prose page
   -------------------------------------------------------------------------- */

.prose-page {
    max-width: 720px;
    margin-inline: auto;
    padding: var(--space-12) var(--space-6);
}

.prose-page h1 {
    margin-bottom: var(--space-2);
}

.prose-page .prose-meta {
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    color: var(--text-3);
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border);
}

.prose-page h2 {
    font-size: var(--text-xl);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
}

.prose-page h3 {
    font-size: var(--text-lg);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.prose-page p {
    margin-bottom: var(--space-4);
}

.prose-page ul, .prose-page ol {
    list-style: disc;
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
    color: var(--text-2);
}

.prose-page li {
    margin-bottom: var(--space-2);
    line-height: 1.7;
    font-size: var(--text-base);
}

.prose-page a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 500px) {
    .prose-page { padding: var(--space-8) var(--space-3); }
}

/* --------------------------------------------------------------------------
   Section utility
   -------------------------------------------------------------------------- */

.section {
    margin-bottom: var(--space-10);
}

.section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.section__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
}

/* --------------------------------------------------------------------------
   Home page — availability map
   -------------------------------------------------------------------------- */

:root {
    --map-bg: #eae6de;
    --map-stroke: #a8a4a0;
    --map-inset-border: #d0ccc8;
    --map-text-muted: #9a9a98;
}

[data-theme="dark"] {
    --map-bg: #1a2030;
    --map-stroke: #2C3240;
    --map-inset-border: #3A4255;
    --map-text-muted: #505A68;
}

#home-map-wrap {
    position: relative;
    height: 340px;
    overflow: hidden;
    width: 100%;
}

#home-map-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
}

#home-map-wrap .state-path {
    stroke: var(--map-stroke);
    stroke-width: 3;
    pointer-events: none;
}

#home-map-wrap .state-path--available  { fill: #051f40; }
#home-map-wrap .state-path--restricted { fill: #6b7280; opacity: 0.5; }

#home-map-wrap .state-label {
    fill: #ffffff;
    pointer-events: none;
    font-family: var(--font-ui);
    font-weight: 700;
    dominant-baseline: middle;
}

#home-map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    font-size: 0.8rem;
    color: var(--text-3);
    z-index: 20;
}

.home-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
    justify-content: center;
    margin-top: var(--space-4);
    font-size: var(--text-xs);
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.home-map-legend__item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

.home-map-legend__swatch {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.home-map-legend__swatch--available  { background: #051f40; }
.home-map-legend__swatch--restricted { background: #b8b4ac; }

.home-map-legend__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    height: 12px;
    background: #051f40;
    color: #fff;
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: 2px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.home-map-legend__badge--restricted { background: #6b7280; }

.map-disclaimer {
    margin-top: var(--space-4);
    font-size: var(--text-xs);
    color: var(--text-3);
    text-align: right;
}

@media (max-width: 600px) {
    #home-map-wrap { height: 220px; }
    #home-map-wrap .state-label { display: none; }
    .map-disclaimer { text-align: center; }
}

@media (max-width: 400px) {
    #home-map-wrap { height: 180px; }
}
