/* ══════════════════════════════════════════════
   HTAB Sites — Complete Stylesheet
   Fraunces (headings) + Source Sans 3 (body)
   ══════════════════════════════════════════════ */

:root {
    --color-primary: #1a365d;
    --color-primary-light: #2a5298;
    --color-accent: #d4920b;
    --color-accent-light: #f5deb3;
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-muted: #6c757d;
    --color-border: #e2e8f0;
    --color-success: #16a34a;
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
    --radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --max-width: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
img[src$=".webp"], img[src$=".png"], img[src$=".jpg"] {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    min-height: 60px;
}
/* Hide broken image alt text gracefully */
img::after {
    content: ''; display: block;
    position: absolute; inset: 0;
    background: inherit;
}
a { color: var(--color-primary-light); text-decoration: none; }
a:hover { color: var(--color-primary); }

/* ── Header / Navigation ── */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky; top: 0; z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 64px;
}

.logo {
    display: flex; align-items: center; gap: 0.75rem;
    text-decoration: none; color: var(--color-text);
}

.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 6px;
    background: var(--color-primary); color: white;
    font-family: var(--font-heading); font-weight: 700; font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 600; font-size: 1rem;
    color: var(--color-text);
}

.site-header nav ul {
    display: flex; list-style: none; gap: 0.25rem; align-items: center;
}

.site-header nav a {
    color: var(--color-text-muted);
    font-size: 0.9rem; font-weight: 500;
    padding: 0.4rem 0.75rem; border-radius: 6px;
    transition: all 0.2s;
}

.site-header nav a:hover {
    color: var(--color-primary); background: rgba(26,54,93,0.05);
}

/* ── Hero ── */
.state-hero {
    position: relative; min-height: 440px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: var(--color-primary);
}

.hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0f2847, #1a4a8a, #2d6cb5);
}

.hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
    position: relative; z-index: 1;
}

.hero-overlay {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(135deg, rgba(15,40,71,0.85), rgba(26,74,138,0.6));
}

.hero-content {
    position: relative; z-index: 2;
    text-align: center; padding: 4rem 2rem; max-width: 760px;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
    padding: 0.35rem 1rem; border-radius: 50px;
    color: rgba(255,255,255,0.9); font-size: 0.85rem; font-weight: 600;
    margin-bottom: 1.25rem;
}

.badge-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--color-accent); display: inline-block;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700; color: white; line-height: 1.15;
    margin-bottom: 1rem;
}

.subheadline {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem; line-height: 1.6;
    max-width: 600px; margin: 0 auto;
}

.hero-fade {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--color-bg));
    z-index: 2;
}

/* ── Reveal Animations ── */
.reveal {
    opacity: 0; transform: translateY(20px);
    animation: revealUp 0.6s ease forwards;
}
.reveal-delay-1 { animation-delay: 0.15s; }
.reveal-delay-2 { animation-delay: 0.3s; }
.reveal-delay-3 { animation-delay: 0.45s; }

@keyframes revealUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ── Home Content ── */
.home-content {
    max-width: var(--max-width);
    margin: 0 auto; padding: 2.5rem 1.5rem 4rem;
}

.home-content section {
    margin-bottom: 3rem;
}

.home-content h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem; font-weight: 700;
    color: var(--color-text); margin-bottom: 0.5rem;
}

.intro {
    font-size: 1.05rem; color: var(--color-text-muted);
    max-width: 760px; margin-bottom: 2.5rem;
}

.text-muted { color: var(--color-text-muted); }
.text-small { font-size: 0.85rem; }

/* ── Prose (body text) ── */
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 1rem 0 1.5rem 1.5rem; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { font-weight: 600; }
.prose a { color: var(--color-primary-light); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(0,0,0,0.15); }
.prose a:hover { color: var(--color-primary); text-decoration-color: var(--color-primary); }

/* ── Tables ── */
.btt-wrap, .cost-table-wrap {
    overflow-x: auto; margin: 1.5rem 0;
    border: 1px solid var(--color-border); border-radius: var(--radius);
    background: var(--color-surface);
}

.btt, .cost-table {
    width: 100%; border-collapse: collapse; font-size: 0.92rem;
}

.btt th, .cost-table th {
    background: var(--color-primary); color: white;
    padding: 0.75rem 1rem; text-align: left;
    font-weight: 600; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.04em;
}

