/* ==========================================================================
   AMS marketing site - design system
   --------------------------------------------------------------------------
   Hand-written on purpose. No Bootstrap, no FontAwesome: the product heads
   vendor Bootstrap because Syncfusion ships a Bootstrap 5 theme and their
   data-dense CRUD screens need to cohere with third-party grids. This site has
   no Syncfusion, no grids and nine pages, so it would inherit all of that cost
   and none of the benefit - and with npm off the table outside Components/JsLib,
   a trimmed custom build is not available. Icons are inline SVG (Icon.razor).

   PALETTE NOTE. Every colour in the AMS product heads belongs to a CUSTOMER:
   --dyno-navy (#172B6B) in AMSBlazorServerApp/wwwroot/app.css belongs to Dyno
   Nobel and the mobile palette belongs to Nyrstar, so none of them may be used
   here. The parent brand is the one to match instead:

     Amber     #F59E0B, lifted from dynamicbuildsystems.com's own favicon. The
               single accent, and the visual signature shared with the parent
               site. Keyline, active-nav underline and diagram marker only -
               2.15:1 on white, so never text on a light ground.
     Graphite  cool neutral, H=210. 85% of every page. Reads alongside the DBS
               near-black (#1F1F21) without competing with it.
     Anodise   deep teal, H=187. AMS's own colour, carrying every interactive
               element. The colour of instrumentation - DCS faceplates, gauge
               dials, anodised fittings. The amber says Dynamic Build Systems;
               the teal says AMS.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Raw ramps - theme independent
   -------------------------------------------------------------------------- */
:root {
  --g-0:   #FFFFFF;
  --g-25:  #FAFBFC;
  --g-50:  #F4F6F8;
  --g-100: #E9EDF1;
  --g-200: #D8DEE5;
  --g-300: #BFC8D2;
  --g-400: #9AA6B2;
  --g-500: #7E8B99;
  --g-600: #6E7C8A;
  --g-700: #53606C;
  --g-800: #3D4852;
  --g-850: #2B333B;
  --g-900: #1C2229;
  --g-950: #12171C;
  --g-975: #0F1419;

  --t-50:  #E8F4F5;
  --t-100: #CFE6E9;
  --t-200: #9FD2D8;
  --t-300: #5DCBD6;
  --t-400: #2E939F;
  --t-500: #0E7C88;
  --t-600: #0B6671;
  --t-700: #0A535C;
  --t-800: #093F46;
  --t-900: #0A2E34;

  /* DBS accent, taken from dynamicbuildsystems.com's own favicon bar. Like the lime it
     replaced, it is a keyline colour: 2.15:1 on white, so never text on a light ground.
     6.73:1 on the hero band and 5.40:1 on the CTA band, where it does carry small labels. */
  --hv:     #F59E0B;
  --hv-dim: #B87708;

  --ok-600:   #1E7B4D;  --ok-300:   #5BC98D;  --ok-tint:   #EAF6F0;
  --warn-600: #8A5A00;  --warn-300: #E0A93B;  --warn-tint: #FDF4E3;
  --bad-600:  #A32B21;  --bad-300:  #F08A7E;  --bad-tint:  #FDEDEA;

  /* Dynamic Build Systems brand constants, from their own stylesheet. The logo and the
     footer rule use these directly so the two sites read as one family. */
  --dbs-ink:       #1F1F21;
  --dbs-primary:   #2B2B2E;
  --dbs-secondary: #6B6B72;
  --dbs-light:     #F7F7F8;

  /* Type - system stack, zero font requests, no render-blocking round trip */
  --font-sans: ui-sans-serif, system-ui, "Segoe UI", -apple-system,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  --step--2: clamp(.75rem, .73rem + .10vw, .81rem);
  --step--1: clamp(.83rem, .80rem + .15vw, .92rem);
  --step-0:  clamp(1rem, .96rem + .20vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.12rem + .40vw, 1.5rem);
  --step-2:  clamp(1.5rem, 1.34rem + .80vw, 2.1rem);
  --step-3:  clamp(1.9rem, 1.60rem + 1.5vw, 3rem);
  --step-4:  clamp(2.3rem, 1.85rem + 2.3vw, 3.75rem);

  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;

  --shell: 76rem;
  --shell-narrow: 46rem;
  --radius: 4px;            /* industrial: near-square, never pill-shaped */
  --radius-lg: 6px;
}

