:root {
  --page:#f6faff;
  --surface:#fff;
  --surface-alt:#edf5fd;
  --header:#f6fafff2;
  --accent:#075da8;
  --action:#a9d5ff;
  --action-hover:#c5e4ff;
  --action-ink:#102d4a;
  --media-surface:#e9f1fa;
  --focus:#0867b9;
  --blue-600:var(--accent);
  --blue-700:#124f86;
  --cyan:#5fb4ff;
  --radius:12px;
  --radius-lg:18px;
  --container:1240px;
}

:root:not([data-theme="light"]) {
  color-scheme:dark;
  --page:#0b1626;
  --surface:#132339;
  --surface-alt:#101e30;
  --header:#0b1626f2;
  --accent:#9dd0ff;
  --action:#9bcfff;
  --action-hover:#c5e4ff;
  --focus:#b1d8ff;
  --media-surface:#1a2c44;
  --blue-900:#f0f6ff;
  --blue-800:#cbe4ff;
  --blue-700:#b4d9ff;
  --blue-500:#78bfff;
  --sky:#1b314d;
  --ice:#101e30;
  --ink:#eaf4ff;
  --muted:#b7c8dc;
  --line:#30465f;
  --card:var(--surface);
  --shadow:0 16px 40px #050c1750;
}

body { background:var(--page); }
:focus-visible { outline:2px solid var(--focus); outline-offset:4px; }
.lead,.check-list li { color:var(--muted); }
.text-link:hover { text-decoration:underline; text-underline-offset:.25em; }
.btn { border-radius:8px; font-weight:750; }
.btn-primary,.kb-query-form .btn-primary,.kb-page .btn-primary {
  background:var(--action);
  color:var(--action-ink);
  box-shadow:none;
}
.btn-primary:hover,.kb-query-form .btn-primary:hover,.kb-page .btn-primary:hover {
  background:var(--action-hover);
  box-shadow:none;
}
.btn-secondary,.btn-ghost {
  border-color:var(--line);
  background:var(--surface);
  color:var(--blue-700);
}
.btn-secondary:hover,.btn-ghost:hover { background:var(--sky); }

.site-header {
  background:var(--header);
  border-bottom-color:var(--line);
}
.site-header .nav-wrap {
  width:min(var(--container),calc(100% - 64px));
  min-height:76px;
  height:auto;
  gap:clamp(.6rem,1.8vw,1.8rem);
}
.site-header .brand { flex:none; }
.site-header .brand img { width:clamp(132px,13vw,185px); }
.site-header .brand:hover { opacity:.9; }
.primary-nav { gap:clamp(.1rem,.6vw,.6rem); }
.primary-nav a:not(.btn) {
  padding:.65rem .55rem;
  border-radius:6px;
  font-size:.88rem;
  font-weight:650;
}
.primary-nav a.active { color:var(--accent); }
.header-controls { display:flex; align-items:center; gap:.65rem; flex:none; }
.header-controls .lang-switch {
  color:var(--muted);
  background:none;
  border:0;
  border-radius:0;
  padding:.2rem 0;
  font-size:.8rem;
  white-space:nowrap;
}
.header-controls .lang-switch a.active { color:var(--accent); }
.header-controls .header-cta { white-space:nowrap; padding:.55rem .85rem; }
.header-controls .theme-toggle {
  width:40px;
  height:40px;
  border:1px solid var(--line);
  border-radius:8px;
  color:var(--ink);
  background:transparent;
  display:grid;
  place-items:center;
  font-size:1.15rem;
  cursor:pointer;
}
.theme-toggle:hover { background:var(--sky); }
.nav-contact-mobile { display:none; }