.btt td, .cost-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.btt tr:last-child td, .cost-table tr:last-child td { border-bottom: none; }
.btt tr:hover td, .cost-table tr:hover td { background: #f8fafc; }

.entity-name { font-weight: 600; }
.entity-name a { color: var(--color-primary-light); text-decoration: underline; text-underline-offset: 2px; }
.cost-cell { font-weight: 600; color: var(--color-primary); white-space: nowrap; }
.note-cell { color: var(--color-text-muted); font-size: 0.88rem; }

.required-badge {
    display: inline-block; background: #fef3c7; color: #92400e;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    padding: 0.1rem 0.4rem; border-radius: 3px; margin-left: 0.4rem;
    vertical-align: middle;
}

.total-row td {
    font-weight: 700; background: #f0f7ff !important;
    border-top: 2px solid var(--color-primary);
}

/* ── Steps ── */
.steps {
    list-style: none; padding: 0; margin: 2rem 0;
}

.step {
    display: flex; gap: 1.25rem; margin-bottom: 0;
}

.step-connector {
    display: flex; flex-direction: column; align-items: center;
    flex-shrink: 0; width: 40px;
}

.step-marker {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--color-primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem;
    flex-shrink: 0;
}

.step-line {
    width: 2px; flex: 1; background: var(--color-border);
    margin: 0.25rem 0;
}

.step:last-child .step-line { display: none; }

.step-body {
    padding-bottom: 2rem; flex: 1;
}

.step-body h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem; font-weight: 600;
    color: var(--color-text); margin-bottom: 0.25rem; line-height: 1.3;
}

.step-body h3 a {
    color: var(--color-primary-light);
    text-decoration: underline; text-underline-offset: 2px;
    text-decoration-color: rgba(0,0,0,0.15);
}
.step-body h3 a:hover { color: var(--color-primary); }

.step-body p {
    color: var(--color-text-muted); font-size: 0.95rem;
}

/* ── Resources ── */
.resources-section { margin: 3rem 0; }
.resources-section h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem; font-weight: 700; margin-bottom: 1.25rem;
}

.resources-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.resource-card {
    display: flex; flex-direction: column;
    padding: 1.25rem; background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: var(--radius);
    text-decoration: none; color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.resource-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
}

.resource-name {
    font-family: var(--font-heading);
    font-weight: 600; font-size: 1rem; color: var(--color-text);
    margin-bottom: 0.25rem;
}

.resource-desc {
    font-size: 0.88rem; color: var(--color-text-muted);
    margin-bottom: 0.5rem; flex: 1;
}

.resource-url {
    font-size: 0.82rem; color: var(--color-primary-light);
    font-weight: 600;
}

/* ── FAQ ── */
.faq-section { margin: 3rem 0; }
.faq-section h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem; font-weight: 700; margin-bottom: 1.25rem;
}

.faq-list { margin: 0; }

.faq-item {
    border: 1px solid var(--color-border); border-radius: var(--radius);
    margin-bottom: 0.5rem; background: var(--color-surface);
    overflow: hidden;
}

.faq-item summary {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; cursor: pointer;
    font-weight: 600; font-size: 0.95rem;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary dt {
    flex: 1; font-weight: 600;
}

.faq-icon {
    font-size: 1.4rem; color: var(--color-text-muted);
    font-weight: 300; transition: transform 0.2s;
    flex-shrink: 0; margin-left: 1rem;
}

.faq-item[open] .faq-icon { transform: rotate(45deg); }

.faq-item dd {
    padding: 0 1.25rem 1.25rem;
    color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.7;
}

/* ── Article / Guide Layout ── */
.guide-layout {
    max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem;
}

.guide-hero {
    margin-bottom: 1.5rem; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, #1a365d 0%, #2a5298 50%, #4a7cc9 100%);
    min-height: 200px; position: relative;
}

.guide-hero img {
    width: 100%; height: auto; display: block;
    aspect-ratio: 16 / 9; object-fit: cover;
    position: relative; z-index: 1;
}

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

.guide-header h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem; font-weight: 700;
    line-height: 1.15; margin-bottom: 0.5rem;
    color: var(--color-text);
}

.guide-meta {
    color: var(--color-text-muted); font-size: 0.9rem;
}

.guide-body { line-height: 1.8; }
.guide-body h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem; font-weight: 700;
    margin: 2.5rem 0 0.75rem; color: var(--color-text);
    padding-bottom: 0.4rem; border-bottom: 2px solid var(--color-border);
}
.guide-body h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem; font-weight: 600;
    margin: 2rem 0 0.5rem; color: var(--color-text);
}

/* ── Footer ── */
.site-footer {
    background: var(--color-primary); color: rgba(255,255,255,0.7);
    margin-top: 4rem;
}

.footer-inner {
    max-width: var(--max-width); margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.footer-top {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 1.5rem; margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
    font-family: var(--font-heading);
    font-weight: 600; font-size: 1rem;
    color: rgba(255,255,255,0.9);
}

.footer-links {
    display: flex; gap: 1.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.6); font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: white; }

.footer-bottom {
    font-size: 0.82rem; color: rgba(255,255,255,0.5);
}

.footer-bottom p { margin-bottom: 0.75rem; }

.disclaimer, .affiliate-disclosure {
    line-height: 1.6;
}

.copyright {
    margin-top: 1rem; opacity: 0.5;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .header-inner { padding: 0 1rem; }
    .site-header nav ul { display: none; }
    .hero-content h1 { font-size: 2rem; }
    .home-content { padding: 1.5rem 1rem 3rem; }
    .home-content h2 { font-size: 1.4rem; }
    .resources-grid { grid-template-columns: 1fr; }
    .footer-top { flex-direction: column; gap: 1rem; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
    .guide-header h1 { font-size: 1.75rem; }
}