/* --------------------------------------------------------------------------
   2. Semantic tokens - light is the base definition
   -------------------------------------------------------------------------- */
:root {
  --page:        var(--g-0);
  --page-alt:    var(--g-25);
  --surface:     var(--g-50);
  --surface-2:   var(--g-100);
  --ink:         var(--g-900);   /* 16.03:1 on white */
  --ink-2:       var(--g-800);   /*  9.34:1 */
  --muted:       var(--g-700);   /*  6.45:1 */
  --subtle:      var(--g-600);   /*  4.27:1 - large text only */
  --line:        var(--g-200);
  --line-strong: var(--g-300);
  --field-line:  var(--g-500);   /*  3.48:1 - sole indicator, needs >=3:1 */

  --link:        var(--t-600);   /*  6.66:1 on white */
  --link-hover:  var(--t-700);   /*  8.73:1 */
  --brand:       var(--t-600);
  --brand-ink:   #FFFFFF;
  --brand-tint:  var(--t-50);
  --band:        var(--t-900);
  --band-ink:    #FFFFFF;        /* 14.45:1 */
  --band-sub:    #D6E3E5;        /* 10.99:1 */
  --band-line:   var(--t-700);
  --cta-band:    var(--t-800);

  --accent:      var(--hv);
  --accent-ink:  var(--g-900);   /*  7.4:1 ink on amber */

  --ok: var(--ok-600); --ok-bg: var(--ok-tint);
  --warn: var(--warn-600); --warn-bg: var(--warn-tint);
  --bad: var(--bad-600); --bad-bg: var(--bad-tint);

  --shadow-sm: 0 1px 2px rgb(28 34 41 / .06), 0 1px 1px rgb(28 34 41 / .04);
  --shadow-md: 0 2px 4px rgb(28 34 41 / .06), 0 8px 24px rgb(28 34 41 / .07);

  color-scheme: light;
}

/* Dark: only the tokens change. Guarded so an explicit light choice still wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page:        var(--g-975);
    --page-alt:    #131A20;
    --surface:     #161D23;
    --surface-2:   #1E262E;
    --ink:         #E6ECF2;      /* 15.55:1 on --page */
    --ink-2:       #CBD5DE;
    --muted:       #A3B0BC;
    --subtle:      #8894A0;
    --line:        #2A333C;
    --line-strong: #3A4550;
    --field-line:  #6E7C8A;

    --link:        var(--t-300);
    --link-hover:  #8ADDE6;
    --brand:       var(--t-300);
    --brand-ink:   var(--g-975);
    --brand-tint:  #0C2A2F;
    --band:        #0B2429;
    --band-ink:    #E6ECF2;
    --band-sub:    #A9C2C6;
    --band-line:   #10444C;
    --cta-band:    #0A343A;

    --ok: var(--ok-300); --ok-bg: #11291F;
    --warn: var(--warn-300); --warn-bg: #2B2113;
    --bad: var(--bad-300); --bad-bg: #2E1714;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-md: 0 2px 4px rgb(0 0 0 / .35), 0 8px 24px rgb(0 0 0 / .45);

    color-scheme: dark;
  }
}

/* Explicit dark choice wins in both directions. */
:root[data-theme="dark"] {
  --page:        var(--g-975);
  --page-alt:    #131A20;
  --surface:     #161D23;
  --surface-2:   #1E262E;
  --ink:         #E6ECF2;
  --ink-2:       #CBD5DE;
  --muted:       #A3B0BC;
  --subtle:      #8894A0;
  --line:        #2A333C;
  --line-strong: #3A4550;
  --field-line:  #6E7C8A;

  --link:        var(--t-300);
  --link-hover:  #8ADDE6;
  --brand:       var(--t-300);
  --brand-ink:   var(--g-975);
  --brand-tint:  #0C2A2F;
  --band:        #0B2429;
  --band-ink:    #E6ECF2;
  --band-sub:    #A9C2C6;
  --band-line:   #10444C;
  --cta-band:    #0A343A;

  --ok: var(--ok-300); --ok-bg: #11291F;
  --warn: var(--warn-300); --warn-bg: #2B2113;
  --bad: var(--bad-300); --bad-bg: #2E1714;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-md: 0 2px 4px rgb(0 0 0 / .35), 0 8px 24px rgb(0 0 0 / .45);

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-4);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 650;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
h4 { font-size: var(--step-0); font-weight: 650; }