.sedalia-home-hero {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:#0b1626;
  border-bottom:1px solid #344b65;
}
.home-hero-media { position:absolute; inset:0 0 0 31%; z-index:-1; }
.home-hero-media img {
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:59% 48%;
  filter:saturate(.86) brightness(.84);
}
.home-hero-media::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,#0b1626 0%,#0b1626e0 18%,#0b16262b 52%,#0b162615 100%),
    linear-gradient(0deg,#0b1626d4,transparent 44%);
}
.home-hero-inner {
  display:flex;
  align-items:center;
  min-height:clamp(470px,41vw,620px);
  padding-block:3.5rem 4.5rem;
  position:relative;
}
.home-hero-copy { width:min(62%,640px); }
.home-hero-copy .kicker { color:#afd9ff; }
.home-hero-copy h1 {
  max-width:15ch;
  color:#f6faff;
  font-size:clamp(3rem,6.05vw,6.05rem);
  letter-spacing:-.063em;
  line-height:.99;
  margin:0 0 1.45rem;
}
.home-hero-copy h1 span { color:#a8d7ff; }
.home-hero-copy .lead { max-width:44ch; color:#d7e5f5; font-size:clamp(1rem,1.6vw,1.2rem); }
.home-hero-actions { display:flex; flex-wrap:wrap; gap:.7rem; margin-top:1.55rem; }
.home-hero-actions .btn-secondary {
  background:#0b1626b8;
  color:#f3f9ff;
  border-color:#7694b3;
}
.home-hero-actions .btn-secondary:hover { background:#223a57; }
.home-hero-credit {
  position:absolute;
  right:0;
  bottom:1rem;
  background:#0b1626e8;
  color:#deeafa;
  padding:.27rem .55rem;
  font-size:.72rem;
}
[lang^="ms"] .home-hero-copy h1 { font-size:clamp(2.85rem,5.4vw,5.45rem); max-width:16ch; }

.home-finder { background:var(--surface); border-bottom:1px solid var(--line); }
.home-finder-inner {
  display:grid;
  grid-template-columns:minmax(230px,.8fr) minmax(0,1.8fr);
  align-items:center;
  gap:clamp(1.35rem,4vw,4.2rem);
  padding-block:1.6rem;
}
.home-finder h2 { font-size:clamp(1.5rem,2.5vw,2rem); margin:0 0 .4rem; }
.home-finder p { margin:0; }
.home-finder .kb-query-form { margin:0; display:flex; align-items:stretch; gap:.6rem; }
.home-finder .kb-query-form > label,.home-finder .kb-query-bottom > small {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  margin:0;
}
.home-finder .kb-query-form textarea { flex:1 1 240px; min-width:0; min-height:68px; border-radius:8px; }
.home-finder .kb-query-form textarea::placeholder { color:var(--muted); opacity:1; }
.home-finder .kb-query-bottom { margin:0; }
.home-finder .kb-query-actions { flex-wrap:nowrap; }
.home-finder .kb-query-actions .btn { white-space:nowrap; }
.home-finder .kb-query-actions .kb-luna-trigger { white-space:normal; min-width:126px; }

.market-home .section { padding-block:clamp(2.5rem,5.1vw,5.1rem); }
.home-section-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:.75rem 1.2rem;
  margin-bottom:1.5rem;
}
.home-section-heading h2 { margin:0; font-size:clamp(1.8rem,3.4vw,3rem); }
.home-section-heading .text-link { flex:none; }
.home-domain-grid,.home-planning-grid { display:grid; gap:1rem; }
.home-domain-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.home-domain-card,.home-planning-card {
  position:relative;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  transition:transform .17s ease,border-color .17s ease;
}
.home-domain-card:hover,.home-planning-card:hover { transform:translateY(-3px); border-color:var(--accent); }
.home-domain-card img,.home-planning-card img { width:100%; object-fit:cover; background:var(--media-surface); }
.home-domain-card img { aspect-ratio:3/2; }
.home-domain-copy { padding:1rem 1rem 2.8rem; }
.home-domain-copy h3,.home-planning-card h3 { font-size:1.12rem; margin:0 0 .5rem; line-height:1.2; }
.home-domain-copy p,.home-planning-card p { font-size:.9rem; line-height:1.48; margin:0; }
.home-card-arrow {
  position:absolute;
  right:.8rem;
  bottom:.75rem;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:50%;
  color:var(--accent);
  background:var(--sky);
  font-size:1.1rem;
  font-weight:700;
}
.home-planning-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.home-planning-card img { aspect-ratio:16/8; }
.home-planning-card > div { padding:1.15rem 3.1rem 1.35rem 1.1rem; }
.home-work .market-work-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.home-work .market-project-card img { height:auto; aspect-ratio:4/3; object-fit:cover; }
.home-work .market-project-card .card-body { padding:1rem; }
.home-work .market-project-card h3 { font-size:1.1rem; }
.home-work .market-project-card .evidence-meta { gap:.35rem .6rem; }
.home-contact { background:#102e4e; border-top:1px solid #496f95; }
.home-contact h2 { margin-bottom:.55rem; }
.home-contact p { margin-bottom:0; }

/* Bind the existing technical, enquiry and project layouts to the shared palette. */
:root:not([data-theme="light"]) :is(
  .section.alt,.market-hero,.page-hero,.hero,.bridge-hero,.kb-finder-intro,.kb-entry-band,
  .kb-results-section,.project-proof
) { background:var(--surface-alt); }
:root:not([data-theme="light"]) :is(
  .metric,.capability,.solution-card,.feature,.panel,.product-card,.table-wrap,.form-card,
  .bridge-diagram>div,.process-card,.local-proof,.faq-list details,.learning-card,
  .image-dialog,.content-disclosure,.evidence-card,.system-card,.evidence-gallery figure,
  .resource-card,.application-card,.prose-panel,.decision-card,.next-action-card,.buyer-card,
  .buyer-card.research-card,.market-gallery figure,.market-hero-photo,.market-visit .visit-agenda,
  .technology-links a,.project-image-link,.proof-callout,.kb-examples button,.skip-link
) {
  background:var(--surface);
  border-color:var(--line);
  color:var(--ink);
}
:root:not([data-theme="light"]) :is(
  th,.article-note,.scope-note,.framework-note,.project-role,.context-banner,
  .security-box,.notice,.kb-technical summary,.kb-context-summary,.kb-query-form textarea
) {
  background:var(--sky);
  border-color:var(--line);
  color:var(--ink);
}
:root:not([data-theme="light"]) :is(.panel.dark,.proof-strip,.impact-band,.cta) { background:#102e4e; }
:root:not([data-theme="light"]) .bridge-diagram .bridge-center { background:#174572; }
:root:not([data-theme="light"]) :is(.limitation-panel,.notice-error) {
  background:#2f2430;
  color:#ffd5d5;
  border-color:#76545f;
}
:root:not([data-theme="light"]) :is(.form-field input,.form-field textarea,.form-field select,.security-box input) {
  background:var(--page);
  color:var(--ink);
  border-color:#557394;
}
:root:not([data-theme="light"]) :is(.nda-note,.kb-error,.evidence-meta) { color:var(--muted); }
:root:not([data-theme="light"]) .kb-error { color:#ffb9c1; }
:root:not([data-theme="light"]) :is(.market-project-card .evidence-meta,.text-link,summary) { color:var(--accent); }
:root:not([data-theme="light"]) :is(.market-hero-photo img,.market-project-card img,.domain-intro .intro-visual img) { background:var(--media-surface); }
:root:not([data-theme="light"]) .site-header .brand img,.site-footer .footer-logo { outline:1px solid #53779e; border-radius:3px; }
.site-footer .footer-main { background:#081321; }
.site-footer .btn-primary { color:var(--action-ink); }

@media (max-width:1120px) {
  .home-domain-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .home-finder .kb-query-form { flex-wrap:wrap; }
}

@media (max-width:980px) {
  .site-header .nav-wrap { width:min(var(--container),calc(100% - 40px)); min-height:68px; }
  .site-header .primary-nav {
    top:100%;
    background:var(--surface);
    border-color:var(--line);
    border-top:0;
    border-radius:0 0 12px 12px;
  }
  .primary-nav a:not(.btn) { padding:.8rem; font-size:1rem; }
  .primary-nav .nav-contact-mobile { display:block; color:var(--accent); }
  .header-controls .header-cta { display:none; }
  .header-controls .menu-toggle { display:block; }
  .home-hero-inner { min-height:490px; }
  .home-finder-inner { grid-template-columns:minmax(175px,.7fr) minmax(0,1.4fr); }
  .home-work .market-work-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:640px) {
  .site-header .nav-wrap { width:calc(100% - 28px); min-height:62px; }
  .site-header .brand img { width:min(142px,38vw); }
  .header-controls { gap:.38rem; }
  .header-controls .theme-toggle { width:36px; height:36px; }
  .header-controls .menu-toggle { padding:.32rem; }
  .home-hero-media { inset:0 0 auto; height:300px; }
  .home-hero-media img { object-position:60% 43%; }
  .home-hero-media::after { background:linear-gradient(0deg,#0b1626 2%,#0b16268a 42%,#0b162612 100%); }
  .home-hero-inner { padding:12rem 0 3rem; min-height:0; align-items:end; }
  .home-hero-copy { width:100%; }
  .home-hero-copy .kicker { font-size:.67rem; margin-bottom:.65rem; }
  .home-hero-copy .kicker::before { width:23px; }
  .home-hero-copy h1,[lang^="ms"] .home-hero-copy h1 {
    font-size:clamp(2.8rem,9.1vw,3.6rem);
    margin-bottom:1rem;
  }
  .home-hero-copy .lead { font-size:1rem; }
  .home-hero-actions { margin-top:1.1rem; gap:.55rem; }
  .home-hero-actions .btn { width:auto; padding:.65rem .72rem; font-size:.85rem; }
  .home-hero-credit { inset:.65rem 0 auto auto; }
  .home-finder-inner { display:block; padding-block:1.2rem; }
  .home-finder-inner > div { margin-bottom:.85rem; }
  .home-finder .kb-query-form { flex-direction:column; }
  .home-finder .kb-query-form textarea { flex:auto; min-height:68px; }
  .home-finder .kb-query-actions .btn { width:auto; flex:1; padding:.65rem .7rem; }
  .home-domain-grid,.home-planning-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
  .home-domain-copy { padding:.75rem .75rem 2.55rem; }
  .home-domain-copy h3,.home-planning-card h3 { font-size:1rem; }
  .home-domain-copy p,.home-planning-card p { font-size:.85rem; }
  .home-planning-card > div { padding:.75rem .75rem 2.55rem; }
  .home-work .market-work-grid { grid-template-columns:1fr; }
}

@media (max-width:365px) {
  .home-domain-grid,.home-planning-grid { grid-template-columns:1fr; }
  .home-finder .kb-query-actions { flex-wrap:wrap; }
}
