/* Shared foundation. Legacy page compositions stay in their own stylesheets.
   New pages depend on this file, not on the accumulated legacy cascade. */
@font-face { font-family: Geist; src: url('/public/fonts/geist-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Geist; src: url('/public/fonts/geist-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Geist; src: url('/public/fonts/geist-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --xe-font: Geist, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --xe-ink: #182234;
  --xe-muted: #536177;
  --xe-paper: #fff;
  --xe-soft: #f4f6fa;
  --xe-blue: #2449cc;
  --xe-blue-soft: #edf2ff;
  --xe-magenta: #cd0051;
  --xe-night: #18263d;
  --xe-on-night: #d1dbea;
  --xe-line: #d6deea;
  --xe-max: 1320px;
  --xe-gutter: clamp(20px, 4vw, 56px);
  --xe-header: 76px;
  --xe-radius: 8px;
}

html { scroll-padding-top: calc(var(--xe-header) + 24px); -webkit-text-size-adjust: 100%; }
.xether-shell *, .xether-shell *::before, .xether-shell *::after { box-sizing: border-box; }
.xether-shell button, .xether-shell input, .xether-shell select, .xether-shell textarea { font: inherit; }
.xether-shell button, .xether-shell select { cursor: pointer; }
.xether-shell input, .xether-shell select, .xether-shell textarea { min-width: 0; font-size: 1rem; }
.xether-shell [hidden] { display: none !important; }
/* Long words and enlarged text must reflow, including inside grid tracks. */
.xether-shell :is(h1, h2, h3, p, dt, dd, li, th, td, .btn, .text-link) { overflow-wrap: anywhere; }
.xether-shell :is(main, section, article, figure, .wrap, .text-link) { min-width: 0; }
.xether-shell .text-link > [aria-hidden='true'] { flex-shrink: 0; }
.xether-shell .example-label { display: block; margin-bottom: .6rem; color: var(--xe-muted); font: 500 .8125rem/1.5 var(--xe-font); }
/* Prefer whole words in headings; overflow-wrap remains a zoom safety net. */
.xether-shell :is(h1, h2, h3) { hyphens: manual; text-wrap: balance; }
body.xether-shell :focus-visible { outline: 3px solid var(--xe-blue); outline-offset: 4px; box-shadow: 0 0 0 2px #fff; }
body.xether-shell .skip-link { position: fixed; z-index: 100; top: 12px; left: 16px; padding: 12px 20px; color: var(--xe-ink); background: white; border: 2px solid var(--xe-blue); border-radius: 6px; transform: translateY(-180%); }
body.xether-shell .skip-link:focus { transform: translateY(0); }
body.xether-shell.menu-open { overflow: hidden; }

/* The shell always has a light surface, independent of the hero below it. */
body.xether-shell .site-header,
body.xether-shell .site-header.dark:not(.is-scrolled) {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--xe-header);
  color: var(--xe-ink); background: rgb(255 255 255 / 97%);
  border: 0; border-bottom: 1px solid var(--xe-line); backdrop-filter: blur(14px);
}
body.xether-shell .nav-shell { position: relative; display: flex; align-items: center; justify-content: space-between; height: var(--xe-header); gap: 24px; width: min(100%, var(--xe-max)); margin: 0 auto; padding-inline: var(--xe-gutter); }
body.xether-shell .brand-lockup { display: flex; align-items: center; width: 154px; min-width: 0; height: 44px; flex: 0 0 auto; margin: 0; }
body.xether-shell .brand-lockup img.brand-logo { width: 154px; height: auto; }
body.xether-shell .site-header .brand-logo-on-light,
body.xether-shell .site-header.dark:not(.is-scrolled) .brand-logo-on-light { display: block; }
body.xether-shell .site-header .brand-logo-on-dark,
body.xether-shell .site-header.dark:not(.is-scrolled) .brand-logo-on-dark { display: none; }
body.xether-shell .site-header .nav-links { position: static; display: flex; align-items: center; flex-direction: row; gap: clamp(16px, 2vw, 28px); padding: 0; background: none; color: var(--xe-muted); font: 500 15px/1.4 var(--xe-font); }
body.xether-shell .site-header.dark:not(.is-scrolled) .nav-links { color: var(--xe-muted); }
body.xether-shell .nav-links a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; white-space: nowrap; }
body.xether-shell .nav-links a:hover, body.xether-shell .nav-links a[aria-current='page'],
body.xether-shell .site-header.dark:not(.is-scrolled) .nav-links a:hover { color: var(--xe-blue); }
body.xether-shell .nav-actions { display: flex; align-items: center; gap: 12px; }
body.xether-shell .site-header .btn-primary { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; margin: 0; padding: 11px 18px; border: 1px solid var(--xe-magenta); border-radius: 6px; background: var(--xe-magenta); color: #fff; box-shadow: none; font: 600 15px/1.4 var(--xe-font); text-decoration: none; white-space: nowrap; }
body.xether-shell .site-header .btn-primary:hover { background: #ac0044; border-color: #ac0044; }
body.xether-shell .mobile-toggle { display: none; }

body.xether-shell .site-footer { background: #172238; color: var(--xe-on-night); padding: 56px 0 40px; }
body.xether-shell .site-footer .wrap { width: min(100%, var(--xe-max)); margin-inline: auto; padding-inline: var(--xe-gutter); }
body.xether-shell .footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; border: 0; padding-top: 0; }
body.xether-shell .footer-col { min-width: 0; }
body.xether-shell .footer-col h3 { margin: 0 0 12px; color: #fff; font: 600 15px/1.5 var(--xe-font); letter-spacing: 0; }
body.xether-shell .footer-col p { max-width: 24ch; margin-top: 16px; color: var(--xe-on-night); font: 400 14px/1.7 var(--xe-font); }
body.xether-shell .footer-col a:not(.brand) { display: flex; align-items: center; width: fit-content; min-height: 36px; margin: 0; color: var(--xe-on-night); font: 400 14px/1.5 var(--xe-font); text-decoration: none; }
body.xether-shell .footer-col a:not(.brand):hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
body.xether-shell .footer-brand { width: 154px; }

@media (max-width: 920px) {
  :root { --xe-header: 68px; }
  body.xether-shell .site-header .nav-links { display: none; }
  body.xether-shell .site-header .nav-actions > .btn-primary { display: none; }
  body.xether-shell .mobile-toggle { position: relative; z-index: 43; display: inline-flex; justify-content: center; align-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid var(--xe-line); border-radius: 6px; background: white; color: var(--xe-ink); font-size: 0; }
  body.xether-shell .mobile-toggle::before, body.xether-shell .mobile-toggle::after { content: ''; position: absolute; width: 18px; height: 0; border: 0; border-top: 2px solid currentColor; background: none; transform: translateY(-3px); }
  body.xether-shell .mobile-toggle::after { transform: translateY(3px); }
  body.xether-shell .site-header.menu-open,
  body.xether-shell .site-header.dark.menu-open:not(.is-scrolled) { height: 100dvh; background: white; overflow: auto; }
  body.xether-shell .site-header.menu-open .nav-shell { z-index: 42; }
  body.xether-shell .site-header.menu-open .nav-links { position: fixed; inset: var(--xe-header) 0 108px; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 24px var(--xe-gutter); overflow-y: auto; background: white; }
  body.xether-shell .site-header.menu-open .nav-links a { flex-shrink: 0; min-height: 68px; justify-content: space-between; border-bottom: 1px solid var(--xe-line); color: var(--xe-ink); font: 500 24px/1.3 var(--xe-font); }
  body.xether-shell .site-header.menu-open .nav-links a::after { content: '↗'; position: static; width: auto; height: auto; border: 0; color: var(--xe-blue); background: none; transform: none; }
  body.xether-shell .site-header.menu-open .nav-actions > .btn-primary { position: fixed; inset: auto var(--xe-gutter) 28px; display: flex; width: auto; min-height: 52px; }
  body.xether-shell .site-header.menu-open .mobile-toggle::before { transform: rotate(45deg); }
  body.xether-shell .site-header.menu-open .mobile-toggle::after { transform: rotate(-45deg); }
  body.xether-shell .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  body.xether-shell .footer-col:first-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  body.xether-shell .brand-lockup, body.xether-shell .brand-lockup img.brand-logo { width: 136px; }
  body.xether-shell .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.xether-shell .footer-col a:not(.brand) { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .xether-shell *, .xether-shell *::before, .xether-shell *::after { animation: none !important; transition: none !important; }
}

/* Copy support: compact, readable status and scope notes. */
.xe-status { display: inline-block; max-width: 100%; padding: .4rem .7rem; border: 1px solid #aebed7; border-radius: 4px; background: #edf2fa; color: #253b61; font: 500 .875rem/1.5 var(--xe-font); overflow-wrap: anywhere; }
.xe-note { margin-top: 1.25rem !important; padding: 1rem 0; border-top: 1px solid #bdcadd; color: #47566f; font-size: 1rem; line-height: 1.65; }
.xe-note p { margin-top: .75rem !important; }
.xe-context-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: .75rem; color: #2447b2 !important; font-size: 1rem; text-decoration: underline !important; text-underline-offset: .2em; }
.xe-copy-details { padding: 1.25rem 0; border-bottom: 1px solid #bdcadd; font-size: 1rem; line-height: 1.65; }
.xe-copy-details summary { min-height: 44px; display: list-item; cursor: pointer; color: #182234; font-weight: 600; }
.xe-copy-details p { max-width: 75ch; margin: .75rem 0 0 !important; color: #47566f; }
.xe-copy-details a { color: #2447b2; text-decoration: underline; }
.xe-scope-list { margin: 0; }
.xe-scope-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid #bdcadd; }
.xe-scope-list dt { color: #182234; font-weight: 600; }
.xe-scope-list dd { margin: 0; color: #47566f; }
.xether-shell summary:focus-visible { outline: 3px solid #2447b2; outline-offset: 4px; }
@media (max-width: 700px) { .xe-scope-list > div { grid-template-columns: minmax(0, 1fr); gap: .5rem; } }

.xe-scope-list dd .xe-status + p { margin-top: .75rem; }

/* Keep the full text and navigation available when JavaScript is unavailable. */
html:not(.has-js) .xn-action-tabs .tab-panel,
html:not(.has-js) .xn-cases .profile-panel { display: grid; margin-block: 2rem; }
html:not(.has-js) .xn-action-tabs .tab-list,
html:not(.has-js) .xn-action-tabs .accordion-trigger,
html:not(.has-js) .xn-cases .profile-picker,
html:not(.has-js) .xn-cases .profile-select,
html:not(.has-js) .faq-categories,
html:not(.has-js) .faq-category-select,
html:not(.has-js) .mobile-toggle { display: none !important; }
@media (max-width: 920px) {
  html:not(.has-js) body.xether-shell .site-header { position: static; height: auto; }
  html:not(.has-js) body.xether-shell .nav-shell { flex-wrap: wrap; height: auto; padding-block: .5rem; gap: .5rem; }
  html:not(.has-js) body.xether-shell .nav-links { position: static; display: flex; flex-wrap: wrap; order: 3; width: 100%; opacity: 1; visibility: visible; transform: none; pointer-events: auto; padding: .5rem 0; }
}
