/* Shared visual language: navigation, page headings, surfaces and controls. */
:root {
    --flight-navy: #142f43;
    --flight-navy-light: #365469;
    --instrument-blue: #087e86;
    --beacon-amber: #a9630c;
    --starboard-green: #19734d;
    --port-red: #b53f42;
    --panel-line: #dfe6eb;
    --sky: #f4f7f9;
    --panel-ink: #203746;
    --metal: #fff;
    --text-muted: #617583;
    --accent-soft: #e7f4f3;
    --success-soft: #eaf6ef;
    --warning-soft: #fff5e5;
    --danger-soft: #fceeee;
    --radius-card: 10px;
    --radius-control: 6px;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --instrument-font: 'JetBrains Mono', ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.6; color: var(--panel-ink); background: var(--sky); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.3; color: var(--flight-navy); }
h1 { font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -0.035em; }
h2 { font-size: 1.2rem; letter-spacing: -0.02em; }
h3 { font-size: 1.05rem; }
a { color: var(--instrument-blue); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
input, select, textarea { accent-color: var(--instrument-blue); }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--instrument-blue); outline-offset: 3px; }
[hidden] { display: none !important; }
.container { max-width: 1248px; margin: 0 auto; padding: 0 32px; }
main { padding-bottom: 48px; }
.app-header { background: var(--flight-navy); min-height: 76px; color: white; }
.app-header-inner { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.app-brand { display: inline-flex; align-items: center; gap: 10px; color: white; text-decoration: none; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; white-space: nowrap; }
.app-brand-mark { width: 32px; height: 32px; color: #76c9c3; flex-shrink: 0; }
.app-navigation { display: flex; align-self: stretch; align-items: center; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: var(--radius-control); text-decoration: none; color: #c6d4dd; font-size: 0.9rem; font-weight: 500; white-space: nowrap; }
.nav-link:hover { color: white; background: #ffffff0c; }
.nav-link.active { color: white; background: #ffffff16; }
.app-utilities { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.app-header :focus-visible { outline-color: #76c9c3; }
.app-menu-toggle { display: none; color: white; background: transparent; border: 1px solid #ffffff30; border-radius: var(--radius-control); width: 38px; height: 38px; align-items: center; justify-content: center; }
.app-icon { width: 20px; height: 20px; flex-shrink: 0; }
.app-account { position: relative; }
.app-account > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 0.85rem; }
.app-account > summary::-webkit-details-marker { display: none; }
.app-account-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ffffff15; color: white; font-weight: 500; }
.app-account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-account-menu { position: absolute; top: calc(100% + 14px); right: 0; z-index: 100; min-width: 200px; padding: 8px; border: 1px solid var(--panel-line); border-radius: var(--radius-card); background: white; box-shadow: 0 8px 24px #142f431a; }
.app-account-identity { width: 240px; max-width: calc(100vw - 140px); padding: 9px 12px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--panel-line); color: var(--panel-ink); }
.app-account-identity dt { color: var(--text-muted); font-size: 0.75rem; margin-bottom: 4px; }
.app-account-identity dd { font-size: 0.9rem; overflow-wrap: anywhere; }
.app-account-menu a { display: block; color: var(--panel-ink); text-decoration: none; padding: 9px 12px; border-radius: var(--radius-control); font-size: 0.9rem; }
.app-account-menu a:hover { color: var(--instrument-blue); background: var(--accent-soft); }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid #ffffff25; border-radius: var(--radius-control); }
.lang-switch button { background: transparent; border: 0; color: #c6d4dd; padding: 4px 6px; border-radius: 3px; font-size: 0.7rem; font-weight: 600; }
.lang-switch button.active { color: var(--flight-navy); background: white; }
.lang-switch button:hover { color: white; background: #ffffff15; }
.lang-switch button.active:hover { color: var(--flight-navy); background: white; }
.lang-switch-floating { position: fixed; top: 24px; right: 24px; border-color: var(--panel-line); background: white; z-index: 50; }
.lang-switch-floating button { color: var(--text-muted); }
.lang-switch-floating button.active, .lang-switch-floating button.active:hover { color: var(--instrument-blue); background: var(--accent-soft); }
.lang-switch-floating button:hover { color: var(--flight-navy); background: var(--sky); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 36px 0 28px; }
.page-heading p { margin-top: 8px; color: var(--text-muted); max-width: 68ch; }
.page-eyebrow { color: var(--instrument-blue); font-size: 0.8rem; font-weight: 600; margin-bottom: 8px; }
.page-heading-actions { display: flex; gap: 8px; flex-shrink: 0; }
.section { background: white; border: 1px solid var(--panel-line); border-radius: var(--radius-card); padding: 24px; margin-bottom: 24px; }
.section h2 { margin-bottom: 20px; padding: 0; border: 0; text-transform: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 16px; background: var(--instrument-blue); color: white; border: 1px solid transparent; border-radius: var(--radius-control); font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; line-height: 1.4; text-decoration: none; transition: background 0.15s, border-color 0.15s; white-space: normal; }
.btn:hover { background: #07676e; }
.btn-small { min-height: 32px; padding: 6px 10px; font-size: 0.8rem; }
.btn-secondary { background: white; border-color: var(--panel-line); color: var(--flight-navy-light); }
.btn-secondary:hover { background: var(--sky); border-color: #b8c9d3; color: var(--flight-navy); }
.btn-success { background: var(--instrument-blue); }
.btn-success:hover { background: #07676e; }
.btn-danger { background: var(--danger-soft); color: var(--port-red); border-color: #edc7c8; }
.btn-danger:hover { background: #f7dfe0; }
.ui-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--panel-line); margin-bottom: 24px; overflow-x: auto; }
.ui-tabs > button { flex-shrink: 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 12px 2px; font: 500 0.9rem var(--font-body); color: var(--text-muted); white-space: nowrap; }
.ui-tabs > button:hover { color: var(--instrument-blue); }
.ui-tabs > button.active, .ui-tabs > button[aria-selected="true"] { color: var(--instrument-blue); border-bottom-color: var(--instrument-blue); background: transparent; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 200; padding: 8px 16px; background: white; color: var(--flight-navy); }
.skip-link:focus { top: 8px; }
@media (max-width: 1080px) {
    .app-header-inner { gap: 20px; }
    .app-account-name { display: none; }
    .nav-link { padding: 8px 9px; }
}
@media (max-width: 900px) {
    .app-header, .app-header-inner { min-height: 68px; }
    .app-header-inner { flex-wrap: wrap; gap: 0; padding-top: 14px; padding-bottom: 14px; }
    .app-brand { font-size: 1.05rem; }
    .app-brand-mark { width: 28px; height: 28px; }
    .app-utilities { gap: 10px; }
    .app-menu-toggle { display: inline-flex; }
    .app-navigation { display: none; width: 100%; order: 3; padding-top: 14px; flex-direction: column; align-items: stretch; }
    .app-header.menu-open .app-navigation { display: flex; }
    .app-navigation .nav-link { padding: 10px 12px; }
}
@media (max-width: 760px) {
    .container { padding: 0 20px; }
    .page-heading { padding: 28px 0 20px; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
    .page-heading-actions { flex-wrap: wrap; }
    .section { padding: 20px; }
    .ui-tabs { gap: 20px; margin-bottom: 20px; }
}
@media (max-width: 380px) {
    .app-account-avatar { width: 28px; height: 28px; }
    .app-account .app-icon { display: none; }
    .app-utilities { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
