/* ================================================
   Wend Today — Professional Redesign
   ================================================ */

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-400.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-500.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-600.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-800.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-900.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* --- CSS Variables --- */
:root {
    /* Word colors — exact match LinkedIn/thewordfinder.com */
    --word-0: #e8572a;
    --word-1: #d4449a;
    --word-2: #4dbdba;
    --word-3: #98c21f;
    --word-4: #5b8dd9;

    /* Brand */
    --clr-primary: #0a66c2;
    --clr-primary-dark: #004182;
    --clr-primary-light: #dbeafe;

    /* Surfaces */
    --clr-bg: #f0f4f8;
    --clr-surface: #ffffff;
    --clr-surface-alt: #f8fafc;

    /* Text */
    --clr-text: #1e293b;
    --clr-text-secondary: #475569;
    --clr-text-muted: #94a3b8;

    /* Borders */
    --clr-border: #e2e8f0;
    --clr-border-strong: #cbd5e1;

    /* Functional */
    --clr-bubble: #dde1e7;

    /* Font */
    --font:
        "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.11), 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-board:
        0 2px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition-fast: 0.14s ease;
    --transition: 0.22s ease;
    --transition-slow: 0.35s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: var(--font);
    background: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    cursor: pointer;
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Page Wrapper --- */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================================================
   HEADER
   ================================================ */
.site-header {
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow var(--transition);
}
.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--clr-text);
    text-decoration: none;
}
.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--clr-primary);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.88rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.3);
}
.logo-text {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--clr-text);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--clr-text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    transition:
        color var(--transition-fast),
        background var(--transition-fast);
}
.nav-links a:hover {
    color: var(--clr-text);
    background: var(--clr-bg);
}
.nav-links a.active {
    color: var(--clr-primary);
    background: var(--clr-primary-light);
    font-weight: 600;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--clr-text);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}
.mobile-menu-btn:hover {
    background: var(--clr-bg);
}
.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
    padding: 8px 14px 14px;
    gap: 2px;
}
.mobile-menu.active {
    display: flex;
}
.mobile-menu a {
    padding: 10px 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--clr-text-secondary);
    border-radius: var(--radius-md);
    transition:
        background var(--transition-fast),
        color var(--transition-fast);
}
.mobile-menu a:hover {
    background: var(--clr-bg);
    color: var(--clr-text);
}
.mobile-menu a.active {
    color: var(--clr-primary);
    background: var(--clr-primary-light);
    font-weight: 600;
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
}

/* ================================================
   PAGE TITLE / HERO
   ================================================ */
.page-title-section {
    padding: 28px 0 18px;
    text-align: center;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
}

/* Live badge */
.puzzle-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--clr-primary-light);
    color: var(--clr-primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 13px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.puzzle-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--clr-primary);
    border-radius: 50%;
    animation: dotPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes dotPulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.55;
        transform: scale(0.75);
    }
}

.page-title {
    font-size: clamp(1.15rem, 3.5vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--clr-text);
    line-height: 1.2;
    max-width: 720px;
    margin: 0 auto;
}
.page-subtitle {
    font-size: 0.9rem;
    color: var(--clr-text-secondary);
    margin-top: 6px;
    font-weight: 500;
}

.share-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.share-bar-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--clr-text-muted);
}
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.share-button {
    appearance: none;
    border: 1px solid var(--clr-border);
    background: rgba(255, 255, 255, 0.88);
    color: var(--clr-text-secondary);
    border-radius: var(--radius-full);
    padding: 9px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        color var(--transition-fast),
        background var(--transition-fast);
    box-shadow: var(--shadow-xs);
}
.share-button:hover {
    transform: translateY(-1px);
    border-color: var(--clr-primary);
    color: var(--clr-primary-dark);
    box-shadow: var(--shadow-sm);
}
.share-button.is-copied {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
}

/* ================================================
   GAME SECTION
   ================================================ */
.game-section {
    padding: 20px 0 28px;
}
.game-container {
    position: relative;
}

/* Hidden checkbox for CSS-only reveal */
.reveal-checkbox,
.archive-reveal-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* --- 2-column layout on desktop --- */
.game-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}
@media (min-width: 768px) {
    .game-layout {
        grid-template-columns: minmax(430px, 520px) 1fr;
        gap: 24px;
        align-items: start;
    }
}

