/* ============================================================
   recap.study — Site Stylesheet
   Card-block design system · 2025
   
   STRUCTURE (unchanged):
   body > .ads_top / main (flex-row) > aside + #articleBody (flex-row) > article + aside / footer
   
   DESIGN LOGIC:
   · Page background: neutral dot-grid, same as card system
   · aside (left nav) = card block — tinted background, top border accent
   · article = main card — white body, strong header rule
   · footer = subdued card block
   · Nav buttons: card-style, matching lens palette
   · Typography: Merriweather for body, system sans for UI elements
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   FONTS
   ───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;600;700&display=swap');

@font-face {
    font-family: 'Roboto';
    src: url(/fonts/Roboto.woff2) format("woff2"), url(/fonts/Roboto.woff) format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* ─────────────────────────────────────────────────────────────
   ROOT PALETTE — mirrors lens card system
   ───────────────────────────────────────────────────────────── */

:root {
    --page-bg:        #e4e8ec;
    --page-dot:       rgba(0,0,0,0.04);

    --card-bg:        #ffffff;
    --card-border:    #d0d8de;
    --card-shadow:    0 2px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.05);

    --aside-bg:       #dce4ea;
    --aside-border:   #20808a;      /* teal accent — matches entry card */

    --accent:         #20808a;      /* LightSeaGreen family, unified with nav */
    --accent-hover:   #155f68;
    --accent-text:    #0d3b40;

    --nav-btn-bg:     #eef6f7;
    --nav-btn-border: rgba(32,128,138,0.45);
    --nav-btn-hover:  #d4eef0;

    --body-text:      #1e2a2e;
    --muted-text:     #5a6a70;
    --rule-color:     #d0d8de;

    --h-color:        #1a2e35;
    --h2-color:       #20808a;
    --link-color:     #20808a;
    --link-visited:   #1a6070;
}


/* ─────────────────────────────────────────────────────────────
   GLOBAL RESET & BASE
   ───────────────────────────────────────────────────────────── */

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

body {
    font-family: 'Merriweather', 'Georgia', serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--body-text);
    background-color: var(--page-bg);
    background-image: radial-gradient(circle, var(--page-dot) 1px, transparent 1px);
    background-size: 22px 22px;
    margin: 0;
    padding: 0;
}

li {
    list-style-type: none;
}

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

hr {
    border: none;
    border-top: 1px solid var(--rule-color);
    margin: 2em 0;
}


/* ─────────────────────────────────────────────────────────────
   LINKS
   ───────────────────────────────────────────────────────────── */

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color .15s;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:visited {
    color: var(--link-visited);
}


/* ─────────────────────────────────────────────────────────────
   ADS TOP STRIP
   ───────────────────────────────────────────────────────────── */

.ads_top {
    text-align: center;
    min-height: 280px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--rule-color);
    padding: 12px 0;
}


/* ─────────────────────────────────────────────────────────────
   LAYOUT — MAIN (flex row: aside + articleBody)
   ───────────────────────────────────────────────────────────── */

main {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-width: 1400px;
    margin: 24px auto;
    gap: 20px;
    padding: 0 16px;
}

#articleBody {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
}


/* ─────────────────────────────────────────────────────────────
   LEFT ASIDE — navigation card
   ───────────────────────────────────────────────────────────── */

main > aside {
    flex-direction: column;
    width: 280px;
    flex-shrink: 0;

    background: var(--aside-bg);
    border: 1px solid var(--card-border);
    border-top: 3px solid var(--aside-border);
    box-shadow: var(--card-shadow);
    padding: 20px 12px;
    align-self: flex-start;
    position: sticky;
    top: 20px;
}

/* Right aside (search + ads inside articleBody) */
#articleBody > aside {
    flex-direction: column;
    width: 300px;
    flex-shrink: 0;
    background: var(--aside-bg);
    border: 1px solid var(--card-border);
    border-top: 3px solid var(--rule-color);
    box-shadow: var(--card-shadow);
    padding: 16px 12px;
    align-self: flex-start;
}