p  { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

strong { font-weight: 650; color: var(--ink); }
code, kbd, samp { font-family: var(--font-mono); font-size: .9em; }

img, svg { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-7) 0; }

:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: var(--t-200); color: var(--g-900); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--sp-4); top: -4rem; z-index: 100;
  background: var(--brand); color: var(--brand-ink);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
  transition: top .15s ease;
}
.skip-link:focus { top: var(--sp-4); color: var(--brand-ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.shell        { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.shell-narrow { width: min(100% - 2.5rem, var(--shell-narrow)); margin-inline: auto; }

.section { padding-block: var(--sp-9); }
.section--tight { padding-block: var(--sp-8); }
.section--alt   { background: var(--page-alt); border-block: 1px solid var(--line); }
.section--band  { background: var(--band); color: var(--band-ink); }
.section--band h2, .section--band h3 { color: var(--band-ink); }
.section--band p { color: var(--band-sub); }

.section__eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--step--1); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: var(--sp-3);
}
.section__eyebrow::before {
  content: ""; width: 1.75rem; height: 3px; background: var(--accent); border-radius: 1px;
}
.section--band .section__eyebrow { color: var(--band-sub); }

.section__lead {
  font-size: var(--step-1); line-height: 1.5; color: var(--ink-2);
  max-width: 54ch; margin-bottom: var(--sp-6);
}
.section--band .section__lead { color: var(--band-sub); }

.grid-auto {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.grid-2 { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 2.875rem; padding: var(--sp-3) var(--sp-5);
  font: inherit; font-size: var(--step-0); font-weight: 600;
  border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn--primary:hover { background: var(--link-hover); border-color: var(--link-hover); color: var(--brand-ink); }
.btn--ghost { background: transparent; color: var(--link); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface); border-color: var(--field-line); color: var(--link-hover); }
.btn--on-band { background: transparent; color: var(--band-ink); border-color: var(--band-line); }
.btn--on-band:hover { background: rgb(255 255 255 / .08); color: var(--band-ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* --------------------------------------------------------------------------
   6. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--sp-5);
  min-height: 4rem;
}
.brand {
  display: inline-flex; align-items: baseline; gap: var(--sp-2);
  text-decoration: none; color: var(--ink); font-weight: 700;
  letter-spacing: -0.02em; font-size: var(--step-1);
  /* Must be allowed to shrink: with flex:none the wordmark plus the menu button pushed the
     whole page wider than a 400px viewport and clipped every line of text on the right. */
  min-width: 0;
}
.brand__by {
  font-size: var(--step--2); font-weight: 500; color: var(--muted);
  letter-spacing: 0; text-transform: none;
}

.site-nav { margin-left: auto; }
.site-nav__list {
  display: flex; align-items: center; gap: var(--sp-5);
  list-style: none; margin: 0; padding: 0;
}
.site-nav__link {
  display: inline-block; padding: var(--sp-2) 0;
  color: var(--muted); text-decoration: none;
  font-size: var(--step--1); font-weight: 550;
  border-bottom: 3px solid transparent;
}
.site-nav__link:hover { color: var(--ink); }
.site-nav__link.active { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle { display: none; }

@media (max-width: 62rem) {
  .site-header__inner { flex-wrap: wrap; }
  /* <details>/<summary> rather than a checkbox: Blazor enhanced navigation patches the DOM
     instead of replacing it, so state held only in a DOM property (input.checked) survives
     navigation and the menu would stay open across every link. The open attribute is
     reflected, so it is patched correctly. */
  .nav-toggle { display: block; margin-left: auto; }
  .nav-toggle > summary {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: var(--sp-2);
    min-height: 2.75rem; padding: var(--sp-2) var(--sp-3);
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    color: var(--ink); font-size: var(--step--1); font-weight: 600;
  }
  .nav-toggle > summary::-webkit-details-marker { display: none; }
  .site-nav { margin-left: 0; flex-basis: 100%; }
  .nav-toggle:not([open]) + .site-nav { display: none; }
  .site-nav__list {
    flex-direction: column; align-items: stretch; gap: 0;
    padding-block: var(--sp-3); border-top: 1px solid var(--line);
  }
  .site-nav__link {
    padding: var(--sp-3) 0 var(--sp-3) var(--sp-3);
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
  }
  .site-nav__link.active { border-bottom-color: var(--line); border-left-color: var(--accent); }
  .site-header__cta { width: 100%; margin-top: var(--sp-3); }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  background: var(--band); color: var(--band-ink);
  border-bottom: 1px solid var(--band-line);
  padding-block: var(--sp-9);
  position: relative; overflow: hidden;
}
/* The binary column from the DBS monogram, reduced to a ground texture. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgb(255 255 255 / .04) 0 1px, transparent 1px 3.5rem),
    repeating-linear-gradient(0deg, rgb(255 255 255 / .03) 0 1px, transparent 1px 3.5rem);
  mask-image: radial-gradient(120% 90% at 85% 15%, #000 20%, transparent 75%);
}
.hero__inner {
  position: relative;
  display: grid; gap: var(--sp-8); align-items: center;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
.hero__eyebrow {
  display: block; font-size: var(--step--1); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--t-300); margin-bottom: var(--sp-4);
}
.hero h1 { color: var(--band-ink); max-width: 19ch; }
.hero__sub {
  font-size: var(--step-1); line-height: 1.5;
  color: var(--band-sub); max-width: 48ch; margin-block: var(--sp-5);
}
.hero__trust {
  margin-top: var(--sp-6); padding-top: var(--sp-5);
  border-top: 1px solid var(--band-line);
  font-size: var(--step--1); color: var(--band-sub); max-width: 52ch;
}

@media (max-width: 62rem) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-6); }
  /* The headline leads on every width. The diagram supports it; it does not open for it. */
  .hero__figure { max-width: 32rem; }
}

/* --------------------------------------------------------------------------
   8. Cards, tiles, lists
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.card--link { text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.card--link:hover { border-color: var(--field-line); box-shadow: var(--shadow-md); color: inherit; }
.card__title { font-size: var(--step-1); font-weight: 650; margin: 0; letter-spacing: -0.01em; }
.card__body { color: var(--muted); font-size: var(--step--1); line-height: 1.6; margin: 0; }
.card__more { margin-top: auto; font-size: var(--step--1); font-weight: 600; color: var(--link); }

.card__icon {
  width: 2.25rem; height: 2.25rem; flex: none;
  display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand);
  border-radius: var(--radius);
}

.pillar {
  border-top: 3px solid var(--accent);
  padding-top: var(--sp-4);
}
.pillar__n {
  font-family: var(--font-mono); font-size: var(--step--2);
  color: var(--muted); letter-spacing: .1em;
}

.tile {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-5); background: var(--page);
}
.tile__figure {
  font-size: var(--step-2); font-weight: 680; letter-spacing: -0.03em;
  color: var(--brand); line-height: 1.1;
}
.tile__label { font-size: var(--step--1); color: var(--muted); margin-top: var(--sp-2); }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  position: relative; padding-left: 1.6rem; margin-bottom: var(--sp-3);
  color: var(--ink-2);
}
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: .55rem; height: .55rem; border-radius: 1px;
  background: var(--brand);
}
.section--band .ticks li { color: var(--band-sub); }
.section--band .ticks li::before { background: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.tag {
  font-size: var(--step--2); font-weight: 600; letter-spacing: .02em;
  padding: var(--sp-1) var(--sp-3); border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   9. Notes, tables, code
   -------------------------------------------------------------------------- */
.note {
  border-left: 3px solid var(--line-strong);
  background: var(--surface); padding: var(--sp-4) var(--sp-5);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--step--1); color: var(--ink-2);
}
.note--scope  { border-left-color: var(--warn); background: var(--warn-bg); color: var(--ink-2); }
.note--brand  { border-left-color: var(--brand); background: var(--brand-tint); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table.data {
  width: 100%; border-collapse: collapse; font-size: var(--step--1);
  min-width: 34rem;
}
table.data th, table.data td {
  text-align: left; padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line); vertical-align: top;
}
table.data thead th {
  background: var(--surface-2); color: var(--ink);
  font-weight: 650; white-space: nowrap;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td .yes { color: var(--ok); font-weight: 650; }
table.data td .no  { color: var(--subtle); }

.code {
  background: var(--g-975); color: #E6ECF2;
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5); overflow-x: auto;
  font-family: var(--font-mono); font-size: var(--step--1); line-height: 1.7;
}
.code .c-key { color: var(--t-300); }
.code .c-str { color: var(--hv); }
.code .c-com { color: #8894A0; }

/* --------------------------------------------------------------------------
   10. FAQ
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: flex-start; gap: var(--sp-4);
  padding: var(--sp-5) 0; font-size: var(--step-1);
  font-weight: 650; letter-spacing: -0.01em; color: var(--ink);
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after {
  /* A rotated plus rather than a minus-sign glyph: U+2212 is missing from some of the system
     fonts this stack falls back to and renders as tofu. This has no glyph dependency. */
  content: "+"; margin-left: auto; flex: none;
  font-weight: 400; font-size: var(--step-2); line-height: 1;
  color: var(--brand); display: inline-block;
  transition: transform .15s ease;
}
.faq__item[open] > summary::after { transform: rotate(45deg); }
.faq__answer { padding-bottom: var(--sp-5); max-width: 62ch; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   11. Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--sp-5); }
.field { display: grid; gap: var(--sp-2); }
.field > label { font-weight: 600; font-size: var(--step--1); color: var(--ink); }
.field__hint { font-size: var(--step--2); color: var(--muted); }