/* --- Board Column --- */
.game-board-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Grid view wrapper */
.grid-view {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ================================================
   WEND BOARD GRID
   ================================================ */
.wend-board-wrapper {
    display: grid;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2.5px solid #2c2c2c;
    border-radius: 16px;
    overflow: hidden;
    gap: 0;
    background: #fff;
    box-shadow: var(--shadow-board);
    max-width: 520px;
}

/* --- Grid Cells --- */
.wend-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: visible;
}
.wend-cell--blocked {
    background: #adb5bd;
    cursor: default;
    box-sizing: border-box;
}
.wend-cell--letter {
    appearance: none;
    border: none;
    padding: 0;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
    box-shadow:
        rgb(228, 228, 228) 1px 0px inset,
        rgb(228, 228, 228) -1px 0px inset,
        rgb(228, 228, 228) 0px 1px inset,
        rgb(228, 228, 228) 0px -1px inset;
    background: #fff;
    transition: background 0.12s;
}
.wend-cell--letter:hover {
    background: #f8fafc;
}
.wend-cell--letter.cell-revealed-hint {
    background: color-mix(in srgb, var(--word-color) 18%, white);
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--word-color) 60%, white);
}
.wend-cell--letter.cell-revealed-hint .cell-letter {
    color: #111827;
}
.wend-cell--revealed {
    background: color-mix(in srgb, var(--word-color) 20%, white) !important;
    box-shadow: none;
}
.wend-cell--revealed:hover {
    filter: brightness(1.03);
}

