/* AECC-Next base: reset, type scale, layout primitives. TOKEN NAMES ONLY.
   Every colour comes from a site theme (sites/<site>/theme.css, generated);
   tools/test_theme_tokens.js fails a colour literal in this file. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body {
  background: var(--bg, var(--paper));
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; font-family: var(--font-display); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.num { font-variant-numeric: tabular-nums lining-nums; }
:focus-visible { outline: 2px solid var(--metal); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* page width primitives */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 1240px; margin: 0 auto; padding: 0 48px; }

/* The story rail: the one AECC element on every company page. Its colours are
   its own tokens, written by the AECC theme, so it looks the same everywhere. */
.story-rail {
  background: var(--rail-bg);
  color: var(--rail-text);
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  font: 11px var(--rail-font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.story-rail:empty { display: none; }
.story-rail .ctx { color: var(--rail-context); }
.story-rail .ctx b { color: var(--rail-accent); font-weight: 600; }
.story-rail .lead { display: flex; align-items: center; gap: 16px; }
.story-rail a.jump { color: var(--rail-accent); border: 1px solid var(--rail-accent); padding: 3px 12px; border-radius: 3px; font-weight: 700; text-decoration: none; }
.story-rail a.jump:hover, .story-rail a.jump:focus-visible { background: var(--rail-accent); color: var(--rail-bg); }
.story-rail ol { display: flex; gap: 6px; align-items: center; }
.story-rail li { padding: 4px 10px; border-radius: 3px; }
.story-rail li a { color: inherit; text-decoration: none; }
.story-rail li.on { color: var(--rail-bg); background: var(--rail-accent); font-weight: 700; }
.story-rail .dot { color: var(--rail-dot); padding: 0; }
.story-rail li i { font-style: normal; margin-right: .4em; }
.story-rail .sw-dots { display: none; }

/* Laptop first. The workspaces and the Command Center show a one-line notice
   below 1024px; the customer pages fall to one column but never scroll sideways. */
.narrow-notice { display: none; }
@media (max-width: 1023px) {
  .narrow-notice { display: block; padding: 8px 16px; font-size: 12px; background: var(--tint); color: var(--ink); }
  .wrap, .wrap-narrow { padding: 0 16px; }
  .story-rail { padding: 0 16px; flex-wrap: wrap; min-height: 0; }
}

/* The phone rail (round 26, rule 5): 30px, sticky at the top, a solid Switchboard
   button at the left, "· Company", then the three step numbers with only the
   current one labelled. The width is PHONE_MAX_WIDTH in core/phone.js; the
   phone gate fails when the two differ. */
@media (max-width: 767px) {
  .story-rail { position: sticky; top: 0; z-index: 30; height: 30px; min-height: 30px; padding: 0 10px; gap: 8px; flex-wrap: nowrap; font-size: 10px; }
  .story-rail .lead { flex: 1 1 auto; min-width: 0; gap: 6px; }
  .story-rail a.jump { order: -1; display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 8px 3px 7px; border-radius: 4px; background: var(--rail-accent); color: var(--rail-bg); font-size: 9.5px; line-height: 1.2; letter-spacing: .1em; }
  .story-rail .sw-dots { display: block; width: 4px; height: 4px; margin: 0 5px 5px 0; background: currentColor; box-shadow: 5px 0 0 currentColor, 0 5px 0 currentColor, 5px 5px 0 currentColor; }
  .story-rail .ctx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .story-rail .ctx::before { content: "· "; }
  .story-rail .ctx b { color: var(--rail-context); }
  .story-rail .ctx .pre, .story-rail .ctx .case, .story-rail .dot, .story-rail li:not(.on) span { display: none; }
  .story-rail ol { flex: none; gap: 8px; }
  .story-rail li { display: flex; align-items: center; padding: 0; white-space: nowrap; }
  .story-rail li a { display: flex; align-items: center; gap: 5px; }
  .story-rail li i { display: grid; place-items: center; width: 14px; height: 14px; margin: 0; border: 1px solid var(--rail-dot); border-radius: 50%; font-size: 8.5px; font-weight: 600; }
  .story-rail li.on { background: none; color: var(--rail-context); }
  .story-rail li.on i { background: var(--rail-accent); border-color: var(--rail-accent); color: var(--rail-bg); }
}