.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  font: inherit; font-size: var(--step-0); color: var(--ink);
  background: var(--page);
  border: 1px solid var(--field-line); border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4); width: 100%;
  min-height: 2.875rem;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }
.field input:focus-visible, .field textarea:focus-visible {
  border-color: var(--link); outline: 2px solid var(--link); outline-offset: 1px;
}
.field .validation-message, .field-error { color: var(--bad); font-size: var(--step--1); }
.field input.invalid, .field textarea.invalid { border-color: var(--bad); }

.choice-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.choice {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4); cursor: pointer; font-size: var(--step--1);
  font-weight: 550; min-height: 2.875rem;
}
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--link); }
.choice input { accent-color: var(--brand); }

/* Honeypot: never shown, never announced, but reachable by a naive bot. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  border-radius: var(--radius-lg); padding: var(--sp-5);
  border: 1px solid var(--ok); background: var(--ok-bg); color: var(--ink);
}
.validation-summary {
  border-radius: var(--radius); padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--bad); background: var(--bad-bg); color: var(--bad);
  font-size: var(--step--1);
}
.validation-summary ul { margin: var(--sp-2) 0 0; padding-left: 1.1rem; }

/* --------------------------------------------------------------------------
   12. CTA band + footer
   -------------------------------------------------------------------------- */
