:root {
    --sidebar-width: 250px;
    --sidebar-bg: #0d1b2a;
    --sidebar-text: #94adc4;
    --sidebar-heading: #ffffff;
    --sidebar-hover: rgba(255,255,255,0.06);
    --accent: #2a85d0;
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --link: #1a6cb0;
    --green: #059669;
    --amber: #d97706;
    --red: #dc2626;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
}

/* ── Layout ── */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.28s ease;
}

.sidebar-brand {
    padding: 1.75rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 0.5rem;
}

.sidebar-brand h1 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sidebar-heading);
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.sidebar-brand p {
    font-size: 0.72rem;
    color: var(--sidebar-text);
    margin-top: 0.3rem;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nav-section {
    display: block;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(148, 173, 196, 0.45);
    padding: 1.25rem 1.5rem 0.4rem;
}

nav a {
    display: block;
    padding: 0.6rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
}

nav a:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-heading);
    text-decoration: none;
}

nav a.active {
    background: rgba(42, 133, 208, 0.12);
    color: #6bb8ef;
    border-left-color: var(--accent);
    font-weight: 500;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    font-size: 0.72rem;
    color: rgba(148,173,196,0.4);
}

/* ── Main ── */
.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Mobile topbar ── */
.topbar {
    display: none;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--sidebar-bg);
    color: white;
    position: sticky;
    top: 0;
    z-index: 90;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 1.3rem;
    padding: 0.2rem 0.5rem;
    margin-right: 0.75rem;
    line-height: 1;
}

.topbar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99;
}

/* ── Content ── */
.content {
    padding: 3rem 3.5rem;
    max-width: 800px;
    flex: 1;
}

/* ── Business card (index) ── */
.card-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.card-location {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 2rem;
}

.tag {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.775rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.bio {
    font-size: 0.9375rem;
    line-height: 1.78;
    color: #334155;
    margin-bottom: 1rem;
    max-width: 640px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0 0.75rem;
}

.contact-icon {
    width: 38px;
    height: 38px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-row a {
    color: var(--link);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
}

.contact-row a:hover { text-decoration: underline; }

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

.index-secondary h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.index-secondary p {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: 0.75rem;
    max-width: 620px;
}

.index-secondary a {
    color: var(--link);
    font-weight: 500;
}

/* ── Framework page ── */
.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.75rem;
    border-bottom: 2px solid var(--border);
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.page-header .subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 600px;
}

.page-header .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    opacity: 0.7;
}

h2.section-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 2.5rem 0 0.75rem;
    letter-spacing: -0.015em;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

h3.sub-heading {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    margin: 1.5rem 0 0.4rem;
}

.framework-body p {
    font-size: 0.9375rem;
    line-height: 1.78;
    color: #334155;
    margin-bottom: 0.875rem;
}

.framework-body ul,
.framework-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.framework-body li {
    font-size: 0.9175rem;
    line-height: 1.72;
    color: #334155;
    margin-bottom: 0.3rem;
}

.framework-body a {
    color: var(--link);
}

.framework-body a:hover { text-decoration: underline; }

/* Jurisdiction cards */
.jurisdiction-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}

.j-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    border-left: 5px solid var(--accent);
}

.j-card.municipal { border-left-color: var(--green); }
.j-card.provincial { border-left-color: var(--amber); }
.j-card.federal    { border-left-color: var(--red); }

.j-card .j-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.35rem;
}

.j-card.municipal .j-label { color: var(--green); }
.j-card.provincial .j-label { color: var(--amber); }
.j-card.federal .j-label { color: var(--red); }

.j-card h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
}

.j-card p {
    font-size: 0.875rem;
    line-height: 1.68;
    color: #475569;
    margin: 0;
}

.j-card ul {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}

.j-card li {
    font-size: 0.85rem;
    line-height: 1.65;
    color: #475569;
    margin-bottom: 0.2rem;
}

/* Callout box */
.callout {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    font-size: 0.875rem;
    line-height: 1.68;
    color: #0c4a6e;
}

.callout strong { color: #075985; }

/* Links grid */
.links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

.link-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0.875rem 1rem;
    text-decoration: none;
    display: block;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.link-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 10px rgba(42,133,208,0.1);
    text-decoration: none;
}

.link-card .lc-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--link);
    margin-bottom: 0.2rem;
}

.link-card .lc-desc {
    font-size: 0.77rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Archive banner */
.archive-banner {
    background: #1e293b;
    color: #94a3b8;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.archive-banner p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0;
}

.archive-banner strong { color: #e2e8f0; }

.archive-banner a {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: 7px;
    font-size: 0.8375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}

.archive-banner a:hover {
    background: #1a6cb0;
    text-decoration: none;
}

/* Footer */
footer {
    padding: 1.25rem 3.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

footer a { color: var(--text-muted); }
footer a:hover { color: var(--link); }

/* ── Language toggle ── */
.lang-section {
    padding-bottom: 0.5rem;
}

.lang-btn {
    display: block;
    margin: 0.25rem 1.5rem;
    background: rgba(255,255,255,0.06);
    color: var(--sidebar-text);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left;
    width: calc(100% - 3rem);
    font-family: inherit;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

.lang-btn.active {
    background: rgba(42, 133, 208, 0.15);
    color: #6bb8ef;
    border-color: rgba(42, 133, 208, 0.25);
}

/* Suppress Google Translate UI chrome */
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; }

/* ── Mobile ── */
@media (max-width: 820px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    .overlay.open {
        display: block;
    }
    .main {
        margin-left: 0;
    }
    .topbar {
        display: flex;
    }
    .content {
        padding: 1.5rem 1.25rem;
    }
    .links-grid {
        grid-template-columns: 1fr;
    }
    .card-name {
        font-size: 1.875rem;
    }
    footer {
        padding: 1rem 1.25rem;
    }
}