/* ─────────────────────────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────────────────────────── */

main nav ul {
    margin: 0;
    padding: 0;
}

main nav a {
    display: block;
}

nav a {
    display: block;
    background: var(--nav-btn-bg);
    border: 1px solid var(--nav-btn-border);
    border-radius: 4px;
    color: var(--accent);
    width: 100%;
    max-width: 250px;
    margin: 0 auto 5px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    height: 38px;
    line-height: 38px;
    text-decoration: none;
    transition: background .15s, box-shadow .15s, color .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06) inset;
}

nav a:hover,
nav a:focus {
    background: var(--nav-btn-hover);
    color: var(--accent-hover);
    box-shadow: 0 0 0 2px rgba(32,128,138,0.25);
    outline: none;
    text-decoration: none;
    text-shadow: none;
}

nav a.bot {
    background: #f5ede0;
    border-color: rgba(180,120,60,0.4);
    color: #8a5a20;
}

nav a.bot:hover {
    background: #eedcc0;
    color: #6a4010;
}

/* Article-level nav (prev / contents / next) */
article nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    margin: 32px 0 16px;
    padding: 16px 0;
    border-top: 1px solid var(--rule-color);
    border-bottom: 1px solid var(--rule-color);
}

article nav a {
    width: 120px;
    font-size: 0.78rem;
    height: 36px;
    line-height: 36px;
}

article nav a:focus {
    background: var(--nav-btn-hover);
    box-shadow: 0 0 0 2px rgba(32,128,138,0.25);
}

article a:focus {
    box-shadow: none;
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-shadow: none;
}

article a:visited {
    color: var(--link-visited);
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-shadow: none;
}


/* ─────────────────────────────────────────────────────────────
   ARTICLE — main content card
   ───────────────────────────────────────────────────────────── */

article {
    display: block;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: 3px solid var(--accent);
    box-shadow: var(--card-shadow);
    padding: 32px 40px 40px;
    box-sizing: border-box;
    position: relative;
    overflow-y: hidden;
    text-align: left;
    hyphens: auto;
    word-wrap: break-word;
}


/* ─────────────────────────────────────────────────────────────
   TYPOGRAPHY — headings
   ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.25;
    color: var(--h-color);
    margin-top: 1.6em;
    margin-bottom: 0.7em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-size: 1.9rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: 0.4em;
    border-bottom: 2px solid var(--rule-color);
    margin-bottom: 1.2em;
    color: var(--h-color);
}

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    color: var(--h2-color);
    border-bottom: 1px solid var(--rule-color);
    padding-bottom: 0.25em;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--h-color);
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

h5 {
    font-size: 1rem;
    font-weight: 600;
}

h6 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-text);
}

/* Heading focus */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}


/* ─────────────────────────────────────────────────────────────
   BODY TYPOGRAPHY
   ───────────────────────────────────────────────────────────── */

p {
    font-size: 1rem;
    line-height: 1.85;
    padding: 0 0 0.4em;
    margin: 0 0 0.6em;
    color: var(--body-text);
}

strong {
    font-weight: 700;
    color: var(--body-text);
}


/* ─────────────────────────────────────────────────────────────
   CONTENT CLASSES — legacy support
   ───────────────────────────────────────────────────────────── */

.i4 {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    text-indent: 4em;
    display: block;
    margin: 0.5em 0;
}

.i3 {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    margin: 0.7em 0 0.3em;
}

.i2 {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    display: block;
    margin: 1em 0 0.5em;
}

.small {
    font-size: 0.78rem;
    text-align: center;
    color: var(--muted-text);
    line-height: 1.6;
}

.right {
    text-align: right;
}

.center {
    text-align: center;
}

/* GDZ button */
.gdz {
    float: left;
    background: var(--nav-btn-bg);
    border: 1px solid var(--nav-btn-border);
    border-radius: 4px;
    color: var(--accent);
    margin: 2px auto;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    height: 40px;
    line-height: 40px;
    margin-bottom: 4px;
    vertical-align: middle;
    text-decoration: none;
    transition: background .15s;
}