/* Cell pop animation */
@keyframes cellPop {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    55% {
        transform: scale(1.07);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.wend-cell--pulse {
    animation: cellPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Cell letters */
.cell-letter {
    font-size: clamp(14px, 4.5vw, 28px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    user-select: none;
    pointer-events: none;
    position: relative;
    z-index: 4;
    color: #1a1a2e;
}
.cell-letter--hidden {
    color: #1a1a2e;
}
.cell-letter--revealed {
    color: #1a1a2e;
    text-shadow: none;
}

/* --- Tube connectors (22.5% positioning, matching TWF) --- */
.cell-tube {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}
.cell-tube-h {
    top: 22.5%;
    bottom: 22.5%;
}
.cell-tube-v {
    left: 22.5%;
    right: 22.5%;
}

/* --- Cell circle (word START) --- */
.cell-circle {
    position: absolute;
    width: 55%;
    height: 55%;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    outline: 5px solid color-mix(in srgb, var(--word-color) 20%, white);
}

/* --- Check badge (word END) --- */
.cell-check-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 5;
    pointer-events: none;
    font-size: 9px;
    font-weight: 800;
}

/* --- Direction arrows --- */
.cell-arrow {
    position: absolute;
    width: clamp(10px, 3vw, 16px);
    height: clamp(10px, 3vw, 16px);
    color: rgba(0, 0, 0, 0.52);
    z-index: 999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cell-arrow svg {
    width: 100%;
    height: 100%;
    display: block;
}
.cell-arrow--down {
    top: 0;
    left: 50%;
    transform: translate(-50%) translateY(-50%) rotate(0deg);
}
.cell-arrow--up {
    bottom: 0;
    left: 50%;
    transform: translate(-50%) translateY(50%) rotate(180deg);
}
.cell-arrow--right {
    left: 0;
    top: 50%;
    transform: translate(-50%) translateY(-50%) rotate(-90deg);
}
.cell-arrow--left {
    right: 0;
    top: 50%;
    transform: translate(50%) translateY(-50%) rotate(90deg);
}

/* --- Board instruction --- */
.board-instruction {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--clr-text-secondary);
    text-align: center;
    margin-top: 12px;
    align-self: center;
}
.board-instruction b {
    color: var(--clr-text);
    font-weight: 700;
}
.revealed-text {
    display: none;
    color: #16a34a;
}

/* --- Reveal Button --- */
.reveal-buttons {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.reveal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.01em;
    user-select: none;
    background: var(--clr-primary);
    color: #fff;
    border-color: var(--clr-primary);
    box-shadow: 0 2px 10px rgba(10, 102, 194, 0.28);
}
.reveal-btn:hover {
    background: var(--clr-primary-dark);
    border-color: var(--clr-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(10, 102, 194, 0.36);
}
.reveal-btn svg {
    flex-shrink: 0;
}

/* Toggle text on reveal */
.reveal-text-hide {
    display: none;
}
.reveal-checkbox:checked ~ .game-layout .reveal-text-show {
    display: none;
}
.reveal-checkbox:checked ~ .game-layout .reveal-text-hide {
    display: inline;
}
.reveal-checkbox:checked ~ .game-layout .reveal-btn--primary {
    background: var(--clr-surface);
    border-color: var(--clr-border-strong);
    color: var(--clr-text-secondary);
    box-shadow: none;
}

/* ================================================
   WORDS COLUMN
   ================================================ */
.game-words-col {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* --- Progress Bar --- */
.progress-section {
    margin-bottom: 14px;
}
.progress-label {
    font-size: 0.85rem;
    color: var(--clr-text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.progress-label b {
    font-weight: 700;
    color: var(--clr-text);
}
.progress-bar {
    height: 5px;
    background: var(--clr-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--clr-primary), #38bdf8);
    transition: width 0.75s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* --- Word Cards --- */
.words-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.word-blank {
    background: var(--clr-surface);
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-xs);
}
.word-blank--revealed {
    border-color: var(--word-color, #22c55e);
    background: color-mix(in srgb, var(--word-color, #22c55e) 7%, white);
    box-shadow: 0 3px 18px
        color-mix(in srgb, var(--word-color, #22c55e) 22%, transparent);
    animation: wordReveal 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--card-delay, 0) * 0.12s);
}

@keyframes wordReveal {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Letter Row --- */
.letter-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* --- Letter Bubbles --- */
.letter-bubble {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
    transition:
        background 0.28s,
        transform 0.2s;
}
.letter-bubble--hidden {
    background: var(--clr-bubble);
}
.letter-bubble--hinted {
    background: var(--word-color, var(--clr-primary));
    color: #111827;
    transform: scale(1.04);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    animation: bubblePop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.letter-bubble--revealed {
    color: #1a1a2e;
    transform: scale(1.04);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    animation: bubblePop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--bubble-delay, 0) * 0.08s);
}
.bubble-letter {
    font-size: 15px;
    font-weight: 800;
    color: inherit;
    line-height: 1;
    letter-spacing: -0.02em;
}

@keyframes bubblePop {
    0% {
        transform: scale(0.6);
        opacity: 0.3;
    }
    60% {
        transform: scale(1.12);
    }
    100% {
        transform: scale(1.04);
        opacity: 1;
    }
}

/* --- Bubble arrow between letters --- */
.bubble-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--clr-text-muted);
}
.bubble-arrow svg {
    width: 12px;
    height: 12px;
    fill: var(--clr-text-muted);
}

/* --- Word Actions --- */
.word-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn-reveal-letter,
.btn-reveal-word {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1.5px solid;
    letter-spacing: 0.01em;
    font-family: inherit;
    opacity: 1;
}
.btn-reveal-letter {
    background: transparent;
    border-color: var(--word-color, #94a3b8);
    color: var(--word-color, #475569);
}
.btn-reveal-letter:hover {
    background: color-mix(in srgb, var(--word-color, #94a3b8) 14%, white);
    transform: translateY(-1px);
}
.btn-reveal-word {
    background: var(--word-color, #94a3b8);
    border-color: var(--word-color, #94a3b8);
    color: #fff;
}
.btn-reveal-word:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.btn-reveal-letter:disabled,
.btn-reveal-word:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
    filter: none;
}
.word-blank.word-complete {
    border-color: var(--word-color, var(--clr-primary));
    background: color-mix(
        in srgb,
        var(--word-color, var(--clr-primary)) 6%,
        white
    );
}

/* --- Revealed label --- */
.revealed-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--clr-text-secondary);
    letter-spacing: 0.02em;
}
.revealed-label strong {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* --- Wend #N Words label --- */
.wend-words-label {
    display: none;
    margin-top: 12px;
    padding: 14px 16px;
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--clr-border);
    box-shadow: var(--shadow-sm);
}
.wend-words-label h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--clr-text);
}
.wend-words-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* --- Word Chips --- */
.word-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    opacity: 0;
    animation: chipIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--chip-delay, 0s);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.chip-check {
    display: flex;
    width: 12px;
    height: 12px;
}
.chip-check svg {
    width: 100%;
    height: 100%;
}

@keyframes chipIn {
    0% {
        opacity: 0;
        transform: scale(0.72);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================================================
   CSS-ONLY REVEAL MECHANISM
   ================================================ */
.grid-view-revealed {
    display: none;
}
.grid-view:not(.grid-view-revealed) {
    display: flex;
}
.words-list-revealed {
    display: none;
}
.wend-words-label {
    display: none;
}
.progress-fill {
    width: 0%;
}

.reveal-checkbox:checked ~ .game-layout .grid-view:not(.grid-view-revealed) {
    display: none;
}
.reveal-checkbox:checked ~ .game-layout .grid-view-revealed {
    display: flex;
    animation: boardReveal 0.5s ease-out;
}
.reveal-checkbox:checked ~ .game-layout .words-list:not(.words-list-revealed) {
    display: none;
}
.reveal-checkbox:checked ~ .game-layout .words-list-revealed {
    display: flex;
}
.reveal-checkbox:checked ~ .game-layout .wend-words-label {
    display: block;
}
.reveal-checkbox:checked ~ .game-layout .progress-fill {
    width: 100% !important;
}
.reveal-checkbox:checked ~ .game-layout .board-instruction:not(.revealed-text) {
    display: none;
}
.reveal-checkbox:checked ~ .game-layout .revealed-text {
    display: block;
}

.reveal-checkbox:checked ~ .game-layout .wend-cell--revealed {
    animation: cellPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--cell-delay, 0) * 0.06s);
}
.reveal-checkbox:checked ~ .game-layout .word-blank--revealed {
    animation: wordReveal 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--card-delay, 0) * 0.12s);
}
.reveal-checkbox:checked ~ .game-layout .letter-bubble--revealed {
    animation: bubblePop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--bubble-delay, 0) * 0.08s);
}

@keyframes boardReveal {
    0% {
        opacity: 0;
        transform: scale(0.97);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================================================
   SECTION TITLES
   ================================================ */
.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--clr-text);
    margin-bottom: 16px;
    position: relative;
    padding-left: 14px;
}
.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    background: var(--clr-primary);
    border-radius: var(--radius-full);
}

/* ================================================
   HINTS SECTION
   ================================================ */
.hints-section {
    padding: 32px 0;
}
.hints-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 640px) {
    .hints-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.hint-card {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--clr-border);
    box-shadow: var(--shadow-sm);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}
.hint-card:hover {
    border-color: var(--clr-primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.hint-number {
    width: 28px;
    height: 28px;
    background: var(--clr-primary);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.28);
}
.hint-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--clr-text);
}
.hint-card p {
    font-size: 0.83rem;
    color: var(--clr-text-secondary);
    line-height: 1.55;
}

/* ================================================
   RECENT PUZZLES
   ================================================ */
.recent-section {
    padding: 0 0 32px;
}
.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 12px;
}
.recent-card {
    display: block;
    padding: 14px 16px;
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--clr-border);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.recent-card:hover {
    border-color: var(--clr-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.card-number {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--clr-primary);
}
.card-date {
    font-size: 0.72rem;
    color: var(--clr-text-muted);
    font-weight: 500;
}
.card-words {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.card-word {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--clr-bg);
    border-radius: var(--radius-full);
    color: var(--clr-text-secondary);
    font-weight: 500;
    border: 1px solid var(--clr-border);
}

/* ================================================
   FAQ SECTION (Accordion)
   ================================================ */
.faq-section {
    padding: 0 0 40px;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.faq-item {
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--clr-border);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}
.faq-item:hover {
    border-color: var(--clr-border-strong);
}
.faq-item.faq-open {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px var(--clr-primary-light);
}
.faq-question {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 16px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--clr-text);
    user-select: none;
    transition: color var(--transition-fast);
    margin-bottom: 0;
}
.faq-question:hover {
    color: var(--clr-primary);
}
.faq-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--clr-text-muted);
    transition: transform var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.faq-item.faq-open .faq-chevron {
    transform: rotate(180deg);
    color: var(--clr-primary);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition:
        max-height 0.38s ease,
        padding 0.28s ease;
}
.faq-answer-inner {
    padding: 0 18px 16px;
    font-size: 0.875rem;
    color: var(--clr-text-secondary);
    line-height: 1.7;
}
.faq-item.faq-open .faq-answer {
    max-height: 400px;
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
    margin-top: auto;
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.footer-brand .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 0.88rem;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.3);
}
.footer-brand .logo-text {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: #f1f5f9;
}
.footer-brand p {
    font-size: 0.82rem;
    color: #64748b;
    max-width: 260px;
    line-height: 1.65;
}
.footer-links h4,
.footer-legal h4 {
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
}
.footer-links a {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    padding: 3px 0;
    transition: color var(--transition-fast);
}
.footer-links a:hover {
    color: #f1f5f9;
}
.footer-legal p {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 4px;
}
.footer-bottom {
    border-top: 1px solid #2d3748;
    padding: 16px 0;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
}