.cta-band { background: var(--cta-band); color: var(--band-ink); padding-block: var(--sp-8); }
.cta-band__inner { display: grid; gap: var(--sp-5); align-items: center; grid-template-columns: minmax(0, 1fr) auto; }
.cta-band h2 { color: var(--band-ink); margin-bottom: var(--sp-2); font-size: var(--step-2); }
.cta-band p  { color: var(--band-sub); margin: 0; max-width: 52ch; }
@media (max-width: 52rem) { .cta-band__inner { grid-template-columns: 1fr; } }

.site-footer {
  background: var(--page-alt); border-top: 1px solid var(--line);
  padding-block: var(--sp-7) var(--sp-6); font-size: var(--step--1);
}
.site-footer__grid {
  display: grid; gap: var(--sp-6);
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(9rem, 1fr));
}
.site-footer h2 {
  font-size: var(--step--2); text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 650; margin-bottom: var(--sp-3);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__note { color: var(--muted); max-width: 40ch; }
.site-footer__bar {
  margin-top: var(--sp-6); padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  justify-content: space-between; color: var(--subtle);
}

/* --------------------------------------------------------------------------
   13. Drawn figures - no product screenshots exist, so everything is SVG or CSS
   -------------------------------------------------------------------------- */
.figure { display: block; }
.figure svg { display: block; width: 100%; height: auto; }
.figure__caption {
  margin-top: var(--sp-3); font-size: var(--step--2); color: var(--muted);
  text-align: center;
}
.section--band .figure__caption, .hero .figure__caption { color: var(--band-sub); }

/* Risk heat grid. Five labelled columns cannot compress to phone width without becoming
   unreadable, so it scrolls inside its own container rather than widening the document. */
.heat-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.heat {
  display: grid; grid-template-columns: auto repeat(5, 1fr); gap: 3px;
  font-size: var(--step--2); min-width: 31rem;
}
.heat__cell { aspect-ratio: 1.9 / 1; border-radius: 2px; display: grid; place-items: center; font-weight: 650; }
.heat__axis { display: grid; place-items: center; color: var(--muted); padding: var(--sp-1); }
.heat__l1 { background: #DCE9DF; color: #17351F; }
.heat__l2 { background: #CFE0C0; color: #22361A; }
.heat__l3 { background: #F0E2B8; color: #3A2F12; }
.heat__l4 { background: #EFCBA8; color: #43230C; }
.heat__l5 { background: #E0A99A; color: #3B120B; }
:root[data-theme="dark"] .heat__cell { filter: brightness(.82) saturate(.85); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .heat__cell { filter: brightness(.82) saturate(.85); }
}

/* Device frame with a schematic inspection UI */
.device {
  width: min(100%, 17rem); margin-inline: auto;
  border: 2px solid var(--line-strong); border-radius: 20px;
  background: var(--page); padding: var(--sp-3);
  box-shadow: var(--shadow-md);
}
.device__notch {
  width: 33%; height: 5px; border-radius: 3px;
  background: var(--line-strong); margin: 0 auto var(--sp-3);
}
.device__screen {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--surface);
}
.device__bar {
  background: var(--band); color: var(--band-ink);
  padding: var(--sp-3) var(--sp-4); font-size: var(--step--2); font-weight: 650;
  display: flex; justify-content: space-between; align-items: center;
}
.device__chip {
  font-size: .62rem; font-weight: 700; letter-spacing: .04em;
  background: var(--accent); color: var(--accent-ink);
  padding: 2px 6px; border-radius: 2px;
}
.device__q { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.device__q b { display: block; font-size: var(--step--2); font-weight: 600; margin-bottom: var(--sp-2); color: var(--ink); }
.device__opts { display: flex; gap: 4px; }
.device__opt {
  flex: 1; text-align: center; font-size: .62rem; font-weight: 650;
  padding: 5px 0; border-radius: 2px;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.device__opt.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.device__opt.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.device__foot {
  padding: var(--sp-3) var(--sp-4); font-size: .62rem; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}

/* --------------------------------------------------------------------------
   14. Error UI (framework-owned id)
   -------------------------------------------------------------------------- */
#blazor-error-ui {
  background: var(--warn-bg); color: var(--ink);
  border-top: 3px solid var(--warn);
  bottom: 0; display: none; left: 0; position: fixed; width: 100%;
  padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-md); z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: var(--sp-5); top: var(--sp-4); }

/* --------------------------------------------------------------------------
   15. Diagram internals
   --------------------------------------------------------------------------
   These were Blazor scoped stylesheets (OverlayDiagram/FiveHeads/SyncFlow
   .razor.css) and are folded in here deliberately.

   Two reasons. First, the scoped-CSS bundle is generated into obj/ and only
   copied into wwwroot on PUBLISH - so `dotnet run` from source 500s on
   AMSMarketingSite.styles.css via StaticAssetDevelopmentRuntimeHandler, which
   looks for it under wwwroot. Production is fine; local development is not, and
   that divergence costs somebody an afternoon. Second, the bundle's @Assets key
   is the ASSEMBLY NAME, so renaming the project breaks it with no build error.

   Encapsulation buys nothing here: every class below is already uniquely
   prefixed (dia-, hd-, sf-). If you reintroduce a .razor.css file, put the
   <link> for the bundle back in App.razor at the same time.
   -------------------------------------------------------------------------- */

/* Parent-brand logo. Two files rather than a recolour: the wordmark is raster and the light
   variant is the vendor's own, not a filter approximation. */
.dbs-logo { display: block; width: 190px; max-width: 100%; height: auto; }
.dbs-logo--light { display: none; }
:root[data-theme="dark"] .dbs-logo--dark { display: none; }
:root[data-theme="dark"] .dbs-logo--light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dbs-logo--dark { display: none; }
  :root:not([data-theme="light"]) .dbs-logo--light { display: block; }
}

/* Hero overlay schematic */
.overlay-dia { margin: 0; }

.dia-box { fill: none; stroke-width: 1; }
.dia-box--plant { stroke: var(--band-line, #0A535C); stroke-dasharray: 4 4; }
.dia-box--erp   { stroke: var(--band-line, #0A535C); fill: rgb(255 255 255 / .03); }
.dia-box--ams   { stroke: var(--hv, #F59E0B); stroke-width: 1.75; fill: rgb(245 158 11 / .07); }

.dia-cap {
  font-family: var(--font-mono, monospace); font-size: 11px; letter-spacing: .12em;
  fill: var(--band-sub, #D6E3E5);
}
.dia-cap--ams { fill: var(--hv, #F59E0B); font-size: 13px; }
.dia-cap--dim { fill: #9FB4B8; }

.dia-label { font-size: 12.5px; fill: var(--band-ink, #fff); }
.dia-label--dim { fill: #9FB4B8; font-size: 11.5px; }

.dia-device { fill: none; stroke: var(--band-sub, #D6E3E5); stroke-width: 1.25; }
.dia-device-line { stroke: var(--band-sub, #D6E3E5); stroke-width: 1.25; }
.dia-device-fill { fill: var(--hv, #F59E0B); }
.dia-device-mute { fill: #5A7A80; }

.dia-chip { fill: rgb(255 255 255 / .06); stroke: var(--t-700, #0A535C); stroke-width: 1; }
.dia-chip-text { font-size: 12px; font-weight: 600; fill: var(--band-ink, #fff); }

.dia-arrow { stroke: #6E9298; stroke-width: 1.25; fill: none; }
.dia-arrow--hv { stroke: var(--hv, #F59E0B); }
.dia-head { fill: #6E9298; }
.dia-head--hv { fill: var(--hv, #F59E0B); }

.dia-flow-label { font-size: 10.5px; fill: #9FB4B8; }
.dia-flow-label--hv { fill: var(--hv, #F59E0B); }

/* Five heads, one codebase */
.heads-dia { margin: 0; }
.hd-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.hd-box--primary { stroke: var(--brand); stroke-width: 1.75; fill: var(--brand-tint); }
.hd-title { font-size: 13px; font-weight: 650; fill: var(--ink); }
.hd-sub { font-size: 11px; fill: var(--muted); }
.hd-line { stroke: var(--line-strong); stroke-width: 1.25; fill: none; }
.hd-line--hv { stroke: var(--brand); stroke-width: 1.5; }
.hd-arrowhead { fill: var(--brand); }
.hd-shared { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1; }
.hd-shared-title { font-size: 14px; font-weight: 650; fill: var(--ink); }
.hd-api { fill: none; stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 5 4; }

/* Offline sync flow */
.sync-dia { margin: 0; }
.sf-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.sf-box--offline { stroke: var(--brand); stroke-width: 1.5; fill: var(--brand-tint); }
.sf-n { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); }
.sf-title { font-size: 13px; font-weight: 650; fill: var(--ink); }
.sf-sub { font-size: 10.5px; fill: var(--muted); }
.sf-arrow { stroke: var(--line-strong); stroke-width: 1.25; fill: none; }
.sf-arrowhead { fill: var(--line-strong); }
.sf-brace { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.sf-brace-label {
  font-size: 11px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; fill: var(--muted);
}

/* --------------------------------------------------------------------------
   16. Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 30rem) {
  .shell, .shell-narrow { width: min(100% - 2rem, var(--shell)); }
  .shell-narrow { width: min(100% - 2rem, var(--shell-narrow)); }
  .section { padding-block: var(--sp-8); }
  /* The company name is the first thing to go when the header runs out of room. */
  .brand__by { display: none; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .cta-band__inner .btn-row { align-items: stretch; }
}

/* Long unbroken strings (a route, an endpoint, an address) must not widen the page. */
h1, h2, h3, p, li, td, th, summary { overflow-wrap: break-word; }
