* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; line-height: 1.6; background: var(--page); color: var(--text); }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--heading); }
:focus-visible { outline: 3px solid var(--focus) !important; outline-offset: 4px; box-shadow: none !important; }
h1, h2, h3 { line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.9rem; color: var(--heading); }
h2 { font-size: 1.35rem; color: var(--section); }
h3 { font-size: 1.1rem; }
p { max-width: 70ch; }
code { color: var(--context); overflow-wrap: anywhere; }
.skip-link { position: fixed; left: 16px; top: -100px; padding: 12px 20px; background: var(--surface); z-index: 100; }
.skip-link:focus { top: 10px; }
.topbar { position: sticky; top: 0; min-height: 68px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 20px; padding: 12px 28px; z-index: 20; }
.brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 750; letter-spacing: .13em; }
.brand-caption { font-size: .75rem; font-weight: 400; letter-spacing: .02em; color: var(--muted); border-left: 1px solid var(--border); padding-left: 16px; margin-left: 4px; }
.brand-art { display: block; flex-shrink: 0; line-height: 0; }
.brand-sheet { display: block; width: 100%; max-width: 1000px; height: auto; border-radius: 12px; }
.brand .brand-logo { display: block; width: 198px; height: 44px; }
.brand .brand-logo-dark { display: none; }
[data-theme="dark"] .brand-logo-light, [data-theme="blue-dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark, [data-theme="blue-dark"] .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
    [data-theme="system"] .brand-logo-light { display: none; }
    [data-theme="system"] .brand-logo-dark { display: block; }
}
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.topbar-codename { display: none; }
/* Centre on the viewport only once the full brand and controls have room beside it. */
@media (min-width: 100rem) {
    .topbar-codename { display: block; position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 64rem); margin: 0; color: var(--heading); font-size: clamp(1.1rem, 1.1vw, 1.35rem); font-weight: 700; line-height: 1.3; text-align: center; }
}
.edition, .small-label, .eyebrow, .sidebar-title { font-size: .7rem; letter-spacing: .13em; font-weight: 700; }
.edition { color: var(--muted); }
.utility-link, .navigation-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; }
.utility-link { text-decoration: none; color: var(--text); }
.utility-link:hover, .utility-link[aria-current="page"], .navigation-toggle:hover { background: var(--secondary); color: var(--accent); }
.workspace { display: flex; align-items: flex-start; }
.sidebar { position: sticky; top: 68px; width: 240px; flex: 0 0 240px; height: calc(100dvh - 68px); overflow-y: auto; padding: 32px 16px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); }
.sidebar-title { padding: 0 16px 16px; color: var(--muted); }
.family-navigation { margin-top: 16px; }
.family-navigation .sidebar-title { margin: 0; text-transform: uppercase; }
.family-cup {
    flex: none;
    height: 24px;
    background: currentColor;
    mask: url("../media/pootler-mark.png?v=dc66352470a0") center / contain no-repeat;
}
.navigation-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 6px; color: var(--muted); text-decoration: none; border-radius: 8px; border: 1px solid transparent; }
.navigation-link:hover { background: var(--secondary); }
.navigation-link.active { background: var(--selection); color: var(--accent); border-color: var(--border); font-weight: 650; }
.navigation-symbol { width: 24px; font-size: 1.2rem; text-align: center; }
.navigation-children { list-style: none; margin: 0 0 16px 28px; padding: 0 0 0 12px; border-left: 1px solid var(--border); }
.navigation-children a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: .875rem; }
.navigation-children a:hover { background: var(--secondary); }
.navigation-children a[aria-current="page"] { background: var(--selection); color: var(--accent); font-weight: 650; }
.sidebar-note { margin: auto 16px 0; padding-top: 48px; color: var(--muted); font-size: .85rem; }
.sidebar-note p { margin: 12px 0; }
.main-column { min-width: 0; flex: 1; }
main { padding: 24px 32px 32px; max-width: 1600px; margin: auto; }
main:focus { outline: none; }
.context-strip { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .75rem; margin-bottom: 28px; }
.context-strip > span:first-child { color: var(--context); font-weight: 600; }
.context-dot { width: 6px; height: 6px; background: currentColor; display: inline-block; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.page-heading { margin: 28px 0 32px; }
.page-heading p:last-child { color: var(--muted); margin: 12px 0 0; }
.eyebrow { color: var(--context); margin-bottom: 12px; }
.section-heading { margin-bottom: 20px; }
.section-heading p { color: var(--muted); margin: 8px 0 0; }
footer { margin: 0 32px; padding: 24px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer span span { margin: 0 8px; }
footer .website-release { max-width: 100%; overflow-wrap: anywhere; }
.section-links { display: flex; gap: 12px 24px; flex-wrap: wrap; margin: 24px 0; font-size: .875rem; }
section, details, #main { scroll-margin-top: 90px; }
.btn.navigation-toggle { padding: 0; color: var(--text); border: 1px solid var(--border); }
.navigation-shade { position: fixed; inset: 68px 0 0; border: 0; background: rgb(0 0 0 / 45%); z-index: 21; }
@media (max-width: 1199px) { .brand-caption { display: none; } .topbar { padding-inline: 20px; } main { padding-inline: 20px; } }
@media (max-width: 991px) {
    .sidebar { position: fixed; top: 68px; bottom: 0; z-index: 22; transform: translateX(-100%); visibility: hidden; width: min(300px, 85vw); }
    .sidebar.is-open { transform: none; visibility: visible; }
    body:not(.enhanced) .workspace { display: block; }
    body:not(.enhanced) .sidebar { position: static; transform: none; visibility: visible; height: auto; width: 100%; padding: 16px; }
    body:not(.enhanced) .sidebar-note, body:not(.enhanced) .sidebar-title { display: none; }
    body:not(.enhanced) .sidebar nav { display: flex; flex-wrap: wrap; }
    body:not(.enhanced) .family-navigation .sidebar-title { display: block; width: 100%; }
    .navigation-open { overflow: hidden; }
    .edition { display: none; }
}
@media (max-width: 575px) {
    .topbar { gap: 12px; padding: 12px 16px; }
    .brand { font-size: .95rem; gap: 8px; }
    .brand .brand-logo { width: 144px; height: 32px; }
    main { padding: 20px 16px; }
    .context-strip { margin-bottom: 20px; }
    .context-strip > span:last-child { font-size: .7rem; }
    h1 { font-size: 1.5rem; }
    footer { margin-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