.gdz:hover {
    background: var(--nav-btn-hover);
}


/* ─────────────────────────────────────────────────────────────
   TABLES
   ───────────────────────────────────────────────────────────── */

article table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--accent);
    table-layout: auto;
    margin: 1.5em 0;
    font-size: 0.95rem;
}

article td, article th {
    border: 1px solid var(--rule-color);
    padding: 8px 12px;
    word-wrap: break-word;
}

article th {
    background: var(--aside-bg);
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--accent-text);
}

article td p {
    padding: 0;
    margin: 0;
}

.text_table {
    margin: 0 0 12px;
    border: 2px solid var(--rule-color);
    overflow: auto;
    background: var(--aside-bg);
    padding: 8px;
}

.text_table img.main {
    float: left;
    margin-right: 12px;
}


/* ─────────────────────────────────────────────────────────────
   IMAGES
   ───────────────────────────────────────────────────────────── */

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

.pic {
    max-width: 400px;
    display: block;
    margin: 1em auto;
}

.video {
    min-height: 405px;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ─────────────────────────────────────────────────────────────
   AD UNITS
   ───────────────────────────────────────────────────────────── */

.adsbygoogle {
    display: flex;
    justify-content: center;
}

.staticpubads89354 {
    display: flex;
    justify-content: center;
}


/* ─────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────── */

footer {
    background: var(--card-bg);
    border-top: 2px solid var(--rule-color);
    padding: 32px 24px 48px;
    margin-top: 32px;
    text-align: center;
}

footer p.small {
    color: var(--muted-text);
    font-size: 0.75rem;
    line-height: 1.7;
    margin: 4px 0;
}

footer a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — ≤1151px: right aside drops below article
   ───────────────────────────────────────────────────────────── */

@media (max-width: 1151px) {
    #articleBody {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-self: center;
    }

    #articleBody aside {
        align-self: center;
        max-width: 100%;
        width: 100%;
        position: static;
    }

    .staticpubads89354 {
        display: flex;
        justify-content: center;
    }
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — ≤720px: left aside also drops, full column
   ───────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
    main {
        flex-direction: column;
        margin: 12px auto;
        padding: 0 10px;
        gap: 12px;
    }

    main > aside {
        width: 100%;
        position: static;
        flex-shrink: unset;
        align-self: stretch;
    }

    nav a {
        max-width: 100%;
    }

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

    p {
        padding: 0;
    }

    #admixer_68e76b05412f4cbcad44c98aeaa4e413_zone_8296_sect_2139_site_1995 {
        width: 360px;
    }
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — ≤480px
   ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }
    h5 { font-size: 0.95rem; }
    h6 { font-size: 0.8rem; }

    article {
        padding: 16px 14px 24px;
    }

    article nav {
        flex-direction: column;
        align-items: center;
    }

    .video {
        min-height: 205px;
    }

    .gsc-search-button {
        border-radius: 2px;
    }

    #admixer_68e76b05412f4cbcad44c98aeaa4e413_zone_8296_sect_2139_site_1995 {
        width: 360px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1.05rem; }
    h5 { font-size: 0.98rem; }
    h6 { font-size: 0.85rem; }
}


/* ─────────────────────────────────────────────────────────────
   PRINT
   ───────────────────────────────────────────────────────────── */

@media print {
    body {
        background: #fff;
        color: #000;
    }

    main > aside,
    #articleBody > aside,
    .ads_top,
    footer nav {
        display: none;
    }

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

    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        text-shadow: none !important;
    }

    h1 { font-size: 22pt; border-bottom: 1px solid #000; text-align: center; }
    h2 { font-size: 17pt; border-bottom: 1px solid #000; text-align: center; }
    h3 { font-size: 14pt; }
    h4 { font-size: 12pt; }
    h5 { font-size: 11pt; }
    h6 { font-size: 10pt; }
}
