/* Shared layouts for the career and service guides. */
.explore-controls { display:flex; flex-wrap:wrap; gap:1rem; margin:1.25rem 0; }
.explore-controls label { display:flex; flex-direction:column; gap:.4rem; flex:1 1 230px; font-weight:600; }
.explore-controls input,.explore-controls select { width:100%; min-width:0; padding:.75rem; border:1px solid var(--border); border-radius:var(--radius); color:var(--text); background:var(--card); font:inherit; }
.career-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:.4rem; max-height:20rem; overflow:auto; padding:.75rem; margin:1rem 0 2rem; border:1px solid var(--border); border-radius:var(--radius); }
.career-option { display:flex; align-items:center; gap:.6rem; min-height:44px; padding:.5rem; cursor:pointer; }
.career-option:has(:checked) { background:var(--bg-soft); border-radius:var(--radius); }
.career-option:has(:disabled) { color:var(--text-muted); }
.career-option input { flex-shrink:0; width:1.2rem; height:1.2rem; accent-color:var(--red); }
.explore-links { display:flex; flex-wrap:wrap; gap:.65rem; margin:1rem 0; }
.explore-links a,.explore-links button { min-height:44px; display:inline-flex; align-items:center; }
#career-comparison table { min-width:620px; table-layout:fixed; }
#career-comparison td { overflow-wrap:anywhere; }
.guide-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:1rem; margin:1.5rem 0; }
.guide-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:1.5rem; }
.guide-card p,.guide-card ul,.guide-card ol { margin-top:.75rem; }
.guide-card ul,.guide-card ol { padding-left:1.25rem; }
.guide-steps { padding-left:1.5rem; margin:1.5rem 0; }
.guide-steps>li { padding:0 0 1.5rem .5rem; }
.guide-steps h3 { margin-bottom:.5rem; }
.source-note { font-size:.875rem; color:var(--text-muted); margin:1rem 0; }
.guide-nav { margin:1.5rem 0; display:flex; flex-wrap:wrap; gap:.6rem; }
.guide-nav a { padding:.6rem .8rem; border:1px solid var(--border); border-radius:var(--radius); }
.guide-section { scroll-margin-top:6rem; }
.guide-summary { padding:1rem; border-left:4px solid var(--ok); background:var(--bg-soft); margin:1rem 0; }
.guide-result { margin:1.5rem 0; }
/* Readable metadata across the reference: no tiny monospaced letterspacing. */
.kicker,.card-stat,.equip-type,.post-meta,.news-body time,.source-note,
.trade-fact-label,.pay-range-label,.pay-step-label,.brand-sub,.home-label {
 font-family:var(--font-ui); font-size:.9375rem; line-height:1.5;
 letter-spacing:normal; text-transform:none; font-weight:500;
}
.card-stat,.post-meta,.news-body time,.trade-fact-label { color:var(--text-muted); }
.home-page .home-section { margin-top:3.5rem; }
.home-intro { display:grid; grid-template-columns:1fr 180px; align-items:center; gap:3rem; padding-top:3.5rem; padding-bottom:2rem; }
.home-intro h1 { font-size:clamp(2.2rem,4vw,3.5rem); line-height:1.12; max-width:22ch; margin:.6rem 0 1rem; }
.home-lead { font-size:1.2rem; max-width:58ch; line-height:1.65; }
.home-note { color:var(--text-muted); font-size:1rem; margin-top:1rem; max-width:72ch; }
.home-intro img,.home-feature img { border-radius:var(--radius-lg); }
.home-primary { background:var(--red-btn); color:white; border-color:var(--red-btn); }
.home-primary:hover { background:var(--red-btn-hover); color:white; }
.home-page .finder { margin-top:1rem; padding:2rem 0; background:var(--bg-soft); }
.home-page .finder-search { max-width:760px; }
.home-page .finder-search label { display:block; font-weight:600; margin-bottom:.5rem; }
.home-page .finder-hint,.home-page .finder-meta { font-family:var(--font-ui); font-size:1rem; letter-spacing:normal; text-transform:none; }
.home-routes { grid-template-columns:repeat(2,minmax(0,1fr)); }
.home-stat { font-size:1rem; font-weight:600; color:var(--text); }
.home-routes li { margin:.35rem 0; }
.home-routes a { display:inline-block; padding:.25rem 0; }
.home-journey { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.8rem; padding:0; list-style:none; margin:1.5rem 0; counter-reset:journey; }
.home-journey a { display:flex; flex-direction:column; height:100%; gap:.5rem; border:1px solid var(--border); border-radius:var(--radius); padding:1rem; background:var(--card); }
.home-journey a::before { counter-increment:journey; content:counter(journey); color:var(--text-muted); }
.home-journey span { color:var(--text-muted); }
.home-feature { display:grid; grid-template-columns:1fr 160px; gap:2rem; padding:2rem; border-radius:var(--radius-lg); background:var(--bg-soft); border:1px solid var(--border); }
.home-feature p { margin:.8rem 0; max-width:65ch; }
.home-page :focus-visible { outline:3px solid var(--link); outline-offset:4px; }
/* A daylight sky and a starry night; the active symbol travels with its disc. */
.theme-switch {
  --theme-travel:34px;
  width:80px; height:44px; padding:0; flex-shrink:0;
  overflow:hidden; isolation:isolate;
  border:1px solid #a48751; border-radius:999px;
  background:linear-gradient(135deg,#f1ca7f,#f9e8bd 65%,#fff4d9);
  box-shadow:inset 0 2px 4px #80561920,0 1px 2px #392b1512;
  transition:background .25s ease,border-color .25s ease,box-shadow .25s ease;
}
.theme-switch:hover { border-color:#76531b; box-shadow:inset 0 2px 4px #80561920,0 2px 10px #80561925; }
/* Decorative cloud and stars stay behind the control, with no extra spoken content. */
.theme-switch::before,.theme-switch::after {
  content:""; position:absolute; pointer-events:none; z-index:0;
  transition:opacity .2s ease,transform .3s ease;
}
.theme-switch::before {
  width:31px; height:17px; right:5px; top:15px;
  background:radial-gradient(circle at 35% 44%,#fffdf4 0 6px,transparent 6.5px),radial-gradient(circle at 66% 59%,#fffdf4 0 7px,transparent 7.5px),linear-gradient(#fffdf4,#fffdf4) center bottom / 24px 7px no-repeat;
  opacity:.92;
}
.theme-switch::after {
  width:3px; height:3px; left:16px; top:11px; border-radius:50%;
  background:#eff5ff; box-shadow:13px 7px 0 -0.5px #dbe9ff,-5px 17px 0 -0.5px #dbe9ff,12px 23px 0 -0.75px #dbe9ff;
  opacity:0; transform:translateY(5px);
}
.theme-switch .switch-icon {
  position:absolute; top:50%; left:12px; right:auto; transform:translate(0,-50%);
  width:20px; height:20px; fill:none; stroke:currentColor;
  stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; z-index:2;
  pointer-events:none; transition:transform .3s ease,opacity .15s ease;
}
.theme-switch .switch-sun { color:#80500b; opacity:1; }
.theme-switch .switch-sun circle { fill:#f4c55d; }
.theme-switch .switch-moon { color:#33486b; fill:#bccde6; opacity:0; }
.theme-switch .switch-knob {
  left:5px; top:50%; width:34px; height:34px; z-index:1; pointer-events:none;
  border:1px solid #e2b557; background:linear-gradient(145deg,#fff9df,#ffe7a2);
  box-shadow:0 2px 5px #79511835,inset 0 1px 1px #fff; transform:translate(0,-50%);
  transition:transform .3s ease,background .25s ease,border-color .25s ease;
}
.theme-switch.is-dark { background:linear-gradient(135deg,#101a30,#273d62); border-color:#6f86ab; box-shadow:inset 0 2px 5px #0005,0 1px 3px #0003; }
.theme-switch.is-dark:hover { border-color:#bdcfea; box-shadow:inset 0 2px 5px #0005,0 2px 12px #87a9df25; }
.theme-switch.is-dark::before { opacity:0; transform:translateX(8px); }
.theme-switch.is-dark::after { opacity:1; transform:translateY(0); }
.theme-switch.is-dark .switch-knob { transform:translate(var(--theme-travel),-50%); background:linear-gradient(145deg,#f5f8ff,#d1def1); border-color:#e8effc; box-shadow:0 2px 6px #0005,0 0 9px #cadfff30; }
.theme-switch.is-dark .switch-icon { transform:translate(var(--theme-travel),-50%); }
.theme-switch.is-dark .switch-sun { opacity:0; }
.theme-switch.is-dark .switch-moon { opacity:1; }
.theme-switch:focus-visible { outline:3px solid var(--text); outline-offset:4px; }
@media(prefers-reduced-motion:reduce) {
 .theme-switch,.theme-switch::before,.theme-switch::after,.theme-switch .switch-icon,.theme-switch .switch-knob { transition:none; }
}
@media(forced-colors:active) {
 .theme-switch { border:2px solid ButtonText; }
 .theme-switch::before,.theme-switch::after { display:none; }
 .theme-switch .switch-knob { background:ButtonFace; border:1px solid ButtonText; }
 .theme-switch .switch-icon { color:ButtonText; fill:none; }
}
@media(max-width:700px) {
 .home-intro { grid-template-columns:1fr; gap:1rem; padding-top:2rem; }
 .home-intro img,.home-feature img { display:none; }
 .home-routes,.home-feature { grid-template-columns:1fr; }
 .home-journey { grid-template-columns:1fr; }
 .home-journey a { display:grid; grid-template-columns:1.25rem 1fr; }
 .home-journey span { grid-column:2; }
 .home-feature { padding:1.5rem; }
 .brand-sub { font-size:.8125rem; }
}
@media print { .career-options,.explore-controls,#career-clear,#career-share { display:none; } #career-comparison table { min-width:0; } }

/* About: a personal introduction with a comfortable reading measure. */
.about-page .about-story { margin-top:2.5rem; max-width:800px; }
.about-page .prose p { max-width:66ch; font-size:1.0625rem; line-height:1.75; }
.about-page .home-intro h1 { max-width:24ch; font-size:clamp(2rem,3.6vw,3rem); }
.about-page .faq { max-width:800px; }
.about-page .faq-item { max-width:none; }
.about-page .faq-item summary { min-height:44px; font-size:1rem; }
.about-page .about-contact { margin-top:3rem; max-width:calc(var(--container) - 3rem); scroll-margin-top:6rem; }
.about-page .about-contact p { max-width:66ch; margin-top:1rem; }
@media(max-width:700px) { .about-page .about-contact { margin-inline:1.5rem; } }

.about-page .btn-outline { color:var(--text); }
.about-page .btn-outline:hover { color:var(--red-text); background:var(--red-btn); }

/* A centred reading column makes the page margins predictable. */
.about-page .home-intro { max-width:800px; grid-template-columns:1fr 120px; gap:1.5rem; padding-bottom:.5rem; }
.about-page .home-intro img { width:120px; height:120px; }
.about-page .home-intro + .about-story { margin-top:1.25rem; }
.about-page .about-story > h2 { margin-top:0; }
.about-page .faq > h2 { margin-bottom:1.25rem; padding-top:0; border-top:0; }
.about-page .faq > h2::before { display:none; }
.about-page .about-contact { max-width:752px; margin-top:2.5rem; }
@media(max-width:700px) {
  .about-page .home-intro { grid-template-columns:1fr; padding-bottom:.25rem; }
  .about-page .home-intro + .about-story { margin-top:1rem; }
  .about-page .about-story { margin-top:2rem; }
}
/* CAF orientation and tools: readable labels and predictable sections. */
#caf-menu { min-width:280px; max-height:calc(100dvh - 100px); overflow-y:auto; }
#caf-menu .nav-group { display:block; }
#caf-menu .nav-group > span { display:block; padding:.65rem .7rem; margin-bottom:.3rem; border-radius:5px; background:var(--surface-2); font:700 1rem/1.4 var(--font-ui); color:var(--text); }
#caf-menu .nav-group + .nav-group { margin-top:.75rem; padding-top:.75rem; border-top:1px solid var(--border); }
#caf-menu .nav-group ul { list-style:none; margin:0; padding:0; }
#caf-menu a { min-height:44px; display:flex; align-items:center; padding-inline:1rem; }
.caf-section .page-head { max-width:800px; margin-inline:auto; }
.caf-section .branch-lede { max-width:70ch; line-height:1.7; }
.caf-section .structure-guide { max-width:800px; }
.caf-section .branch-section > h2 { margin-bottom:1.25rem; }
.caf-section .guide-nav { display:flex; flex-wrap:wrap; gap:.6rem 1.25rem; margin-block:1.5rem 2rem; }
.caf-section .guide-nav a { padding:.5rem 0; }
.caf-section .dash-tile-label,.caf-section .branch-trade-key,.caf-section .branch-trade-count,.caf-section .branch-trade-tag,.caf-section .branch-trade-cat,.caf-section .equip-type { font-family:var(--font-ui); letter-spacing:normal; text-transform:none; }
.caf-section .dash-tile-label,.caf-section .branch-trade-key,.caf-section .equip-type { font-size:1rem; line-height:1.5; }
.caf-section .branch-trade-tag { font-size:.875rem; }
.caf-section .explore-links { display:flex; flex-wrap:wrap; gap:.75rem; margin-block:1rem; }
.caf-section .explore-links [aria-current] { font-weight:700; text-decoration:underline; text-underline-offset:4px; }
.caf-section .equipment-group,.caf-section .reference-fold > details { border:1px solid var(--border); border-radius:12px; margin-block:1rem; overflow:hidden; }
.caf-section .equipment-group > summary,.caf-section .reference-fold summary { cursor:pointer; padding:1.1rem 1.25rem; font:600 1.1rem/1.5 var(--font-ui); color:var(--text); }
.caf-section .equipment-group > .branch-grid,.caf-section .reference-fold-body { padding:0 1.25rem 1.25rem; }
.caf-section #branch-equipment { display:block; }
.caf-section .reference-fold { margin-top:1.25rem; }
.caf-section :is(summary,a,button,input,select):focus-visible { outline:3px solid var(--text); outline-offset:3px; }
.caf-section [id] { scroll-margin-top:7rem; }
@media(max-width:700px) {
 #caf-menu { min-width:0; max-height:60dvh; }
 .caf-section .equipment-group > .branch-grid,.caf-section .reference-fold-body { padding-inline:.75rem; }
}

.caf-section .guide-nav.container { max-width:800px; margin-inline:auto; padding-inline:24px; }
.caf-section .branch-trade-chip { min-height:44px; font-size:1rem; padding:.6rem .8rem; }
.caf-section .branch-trade-count { font-size:.95rem; }
.caf-section .caf-branch-tag { font:600 .95rem var(--font-ui); letter-spacing:normal; }
/* Card summaries need space above the rule even when auto margins shrink. */
.card-stat {
  border-top:0;
  padding-top:.9rem;
}
.card-stat::before {
  content:"";
  display:block;
  border-top:1px solid var(--rule);
  margin-bottom:.9rem;
}
/* These four-card CAF sections need balanced rows and aligned summary dividers. */
.caf-element-grid:has(> .branch-card) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; }
.caf-element-grid .branch-card { display:flex; flex-direction:column; gap:.5rem; padding:1.5rem; }
.caf-element-grid .equip-type { margin:0 0 .25rem; }
.caf-element-grid .card-stat {
  margin-top:auto;
  min-height:calc(3em + 1.8rem + 1px);
}
@media(max-width:640px) {
  .caf-element-grid:has(> .branch-card) { grid-template-columns:minmax(0,1fr); gap:1rem; }
  .caf-element-grid .branch-card { padding:1.25rem; }
  .caf-element-grid .card-stat { min-height:0; }
}
.equip-relation,.base-units,.base-trains {
  margin-top:.9rem;
  padding-top:.9rem;
}

/* Readable semantic accents; filled-button red remains unchanged. */
:root { --text-accent:var(--link); }
.trade-flag,.trade-flag-note,.forecast-when,.rank-row-officer .rank-nato { color:var(--text-accent); }
.trade-area-count { color:var(--text-muted); }
.trade-area-count,.forecast-when,.equip-status { font-family:var(--font-ui); font-size:.9375rem; line-height:1.5; letter-spacing:normal; text-transform:none; }
.forecast-name { border:0; background:transparent; padding:.55rem 0; text-align:left; cursor:pointer; text-decoration:underline; text-underline-offset:.2em; min-height:44px; }
.forecast-name:focus-visible { outline:3px solid var(--text); outline-offset:3px; }
.trade-search > label { display:block; margin-bottom:.5rem; font-weight:600; }
.trade-filter-disclosure { margin-block:1rem; border:1px solid var(--border); border-radius:var(--radius); padding:1rem; }
.trade-filter-disclosure > summary { cursor:pointer; min-height:44px; display:list-item; font-weight:600; padding-block:.5rem; }
.trade-filter-disclosure .seg { border:0; border-radius:0; overflow:visible; gap:.4rem; }
.trade-filter-disclosure .seg-btn { border:1px solid var(--border) !important; border-radius:8px; min-height:44px; }
.career-options { max-height:none; overflow:visible; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); }
.equip-card h2 { font-size:var(--fs-lead); margin:0; padding:0; border:0; }
.equip-card h2::before { display:none; }

.dash-origin-head strong,.branch-trade-tag { color:var(--text-accent); }
.search-retry[hidden] { display:none; }

/* Keep small occupation-role labels readable on branch-card surfaces. */
:root { --role-label: var(--link); }
:root[data-theme="dark"] { --role-label: #f07b80; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --role-label: #f07b80; }
}
.branch-trade-tag { color: var(--role-label); }
/* Shared comparisons show their results first, with an accessible editing control. */
.career-picker { margin-block: 1rem; }
.career-picker > summary { cursor:pointer; padding:.8rem 1rem; border:1px solid var(--border); border-radius:var(--radius); font-weight:600; }
.career-picker[open] > summary { margin-bottom:1rem; }

/* Preserve the header flex layout while exposing its navigation landmark. */
.primary-navigation { display: contents; }
/* Give the keyboard-accessible video button the existing thumbnail appearance. */
button.news-thumb { border: 0; padding: 0; cursor: pointer; color: inherit; background: transparent; font: inherit; text-align: inherit; }
button.news-thumb:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
