/* ============================================================
   BIBLE — AI Governance Reference Guide
   Shared Stylesheet v1.0
   ============================================================ */

/* --- Design Tokens --- */
:root {
    --bg:        oklch(15% 0.02 250);
    --surface:   oklch(20% 0.02 250);
    --elevated:  oklch(25% 0.02 250);
    --border:    oklch(30% 0.02 250);
    --text:      oklch(95% 0.01 250);
    --muted:     oklch(65% 0.01 250);
    --accent:    oklch(65% 0.2  270);
    --gold:      oklch(75% 0.15 85);
    --gold-dim:  oklch(60% 0.12 85);
    --eu:        oklch(60% 0.15 240);
    --us:        oklch(60% 0.15 25);
    --china:     oklch(60% 0.2  0);
    --uk:        oklch(60% 0.15 280);
    --canada:    oklch(60% 0.15 15);
    --green:     oklch(65% 0.2  145);
    --red:       oklch(60% 0.2  25);
    --orange:    oklch(65% 0.18 60);
    --purple:    oklch(60% 0.18 300);
    --teal:      oklch(65% 0.15 195);
    --pink:      oklch(60% 0.18 340);

    --font-serif: Georgia, 'Times New Roman', Times, serif;
    --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:  'JetBrains Mono', 'Fira Code', Consolas, monospace;

    --max-width:    1200px;
    --content-width: 960px;
    --radius:       8px;
    --radius-lg:    12px;
    --shadow:       0 4px 20px rgba(0,0,0,0.4);
    --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
}

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

/* --- Base --- */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-serif);
    background: var(--bg);
    color: var(--text);
    line-height: 1.85;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: oklch(65% 0.15 85 / 0.35);
    color: var(--text);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 600;
    color: var(--text);
}

h1 { font-size: 2.75rem; letter-spacing: 0.04em; color: var(--gold); margin-bottom: 1rem; }
h2 { font-size: 2rem; color: var(--gold); margin: 3rem 0 1.25rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
h3 { font-size: 1.5rem; margin: 2rem 0 0.75rem; color: var(--text); }
h4 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; }

p { margin-bottom: 1.25rem; }

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: oklch(65% 0.2 270 / 0.4);
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover {
    color: var(--gold);
    text-decoration-color: var(--gold);
}

blockquote {
    border-left: 4px solid var(--gold);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--muted);
}

code {
    font-family: var(--font-mono);
    background: var(--elevated);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

.content {
    max-width: var(--content-width);
    margin: 0 auto;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* --- Navigation Bar --- */
.nav-bar {
    background: var(--surface);
    border-bottom: 2px solid var(--gold);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 2rem;
    gap: 1rem;
}

.nav-brand {
    font-size: 1.25rem;
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-brand:hover { color: var(--gold); text-decoration: none; }

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-family: var(--font-sans);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    background: var(--elevated);
    color: var(--gold);
    text-decoration: none;
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    background: none;
    border: none;
    color: var(--muted);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius);
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    font-size: 0.85rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.nav-dropdown-btn:hover { background: var(--elevated); color: var(--gold); }

.nav-dropdown-btn::after {
    content: '▾';
    font-size: 0.7em;
    opacity: 0.6;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown.open .nav-dropdown-content {
    display: block;
}

.nav-dropdown-content a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-sans);
    transition: background 0.15s, color 0.15s;
}
.nav-dropdown-content a:hover {
    background: var(--elevated);
    color: var(--gold);
}

.nav-dropdown-content .dropdown-divider {
    border-top: 1px solid var(--border);
    margin: 0.35rem 0;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 48px;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

/* --- Page Header --- */
.page-header {
    text-align: center;
    padding: 4rem 2rem;
    border-bottom: 3px solid var(--gold);
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--elevated) 0%, var(--surface) 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.page-header .icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: block;
    stroke: var(--gold);
    stroke-width: 1.5;
}

.page-header .header-icon {
    margin-bottom: 1rem;
}

.page-header .header-icon .icon {
    width: 4rem;
    height: 4rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.page-header .subtitle {
    font-size: 1.3rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-header .meta,
.page-header .header-meta {
    font-size: 0.85rem;
    color: var(--muted);
    font-family: var(--font-sans);
}

.page-header .meta span,
.page-header .header-meta span {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin: 0.25rem;
}

.page-header .header-meta span .icon,
.page-header .meta span .icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    display: inline-block;
    stroke: var(--gold-dim);
    stroke-width: 2;
}

/* --- Cards --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
    border-color: var(--gold-dim);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.card-header .card-icon { font-size: 1.75rem; }
.card-header h3 { margin: 0; font-size: 1.25rem; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* --- Tables --- */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    font-family: var(--font-sans);
}

thead {
    background: var(--elevated);
    position: sticky;
    top: 0;
}

th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gold);
    border-bottom: 2px solid var(--gold-dim);
    white-space: nowrap;
    cursor: default;
    user-select: none;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--text); }