/* ================================================
   LONG-FORM SEO CONTENT
   ================================================ */
.content-section {
    padding: 12px 0 36px;
}
.content-card {
    background: var(--clr-surface);
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: clamp(22px, 4vw, 36px);
}
.content-card + .content-card {
    margin-top: 18px;
}
.content-card h2,
.content-card h3 {
    color: var(--clr-text);
    letter-spacing: -0.025em;
    line-height: 1.2;
}
.content-card h2 {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    font-weight: 850;
    margin-bottom: 14px;
}
.content-card h3 {
    font-size: 1.08rem;
    font-weight: 800;
    margin: 24px 0 8px;
}
.content-card p {
    color: var(--clr-text-secondary);
    font-size: 0.98rem;
    line-height: 1.85;
    margin: 0 0 14px;
}
.content-card a {
    color: var(--clr-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.content-card ul,
.content-card ol {
    margin: 10px 0 18px 1.25rem;
    color: var(--clr-text-secondary);
    line-height: 1.8;
}
.content-card li {
    margin-bottom: 8px;
}
.content-highlight {
    background: linear-gradient(135deg, #eef6ff, #f8fbff);
    border: 1px solid #cfe4fb;
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin: 18px 0;
}
.content-grid {
    display: grid;
    gap: 14px;
    margin: 18px 0;
}
@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.mini-card {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 16px;
}
.mini-card strong {
    display: block;
    color: var(--clr-text);
    margin-bottom: 6px;
}

/* ================================================
   ARCHIVE PAGE
   ================================================ */
.archive-header {
    padding: 24px 0 16px;
    text-align: center;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
}
.archive-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--clr-text);
}
.archive-header p {
    font-size: 0.9rem;
    color: var(--clr-text-secondary);
    margin-top: 4px;
}

/* Calendar */
.calendar-section {
    padding: 20px 0;
}
.calendar-wrapper {
    background: var(--clr-surface);
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--clr-border);
    padding: 20px;
    max-width: 360px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.calendar-nav button {
    background: none;
    border: 1.5px solid var(--clr-border);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--clr-text-secondary);
    transition: all var(--transition-fast);
}
.calendar-nav button:hover {
    background: var(--clr-bg);
    border-color: var(--clr-border-strong);
    color: var(--clr-text);
}
.calendar-month-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--clr-text);
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
}
.calendar-weekdays span {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--clr-text-muted);
    padding: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    border-radius: 50%;
    color: var(--clr-text-secondary);
    transition: all var(--transition-fast);
}
.calendar-day--empty {
    visibility: hidden;
}
.calendar-day--today {
    background: var(--clr-bg);
    font-weight: 700;
    color: var(--clr-text);
}
.calendar-day--has-puzzle {
    background: var(--clr-primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(10, 102, 194, 0.25);
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}
.calendar-day--has-puzzle:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.38);
}
.calendar-day--has-puzzle.calendar-day--today {
    box-shadow:
        0 0 0 2.5px #1e293b,
        0 3px 10px rgba(10, 102, 194, 0.3);
}

