/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --canvas: #ffffff;
    --canvas-alt: #f8f9fa;
    --canvas-deep: #f1f3f5;
    --primary: #c0392b;
    --primary-dark: #962d22;
    --primary-soft: #fdecea;
    --navy: #1e2d40;
    --ink: #1a1a1a;
    --body: #3d4451;
    --muted: #6b7280;
    --hairline: #e5e7eb;
    --hairline-strong: #d1d5db;
    --on-primary: #ffffff;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --section-gap: 80px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--body);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: .375rem; }

strong { color: var(--ink); font-weight: 600; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === HEADER === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}
.logo-icon { font-size: 1.375rem; line-height: 1; }
.logo-text {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ink);
}

.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 4px;
}
.main-nav a {
    display: block;
    padding: 6px 12px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--body);
    border-radius: var(--radius-sm);
    transition: color .15s, background .15s;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === HERO === */
.page-hero {
    background: var(--navy);
    color: var(--on-primary);
    padding: 56px 0;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(192,57,43,.15) 0%, transparent 60%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #e87070;
    margin-bottom: 16px;
}
.page-hero h1 { color: #fff; margin-bottom: 16px; }
.page-hero .hero-desc {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #b8c5d6;
    max-width: 640px;
    margin-bottom: 0;
}

/* Index hero with image */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.hero-split-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
}
.hero-split-image img { width: 100%; height: 100%; object-fit: cover; }

/* === ALERT BANNER === */
.alert-banner {
    background: var(--primary-soft);
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 32px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.alert-banner .alert-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 2px; }
.alert-banner p { margin: 0; font-size: .9375rem; color: var(--ink); }
.alert-banner strong { color: var(--primary-dark); }

/* === MAIN CONTENT === */
.page-main { padding: 48px 0 var(--section-gap); }

/* === BREADCRUMB === */
.breadcrumb-nav { margin-bottom: 32px; }
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 4px;
    align-items: center;
    font-size: .8125rem;
    color: var(--muted);
}
.breadcrumb li { display: flex; align-items: center; gap: 4px; }
.breadcrumb a { color: var(--muted); text-decoration: underline; text-decoration-color: transparent; }
.breadcrumb a:hover { color: var(--primary); text-decoration-color: var(--primary); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 500; }
.breadcrumb-sep { color: var(--hairline-strong); font-size: .75rem; }

/* === CARD GRID === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow .2s, border-color .2s;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--hairline-strong); }

.card-img { aspect-ratio: 16/9; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-eyebrow {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}
.card-body h2, .card-body h3 { margin-bottom: 10px; font-size: 1.0625rem; }
.card-body p { font-size: .9375rem; color: var(--body); flex: 1; }
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--primary);
}
.card-link::after { content: '→'; transition: transform .15s; }
.card:hover .card-link::after { transform: translateX(3px); }

/* === CONTENT SECTIONS === */
.section { margin-bottom: 56px; }
.section-title { margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--primary); display: inline-block; }

.content-block { max-width: 800px; }
.content-block h2 { margin-bottom: 16px; margin-top: 40px; }
.content-block h2:first-child { margin-top: 0; }
.content-block h3 { margin-bottom: 12px; margin-top: 28px; }
.content-block p { line-height: 1.7; }
.content-block ul, .content-block ol { margin-bottom: 1rem; }

/* === EMERGENCY NUMBERS === */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.number-card {
    background: var(--canvas-alt);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: border-color .15s, box-shadow .15s;
}
.number-card:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.number-digit {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -.02em;
}
.number-service { font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.number-desc { font-size: .8125rem; color: var(--muted); }

/* === STEPS === */
.steps { counter-reset: step-counter; list-style: none; padding: 0; margin: 24px 0; }
.steps li {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}
.steps li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    min-width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 700;
    font-size: .875rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.step-content { flex: 1; }
.step-content strong { display: block; margin-bottom: 4px; font-size: 1rem; color: var(--ink); }
.step-content p { font-size: .9375rem; margin: 0; color: var(--body); }

/* === FAQ (details/summary) === */
.faq-list { margin: 24px 0; }
.faq-item {
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    overflow: hidden;
}
.faq-item summary {
    cursor: pointer;
    padding: 16px 20px;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--ink);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    user-select: none;
    background: var(--canvas);
}
.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--primary);
    flex-shrink: 0;
    transition: transform .2s;
}
.faq-item[open] summary { background: var(--primary-soft); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 16px 20px; font-size: .9375rem; line-height: 1.65; border-top: 1px solid var(--hairline); }
.faq-body p { margin-bottom: .75rem; }
.faq-body p:last-child { margin-bottom: 0; }

/* === TABLE OF CONTENTS === */
.toc {
    background: var(--canvas-alt);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 40px;
    max-width: 440px;
}
.toc-title { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc ol { padding-left: 1.25rem; margin: 0; }
.toc li { margin-bottom: 6px; font-size: .9rem; }
.toc a { color: var(--body); }
.toc a:hover { color: var(--primary); }

/* === IMAGE WITH CAPTION === */
.img-block { margin: 32px 0; }
.img-block img { width: 100%; border-radius: var(--radius-md); }
.img-caption { font-size: .8rem; color: var(--muted); margin-top: 8px; font-style: italic; }

/* === CALLOUT BOX === */
.callout {
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 28px 0;
}
.callout-warning {
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    color: #451a00;
}
.callout-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1e3a5f;
}
.callout-danger {
    background: var(--primary-soft);
    border-left: 4px solid var(--primary);
    color: #7f1d1d;
}
.callout p { margin: 0; font-size: .9375rem; line-height: 1.6; }
.callout p + p { margin-top: .5rem; }
.callout-title { font-weight: 700; margin-bottom: 6px; font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; }