th.sortable::after { content: ' ⇅'; opacity: 0.4; font-size: 0.8em; }
th.sort-asc::after { content: ' ▲'; opacity: 1; }
th.sort-desc::after { content: ' ▼'; opacity: 1; }

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

tbody tr {
    transition: background 0.15s;
}
tbody tr:hover {
    background: oklch(20% 0.015 250);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* --- Badges / Tags --- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-sans);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-eu      { background: oklch(60% 0.15 240 / 0.2); color: var(--eu); border: 1px solid oklch(60% 0.15 240 / 0.3); }
.badge-us      { background: oklch(60% 0.15 25 / 0.2);  color: var(--us); border: 1px solid oklch(60% 0.15 25 / 0.3); }
.badge-china   { background: oklch(60% 0.2 0 / 0.2);    color: var(--china); border: 1px solid oklch(60% 0.2 0 / 0.3); }
.badge-uk      { background: oklch(60% 0.15 280 / 0.2); color: var(--uk); border: 1px solid oklch(60% 0.15 280 / 0.3); }
.badge-canada  { background: oklch(60% 0.15 15 / 0.2);  color: var(--canada); border: 1px solid oklch(60% 0.15 15 / 0.3); }
.badge-green   { background: oklch(65% 0.2 145 / 0.2);  color: var(--green); border: 1px solid oklch(65% 0.2 145 / 0.3); }
.badge-red     { background: oklch(60% 0.2 25 / 0.2);   color: var(--red); border: 1px solid oklch(60% 0.2 25 / 0.3); }
.badge-orange  { background: oklch(65% 0.18 60 / 0.2);  color: var(--orange); border: 1px solid oklch(65% 0.18 60 / 0.3); }
.badge-purple  { background: oklch(60% 0.18 300 / 0.2); color: var(--purple); border: 1px solid oklch(60% 0.18 300 / 0.3); }
.badge-teal    { background: oklch(65% 0.15 195 / 0.2); color: var(--teal); border: 1px solid oklch(65% 0.15 195 / 0.3); }
.badge-gold    { background: oklch(75% 0.15 85 / 0.2);  color: var(--gold); border: 1px solid oklch(75% 0.15 85 / 0.3); }

/* Status badges */
.status-enacted    { background: oklch(65% 0.2 145 / 0.15); color: var(--green); }
.status-proposed   { background: oklch(65% 0.18 60 / 0.15); color: var(--orange); }
.status-draft      { background: oklch(60% 0.18 300 / 0.15); color: var(--purple); }
.status-effective  { background: oklch(65% 0.15 195 / 0.15); color: var(--teal); }

/* --- Info Boxes --- */
.info-box {
    background: var(--surface);
    border-left: 4px solid var(--accent);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.info-box.warning  { border-left-color: var(--orange); }
.info-box.critical { border-left-color: var(--red); }
.info-box.success  { border-left-color: var(--green); }
.info-box.note     { border-left-color: var(--teal); }

.info-box-title {
    font-weight: 700;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* --- Table of Contents (on-page) --- */
.toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin: 2rem 0;
}

.toc h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
}

.toc ol {
    list-style: none;
    counter-reset: toc;
    padding-left: 0;
}

.toc li {
    counter-increment: toc;
    margin-bottom: 0.25rem;
}

.toc li::before {
    content: counter(toc) ".";
    color: var(--gold-dim);
    font-weight: 600;
    font-family: var(--font-sans);
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

.toc a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-block;
    padding: 0.35rem 0;
    min-height: 44px;
    line-height: 1.6;
}
.toc a:hover { color: var(--gold); }

.toc .toc-sub {
    padding-left: 1.5rem;
    margin-top: 0.3rem;
}

/* --- Expandable Sections --- */
details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 1rem 0;
}

summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
summary::before { content: '▸'; color: var(--gold); transition: transform 0.2s; }
details[open] summary::before { transform: rotate(90deg); }
summary:hover { color: var(--gold); }

details .detail-content {
    padding: 0 1.25rem 1.25rem;
}

/* --- Lists --- */
ul, ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
li { margin-bottom: 0.4rem; }

.reference-list {
    list-style: none;
    padding-left: 0;
}
.reference-list li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}
.reference-list li:last-child { border-bottom: none; }

.reference-list .ref-num {
    color: var(--gold-dim);
    font-weight: 700;
    min-width: 2rem;
    font-size: 0.8rem;
}

/* --- Stat Bar / Key Numbers --- */
.stat-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.1;
    display: block;
    font-family: var(--font-sans);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-family: var(--font-sans);
    margin-top: 0.35rem;
    display: block;
}

/* --- Bottom Navigation --- */
.bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
    gap: 1rem;
}

.bottom-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    text-decoration: none;
    font-family: var(--font-sans);
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    font-size: 0.9rem;
    transition: border-color 0.2s, color 0.2s;
}
.bottom-nav a:hover {
    border-color: var(--gold-dim);
    color: var(--gold);
}

.bottom-nav .nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    color: var(--gold-dim);
}

/* --- Footer --- */
/* --- Site Footer (unified with bottom-nav) --- */
.site-footer {
    text-align: center;
    padding: 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.site-footer p { margin-bottom: 0.5rem; }

.footer-nav {
    padding: 1.5rem 2rem;
}

.footer-nav .bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    border: none;
}

.footer-content {
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid var(--border);
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 2px solid var(--gold-dim);
    border-radius: 50%;
    color: var(--gold);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.2s;
    z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--elevated); }

/* --- Anchor Offset (for sticky nav) --- */
[id] {
    scroll-margin-top: 4rem;
}

