/* Shared AoE workspace primitives. Page styles own only their content layout. */
:root {
    color-scheme: light;
    --aoe-ink: #202124;
    --aoe-muted: #717379;
    --aoe-line: #e3e4e7;
    --aoe-canvas: #f6f6f7;
    --aoe-surface: #fff;
    --aoe-navy: #202124;
    --aoe-blue: #315cde;
    --aoe-blue-soft: #edf1ff;
    --aoe-green: #197755;
    --aoe-green-soft: #eaf5ef;
    --aoe-amber: #986419;
    --aoe-amber-soft: #fff5e5;
    --aoe-red: #ba3b3b;
    --aoe-red-soft: #fceeed;
    --aoe-hover: #f0f1f3;
    --aoe-on-accent: #fff;
    --aoe-radius: 6px;
    --sidebar-width: 256px;
    --reading-width: 880px;
}
* { box-sizing: border-box; letter-spacing: 0; }
html, body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--aoe-ink); font-size: 0.875rem; line-height: 1.5; }
html { font-size: 16px; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
a { color: inherit; }
:where(button, a, input, textarea, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--aoe-blue); outline-offset: 3px; }
.ui-icon { display: block; width: 18px; height: 18px; flex: 0 0 18px; }
.aoe-header {
    display: flex; align-items: center; gap: 32px; flex: 0 0 auto;
    min-height: 64px; padding: max(12px, env(safe-area-inset-top, 0px)) 24px 12px;
    border-bottom: 1px solid var(--aoe-line); background: var(--aoe-surface); position: relative; z-index: 20;
}
.aoe-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.aoe-mark { width: 32px; height: 32px; display: block; object-fit: contain; background: transparent; }
.aoe-brand-name { font-size: 1.1875rem; line-height: 1; font-weight: 750; }
.aoe-wordmark { color: var(--aoe-muted); font-size: 0.6875rem; margin-left: 3px; }
.aoe-nav { display: flex; align-self: stretch; align-items: center; gap: 6px; }
.aoe-nav a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 5px; color: var(--aoe-muted); font-size: 0.8125rem; font-weight: 550; text-decoration: none; white-space: nowrap; }
.aoe-nav a:hover { background: var(--aoe-canvas); color: var(--aoe-ink); }
.aoe-nav a[aria-current="page"] { color: var(--aoe-ink); background: var(--aoe-hover); }
.aoe-nav a[aria-current="page"]::after { content: ''; position: absolute; bottom: -13px; left: 14px; right: 14px; height: 2px; background: var(--aoe-ink); }
.aoe-header-end { display: flex; align-items: center; gap: 12px; min-width: 0; margin-left: auto; }
.aoe-account { color: var(--aoe-muted); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.aoe-button, .aoe-icon-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px;
    padding: 7px 12px; border: 1px solid var(--aoe-line); border-radius: var(--aoe-radius);
    background: var(--aoe-surface); text-decoration: none; font-size: 0.8125rem; font-weight: 550; line-height: 1.4;
}
.aoe-button:hover, .aoe-icon-button:hover { background: var(--aoe-hover); border-color: var(--aoe-line); }
.aoe-button.primary { background: var(--aoe-ink); border-color: var(--aoe-ink); color: var(--aoe-surface); }
.aoe-button.primary:hover { background: var(--aoe-hover); }
.aoe-button.primary .ui-icon { filter: invert(1); }
.aoe-icon-button { width: 36px; height: 36px; padding: 0; flex: 0 0 36px; border-color: transparent; background: transparent; }
.aoe-button:disabled { opacity: .45; }
.aoe-eyebrow { color: var(--aoe-muted); font-size: 0.75rem; font-weight: 550; }
.aoe-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.aoe-section-head h2 { font-size: 1rem; font-weight: 650; margin: 0; }
.aoe-text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--aoe-muted); text-decoration: none; }
.aoe-text-link:hover { color: var(--aoe-ink); }
.aoe-state { display: inline-flex; align-items: center; gap: 7px; color: var(--aoe-muted); font-size: 0.75rem; white-space: nowrap; }
.aoe-state::before { content: ''; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.aoe-state.ok { color: var(--aoe-green); }
.aoe-state.warn { color: var(--aoe-amber); }
.aoe-state.bad { color: var(--aoe-red); }
.aoe-drawer { position: fixed; inset: 0 0 0 auto; width: min(820px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--aoe-line); background: var(--aoe-surface); color: var(--aoe-ink); overflow: hidden; }
.aoe-drawer::backdrop { background: #18191e55; }
.aoe-drawer[open] { display: flex; flex-direction: column; }
.aoe-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--aoe-line); }
.aoe-drawer-head h2 { font-size: 1.0625rem; margin: 0; }
.aoe-drawer-tabs { display: flex; gap: 20px; padding: 0 24px; border-bottom: 1px solid var(--aoe-line); }
.aoe-drawer-tabs button { padding: 13px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--aoe-muted); }
.aoe-drawer-tabs button[aria-selected="true"] { color: var(--aoe-ink); border-bottom-color: var(--aoe-ink); }
.aoe-drawer-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px; }
.aoe-drawer-body > .panel { border: 0; padding: 0; margin: 0; }
.aoe-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
    .aoe-header { gap: 20px; padding-inline: 16px; }
    .aoe-wordmark { display: none; }
    .aoe-account { max-width: 145px; }
}
@media (max-width: 600px) {
    .aoe-header { min-height: 58px; gap: 14px; padding: max(10px, env(safe-area-inset-top, 0px)) 12px 10px; flex-wrap: wrap; }
    .aoe-brand { gap: 8px; }
    .aoe-mark { width: 28px; height: 28px; font-size: 1rem; }
    .aoe-brand-name { font-size: 1.0625rem; }
    .aoe-header-end { gap: 5px; }
    .aoe-account { display: none; }
    .aoe-nav { order: 3; width: 100%; gap: 8px; border-top: 1px solid var(--aoe-line); padding-top: 7px; }
    .aoe-nav a { justify-content: center; flex: 1; padding: 5px 10px; font-size: 0.75rem; }
    .aoe-nav a .ui-icon { width: 15px; height: 15px; flex-basis: 15px; }
    .aoe-nav a[aria-current="page"]::after { display: none; }
    .aoe-drawer-head { padding: 16px; }
    .aoe-drawer-body { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