.archive-puzzle-section {
    padding: 16px 0 32px;
}
.archive-puzzle-section:not(.active) {
    display: none;
}
.archive-puzzle-section.active {
    display: block;
}
.back-to-calendar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--clr-primary);
    cursor: pointer;
    margin-bottom: 16px;
    transition: var(--transition-fast);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: var(--clr-primary-light);
}
.back-to-calendar:hover {
    color: var(--clr-primary-dark);
    background: #c7ddf5;
}
.archive-puzzle-item {
    background: var(--clr-surface);
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--clr-border);
    padding: 20px;
    box-shadow: var(--shadow-md);
}
.archive-puzzle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--clr-border);
}
.archive-puzzle-header h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--clr-text);
}
.puzzle-date {
    font-size: 0.82rem;
    color: var(--clr-text-muted);
    font-weight: 500;
}
.archive-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .archive-layout {
        grid-template-columns: auto 1fr;
        gap: 24px;
        align-items: start;
    }
}
.archive-grid-before {
    display: flex;
    justify-content: center;
}
.archive-grid-after {
    display: none;
    justify-content: center;
}
.archive-words-before {
    display: block;
}
.archive-words-after {
    display: none;
}

.archive-reveal-container {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}
.archive-reveal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid var(--clr-primary);
    cursor: pointer;
    background: var(--clr-primary);
    color: #fff;
    transition: var(--transition);
    letter-spacing: 0.01em;
    box-shadow: 0 2px 10px rgba(10, 102, 194, 0.28);
}
.archive-reveal-btn:hover {
    background: var(--clr-primary-dark);
    border-color: var(--clr-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(10, 102, 194, 0.36);
}
.archive-reveal-hide {
    display: none;
}

/* ================================================
   HOW TO PLAY PAGE
   ================================================ */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}
