/* ===================================================
   Pressmantle — Stylesheet
   Colours: bg #ffffff, text #1a1a1a, secondary #666, accent #2a6e5a
   Fonts: Playfair Display (headings), Inter (body)
   =================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: #1a1a1a;
    background: #ffffff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #2a6e5a;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1e5243;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.25;
    color: #1a1a1a;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===================================================
   Masthead
   =================================================== */
.masthead {
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    z-index: 100;
}

.masthead-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hamburger (mobile only) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1a1a1a;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Desktop nav */
.nav-main {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex: 1;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.nav-link:hover {
    color: #2a6e5a;
}

/* Centre lockup */
.masthead-lockup {
    text-align: center;
    flex-shrink: 0;
    padding: 0 2rem;
}

.lockup-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
}

.masthead-emblem {
    width: 36px;
    height: 36px;
}

.masthead-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    color: #1a1a1a;
    line-height: 1;
}

.masthead-tagline {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-size: 0.75rem;
    font-weight: 300;
    color: #777;
    line-height: 1;
}

/* Right actions */
.masthead-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.btn-join {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    background: #2a6e5a;
    padding: 0.55rem 1.25rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.btn-join:hover {
    background: #1e5243;
    color: #ffffff;
}

.btn-join-lg {
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

/* ===================================================
   Hero Article (Homepage)
   =================================================== */
.hero-article {
    border-bottom: 1px solid #e5e5e5;
    padding: 2.5rem 0 3rem;
}

.hero-article-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-article-image-link {
    display: block;
    text-decoration: none;
}

.hero-article-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-accent {
    position: absolute;
    inset: 0;
    border-radius: 6px;
}

.hero-image-section {
    position: relative;
    z-index: 1;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.03em;
    opacity: 0.5;
}

.hero-article-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-article-title {
    font-size: 2.25rem;
    line-height: 1.2;
    margin: 0.25rem 0 0.5rem;
}

.hero-article-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-article-title a:hover {
    color: #2a6e5a;
}

.hero-article-excerpt {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.65;
    margin-bottom: 0.5rem;
}

.hero-article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #888;
}

.meta-sep {
    color: #ccc;
}

.hero-article-writer {
    font-weight: 500;
    color: #666;
}

.hero-article-date {
    color: #999;
}

/* ===================================================
   Section Tag (Colour-coded pill)
   =================================================== */
.section-tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
    padding: 0.2rem 0.65rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.section-tag:hover {
    opacity: 0.85;
    color: #ffffff;
}

/* ===================================================
   Article Grid
   =================================================== */
.article-grid-section {
    padding: 3rem 0 2rem;
}

.section-heading {
    font-size: 1.5rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1a1a1a;
    display: inline-block;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.article-grid--three {
    grid-template-columns: repeat(3, 1fr);
}

.article-card {
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.article-card-image-link {
    display: block;
    text-decoration: none;
}

.article-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image-accent {
    position: absolute;
    inset: 0;
}

.card-image-section {
    position: relative;
    z-index: 1;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.03em;
    opacity: 0.45;
}

.article-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: #1a1a1a;
    line-height: 1.3;
}

.article-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card-title a:hover {
    color: #2a6e5a;
}

.article-card-excerpt {
    font-size: 0.9rem;
    color: #666666;
    line-height: 1.55;
    margin-bottom: 0.75rem;
    flex: 1;
}

.article-card-writer {
    font-size: 0.8rem;
    color: #999;
    font-weight: 500;
    margin-top: auto;
}

/* ===================================================
   Legacy Cards (keep for section pages)
   =================================================== */
.article-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ===================================================
   Hero Section (Fallback - no articles)
   =================================================== */
.hero-section {
    padding: 4rem 0 3rem;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
}

.hero-heading {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.hero-sub {
    font-size: 1.1rem;
    color: #666666;
    font-weight: 300;
}

/* ===================================================
   Sections Grid (Homepage - legacy)
   =================================================== */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.section-card {
    display: block;
    padding: 1.25rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fafafa;
    border-radius: 4px;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

.section-card-writer {
    font-size: 0.85rem;
    color: #666666;
    font-weight: 400;
}

/* ===================================================
   Articles Grid (Legacy — section pages)
   =================================================== */
.articles-grid {
    padding: 2.5rem 0;
    border-top: 1px solid #e5e5e5;
}

/* ===================================================
   CTA Banner
   =================================================== */
.cta-banner {
    background: #f7f9f8;
    padding: 3.5rem 0;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

.cta-banner-heading {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.cta-banner-text {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-banner-form {
    display: flex;
    gap: 0.75rem;
    max-width: 460px;
    margin: 0 auto;
}

.cta-banner-form input[type="email"] {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s ease;
}

.cta-banner-form input[type="email"]:focus {
    border-color: #2a6e5a;
}

.cta-banner-form .btn-join {
    flex-shrink: 0;
}

/* ===================================================
   Section Page
   =================================================== */
.section-header {
    padding: 2rem 0 1.5rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.section-writer {
    font-size: 0.95rem;
    color: #666666;
    font-weight: 400;
}

.section-articles {
    padding-bottom: 3rem;
}

/* ===================================================
   Article Page
   =================================================== */
.article-page {
    padding-bottom: 0;
}

/* Article Hero Image Placeholder */
.article-hero-image {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16 / 7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0;
}

.article-hero-accent {
    position: absolute;
    inset: 0;
}

.article-hero-label {
    position: relative;
    z-index: 1;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: 0.04em;
    opacity: 0.35;
}

/* Article Header */
.article-header {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    margin: 0.75rem 0 1rem;
    line-height: 1.15;
}

/* Article Meta (byline + date) */
.article-meta {
    padding: 1rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.article-byline {
    margin-bottom: 0.35rem;
}

.article-writer {
    font-weight: 600;
    font-size: 0.95rem;
}

.article-writer-bio {
    display: block;
    font-size: 0.85rem;
    color: #666666;
    font-style: italic;
    margin-top: 0.15rem;
}

.article-date {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Article Body */
.article-body {
    padding: 2rem 0 2.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
}

.article-body h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
}

.article-body h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
}

.article-body ul, .article-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    border-left: 3px solid #2a6e5a;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: #555;
    font-style: italic;
}

.article-body strong {
    font-weight: 600;
}

.article-body em {
    font-style: italic;
}

.article-body hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 2rem 0;
}

.article-body a {
    color: #2a6e5a;
    text-decoration: underline;
    text-decoration-color: #2a6e5a40;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease;
}

.article-body a:hover {
    text-decoration-color: #2a6e5a;
}

/* Disclaimer */
.article-disclaimer {
    padding: 1.25rem 0;
    border-top: 1px solid #e5e5e5;
}

.article-disclaimer p {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    line-height: 1.6;
}

/* Article Actions */
.article-actions {
    padding: 1rem 0 2.5rem;
}

.btn-copy-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2a6e5a;
    background: none;
    border: 1px solid #2a6e5a;
    padding: 0.5rem 1.15rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.btn-copy-link:hover {
    background: #2a6e5a;
    color: #ffffff;
}

.btn-copy-link:hover svg path {
    stroke: #ffffff;
}

/* More Articles */
.more-articles {
    padding: 3rem 0 2rem;
    border-top: 1px solid #e5e5e5;
}

.related-articles {
    padding: 2.5rem 0;
    border-top: 1px solid #e5e5e5;
}

/* ===================================================
   Join Banner (legacy)
   =================================================== */
.join-banner {
    background: #f8f8f8;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

.join-banner h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.join-banner p {
    color: #666666;
    margin-bottom: 1.25rem;
}

/* ===================================================
   Page Header (About, Subscribe, etc.)
   =================================================== */
.page-header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
}

.page-body {
    padding-bottom: 3rem;
}

.page-body p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.page-body h2 {
    font-size: 1.4rem;
    margin: 2rem 0 0.75rem;
}

.page-body ul {
    margin: 0.5rem 0 1.5rem 1.5rem;
}

.page-body li {
    margin-bottom: 0.4rem;
}

.empty-message {
    text-align: center;
    padding: 3rem 0;
    color: #999;
    font-size: 1.1rem;
}

/* ===================================================
   Subscribe Form
   =================================================== */
.subscribe-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    max-width: 500px;
}

.subscribe-form input[type="email"] {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease;
}

.subscribe-form input[type="email"]:focus {
    border-color: #2a6e5a;
}

.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.message-success {
    background: #e8f5e9;
    color: #2E7D32;
    border: 1px solid #c8e6c9;
}

.message-error {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #f8bbd0;
}

.message-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* ===================================================
   Puzzles Coming Soon
   =================================================== */
.puzzles-coming-soon {
    text-align: center;
    padding: 3rem 0;
}

.puzzles-emblem {
    margin: 0 auto 1.5rem;
    opacity: 0.6;
}

.puzzles-coming-soon h2 {
    margin-bottom: 0.5rem;
}

.puzzles-coming-soon p {
    color: #666666;
    margin-bottom: 1.5rem;
}

/* ===================================================
   Error Page (404)
   =================================================== */
.error-page {
    text-align: center;
    padding: 5rem 0;
}

.error-emblem {
    margin: 0 auto 1.5rem;
    opacity: 0.5;
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.error-page p {
    color: #666666;
    margin-bottom: 1.5rem;
}

/* ===================================================
   Footer
   =================================================== */
.site-footer {
    background: #1a1a1a;
    color: #cccccc;
    padding: 2.5rem 0;
    margin-top: 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-nav a {
    font-size: 0.85rem;
    color: #cccccc;
    font-weight: 400;
}

.footer-nav a:hover {
    color: #ffffff;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-social a {
    font-size: 0.85rem;
    color: #999;
}

.footer-social a:hover {
    color: #ffffff;
}

.footer-subscribe {
    margin-bottom: 1.5rem;
}

.footer-subscribe-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.footer-subscribe-form input[type="email"] {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #444;
    border-radius: 4px;
    background: #2a2a2a;
    color: #ffffff;
    outline: none;
}

.footer-subscribe-form input[type="email"]::placeholder {
    color: #888;
}

.footer-subscribe-form input[type="email"]:focus {
    border-color: #2a6e5a;
}

.footer-subscribe-form button {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    background: #2a6e5a;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.footer-subscribe-form button:hover {
    background: #1e5243;
}

.footer-copy {
    font-size: 0.8rem;
    color: #777;
}

/* ===================================================
   Section Colour Classes
   =================================================== */
.section-after-50 { color: #8B4513; }
.section-supplements { color: #2a6e5a; }
.section-wholesome { color: #D4A017; }
.section-plain-ai { color: #4A90D9; }
.section-money { color: #2E7D32; }
.section-parenting { color: #C2185B; }
.section-lifestyle { color: #7B1FA2; }

/* ===================================================
   Mobile Responsive
   =================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .article-grid--three {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-article-inner {
        gap: 2rem;
    }

    .hero-article-title {
        font-size: 1.85rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-main {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        z-index: 105;
    }

    .nav-main.active {
        display: flex;
    }

    .nav-link {
        font-size: 1.1rem;
    }

    .masthead-lockup {
        padding: 0 0.5rem;
    }

    .masthead-name {
        font-size: 1.1rem;
    }

    .masthead-emblem {
        width: 28px;
        height: 28px;
    }

    .masthead-tagline {
        display: none;
    }

    .masthead-actions .btn-join {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    /* Hero Article — stacked on mobile */
    .hero-article {
        padding: 1.5rem 0 2rem;
    }

    .hero-article-inner {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .hero-article-title {
        font-size: 1.6rem;
    }

    .hero-article-excerpt {
        font-size: 0.95rem;
    }

    /* Article grid */
    .article-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .article-grid--three {
        grid-template-columns: 1fr;
    }

    .article-cards {
        grid-template-columns: 1fr;
    }

    /* Article page */
    .article-hero-image {
        aspect-ratio: 16 / 9;
    }

    .article-hero-label {
        font-size: 1.25rem;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .article-body {
        font-size: 1rem;
    }

    /* Section page */
    .hero-heading {
        font-size: 1.75rem;
    }

    .hero-section {
        padding: 2.5rem 0 2rem;
    }

    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Forms */
    .subscribe-form {
        flex-direction: column;
    }

    .cta-banner-form {
        flex-direction: column;
        padding: 0 1rem;
    }

    .cta-banner-form .btn-join {
        width: 100%;
        text-align: center;
    }

    /* Footer */
    .footer-nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-social {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-subscribe-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    /* Mobile padding — comfortable breathing room from screen edges */
    .container,
    .container-narrow {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .article-body {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .section-hero-area,
    .section-grid {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .masthead-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .footer-inner {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .sections-grid {
        grid-template-columns: 1fr;
    }

    .hero-heading {
        font-size: 1.5rem;
    }

    .hero-article-title {
        font-size: 1.4rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .cta-banner {
        padding: 2.5rem 0;
    }

    .cta-banner-heading {
        font-size: 1.4rem;
    }
}

/* Small phones (375px and below) */
@media (max-width: 375px) {
    .container,
    .container-narrow {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section-hero-area,
    .section-grid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .article-body {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .cta-banner-form {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .article-card-body {
        padding: 1rem;
    }
}

/* Very small phones (360px and below) */
@media (max-width: 360px) {
    .container,
    .container-narrow {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section-hero-area,
    .section-grid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .masthead-inner {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .footer-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .article-card-body {
        padding: 1rem;
    }
}

/* ===================================================
   Section Page — The Age Style Layout
   ===================================================
 */

/* Section Header */
.section-header {
    padding: 1.5rem 0 0;
    margin-bottom: 0;
}

.section-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 800;
    color: #1a1a1a;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #1a1a1a;
    margin-bottom: 0.35rem;
}

.section-page-writer {
    font-size: 0.9rem;
    color: #888;
    font-weight: 400;
    margin-bottom: 0;
    padding-top: 0.5rem;
}

/* Hero Area — two-column */
.section-hero-area {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    padding: 1.75rem 1.5rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid #e5e5e5;
}

/* Hero Main (left column) */
.section-hero-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-hero-image-link {
    display: block;
    text-decoration: none;
}

.section-hero-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-hero-accent {
    position: absolute;
    inset: 0;
    border-radius: 6px;
}

.section-hero-label {
    position: relative;
    z-index: 1;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.03em;
    opacity: 0.5;
}

.section-hero-title {
    font-size: 1.75rem;
    line-height: 1.2;
    margin: 0;
}

.section-hero-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-hero-title a:hover {
    color: #2a6e5a;
}

.section-hero-excerpt {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.section-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.section-hero-writer {
    font-weight: 500;
    color: #888;
}

/* Hero Sidebar (right column) */
.section-hero-sidebar {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e5e5e5;
    padding-left: 2rem;
}

.section-sidebar-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
}

.section-sidebar-item:first-child {
    padding-top: 0;
}

.section-sidebar-item--bordered {
    border-bottom: 1px solid #eee;
}

.section-sidebar-thumb-link {
    display: block;
    flex-shrink: 0;
    text-decoration: none;
}

.section-sidebar-thumb {
    position: relative;
    width: 120px;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-sidebar-thumb-accent {
    position: absolute;
    inset: 0;
    border-radius: 4px;
}

.section-sidebar-thumb-label {
    position: relative;
    z-index: 1;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    opacity: 0.5;
}

.section-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.section-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.section-sidebar-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-sidebar-title a:hover {
    color: #2a6e5a;
}

.section-sidebar-writer {
    font-size: 0.8rem;
    color: #999;
    font-weight: 500;
}

/* Section Grid (remaining articles below hero) */
.section-grid {
    padding: 2.5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===================================================
   Section Page — Responsive
   =================================================== */
@media (max-width: 768px) {
    .section-page-title {
        font-size: 1.75rem;
    }

    .section-hero-area {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.25rem 1.5rem 2rem;
    }

    .section-hero-sidebar {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #e5e5e5;
        padding-top: 1rem;
    }

    .section-hero-title {
        font-size: 1.5rem;
    }

    .section-sidebar-thumb {
        width: 100px;
    }

    .section-grid {
        padding: 1.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .section-page-title {
        font-size: 1.4rem;
    }

    .section-hero-title {
        font-size: 1.3rem;
    }

    .section-sidebar-thumb {
        width: 80px;
    }

    .section-sidebar-title {
        font-size: 0.9rem;
    }
}

/* ===================================================
   Module 4 — About, Subscribe, 404, Polish
   =================================================== */

/* ===================================================
   About Page
   =================================================== */
.about-page {
    padding: 3rem 0 4rem;
}

.about-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.about-header h1 {
    font-size: 2.25rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
}

.about-content h2 {
    font-size: 1.35rem;
    margin: 2.5rem 0 0.75rem;
    font-family: 'Playfair Display', Georgia, serif;
}

.about-lead {
    font-size: 1.15rem;
    line-height: 1.75;
    color: #333;
    margin-bottom: 1.5rem;
}

.about-content p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
    color: #444;
}

.about-sections-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.about-sections-list li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #2a6e5a;
    transition: color 0.2s ease;
}

.about-sections-list li a:hover {
    color: #1e5243;
}

.about-email {
    font-weight: 500;
    color: #2a6e5a;
    border-bottom: 1px solid #2a6e5a40;
    transition: border-color 0.2s ease;
}

.about-email:hover {
    border-color: #2a6e5a;
}

/* ===================================================
   Subscribe Page
   =================================================== */
.subscribe-page {
    padding: 4rem 0 5rem;
    text-align: center;
}

.subscribe-header {
    margin-bottom: 2rem;
}

.subscribe-emblem {
    margin: 0 auto 1.25rem;
    opacity: 0.65;
}

.subscribe-header h1 {
    font-size: 2.25rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    margin-bottom: 1rem;
}

.subscribe-lead {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}

.subscribe-form-block {
    max-width: 440px;
    margin: 0 auto;
}

.subscribe-field {
    margin-bottom: 1rem;
}

.subscribe-field input[type="email"] {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.subscribe-field input[type="email"]:focus {
    border-color: #2a6e5a;
    box-shadow: 0 0 0 3px #2a6e5a18;
}

.subscribe-btn {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 0.85rem 2rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

.subscribe-btn:active {
    transform: scale(0.98);
}

.subscribe-note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 1rem;
}

/* ===================================================
   404 Page
   =================================================== */
.error-404 {
    text-align: center;
    padding: 6rem 0 5rem;
}

.error-404-emblem {
    margin: 0 auto 1.5rem;
    opacity: 0.45;
}

.error-404 h1 {
    font-size: 2.25rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.error-404 p {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-404 .btn-join {
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

/* ===================================================
   Form Feedback Messages (enhanced)
   =================================================== */
.message {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}

.message p {
    margin: 0;
    color: inherit;
}

.message-success {
    background: #e8f5e9;
    color: #2E7D32;
    border: 1px solid #c8e6c9;
}

.message-error {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #f8bbd0;
}

.message-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* ===================================================
   Mobile Polish — Additional Fixes
   =================================================== */

/* Prevent horizontal overflow everywhere */
html, body {
    overflow-x: hidden;
}

/* Touch-friendly tap targets */
.nav-link,
.footer-nav a,
.footer-social a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.btn-join,
.btn-copy-link,
.subscribe-btn,
.footer-subscribe-form button {
    min-height: 44px;
}

/* Smooth hover transitions on all interactive elements */
.article-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-join {
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-join:active {
    transform: scale(0.97);
}

.btn-copy-link {
    transition: all 0.2s ease;
}

/* Subscribe page — mobile */
@media (max-width: 768px) {
    .about-page {
        padding: 2rem 0 3rem;
    }

    .about-header h1 {
        font-size: 1.75rem;
    }

    .about-content h2 {
        font-size: 1.2rem;
        margin-top: 2rem;
    }

    .about-sections-list {
        flex-direction: column;
        gap: 0.6rem;
    }

    .subscribe-page {
        padding: 3rem 0 4rem;
    }

    .subscribe-header h1 {
        font-size: 1.75rem;
    }

    .subscribe-lead {
        font-size: 0.95rem;
    }

    .error-404 {
        padding: 4rem 0 3.5rem;
    }

    .error-404 h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .about-header h1 {
        font-size: 1.5rem;
    }

    .subscribe-header h1 {
        font-size: 1.5rem;
    }

    .error-404 h1 {
        font-size: 1.5rem;
    }
}

/* ===================================================
   Module 5 — Sudoku Puzzle
   =================================================== */

/* --- Puzzles List Page --- */
.puzzles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0 2rem;
}

.puzzle-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.puzzle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.puzzle-card-coming {
    opacity: 0.55;
    cursor: default;
}

.puzzle-card-coming:hover {
    transform: none;
    box-shadow: none;
}

.puzzle-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #2a6e5a;
    background: #f0f7f5;
    border-radius: 8px;
    flex-shrink: 0;
}

.puzzle-card-info h2 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.puzzle-card-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.puzzle-card-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2a6e5a;
}

.puzzle-card-cta.muted {
    color: #999;
    font-weight: 400;
}

/* --- Sudoku Page --- */
.sudoku-page {
    padding: 2rem 0 4rem;
    text-align: center;
}

.sudoku-header {
    margin-bottom: 1.5rem;
}

.sudoku-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.sudoku-date {
    font-size: 0.9rem;
    color: #888;
    font-weight: 400;
}

/* --- Difficulty Selector --- */
.difficulty-selector {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.difficulty-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 0.45rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.difficulty-btn:hover {
    color: #2a6e5a;
    border-color: #2a6e5a;
    background: #f0f7f5;
}

.difficulty-btn.active {
    color: #ffffff;
    background: #2a6e5a;
    border-color: #2a6e5a;
}

/* --- Timer --- */
.sudoku-timer {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 1.25rem;
    letter-spacing: 0.05em;
}

/* --- Sudoku Grid --- */
.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    max-width: 405px;
    margin: 0 auto 1.5rem;
    border: 2.5px solid #333;
    background: #333;
    gap: 0;
    border-radius: 4px;
    overflow: hidden;
}

.sudoku-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #2a6e5a;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    transition: background 0.15s ease;
    min-width: 36px;
    min-height: 36px;
    position: relative;
}

/* Remove right border on last column */
.sudoku-cell:nth-child(9n) {
    border-right: none;
}

/* Remove bottom border on last row */
.sudoku-cell:nth-child(n+73) {
    border-bottom: none;
}

/* 3x3 box borders — thick left */
.sudoku-cell.box-left {
    border-left: 2.5px solid #333;
}

/* 3x3 box borders — thick top */
.sudoku-cell.box-top {
    border-top: 2.5px solid #333;
}

/* Given cells */
.sudoku-cell.given {
    font-weight: 700;
    color: #1a1a1a;
    background: #fafafa;
}

/* Editable cells */
.sudoku-cell.editable {
    cursor: pointer;
}

/* Selected cell */
.sudoku-cell.selected {
    background: #d4edda;
    z-index: 1;
}

/* Highlighted row/column/box */
.sudoku-cell.highlighted {
    background: #f0f7f5;
}

/* Same number highlight */
.sudoku-cell.same-number {
    background: #e0efe8;
}

/* Error */
.sudoku-cell.error {
    background: #fce4ec !important;
    color: #c62828 !important;
}

/* Correct (flash) */
.sudoku-cell.correct {
    background: #e8f5e9 !important;
    color: #2E7D32 !important;
}

/* --- Number Pad --- */
.number-pad {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 auto 1.25rem;
    max-width: 405px;
    flex-wrap: wrap;
}

.numpad-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.numpad-btn:hover {
    background: #e8f5e9;
    border-color: #2a6e5a;
    color: #2a6e5a;
}

.numpad-btn:active {
    transform: scale(0.95);
}

.numpad-erase {
    color: #c62828;
    font-size: 0.95rem;
}

.numpad-erase:hover {
    background: #fce4ec;
    border-color: #c62828;
    color: #c62828;
}

/* --- Controls --- */
.sudoku-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.sudoku-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2a6e5a;
    background: #ffffff;
    border: 1px solid #2a6e5a;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
}

.sudoku-btn:hover {
    background: #2a6e5a;
    color: #ffffff;
}

.sudoku-btn:active {
    transform: scale(0.97);
}

/* --- Message --- */
.sudoku-message {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 0;
    margin-bottom: 1rem;
    min-height: 1.5rem;
    line-height: 1.5;
}

.sudoku-message-success {
    color: #2a6e5a;
    font-weight: 600;
    font-size: 1.05rem;
}

.sudoku-message-error {
    color: #c62828;
}

.sudoku-message-info {
    color: #2a6e5a;
}

/* --- Back Link --- */
.sudoku-back {
    margin-top: 1rem;
}

.sudoku-back a {
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
}

.sudoku-back a:hover {
    color: #2a6e5a;
}

/* --- Sudoku Responsive --- */
@media (max-width: 480px) {
    .sudoku-grid {
        max-width: 100%;
    }

    .sudoku-cell {
        font-size: 1rem;
        min-width: 32px;
        min-height: 32px;
    }

    .numpad-btn {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .number-pad {
        max-width: 100%;
    }

    .sudoku-header h1 {
        font-size: 1.6rem;
    }

    .difficulty-btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.75rem;
    }

    .sudoku-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 360px) {
    .sudoku-cell {
        font-size: 0.9rem;
    }

    .numpad-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}


/* ===================================================
   Crossword Puzzle Styles
   =================================================== */

.crossword-page {
    padding: 2rem 0 4rem;
}

.crossword-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.crossword-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.crossword-date {
    color: #666;
    font-size: 0.95rem;
}

.crossword-timer {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

/* --- Grid + Clues Layout --- */
.crossword-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.crossword-grid-wrapper {
    flex: 0 0 auto;
    width: 100%;
    max-width: 480px;
}

.crossword-clues-wrapper {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 520px;
    overflow-y: auto;
}

/* --- Grid --- */
.crossword-grid {
    display: grid;
    border: 2px solid #1a1a1a;
    width: 100%;
    aspect-ratio: 1;
    user-select: none;
}

.crossword-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.1s ease;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    aspect-ratio: 1;
}

.crossword-cell.black {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    cursor: default;
}

.crossword-cell.white {
    background-color: #ffffff;
}

.crossword-cell.white:hover {
    background-color: #f0faf7;
}

.crossword-cell.word-highlight {
    background-color: #e0f2ec;
}

.crossword-cell.selected {
    background-color: #b8e0d4;
}

.crossword-cell.selected.word-highlight {
    background-color: #b8e0d4;
}

.crossword-cell.error {
    background-color: #ffe0e0;
}

.crossword-cell.error .cell-letter {
    color: #cc3333;
}

.crossword-cell.revealed .cell-letter {
    color: #999;
}

.cell-number {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 0.55em;
    font-weight: 500;
    color: #999;
    line-height: 1;
    pointer-events: none;
}

.cell-letter {
    color: #2a6e5a;
    font-size: inherit;
    font-weight: 600;
    text-transform: uppercase;
    pointer-events: none;
}

/* --- Clue Panels --- */
.clue-panel {
    padding: 0;
}

.clue-panel-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid #2a6e5a;
}

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

.clue-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-left: 3px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}

.clue-item:hover {
    background-color: #f0faf7;
}

.clue-item.active {
    background-color: #e0f2ec;
    border-left-color: #2a6e5a;
}

.clue-number {
    font-weight: 700;
    color: #2a6e5a;
    min-width: 1.5em;
    flex-shrink: 0;
}

.clue-text {
    color: #333;
}

/* --- Controls --- */
.crossword-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.crossword-btn {
    padding: 0.55rem 1.25rem;
    border: 1px solid #2a6e5a;
    background: #ffffff;
    color: #2a6e5a;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.crossword-btn:hover {
    background: #2a6e5a;
    color: #ffffff;
}

/* --- Message --- */
.crossword-message {
    text-align: center;
    padding: 0;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    min-height: 1.5em;
    transition: opacity 0.3s ease;
}

.crossword-message-success {
    color: #2a6e5a;
    font-weight: 600;
    padding: 1rem;
    background: #e0f2ec;
    border-radius: 6px;
}

.crossword-message-error {
    color: #cc3333;
}

.crossword-message-info {
    color: #666;
}

/* --- Back Link --- */
.crossword-back {
    text-align: center;
}

.crossword-back a {
    color: #2a6e5a;
    font-size: 0.9rem;
}

.crossword-back a:hover {
    color: #1e5243;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .crossword-container {
        flex-direction: column;
        align-items: center;
    }

    .crossword-grid-wrapper {
        max-width: 100%;
    }

    .crossword-clues-wrapper {
        max-height: none;
        overflow-y: visible;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .crossword-header h1 {
        font-size: 1.6rem;
    }

    .crossword-cell {
        font-size: 0.8rem;
    }

    .cell-number {
        font-size: 0.45em;
    }

    .crossword-controls {
        flex-wrap: wrap;
    }

    .crossword-btn {
        padding: 0.45rem 1rem;
        font-size: 0.8rem;
    }

    .clue-item {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .crossword-page {
        padding: 1rem 0 3rem;
    }

    .crossword-cell {
        font-size: 0.65rem;
    }

    .cell-number {
        font-size: 0.4em;
        top: 0;
        left: 1px;
    }

    .crossword-grid {
        border-width: 1.5px;
    }

    .crossword-cell {
        border-width: 0.5px;
    }
}

/* ===================================================
   Module 6 — Crossword Puzzle
   =================================================== */

/* --- Crossword Page --- */
.crossword-page {
    padding: 2rem 0 4rem;
}

.crossword-wrapper {
    max-width: 760px;
}

.crossword-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.crossword-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.crossword-date {
    font-size: 0.9rem;
    color: #888;
    font-weight: 400;
}

/* --- Timer --- */
.crossword-timer {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 1.25rem;
    letter-spacing: 0.05em;
}

/* --- Crossword Container --- */
.crossword-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Crossword Grid --- */
.crossword-grid {
    display: grid;
    max-width: 520px;
    width: 100%;
    margin: 0 auto 1.5rem;
    border: 2.5px solid #333;
    background: #333;
    gap: 1px;
    border-radius: 4px;
    overflow: hidden;
}

.crossword-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    min-width: 30px;
    min-height: 30px;
    transition: background 0.1s ease;
}

.crossword-cell.black {
    background: #333;
    cursor: default;
}

.crossword-cell.active {
    background: #2a6e5a;
    color: #ffffff;
}

.crossword-cell.active .cell-number {
    color: rgba(255, 255, 255, 0.7);
}

.crossword-cell.active-word {
    background: rgba(42, 110, 90, 0.12);
}

.crossword-cell.error {
    background: #fce4ec !important;
    color: #c62828 !important;
}

.crossword-cell.correct {
    background: #e8f5e9 !important;
    color: #2E7D32 !important;
}

/* --- Cell Number --- */
.cell-number {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #666;
    line-height: 1;
    pointer-events: none;
}

/* --- Cell Letter --- */
.cell-letter {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
    pointer-events: none;
}

/* --- Controls --- */
.crossword-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 520px;
}

.crossword-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2a6e5a;
    background: #ffffff;
    border: 1px solid #2a6e5a;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
}

.crossword-btn:hover {
    background: #2a6e5a;
    color: #ffffff;
}

.crossword-btn:active {
    transform: scale(0.97);
}

.crossword-btn-danger {
    color: #c62828;
    border-color: #e0e0e0;
}

.crossword-btn-danger:hover {
    background: #c62828;
    color: #ffffff;
    border-color: #c62828;
}

/* --- Message --- */
.crossword-message {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 0;
    margin-bottom: 1.5rem;
    min-height: 1.5rem;
    line-height: 1.5;
    text-align: center;
    width: 100%;
    max-width: 520px;
}

.crossword-message-success {
    color: #2a6e5a;
    font-weight: 600;
    font-size: 1.05rem;
}

.crossword-message-error {
    color: #c62828;
}

.crossword-message-info {
    color: #2a6e5a;
}

/* --- Clue Panels --- */
.clue-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    margin-top: 0.5rem;
}

.clue-panel {
    min-width: 0;
}

.clue-panel-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1a1a1a;
}

.clue-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.clue-item {
    font-size: 0.88rem;
    line-height: 1.45;
    padding: 0.45rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    color: #444;
    transition: background 0.15s ease, color 0.15s ease;
}

.clue-item:hover {
    background: #f5f5f5;
}

.clue-item.active {
    background: rgba(42, 110, 90, 0.1);
    color: #1a1a1a;
    font-weight: 500;
}

.clue-number {
    font-weight: 700;
    color: #1a1a1a;
    margin-right: 0.15rem;
}

.clue-length {
    color: #999;
    font-size: 0.8rem;
}

/* --- Back Link --- */
.crossword-back {
    text-align: center;
    margin-top: 2rem;
}

.crossword-back a {
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
}

.crossword-back a:hover {
    color: #2a6e5a;
}

/* --- Crossword Responsive --- */
@media (max-width: 640px) {
    .clue-panels {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .crossword-grid {
        max-width: 100%;
    }

    .crossword-cell {
        min-width: 24px;
        min-height: 24px;
    }

    .cell-letter {
        font-size: 0.9rem;
    }

    .cell-number {
        font-size: 8px;
        top: 1px;
        left: 2px;
    }

    .crossword-header h1 {
        font-size: 1.6rem;
    }

    .crossword-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 400px) {
    .crossword-cell {
        min-width: 20px;
        min-height: 20px;
    }

    .cell-letter {
        font-size: 0.8rem;
    }

    .cell-number {
        font-size: 7px;
    }
}


/* ===================================================
   Crossword Puzzle Styles
   =================================================== */

.crossword-page {
    padding: 2rem 0 4rem;
}

.crossword-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.crossword-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.crossword-date {
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
}

.crossword-timer {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.crossword-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
}

.crossword-grid-wrapper {
    flex-shrink: 0;
}

.crossword-grid {
    display: grid;
    border: 2px solid #1a1a1a;
    width: min(420px, 90vw);
    height: min(420px, 90vw);
    background: #1a1a1a;
    gap: 1px;
    user-select: none;
}

.crossword-cell {
    background: #ffffff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1;
}

.crossword-cell.black {
    background: #1a1a1a;
    cursor: default;
}

.crossword-cell.selected {
    background: rgba(42, 110, 90, 0.25);
}

.crossword-cell.highlighted {
    background: rgba(42, 110, 90, 0.12);
}

.crossword-cell.selected.highlighted {
    background: rgba(42, 110, 90, 0.25);
}

.crossword-cell.error {
    background: rgba(220, 53, 69, 0.2) !important;
}

.cell-number {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 9px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #666;
    line-height: 1;
    pointer-events: none;
}

.cell-letter {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 2.2vw, 20px);
    font-weight: 600;
    color: #1a1a1a;
    text-transform: uppercase;
    line-height: 1;
    pointer-events: none;
}

/* --- Clue Panels --- */
.clue-panels {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: min(420px, 90vw);
    overflow-y: auto;
}

.clue-panel-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #ddd;
}

.clue-list {
    display: flex;
    flex-direction: column;
}

.clue-item {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    line-height: 1.5;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    border-left: 3px solid transparent;
    border-radius: 2px;
    transition: background 0.15s ease, border-color 0.15s ease;
    color: #333;
}

.clue-item:hover {
    background: rgba(42, 110, 90, 0.06);
}

.clue-item.active {
    border-left-color: #2a6e5a;
    background: rgba(42, 110, 90, 0.08);
    font-weight: 500;
    color: #1a1a1a;
}

/* --- Controls --- */
.crossword-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.crossword-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crossword-btn:hover {
    border-color: #2a6e5a;
    color: #2a6e5a;
    background: rgba(42, 110, 90, 0.04);
}

/* --- Message --- */
.crossword-message {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    margin-top: 1rem;
    min-height: 1.5em;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.crossword-message-success {
    background: rgba(42, 110, 90, 0.1);
    color: #2a6e5a;
    font-weight: 600;
}

.crossword-message-error {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.crossword-message-info {
    background: rgba(42, 110, 90, 0.06);
    color: #2a6e5a;
}

.crossword-back {
    text-align: center;
    margin-top: 2rem;
}

.crossword-back a {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #2a6e5a;
}

.crossword-back a:hover {
    color: #1e5243;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .crossword-container {
        flex-direction: column;
        align-items: center;
    }

    .crossword-grid {
        width: min(360px, 92vw);
        height: min(360px, 92vw);
    }

    .clue-panels {
        max-height: none;
        width: 100%;
        flex-direction: row;
        gap: 1rem;
    }

    .clue-panel {
        flex: 1;
    }

    .crossword-cell {
        min-width: 28px;
        min-height: 28px;
    }
}

@media (max-width: 480px) {
    .crossword-grid {
        width: 92vw;
        height: 92vw;
    }

    .clue-panels {
        flex-direction: column;
    }

    .cell-number {
        font-size: 7px;
    }

    .cell-letter {
        font-size: 13px;
    }

    .crossword-header h1 {
        font-size: 1.5rem;
    }
}

/* ===== Hero Image Styles ===== */
.article-hero-img,
.hero-article-img,
.article-card-img,
.section-hero-img,
.section-sidebar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
