/* ===== WordleFriend article pages =====
   Shared by every page in /static/articles/. Palette follows the main app
   (static/css/style.css): Wordle green #6aaa64, yellow #c9b458, charcoal-green
   #2f3a36, light gray page background #f5f5f5. */

:root {
    --green: #6aaa64;
    --green-dark: #4e8a49;
    --green-tint: #e2f4e2;
    --yellow: #c9b458;
    --charcoal: #2f3a36;
    --text: #1f2421;
    --muted: #5c6360;
    --border: #d3d6da;
    --page-bg: #f5f5f5;
    --card-bg: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.65;
    color: var(--text);
    background: var(--page-bg);
}

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

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 14px max(16px, calc((100% - 820px) / 2));
    background: var(--charcoal);
    border-bottom: 4px solid var(--green);
}

.site-header .brand {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-decoration: none;
}

.site-header .brand span {
    color: var(--green);
}

.site-header .cta {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--green);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: bold;
    text-decoration: none;
}

.site-header .cta:hover,
.site-header .cta:focus-visible {
    background: var(--green-dark);
}

/* Site-wide footer: the article list over the tagline line. Same card
   treatment as the article body above it, and the same structure as the
   footer on the home page. */
.site-footer {
    max-width: 820px;
    margin: 20px auto 8px;
    padding: 20px 48px 24px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-top: 3px solid var(--green);
}

.site-footer h2 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

.site-footer li {
    margin-bottom: 0;
}

.site-footer a {
    font-size: 0.95rem;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    text-decoration: underline;
}

.footer-tagline {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}

/* ----- Article card ----- */

main {
    padding: 28px 16px 8px;
}

article {
    max-width: 820px;
    margin: 0 auto;
    padding: 36px 48px 40px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

h1,
h2,
h3 {
    color: var(--charcoal);
    line-height: 1.25;
    scroll-margin-top: 16px;
}

h1 {
    margin: 0 0 24px;
    padding-bottom: 14px;
    font-size: 2.2rem;
    border-bottom: 3px solid var(--green);
}

h2 {
    margin: 40px 0 12px;
    font-size: 1.55rem;
}

h3 {
    margin: 32px 0 10px;
    font-size: 1.25rem;
}

p {
    margin: 0 0 16px;
}

a {
    color: #2e7d32;
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
    color: var(--green-dark);
}

strong {
    color: #111;
}

/* ----- Lists ----- */

ul,
ol {
    margin: 0 0 20px;
    padding-left: 1.6em;
}

li {
    margin-bottom: 10px;
    padding-left: 0.2em;
}

li::marker {
    color: var(--green-dark);
    font-weight: bold;
}

li > p {
    margin: 10px 0 0;
}

/* ----- Images ----- */

figure {
    margin: 24px 0;
    text-align: center;
}

figure img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ----- Tables ----- */

.table-wrap {
    margin: 20px 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.4;
}

th,
td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

thead th {
    background: var(--charcoal);
    color: #ffffff;
    font-weight: bold;
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background: #f7f9f7;
}

tbody tr:hover {
    background: var(--green-tint);
}

/* ----- Small screens ----- */

@media (max-width: 640px) {
    body {
        font-size: 17px;
    }

    main {
        padding: 16px 10px 4px;
    }

    article {
        padding: 24px 18px 28px;
    }

    .site-footer {
        padding: 18px 18px 20px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    th,
    td {
        padding: 7px 8px;
    }
}

/* ----- Print ----- */

@media print {
    body {
        background: #ffffff;
    }

    .site-header .cta {
        display: none;
    }

    article {
        box-shadow: none;
        padding: 0;
    }
}