@media (min-width: 640px) {
    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.step-card {
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--clr-border);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}
.step-card:hover {
    border-color: var(--clr-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.step-num {
    width: 32px;
    height: 32px;
    background: var(--clr-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.3);
}
.step-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--clr-text);
}
.step-card p {
    font-size: 0.84rem;
    color: var(--clr-text-secondary);
    line-height: 1.6;
}

/* ================================================
   PUZZLE PICKER — HIDDEN
   ================================================ */
.puzzle-picker-section {
    display: none !important;
}
.puzzle-picker-btn {
    display: none !important;
}

/* ================================================
   SHIMMER
   ================================================ */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
.shimmer {
    animation: shimmer 1.5s infinite;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9, #e2e8f0 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-lg);
}

/* ================================================
   MOBILE OPTIMIZATIONS
   ================================================ */
@media (max-width: 767px) {
    .container {
        padding: 0 14px;
    }
    .game-layout,
    .archive-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .game-board-col {
        align-items: stretch;
    }
    .wend-board-wrapper {
        width: 100%;
        border-radius: 14px;
        border-width: 2px;
    }
    .page-title-section {
        padding: 20px 0 14px;
    }
    .page-title {
        font-size: 1.1rem;
    }
    .game-section {
        padding: 14px 0 20px;
    }
    .letter-bubble {
        width: 33px;
        height: 33px;
        font-size: 13px;
    }
    .bubble-letter {
        font-size: 13px;
    }
    .letter-row {
        gap: 4px;
    }
    .bubble-arrow {
        width: 14px;
        height: 14px;
    }
    .bubble-arrow svg {
        width: 10px;
        height: 10px;
    }
    .word-blank {
        padding: 10px 12px;
    }
    .btn-reveal-letter,
    .btn-reveal-word {
        padding: 5px 10px;
        font-size: 0.72rem;
    }
    .hints-section,
    .recent-section,
    .faq-section {
        padding: 20px 0;
    }
    .cell-letter {
        font-size: clamp(12px, 4.5vw, 22px);
    }
    .footer-grid {
        gap: 20px;
    }
    .section-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 0 10px;
    }
    .letter-bubble {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .bubble-letter {
        font-size: 12px;
    }
    .letter-row {
        gap: 3px;
    }
    .wend-board-wrapper {
        border-width: 2px;
        border-radius: 10px;
    }
    .cell-letter {
        font-size: clamp(11px, 4vw, 18px);
    }
    .cell-check-badge {
        width: 12px;
        height: 12px;
        font-size: 7px;
        top: 3px;
        left: 3px;
    }
    .cell-circle {
        outline-width: 3px;
    }
    .word-blank {
        padding: 8px 10px;
        border-radius: 12px;
    }
    .btn-reveal-letter,
    .btn-reveal-word {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
}