/* --- Print Styles --- */
@media print {
    .nav-bar, .back-to-top, .nav-toggle { display: none !important; }
    body { background: white; color: black; font-size: 11pt; }
    .container { max-width: 100%; padding: 0; }
    .page-header { border: 2px solid #333; background: #f5f5f5; }
    h1, h2, h3, .gold { color: #333 !important; }
    a { color: #1a0dab; }
    a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
    table { font-size: 9pt; }
    .card { border: 1px solid #ccc; break-inside: avoid; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    h1 { font-size: 2.25rem; }
    .page-header h1 { font-size: 2.5rem; }
    .three-col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.55rem; }
    .page-header { padding: 2.5rem 1.5rem; }
    .page-header h1 { font-size: 2rem; }
    .page-header .icon { width: 3rem; height: 3rem; }
    .page-header .header-icon .icon { width: 3rem; height: 3rem; }
    .container { padding: 1.25rem; }

    .two-col, .three-col { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
    .stat-bar { grid-template-columns: repeat(2, 1fr); }

    /* Mobile nav */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
        border-top: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-container { flex-wrap: wrap; }
    .nav-toggle { display: block; }

    .nav-dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--elevated);
        border-radius: var(--radius);
        margin-top: 0.25rem;
    }

    .bottom-nav { flex-direction: column; }
    .bottom-nav a { width: 100%; justify-content: center; }

    table { font-size: 0.82rem; }
    th, td { padding: 0.6rem 0.75rem; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .page-header h1 { font-size: 1.65rem; }
    .stat-bar { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .stat-item { padding: 0.6rem; }
    .stat-number { font-size: 1.4rem; }
}

/* ============================================================
   aigovref.com — Standalone Additions
   ============================================================ */

/* --- Footer Enhancement --- */
.footer-content {
    text-align: center;
    max-width: var(--content-width);
    margin: 0 auto;
}

.footer-attribution {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.footer-link {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
    padding: 0.5rem 0.25rem;
    min-height: 44px;
    line-height: 1.6;
}

.footer-link:hover {
    color: var(--gold);
    text-decoration: underline;
}

.footer-sep {
    margin: 0 0.5rem;
    color: var(--border);
}

/* --- Performance Optimizations --- */
img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* --- Focus Styles (Accessibility) --- */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--gold);
    color: var(--bg);
    padding: 0.5rem 1rem;
    z-index: 10000;
    font-size: 0.9rem;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* --- Smooth scroll for reduced-motion preferences --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* --- High contrast mode support --- */
@media (prefers-contrast: high) {
    :root {
        --border: oklch(50% 0.02 250);
        --muted: oklch(80% 0.01 250);
    }
}

/* ============================================================
   Mobile Touch & Liquid Responsive — aigovref.com
   WCAG 2.1 AA: 44px minimum touch targets
   ============================================================ */

/* --- Global Touch Improvements --- */
@media (pointer: coarse) {
    /* Enlarge all interactive elements on touch devices */
    a, button, [role="button"], summary, input, select, textarea {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent iOS zoom on input focus */
    input, select, textarea { font-size: 16px; }
    
    /* Better spacing for touch dropdown items */
    .nav-dropdown-content a {
        padding: 0.75rem 1rem;
        min-height: 48px;
        border-bottom: 1px solid var(--border);
    }
    .nav-dropdown-content a:last-child { border-bottom: none; }
    
    /* Touch-friendly table cells */
    th.sortable {
        min-height: 48px;
        padding: 0.75rem 1rem;
    }
    
    /* Larger back-to-top on touch */
    .back-to-top {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }
}

/* --- Liquid Container System --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* --- Fluid Typography --- */
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

/* --- Mobile Nav Enhancement (≤768px) --- */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.5rem 1rem;
    }
    
    .nav-links {
        gap: 0;
        padding: 0.5rem 0;
    }
    
    .nav-links.open {
        display: flex;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-btn {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        min-height: 48px;
        font-size: 0.95rem;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-dropdown-content {
        padding-left: 1rem;
    }
    
    .nav-dropdown-content a {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Liquid card grids */
    .card-grid,
    .section-grid,
    .framework-grid,
    .impact-grid,
    .three-col,
    .two-col {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    /* Stat bar responsive */
    .stat-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* Tables: horizontal scroll */
    .table-wrapper,
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100vw;
    }
    
    /* Bottom nav stack */
    .bottom-nav {
        flex-direction: column;
        gap: 0.75rem;
    }
    .bottom-nav a {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        min-height: 52px;
        font-size: 1rem;
    }
    
    /* Page header compact */
    .page-header {
        padding: 2rem 1.25rem;
        border-radius: var(--radius);
    }
    .page-header h1 {
        font-size: clamp(1.5rem, 5vw, 2.25rem);
    }
    .page-header .icon {
        width: clamp(2.5rem, 8vw, 3.5rem);
        height: clamp(2.5rem, 8vw, 3.5rem);
    }
    
    /* Reference list touch-friendly */
    .ref-list li {
        padding: 0.75rem 0;
    }
}

/* --- Small Mobile (≤480px) --- */
@media (max-width: 480px) {
    html { font-size: 15px; }
    
    .nav-brand { font-size: 0.95rem; }
    
    .stat-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .stat-item { padding: 0.6rem 0.5rem; }
    .stat-number { font-size: 1.3rem; }
    
    .page-header {
        padding: 1.5rem 1rem;
    }
    
    .container {
        padding-inline: 0.75rem;
    }
    
    /* Full-bleed cards on very small screens */
    .section-card,
    .framework-card,
    .card {
        border-radius: var(--radius);
        margin-inline: -0.25rem;
    }
}

/* --- Tablet Landscape (769–1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
    .section-grid,
    .framework-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .three-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Large screens (≥1440px) --- */
@media (min-width: 1440px) {
    :root {
        --max-width: 1320px;
    }
    
    .section-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Safe Area Insets (notched devices) --- */
@supports (padding: env(safe-area-inset-bottom)) {
    .site-footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }
    .nav-bar {
        padding-top: env(safe-area-inset-top);
    }
    .back-to-top {
        bottom: calc(2rem + env(safe-area-inset-bottom));
    }
}

/* --- Orientation: Landscape on Mobile --- */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { padding: 2rem 1rem 1rem; }
    .hero h1 { font-size: 2rem; }
    .page-header { padding: 1.5rem; }
    .nav-links.open { max-height: 60vh; }
}

/* --- Footer Mobile Overrides --- */
@media (max-width: 768px) {
    .footer-nav {
        padding: 1rem;
    }
    .footer-nav .bottom-nav {
        flex-direction: column;
        gap: 0.75rem;
    }
    .footer-nav .bottom-nav a {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        min-height: 52px;
        font-size: 1rem;
    }
    .footer-content {
        padding: 1.25rem 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .footer-nav .bottom-nav a {
        font-size: 0.9rem;
        padding: 0.85rem;
    }
}

/* ============================================================
   Icon System — Lucide SVG Icons
   Professional, clean, government-grade
   ============================================================ */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.icon-sm { width: 0.875em; height: 0.875em; }
.icon-lg { width: 1.25em; height: 1.25em; }
.icon-xl { width: 1.5em; height: 1.5em; }
.icon-2x { width: 2em; height: 2em; }
.icon-3x { width: 3em; height: 3em; }

/* Nav icon sizing */
.nav-dropdown-content a .icon,
.nav-link .icon {
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.35em;
    opacity: 0.8;
}

/* Page header icon */
.page-header .header-icon .icon {
    width: 3.5rem;
    height: 3.5rem;
    stroke: var(--gold);
    stroke-width: 1.5;
}

.page-header .header-icon {
    margin-bottom: 0.75rem;
}

/* Card icon */
.section-card .card-icon .icon,
.framework-card .fw-icon .icon {
    width: 2rem;
    height: 2rem;
    stroke: var(--gold);
    stroke-width: 1.5;
}

/* Bottom nav icon */
.bottom-nav a .icon {
    width: 1.1em;
    height: 1.1em;
}

/* Hero icon */
.hero .hero-icon .icon {
    width: 4rem;
    height: 4rem;
    stroke: var(--gold);
    stroke-width: 1.25;
}

@media (max-width: 768px) {
    .page-header .header-icon .icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    .hero .hero-icon .icon {
        width: 3rem;
        height: 3rem;
    }
}

/* --- Overflow Containment --- */
.content,
.container,
body {
    overflow-x: hidden;
}

/* Tables always scrollable */
table {
    display: table;
    max-width: 100%;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin-bottom: 1.5rem;
}

/* Long links/text break */
.content a,
td a {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Reference lists */
.ref-list a,
.content ol a,
.content ul a {
    word-break: break-all;
}

/* Code blocks overflow */
pre, code {
    overflow-x: auto;
    max-width: 100%;
}

/* Cards don't cause overflow */
.card,
.info-box,
.stat-bar,
.framework-card,
.section-card {
    overflow: hidden;
    max-width: 100%;
}

/* Index section cards on mobile */
@media (max-width: 768px) {
    .section-grid {
        gap: 0.75rem;
    }
    .section-card {
        padding: 1.25rem;
    }
    .card-grid {
        gap: 0.75rem;
    }
}

/* --- Touch-Friendly Content Links --- */
@media (pointer: coarse), (max-width: 768px) {
    .content a,
    .toc a,
    .ref-list a,
    .resources a,
    .key-resources a,
    .content li a {
        display: inline-block;
        min-height: 44px;
        line-height: 2;
        padding: 0.2rem 0;
    }
    
    /* Index section grid links */
    .section-card {
        min-height: 44px;
    }
    
    /* Footer attribution links */
    .footer-link {
        min-height: 44px;
        padding: 0.5rem 0.25rem;
    }
    
    /* Dropdown nav items */
    .dropdown-content a {
        min-height: 44px;
        padding: 0.75rem 1rem;
        display: flex;
        align-items: center;
    }
}

/* --- Inline Icons (emoji replacements) --- */
.icon-inline {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.15em;
    display: inline-block;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

h3 .icon-inline,
h4 .icon-inline {
    stroke: var(--gold);
    margin-right: 0.25rem;
}

td .icon-inline {
    width: 1em;
    height: 1em;
}

/* Small size variant */
.icon-sm {
    width: 1rem;
    height: 1rem;
}

/* === Related Topics Navigation (SEO Internal Links) === */
.related-topics {
  margin: 2rem 0 0;
  padding: 1.5rem;
  border-radius: var(--radius-md, 8px);
  background: oklch(0.15 0.01 250);
  border: 1px solid oklch(0.25 0.02 250);
}
.related-topics h3 {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: oklch(0.65 0.02 250);
}
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.related-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 999px;
  background: oklch(0.2 0.02 250);
  color: oklch(0.75 0.08 230);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.related-link:hover, .related-link:focus-visible {
  background: oklch(0.25 0.04 230);
  color: oklch(0.9 0.1 230);
}
.related-link .icon-inline {
  width: 14px;
  height: 14px;
}
@media (prefers-color-scheme: light) {
  .related-topics {
    background: oklch(0.96 0.005 250);
    border-color: oklch(0.88 0.01 250);
  }
  .related-topics h3 { color: oklch(0.45 0.02 250); }
  .related-link {
    background: oklch(0.92 0.01 250);
    color: oklch(0.35 0.06 230);
  }
  .related-link:hover {
    background: oklch(0.88 0.03 230);
    color: oklch(0.2 0.08 230);
  }
}

/* === Update Banners & Content Enhancement Sections === */
.update-banner, .landscape-summary {
  margin: 1.5rem 0;
  padding: 1.5rem;
  border-radius: 8px;
  background: linear-gradient(135deg, oklch(0.14 0.02 220), oklch(0.16 0.015 240));
  border: 1px solid oklch(0.28 0.04 220);
  border-left: 4px solid oklch(0.6 0.15 220);
}
.update-banner h2, .landscape-summary h2 {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.25rem; margin: 0 0 1rem;
  color: oklch(0.85 0.08 220);
}
.timeline-grid { display: grid; gap: 0.75rem; margin: 1rem 0; }
.timeline-item {
  padding: 0.75rem 1rem; background: oklch(0.12 0.01 230);
  border-radius: 6px; border-left: 3px solid oklch(0.4 0.06 230);
}
.timeline-item.current { border-left-color: oklch(0.65 0.2 140); background: oklch(0.13 0.015 140); }
.timeline-item.upcoming { border-left-color: oklch(0.65 0.2 60); background: oklch(0.13 0.015 60); }
.timeline-item strong { color: oklch(0.85 0.06 230); display: block; margin-bottom: 0.25rem; font-size: 0.875rem; }
.timeline-item p { margin: 0; font-size: 0.8125rem; color: oklch(0.7 0.02 230); line-height: 1.5; }
.info-box { margin: 0.75rem 0 0; padding: 1rem; background: oklch(0.11 0.005 230); border-radius: 6px; }
.info-box h3 { margin: 0 0 0.5rem; font-size: 0.9375rem; color: oklch(0.8 0.06 220); }
.info-box ul { margin: 0; padding-left: 1.25rem; }
.info-box li { font-size: 0.8125rem; color: oklch(0.7 0.02 230); line-height: 1.6; margin-bottom: 0.25rem; }
.info-box p { font-size: 0.8125rem; color: oklch(0.7 0.02 230); line-height: 1.6; margin: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.stat-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem; background: oklch(0.12 0.015 220);
  border-radius: 8px; border: 1px solid oklch(0.22 0.03 220); text-align: center;
}
.stat-number { font-size: 1.75rem; font-weight: 700; color: oklch(0.8 0.15 220); line-height: 1.2; }
.stat-card:nth-child(2) .stat-number { color: oklch(0.75 0.15 140); }
.stat-card:nth-child(3) .stat-number { color: oklch(0.75 0.15 30); }
.stat-card:nth-child(4) .stat-number { color: oklch(0.75 0.15 60); font-size: 1.25rem; }
.stat-label { font-size: 0.75rem; color: oklch(0.6 0.02 230); margin-top: 0.25rem; }
.landscape-highlights { display: grid; gap: 0.75rem; margin-top: 1rem; }
.highlight { padding: 0.75rem 1rem; background: oklch(0.12 0.01 230); border-radius: 6px; }
.highlight h3 { margin: 0 0 0.375rem; font-size: 0.9375rem; color: oklch(0.8 0.06 230); }
.highlight p { margin: 0; font-size: 0.8125rem; color: oklch(0.68 0.02 230); line-height: 1.5; }
@media (prefers-color-scheme: light) {
  .update-banner, .landscape-summary { background: linear-gradient(135deg, oklch(0.97 0.005 220), oklch(0.95 0.01 240)); border-color: oklch(0.85 0.03 220); border-left-color: oklch(0.5 0.15 220); }
  .update-banner h2, .landscape-summary h2 { color: oklch(0.25 0.06 220); }
  .timeline-item { background: oklch(0.98 0.003 230); border-left-color: oklch(0.6 0.06 230); }
  .timeline-item.current { border-left-color: oklch(0.5 0.15 140); background: oklch(0.97 0.005 140); }
  .timeline-item.upcoming { border-left-color: oklch(0.5 0.15 60); background: oklch(0.97 0.005 60); }
  .timeline-item strong { color: oklch(0.25 0.04 230); }
  .timeline-item p, .info-box li, .info-box p { color: oklch(0.4 0.02 230); }
  .info-box { background: oklch(0.98 0.002 230); }
  .info-box h3 { color: oklch(0.3 0.04 220); }
  .stat-card { background: white; border-color: oklch(0.9 0.01 220); }
  .stat-number { color: oklch(0.4 0.15 220); }
  .stat-label { color: oklch(0.5 0.02 230); }
  .highlight { background: oklch(0.98 0.003 230); }
  .highlight h3 { color: oklch(0.25 0.04 230); }
  .highlight p { color: oklch(0.4 0.02 230); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 1.375rem; }
  .update-banner, .landscape-summary { padding: 1rem; }
}

/* === ChaozCode Attribution Button === */
.chaozcode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: oklch(0.85 0.12 260);
  background: oklch(0.15 0.03 260);
  border: 1px solid oklch(0.3 0.08 260);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
}
.chaozcode-btn:hover {
  background: oklch(0.2 0.06 260);
  border-color: oklch(0.45 0.12 260);
  color: oklch(0.95 0.14 260);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px oklch(0.2 0.1 260 / 0.3);
}
.chaozcode-btn .icon-inline { width: 14px; height: 14px; }

/* === ChaozCode Attribution Card === */
.chaozcode-card {
  margin: 2rem 0;
  border-radius: 12px;
  background: linear-gradient(145deg, oklch(0.13 0.02 260), oklch(0.11 0.015 240));
  border: 1px solid oklch(0.25 0.05 260);
  overflow: hidden;
  position: relative;
}
.chaozcode-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, oklch(0.55 0.2 260), oklch(0.6 0.18 200), oklch(0.55 0.2 260));
}
.cc-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 0;
}
.cc-logo {
  width: 32px; height: 32px;
  color: oklch(0.7 0.15 260);
  flex-shrink: 0;
}
.cc-header h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: oklch(0.92 0.04 260);
}
.cc-subtitle {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  color: oklch(0.55 0.03 260);
}
.cc-subtitle a { color: oklch(0.7 0.12 260); text-decoration: none; }
.cc-subtitle a:hover { text-decoration: underline; }
.cc-body {
  padding: 1rem 1.5rem 1.25rem;
}
.cc-body p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: oklch(0.72 0.02 240);
  margin: 0 0 0.75rem;
}
.cc-body strong { color: oklch(0.88 0.04 240); }
.cc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.cc-stat {
  padding: 0.75rem;
  background: oklch(0.1 0.01 250);
  border-radius: 8px;
  border: 1px solid oklch(0.2 0.02 250);
  text-align: center;
}
.cc-stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: oklch(0.8 0.15 260);
  line-height: 1.2;
}
.cc-stat-label {
  display: block;
  font-size: 0.6875rem;
  color: oklch(0.55 0.02 250);
  margin-top: 0.25rem;
  line-height: 1.35;
}
.cc-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.cc-btn-primary, .cc-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.cc-btn-primary {
  background: oklch(0.45 0.18 260);
  color: white;
  border: none;
}
.cc-btn-primary:hover {
  background: oklch(0.5 0.2 260);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px oklch(0.3 0.15 260 / 0.4);
}
.cc-btn-secondary {
  background: transparent;
  color: oklch(0.7 0.1 260);
  border: 1px solid oklch(0.3 0.06 260);
}
.cc-btn-secondary:hover {
  background: oklch(0.15 0.02 260);
  border-color: oklch(0.45 0.1 260);
}
.cc-btn-primary .icon-inline,
.cc-btn-secondary .icon-inline { width: 14px; height: 14px; }
.cc-footer-note {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1.5rem;
  background: oklch(0.09 0.005 250);
  font-size: 0.75rem;
  color: oklch(0.5 0.02 250);
  border-top: 1px solid oklch(0.18 0.02 250);
}
.cc-footer-note a { color: oklch(0.6 0.08 220); }
.cc-footer-note .icon-inline { width: 12px; height: 12px; }

/* Light mode */
@media (prefers-color-scheme: light) {
  .chaozcode-btn { color: oklch(0.35 0.12 260); background: oklch(0.95 0.01 260); border-color: oklch(0.8 0.04 260); }
  .chaozcode-btn:hover { background: oklch(0.92 0.02 260); color: oklch(0.25 0.14 260); }
  .chaozcode-card { background: linear-gradient(145deg, oklch(0.98 0.005 260), oklch(0.96 0.008 240)); border-color: oklch(0.88 0.03 260); }
  .cc-header h2 { color: oklch(0.2 0.04 260); }
  .cc-subtitle { color: oklch(0.55 0.02 260); }
  .cc-body p { color: oklch(0.4 0.02 240); }
  .cc-body strong { color: oklch(0.2 0.03 240); }
  .cc-stat { background: white; border-color: oklch(0.92 0.01 250); }
  .cc-stat-num { color: oklch(0.4 0.15 260); }
  .cc-stat-label { color: oklch(0.55 0.02 250); }
  .cc-btn-primary { background: oklch(0.45 0.18 260); color: white; }
  .cc-btn-secondary { color: oklch(0.4 0.1 260); border-color: oklch(0.8 0.04 260); }
  .cc-footer-note { background: oklch(0.96 0.003 250); border-top-color: oklch(0.92 0.01 250); color: oklch(0.5 0.02 250); }
}

/* Mobile */
@media (max-width: 480px) {
  .chaozcode-card { margin: 1.25rem 0; }
  .cc-header { padding: 1rem 1rem 0; }
  .cc-body { padding: 0.75rem 1rem 1rem; }
  .cc-stats { grid-template-columns: 1fr; }
  .cc-cta { flex-direction: column; }
  .cc-btn-primary, .cc-btn-secondary { justify-content: center; }
  .cc-footer-note { padding: 0.625rem 1rem; }
}

/* === Mobile Responsiveness Fixes v3 === */

/* Ensure info-box text always has good contrast */
.info-box, .info-box p, .info-box li {
  color: var(--text, oklch(0.9 0.01 250));
}
.info-box strong { color: var(--gold, oklch(0.85 0.15 80)); }

/* Hero title fluid sizing */
.hero h1 {
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  line-height: 1.15;
}

/* Navigation mobile hamburger improvements */
@media (max-width: 768px) {
  .nav-links {
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Ensure tables don't overflow */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
  }
  table {
    min-width: 100%;
  }
  
  /* Timeline grid: stack on mobile */
  .timeline-grid {
    gap: 0.5rem;
  }
  
  /* ChaozCode card mobile refinements */
  .cc-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .cc-logo {
    width: 28px;
    height: 28px;
  }
  .cc-header h2 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  /* Tighter hero spacing */
  .hero {
    padding: 2rem 0.5rem;
  }
  .hero .tagline {
    font-size: 0.8125rem;
  }
  .hero .acronym {
    font-size: 0.875rem;
  }
  
  /* Version badge + ChaozCode button stack */
  .version-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
  }
  .chaozcode-btn {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }
  
  /* Section cards tighter */
  .section-card {
    padding: 1rem;
  }
  .section-card h3 {
    font-size: 1rem;
  }
  
  /* Update banners compact on mobile */
  .update-banner h2,
  .landscape-summary h2 {
    font-size: 1rem;
  }
  
  /* Landscape stats 2x2 on tiny screens */
  .landscape-highlights {
    gap: 0.5rem;
  }
  .highlight {
    padding: 0.625rem 0.75rem;
  }
  .highlight h3 { font-size: 0.8125rem; }
  .highlight p { font-size: 0.75rem; }
  
  /* Footer compact */
  .site-footer {
    padding: 1.25rem 1rem;
  }
  .footer-content {
    gap: 0.5rem;
  }
}

/* Touch-friendly link spacing for TOC */
.toc a, .toc li {
  padding: 0.5rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Smooth scroll for anchor links */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

/* Prevent text justify on mobile (readability) */
@media (max-width: 600px) {
  p, li {
    text-align: left;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

/* === Info-box High Contrast Fix === */
.info-box {
  color: oklch(0.92 0.01 250) !important;
}
.info-box strong {
  color: oklch(0.85 0.15 80) !important;
}
.info-box p,
.info-box li,
.info-box span {
  color: oklch(0.88 0.01 250) !important;
}

@media (prefers-color-scheme: light) {
  .info-box {
    color: oklch(0.2 0.02 250) !important;
    background: oklch(0.96 0.005 230) !important;
  }
  .info-box strong { color: oklch(0.3 0.1 80) !important; }
  .info-box p, .info-box li, .info-box span {
    color: oklch(0.25 0.02 250) !important;
  }
}
