/* Shared PDE visual tokens. Keep Hub and PRT values aligned. */
:root {
    color-scheme: light;
    --canvas: #faf7f2; --surface: #fffdf9; --ink: #2b1d12;
    --muted: #715d4e; --accent: #a94c0e; --focus: #d96d1a;
    --selected: #f1dfcf; --line: #dcc9b8;
    --shadow: 0 8px 32px rgb(43 29 18 / 5%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6; color: var(--ink); background: var(--canvas);
    -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .22em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
main { scroll-margin-top: 6rem; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -.045em; margin: .5rem 0 1.5rem; font-weight: 750; }
h2 { font-size: 1.15rem; line-height: 1.4; margin: 0 0 .75rem; letter-spacing: -.02em; }
p { max-width: 65ch; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; min-height: 3rem; border: 1px solid var(--line); border-radius: .75rem; padding: .75rem 1rem; color: var(--ink); background: var(--surface); accent-color: var(--accent); }
label { font-size: .9rem; font-weight: 650; }
button { min-height: 3rem; border: 1px solid var(--accent); border-radius: .75rem; padding: .75rem 1.25rem; background: var(--accent); color: #fffdf9; font-weight: 650; cursor: pointer; }
button:hover { filter: brightness(.93); }
button:disabled { opacity: .6; cursor: wait; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); font-size: 1.1rem; font-weight: 750; letter-spacing: -.025em; }
.brand-logo { width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.eyebrow, .note, footer { color: var(--muted); font-size: .875rem; }
.eyebrow { letter-spacing: .08em; text-transform: uppercase; font-weight: 650; margin: 0; }
.overview { display: grid; gap: 1rem; }
.overview section { background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem; box-shadow: var(--shadow); }
code, dd { overflow-wrap: anywhere; }
.skip-link { position: absolute; left: 1rem; top: -5rem; padding: .75rem; background: var(--surface); z-index: 30; }
.skip-link:focus { top: .5rem; }
@media (prefers-color-scheme: dark) {
    :root { color-scheme: dark; --canvas: #211a15; --surface: #2b211a; --ink: #f6eee5; --muted: #c4ad99; --accent: #f2a66d; --focus: #f2a66d; --selected: #463022; --line: #66503f; --shadow: 0 8px 32px rgb(0 0 0 / 12%); }
    button { color: #211a15; }
}
@media (prefers-reduced-motion: no-preference) {
    button, nav a { transition: background-color 150ms ease, color 150ms ease; }
}
@media (forced-colors: active) {
    .overview section { box-shadow: none; }
    nav a[aria-current="page"] { outline: 2px solid Highlight; }
}

/* Mobile first: content above a safe-area-aware, thumb-accessible navigation. */
body { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
body:has(nav[hidden]) { padding-bottom: 0; }
header { position: sticky; top: 0; z-index: 10; padding: 1rem max(1rem, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--surface); }
main, noscript { width: min(100%, 72rem); margin: auto; padding: 1.5rem 1rem; }
header > .brand { max-width: 72rem; }
nav { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .2rem; padding: .5rem max(.5rem, env(safe-area-inset-left)) calc(.5rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 24px rgb(43 29 18 / 5%); }
nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 3.5rem; padding: .35rem .1rem; border-radius: .8rem; color: var(--muted); font-size: .7rem; font-weight: 650; text-decoration: none; }
nav svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav a[aria-current="page"], nav a:hover { color: var(--accent); background: var(--selected); }
section { border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.25rem; background: var(--surface); }
dt { font-size: .8rem; color: var(--muted); font-weight: 650; }
dd { margin: .2rem 0 1rem; }
ul { padding-left: 1.25rem; }
.resource-list { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.resource-list li + li { border-top: 1px solid var(--line); }
.resource-list a { display: flex; align-items: center; justify-content: space-between; min-height: 3.25rem; gap: 1rem; padding: .65rem .25rem; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.resource-list a::after { content: '→'; }
.error { border-left: .25rem solid var(--accent); padding: .75rem 1rem; background: var(--selected); border-radius: .25rem .75rem .75rem .25rem; overflow-wrap: anywhere; }
form { display: grid; gap: .65rem; max-width: 30rem; }
form .note { margin: 0 0 .75rem; }
form button { margin-top: .75rem; }
.setup-panel { max-width: 36rem; margin: 0 auto; }
.setup-panel h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.setup-panel section { padding: 1.5rem; }
.setup-steps { display: flex; gap: 1rem; padding: 0; margin: 0 0 1.5rem; list-style: none; color: var(--muted); font-size: .85rem; }
.setup-steps [aria-current="step"] { color: var(--accent); font-weight: 750; }
.welcome { margin-bottom: 1.5rem; }
.welcome p { margin: .25rem 0; }
summary { cursor: pointer; padding: .75rem 0; font-weight: 650; }
@media (min-width: 48rem) {
    body { padding-bottom: 0; }
    header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem max(2rem, calc((100vw - 72rem) / 2)); }
    nav { position: static; display: flex; flex-wrap: wrap; padding: 0; gap: .25rem; border: 0; box-shadow: none; }
    nav a { flex-direction: row; gap: .5rem; font-size: .875rem; padding: .65rem .85rem; min-height: 2.75rem; }
    nav svg { width: 1rem; height: 1rem; }
    main { padding: 2.5rem 2rem; }
    .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview section:first-child { grid-column: 1 / -1; }
}

body.publication { padding-bottom: 0; }
.publication main { max-width: 52rem; }