/* === DEFINITION LIST === */
.def-list { margin: 16px 0; }
.def-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
    align-items: baseline;
    font-size: .9375rem;
}
.def-row:last-child { border-bottom: none; }
.def-term { font-weight: 600; color: var(--ink); }
.def-desc { color: var(--body); }

/* === RELATED CONTENT === */
.related-content {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--hairline);
}
.related-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; color: var(--ink); }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.related-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--canvas-alt);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    color: var(--ink);
    transition: border-color .15s, background .15s;
}
.related-link:hover { border-color: var(--primary); background: var(--primary-soft); }
.related-link-label { font-weight: 600; font-size: .9375rem; color: var(--primary); }
.related-link-desc { font-size: .8125rem; color: var(--muted); }

/* === HOMEPAGE SECTIONS === */
.home-intro { padding: 56px 0 0; }
.home-intro-text { max-width: 680px; }
.home-intro-text p { font-size: 1.0625rem; line-height: 1.7; color: var(--body); }
.section-heading { margin-bottom: 8px; }
.section-lead { font-size: 1.0625rem; color: var(--muted); margin-bottom: 0; }

.topics-section { padding: var(--section-gap) 0 0; }
.quick-numbers-section { padding: var(--section-gap) 0 0; }
.quick-numbers-inner {
    background: var(--navy);
    border-radius: var(--radius-xl);
    padding: 40px;
    color: #fff;
}
.quick-numbers-inner h2 { color: #fff; margin-bottom: 8px; }
.quick-numbers-inner .section-lead { color: #b8c5d6; margin-bottom: 28px; }
.qn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.qn-item { text-align: center; }
.qn-number { font-size: 2rem; font-weight: 700; color: #e87070; line-height: 1; }
.qn-label { font-size: .8125rem; color: #b8c5d6; margin-top: 6px; }

.image-section { padding: var(--section-gap) 0 0; }
.image-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.image-section-img { border-radius: var(--radius-lg); overflow: hidden; }
.image-section-img img { width: 100%; height: 100%; object-fit: cover; }
.image-section-text h2 { margin-bottom: 16px; }
.image-section-text p { font-size: 1rem; line-height: 1.7; margin-bottom: 16px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    font-size: .875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s, color .15s;
    text-decoration: none;
    letter-spacing: .02em;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); color: var(--on-primary); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }

/* === FOOTER === */
.site-footer {
    background: var(--navy);
    color: #b8c5d6;
    margin-top: var(--section-gap);
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 40px;
    padding: 56px 0 40px;
}
.footer-brand { font-size: 1.0625rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-tagline { font-size: .875rem; color: #6b84a0; line-height: 1.5; }
.footer-nav-title { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6b84a0; margin-bottom: 12px; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav a { font-size: .875rem; color: #b8c5d6; }
.footer-nav a:hover { color: #fff; }
.footer-nav li { margin-bottom: 8px; }
.footer-info { font-size: .875rem; line-height: 1.65; }
.footer-info strong { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .container { padding-top: 20px; padding-bottom: 20px; }
.footer-bottom p { font-size: .8125rem; color: #6b84a0; }

/* === LAYOUT HELPERS === */
.layout-sidebar {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: start;
}
.sidebar {
    position: sticky;
    top: 88px;
}
.sidebar-card {
    background: var(--canvas-alt);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}
.sidebar-card h3 { font-size: .9375rem; margin-bottom: 12px; }
.sidebar-card ul { font-size: .875rem; }
.sidebar-card li { margin-bottom: 6px; }
.sidebar-card a { color: var(--body); }
.sidebar-card a:hover { color: var(--primary); }

/* === TABLE === */
.data-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .9375rem; }
.data-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--canvas-deep);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 2px solid var(--hairline);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--hairline); color: var(--body); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td strong { color: var(--ink); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .qn-grid { grid-template-columns: repeat(2, 2fr); gap: 12px; }
    .layout-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .image-section-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    :root { --section-gap: 48px; }
    .header-inner { height: 56px; }
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--canvas);
        border-bottom: 1px solid var(--hairline);
        box-shadow: var(--shadow-md);
        z-index: 99;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; padding: 12px; gap: 4px; }
    .main-nav a { padding: 10px 14px; font-size: .9375rem; }
    .hero-split { grid-template-columns: 1fr; }
    .hero-split-image { display: none; }
    .page-hero { padding: 40px 0; }
    .card-grid { grid-template-columns: 1fr; }
    .card-grid-2 { grid-template-columns: 1fr; }
    .number-grid { grid-template-columns: repeat(2, 1fr); }
    .def-row { grid-template-columns: 1fr; gap: 4px; }
    .qn-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-numbers-inner { padding: 24px; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 28px; }
    .related-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .number-grid { grid-template-columns: 1fr 1fr; }
    .number-digit { font-size: 2rem; }
    .qn-grid { grid-template-columns: 1fr 1fr; }
    h1 { font-size: 1.625rem; }
}
