/* ============================================================
   Arthur Anderson LLC — Core Stylesheet
   Implements the brand system. Used by index.html and brand.html.
   ============================================================ */

:root {
  /* Brand */
  --aa-graphite: #2B2F33;
  --aa-slate:    #4C6A85;
  --aa-sage:     #7E9C8B;

  /* Surfaces */
  --aa-bone: #F5F4F1;
  --aa-ink:  #1F2A33;
  --aa-fog:  #E6E4DE;
  --aa-line: #D7D4CC;
  --aa-muted:#6B7280;

  /* Type */
  --aa-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --aa-font-mono: 'JetBrains Mono', Menlo, Consolas, monospace;

  /* Motion */
  --aa-ease:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --aa-d-micro: 120ms;
  --aa-d-panel: 240ms;
  --aa-d-page:  400ms;

  /* Type scale */
  --t-display: clamp(40px, 6vw, 72px);
  --t-h1:      clamp(32px, 4vw, 48px);
  --t-h2:      clamp(26px, 2.6vw, 34px);
  --t-h3:      22px;
  --t-h4:      17px;
  --t-body:    16px;
  --t-small:   14px;

  /* Layout */
  --aa-gutter: 24px;
  --aa-margin: clamp(20px, 5vw, 96px);
  --aa-max:    1200px;

  /* Radii */
  --r-xs: 4px; --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px;

  /* Elevations */
  --e1: 0 1px 0 rgba(31,42,51,.06), 0 0 0 1px rgba(31,42,51,.06);
  --e2: 0 8px 24px -8px rgba(31,42,51,.18), 0 0 0 1px rgba(31,42,51,.06);
}

/* Reset */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { padding: 0; margin: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--aa-slate); outline-offset: 3px; border-radius: 4px; }

/* Base */
html { scroll-behavior: smooth; }
body {
  font-family: var(--aa-font-sans);
  font-size: var(--t-body);
  line-height: 1.625;
  color: var(--aa-graphite);
  background: var(--aa-bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  html { scroll-behavior: auto; }
}

/* Typography */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--aa-graphite); }
.t-display { font-size: var(--t-display); line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: var(--t-h1); line-height: 1.15; }
h2 { font-size: var(--t-h2); line-height: 1.2; }
h3 { font-size: var(--t-h3); line-height: 1.35; }
h4 { font-size: var(--t-h4); line-height: 1.45; }
p  { margin: 0 0 1em; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--aa-slate); margin: 0 0 12px;
}
.mono { font-family: var(--aa-font-mono); font-size: 14px; }
.muted { color: var(--aa-muted); }

/* Layout primitives */
.container { width: 100%; max-width: var(--aa-max); margin-inline: auto; padding-inline: var(--aa-margin); }
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section--ink { background: var(--aa-ink); color: var(--aa-bone); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--aa-bone); }
.section--ink .eyebrow { color: var(--aa-sage); }
.section--ink .muted { color: rgba(245,244,241,.65); }
.section--fog { background: var(--aa-fog); }

.grid { display: grid; gap: var(--aa-gutter); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--r-xs);
  font-weight: 500; font-size: 15px;
  transition: transform var(--aa-d-micro) var(--aa-ease), background var(--aa-d-micro) var(--aa-ease), border-color var(--aa-d-micro) var(--aa-ease), color var(--aa-d-micro) var(--aa-ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--aa-graphite); color: var(--aa-bone); }
.btn--primary:hover { background: #1F2226; }
.btn--ghost { border: 1px solid currentColor; color: var(--aa-graphite); }
.section--ink .btn--ghost { color: var(--aa-bone); }
.btn--slate { background: var(--aa-slate); color: var(--aa-bone); }
.btn--slate:hover { background: #3D5870; }
.btn .arrow { transition: transform var(--aa-d-micro) var(--aa-ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Pills / Tags */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500; letter-spacing: .04em;
  background: rgba(76,106,133,.12); color: var(--aa-slate);
}
.pill--sage { background: rgba(126,156,139,.18); color: #4F6E5E; }
.pill--ink  { background: rgba(31,42,51,.08); color: var(--aa-graphite); }
.section--ink .pill { background: rgba(126,156,139,.2); color: var(--aa-sage); }

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--aa-line);
  border-radius: var(--r-md);
  padding: 28px;
  transition: transform var(--aa-d-panel) var(--aa-ease), box-shadow var(--aa-d-panel) var(--aa-ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--e2); }
.section--ink .card { background: rgba(245,244,241,.03); border-color: rgba(245,244,241,.12); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(12px);
  background: rgba(245,244,241,.78);
  border-bottom: 1px solid var(--aa-line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav__brand { display: flex; align-items: center; gap: 12px; font-weight: 600; flex-shrink: 0; text-decoration: none; color: inherit; }
.nav__brand img, .nav__brand svg { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.nav__wordmark { letter-spacing: .14em; text-transform: uppercase; font-size: 13px; white-space: nowrap; }
.nav__wordmark .llc { font-size: 10px; opacity: .55; margin-left: 4px; }
.nav__links { display: flex; gap: 22px; align-items: center; flex-wrap: nowrap; }
.nav__links a { font-size: 14px; color: var(--aa-graphite); opacity: .78; transition: opacity var(--aa-d-micro) var(--aa-ease); white-space: nowrap; text-decoration: none; }
.nav__links a:hover { opacity: 1; }
.nav__cta { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* Compact tenant-admin nav: dropdown groups so 15+ items fit on one row */
.nav__group { position: relative; }
.nav__group-label { cursor: pointer; font-size: 14px; color: var(--aa-graphite); opacity: .78; padding: 4px 0; user-select: none; white-space: nowrap; }
.nav__group-label:hover { opacity: 1; }
.nav__group-label::after { content: " ▾"; font-size: 9px; opacity: .6; margin-left: 2px; }
.nav__group-menu {
  position: absolute; top: 100%; left: -12px; min-width: 180px;
  background: #fff; border: 1px solid var(--aa-line); border-radius: 6px;
  padding: 6px 0; margin-top: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.08);
  display: none; z-index: 100;
}
.nav__group:hover .nav__group-menu,
.nav__group:focus-within .nav__group-menu { display: block; }
.nav__group-menu a { display: block; padding: 8px 16px; font-size: 13px; opacity: .85; }
.nav__group-menu a:hover { background: rgba(0,0,0,.04); opacity: 1; }
.nav__platform { color: #C9A24A !important; font-weight: 500; padding-left: 18px; border-left: 1px solid var(--aa-line); margin-left: 6px; }
.nav__progress {
  position: absolute; left: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--aa-graphite), var(--aa-slate), var(--aa-sage));
  width: 0%;
}
@media (max-width: 880px) {
  .nav__links { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background: var(--aa-ink); color: var(--aa-bone);
  padding: clamp(96px, 14vw, 180px) 0 clamp(72px, 10vw, 128px);
}
.hero__bg {
  position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background:
    radial-gradient(60% 40% at 20% 30%, rgba(76,106,133,.4), transparent 70%),
    radial-gradient(50% 35% at 85% 70%, rgba(126,156,139,.25), transparent 70%);
}
.hero__lattice {
  position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image:
    linear-gradient(0deg, rgba(245,244,241,.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,244,241,.4) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 60%, #000 30%, transparent 80%);
}
.hero__inner { position: relative; z-index: 1; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--aa-sage);
  padding: 8px 14px; border: 1px solid rgba(126,156,139,.35); border-radius: var(--r-pill);
  margin-bottom: 28px;
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aa-sage); box-shadow: 0 0 12px var(--aa-sage); }
.hero h1, .hero h2, .hero h3, .hero h4, .hero p { color: var(--aa-bone); }
.hero__title { max-width: 18ch; color: var(--aa-bone); }
.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, #B7CCDD, #7E9C8B 60%, #B7CCDD);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lede { max-width: 56ch; font-size: 19px; line-height: 1.6; color: rgba(245,244,241,.82); margin: 24px 0 36px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__strip {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid rgba(245,244,241,.14);
}
.hero__strip > div {
  padding: 28px 24px; border-right: 1px solid rgba(245,244,241,.08);
}
.hero__strip > div:last-child { border-right: 0; }
.hero__strip .num {
  font-family: var(--aa-font-mono); font-size: 36px; font-weight: 500;
  color: var(--aa-bone); display: block; margin-bottom: 6px; letter-spacing: -0.02em;
}
.hero__strip .lbl { font-size: 13px; color: rgba(245,244,241,.6); letter-spacing: .04em; }
@media (max-width: 880px) {
  .hero__strip { grid-template-columns: repeat(2, 1fr); }
  .hero__strip > div:nth-child(2) { border-right: 0; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-block: 1px solid var(--aa-line);
  background: var(--aa-bone);
  padding: 22px 0; overflow: hidden; position: relative;
}
.marquee__track {
  display: flex; gap: 56px; width: max-content;
  animation: marqueeRun 38s linear infinite;
}
.marquee__item {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--aa-muted); white-space: nowrap;
}
.marquee__item::before {
  content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: var(--aa-slate);
}
@keyframes marqueeRun { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   SERVICES
   ============================================================ */
.svc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.svc__card {
  position: relative;
  border: 1px solid var(--aa-line); background: #fff;
  border-radius: var(--r-md); padding: 32px;
  transition: transform var(--aa-d-panel) var(--aa-ease), border-color var(--aa-d-panel) var(--aa-ease);
}
.svc__card:hover { transform: translateY(-4px); border-color: var(--aa-graphite); }
.svc__num {
  font-family: var(--aa-font-mono); font-size: 13px; color: var(--aa-slate);
  letter-spacing: .14em; margin-bottom: 24px;
}
.svc__icon { width: 48px; height: 48px; margin-bottom: 24px; color: var(--aa-graphite); }
.svc__title { font-size: 24px; margin-bottom: 12px; }
.svc__list { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--aa-line); }
.svc__list li {
  font-size: 14px; padding: 8px 0; color: var(--aa-graphite);
  display: flex; align-items: center; gap: 10px;
}
.svc__list li::before {
  content: ""; width: 5px; height: 5px; background: var(--aa-sage); transform: rotate(45deg);
}
@media (max-width: 880px) { .svc { grid-template-columns: 1fr; } }

/* ============================================================
   METHOD TIMELINE
   ============================================================ */
.method { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; }
.method__step { padding: 28px 24px 0; border-left: 2px solid var(--aa-line); position: relative; }
.method__step:first-child { border-left-color: var(--aa-graphite); }
.method__step .num {
  font-family: var(--aa-font-mono); font-size: 12px; letter-spacing: .14em;
  color: var(--aa-slate); margin-bottom: 8px;
}
.method__step h3 { font-size: 18px; margin-bottom: 10px; }
.method__step p { font-size: 14px; color: var(--aa-muted); }
.method__step::before {
  content: ""; position: absolute; left: -7px; top: 28px;
  width: 12px; height: 12px; background: var(--aa-graphite);
  transform: rotate(45deg);
}
@media (max-width: 880px) { .method { grid-template-columns: 1fr; } }

/* ============================================================
   CAPABILITIES MATRIX
   ============================================================ */
.matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--aa-line); border: 1px solid var(--aa-line); border-radius: var(--r-md); overflow: hidden; margin-top: 48px; }
.matrix__item {
  background: #fff; padding: 24px; min-height: 140px;
  display: flex; flex-direction: column; gap: 10px;
  transition: background var(--aa-d-micro) var(--aa-ease);
}
.matrix__item:hover { background: var(--aa-fog); }
.matrix__item h4 { font-size: 15px; }
.matrix__item p { font-size: 13px; color: var(--aa-muted); margin: 0; }
.matrix__item .ico { width: 22px; height: 22px; color: var(--aa-slate); }
@media (max-width: 1024px) { .matrix { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .matrix { grid-template-columns: 1fr; } }

/* ============================================================
   PRODUCTS
   ============================================================ */
.product {
  background: var(--aa-ink); color: var(--aa-bone);
  border-radius: var(--r-md); padding: 40px;
  display: flex; flex-direction: column; gap: 28px;
  position: relative; overflow: hidden;
}
.product::before {
  content: ""; position: absolute; inset: 0; opacity: .25; pointer-events: none;
  background: radial-gradient(50% 40% at 80% 20%, rgba(126,156,139,.4), transparent 70%);
}
.product > * { position: relative; }
.product .eyebrow { color: var(--aa-sage); }
.product h3 { color: var(--aa-bone); font-size: 28px; margin-bottom: 14px; }
.product p { color: rgba(245,244,241,.78); }
.product__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.product__visual {
  background: rgba(245,244,241,.04); border: 1px solid rgba(245,244,241,.12);
  border-radius: var(--r-sm); padding: 22px;
  font-family: var(--aa-font-mono); font-size: 12px; color: rgba(245,244,241,.72);
  overflow-x: auto;
}
.product__visual pre { white-space: pre; }

/* ============================================================
   STATS
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; }
.stat { padding: 32px; border: 1px solid var(--aa-line); border-radius: var(--r-md); background: #fff; }
.stat .n { font-family: var(--aa-font-mono); font-size: 44px; font-weight: 500; color: var(--aa-graphite); letter-spacing: -0.03em; line-height: 1.05; display: flex; align-items: flex-end; min-height: 46px; }
.stat .n--text { font-size: 22px; color: var(--aa-sage); letter-spacing: 0; line-height: 1.3; text-wrap: balance; }
.stat .l { color: var(--aa-muted); font-size: 14px; margin-top: 14px; }
.stat--note { background: linear-gradient(180deg, #fff 0%, var(--aa-fog) 100%); }
@media (max-width: 880px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   FOUNDER
   ============================================================ */
.founder { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.founder__quote {
  font-size: 26px; line-height: 1.4; font-weight: 500; letter-spacing: -0.01em;
  border-left: 3px solid var(--aa-sage); padding-left: 24px; margin-bottom: 32px;
}
.founder__creds { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--aa-line); border-radius: var(--r-md); overflow: hidden; }
.founder__creds > div { padding: 18px 22px; border-bottom: 1px solid var(--aa-line); border-right: 1px solid var(--aa-line); }
.founder__creds > div:nth-child(2n) { border-right: 0; }
.founder__creds > div:nth-last-child(-n+2) { border-bottom: 0; }
.founder__creds .role { font-size: 14px; font-weight: 600; }
.founder__creds .org  { font-size: 12px; color: var(--aa-muted); }
.founder__creds .yrs  { font-size: 11px; font-family: var(--aa-font-mono); color: var(--aa-slate); margin-top: 4px; }
@media (max-width: 880px) { .founder { grid-template-columns: 1fr; } }

/* ============================================================
   COMPARISON
   ============================================================ */
.compare { width: 100%; border-collapse: collapse; margin-top: 48px; background: #fff; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--e1); }
.compare th, .compare td { padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--aa-line); font-size: 14px; }
.compare th { font-weight: 600; background: var(--aa-fog); }
.compare th.us { color: var(--aa-sage); background: var(--aa-graphite); color: var(--aa-bone); }
.compare td.us { background: rgba(126,156,139,.08); font-weight: 500; }
.compare tr:last-child td { border-bottom: 0; }
.compare .check { color: var(--aa-sage); font-weight: 700; }
.compare .x     { color: #A14B4B; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { margin-top: 32px; border-top: 1px solid var(--aa-line); }
.faq details {
  border-bottom: 1px solid var(--aa-line);
  padding: 22px 0;
}
.faq summary {
  cursor: pointer; list-style: none; font-weight: 500; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--aa-font-mono); font-size: 22px; line-height: 1;
  color: var(--aa-slate); transition: transform var(--aa-d-micro) var(--aa-ease);
}
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 14px 0 0; color: var(--aa-muted); max-width: 70ch; }

/* ============================================================
   CTA
   ============================================================ */
.cta {
  background: var(--aa-graphite); color: var(--aa-bone);
  border-radius: var(--r-md);
  padding: clamp(40px, 7vw, 80px);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(126,156,139,.25), transparent 70%);
  pointer-events: none;
}
.cta h2 { color: var(--aa-bone); font-size: clamp(28px, 3.5vw, 40px); }
.cta p { color: rgba(245,244,241,.78); }
.cta .muted { color: rgba(245,244,241,.55); }
.cta .btn--ghost { color: var(--aa-bone); border-color: rgba(245,244,241,.4); }
.cta .btn--ghost:hover { background: rgba(245,244,241,.08); }
@media (max-width: 880px) { .cta { grid-template-columns: 1fr; } }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 16px; position: relative; }
.contact-form .field { display: flex; flex-direction: column; gap: 6px; }
.contact-form label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(245,244,241,.7); }
.contact-form label .opt { text-transform: none; letter-spacing: 0; opacity: .6; font-size: 11px; }
.contact-form input,
.contact-form textarea {
  background: rgba(245,244,241,.06);
  border: 1px solid rgba(245,244,241,.16);
  border-radius: var(--r-xs);
  padding: 12px 14px;
  color: var(--aa-bone);
  font: inherit;
  transition: border-color var(--aa-d-micro) var(--aa-ease), background var(--aa-d-micro) var(--aa-ease);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(245,244,241,.4); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--aa-sage);
  background: rgba(245,244,241,.09);
}
.contact-form .field--captcha .captcha-q {
  font-family: var(--aa-font-mono);
  color: var(--aa-sage);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
}
.contact-form .captcha-msg { font-size: 12px; min-height: 16px; }
.contact-form .captcha-msg.is-ok { color: var(--aa-sage); }
.contact-form .captcha-msg.is-bad { color: #C9A24A; }
.contact-form button[disabled] { opacity: .45; cursor: not-allowed; }
.contact-form button { align-self: flex-start; margin-top: 4px; }

/* AI honeypot — visually hidden, but present in DOM for automated agents to fill */
.ai-trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--aa-ink); color: var(--aa-bone); padding: 80px 0 32px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 56px; }
.footer__brand p { color: rgba(245,244,241,.6); max-width: 38ch; font-size: 14px; }
.footer h5 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--aa-sage); margin-bottom: 18px; font-weight: 600; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { font-size: 14px; color: rgba(245,244,241,.78); }
.footer ul a:hover { color: var(--aa-bone); }
.footer__bottom {
  border-top: 1px solid rgba(245,244,241,.12); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 12px; color: rgba(245,244,241,.5);
}
@media (max-width: 880px) { .footer__top { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--aa-ease), transform 600ms var(--aa-ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   BRAND-PAGE SPECIFIC (used by brand.html)
   ============================================================ */
.brand-shell { display: grid; grid-template-columns: 260px 1fr; gap: 0; min-height: 100vh; }
.brand-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--aa-ink); color: var(--aa-bone); padding: 28px 22px;
  border-right: 1px solid rgba(245,244,241,.08);
}
.brand-side .b-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.brand-side .b-brand img, .brand-side .b-brand svg { width: 32px; height: 32px; }
.brand-side .b-brand .nm { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.brand-side h6 { color: var(--aa-sage); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin: 28px 0 10px; font-weight: 600; }
.brand-side a {
  display: block; font-size: 13px; padding: 7px 10px; border-radius: var(--r-xs);
  color: rgba(245,244,241,.72); transition: background var(--aa-d-micro) var(--aa-ease), color var(--aa-d-micro) var(--aa-ease);
}
.brand-side a:hover, .brand-side a.active { background: rgba(245,244,241,.08); color: var(--aa-bone); }

.brand-main { padding: 56px clamp(24px, 5vw, 64px); max-width: 1100px; }
.brand-main section { padding-block: 48px; border-bottom: 1px solid var(--aa-line); }
.brand-main section:last-child { border-bottom: 0; }
.brand-main h2 { margin-bottom: 8px; }
.brand-main .lede { color: var(--aa-muted); max-width: 64ch; margin-bottom: 28px; }

.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.swatch {
  border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--aa-line); cursor: pointer;
  transition: transform var(--aa-d-micro) var(--aa-ease), box-shadow var(--aa-d-micro) var(--aa-ease);
}
.swatch:hover { transform: translateY(-2px); box-shadow: var(--e2); }
.swatch__chip { height: 110px; }
.swatch__meta { padding: 14px; background: #fff; }
.swatch__meta .nm { font-weight: 600; font-size: 14px; }
.swatch__meta .hx { font-family: var(--aa-font-mono); font-size: 12px; color: var(--aa-muted); margin-top: 4px; display: flex; justify-content: space-between; }
.swatch__meta .copied { color: var(--aa-sage); font-weight: 500; }
@media (max-width: 720px) { .swatches { grid-template-columns: repeat(2, 1fr); } }

.type-row {
  display: grid; grid-template-columns: 110px 1fr 110px; gap: 24px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px dashed var(--aa-line);
}
.type-row .tk { font-family: var(--aa-font-mono); font-size: 12px; color: var(--aa-slate); }
.type-row .sm { font-family: var(--aa-font-mono); font-size: 12px; color: var(--aa-muted); text-align: right; }
.type-row .pv { color: var(--aa-graphite); }

.spacers { display: flex; align-items: flex-end; gap: 12px; padding: 24px 0; flex-wrap: wrap; }
.sp {
  background: var(--aa-slate); border-radius: 4px; min-width: 32px;
  position: relative; color: var(--aa-bone); font-family: var(--aa-font-mono); font-size: 11px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px;
}

.logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.logo-tile {
  border: 1px solid var(--aa-line); border-radius: var(--r-sm);
  padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: #fff; min-height: 200px;
  justify-content: center;
}
.logo-tile.dark { background: var(--aa-ink); }
.logo-tile.dark .label { color: rgba(245,244,241,.6); }
.logo-tile img { max-height: 90px; max-width: 100%; }
.logo-tile .label { font-size: 11px; color: var(--aa-muted); letter-spacing: .12em; text-transform: uppercase; margin-top: auto; }
@media (max-width: 720px) { .logo-grid { grid-template-columns: 1fr 1fr; } }

.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dos div {
  border: 1px solid var(--aa-line); border-radius: var(--r-sm);
  padding: 22px; background: #fff;
}
.dos h4 { margin-bottom: 12px; }
.dos .do  { border-top: 3px solid var(--aa-sage); }
.dos .dont { border-top: 3px solid #A14B4B; }
.dos li { padding: 6px 0; font-size: 14px; }
@media (max-width: 720px) { .dos { grid-template-columns: 1fr; } }

.tokens-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tokens-table th, .tokens-table td { padding: 10px 12px; border-bottom: 1px solid var(--aa-line); text-align: left; }
.tokens-table th { background: var(--aa-fog); font-weight: 600; }
.tokens-table .mono { font-family: var(--aa-font-mono); font-size: 12px; color: var(--aa-graphite); }

.code {
  background: var(--aa-ink); color: var(--aa-bone);
  border-radius: var(--r-sm); padding: 18px 20px;
  font-family: var(--aa-font-mono); font-size: 13px; line-height: 1.65;
  overflow-x: auto;
  position: relative;
}
.code .copy {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; padding: 4px 8px; background: rgba(245,244,241,.08);
  border-radius: var(--r-xs); color: rgba(245,244,241,.72);
}
.code .copy:hover { background: rgba(245,244,241,.14); color: var(--aa-bone); }
.code .tok-prop { color: #B7CCDD; }
.code .tok-val  { color: #C7D8C7; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; padding: 20px 0; }

.motion-demo {
  border: 1px solid var(--aa-line); border-radius: var(--r-sm); padding: 28px; background: #fff;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: center;
}
.motion-demo .box {
  background: var(--aa-graphite); color: var(--aa-bone);
  border-radius: var(--r-xs); padding: 22px;
  font-family: var(--aa-font-mono); font-size: 12px;
  transition: transform var(--aa-d-micro) var(--aa-ease);
}
.motion-demo .box:nth-child(1) { transition-duration: 120ms; }
.motion-demo .box:nth-child(2) { transition-duration: 240ms; }
.motion-demo .box:nth-child(3) { transition-duration: 400ms; }
.motion-demo .box:hover { transform: translateY(-8px); background: var(--aa-slate); }

/* Clear-space diagram — mechanical drawing aesthetic */
.cs-plate {
  background: var(--aa-fog);
  border: 1px solid var(--aa-line);
  border-radius: var(--r-sm);
  padding: 64px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cs-zone {
  position: relative;
  width: 240px;
  height: 240px;
  border: 1px dashed var(--aa-slate);
  background: rgba(76, 106, 133, .05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-cell {
  width: 168px;
  height: 168px;
  background: #fff;
  border: 1px dashed var(--aa-graphite);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-cell img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}
/* Corner brackets on the clear-space zone — drafting accent */
.cs-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--aa-graphite);
}
.cs-corner--tl { top: -1px;    left: -1px;   border-right: 0; border-bottom: 0; }
.cs-corner--tr { top: -1px;    right: -1px;  border-left: 0;  border-bottom: 0; }
.cs-corner--bl { bottom: -1px; left: -1px;   border-right: 0; border-top: 0; }
.cs-corner--br { bottom: -1px; right: -1px;  border-left: 0;  border-top: 0; }
/* Dimension callouts — sit inside the buffer band */
.cs-dim { position: absolute; background: var(--aa-graphite); display: block; }
.cs-dim::before, .cs-dim::after { content: ''; position: absolute; background: var(--aa-graphite); }
.cs-dim--right {
  top: 50%; right: 0;
  transform: translateY(-50%);
  width: 36px; height: 1px;
}
.cs-dim--right::before, .cs-dim--right::after { top: -4px; width: 1px; height: 9px; }
.cs-dim--right::before { left: 0; }
.cs-dim--right::after  { right: 0; }
.cs-dim--top {
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 36px;
}
.cs-dim--top::before, .cs-dim--top::after { left: -4px; height: 1px; width: 9px; }
.cs-dim--top::before { top: 0; }
.cs-dim--top::after  { bottom: 0; }
.cs-dim__label {
  position: absolute;
  font-family: var(--aa-font-mono);
  font-size: 11px;
  color: var(--aa-graphite);
}
.cs-dim--right .cs-dim__label {
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}
.cs-dim--top .cs-dim__label {
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
}
.cs-caption {
  text-align: center;
  font-size: 11px;
  color: var(--aa-muted);
  margin-top: 36px;
  letter-spacing: .04em;
}

/* Sizing scale — visual ruler at minimum sizes */
.cs-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px 24px 24px;
  background: var(--aa-fog);
  border: 1px solid var(--aa-line);
  border-radius: var(--r-sm);
  margin-top: 16px;
}
.cs-scale__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cs-scale__rail {
  width: 100%;
  height: 112px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid var(--aa-line);
  padding-bottom: 8px;
}
.cs-scale__rail img { display: block; width: auto; }
.cs-scale__item .mono {
  font-size: 12px;
  color: var(--aa-graphite);
}
.cs-scale__use {
  font-size: 10px;
  color: var(--aa-muted);
  letter-spacing: .14em;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .cs-scale { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .brand-shell { grid-template-columns: 1fr; }
  .brand-side { position: static; height: auto; }
}

/* ============================================================
   TENANT-ADMIN + SUPER-ADMIN SHELL — left sidebar layout
   Moved from inline <style> blocks into the cached stylesheet
   so we don't ship ~4KB per page.
   ============================================================ */
.aa-shell { display: grid; grid-template-columns: 260px 1fr; height: 100vh; overflow: hidden; background: #F5F4F1; }
@media (max-width: 1024px) { .aa-shell { grid-template-columns: 1fr; } .aa-sidebar { display: none; } }
.aa-sidebar { background: #fff; border-right: 1px solid var(--aa-line); display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0; overflow-y: auto; }
.aa-sidebar--dark { background: #0F1418; color: #F5F4F1; border-right-color: #1F2528; }
.aa-sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--aa-line); text-decoration: none; color: inherit; }
.aa-sidebar--dark .aa-sidebar__brand { border-bottom-color: #1F2528; }
.aa-sidebar__brand img { width: 28px; height: 28px; }
.aa-sidebar--dark .aa-sidebar__brand img { filter: invert(1); }
.aa-sidebar__brand .nav__wordmark { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.aa-sidebar__brand .platform-tag { display: block; font-size: 9px; letter-spacing: .14em; color: #C9A24A; margin-top: 4px; text-transform: uppercase; }
.aa-sidebar__nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.aa-section { margin-bottom: 8px; }
.aa-section > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; list-style: none; padding: 8px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--aa-graphite); opacity: .55; }
.aa-sidebar--dark .aa-section > summary { color: rgba(245,244,241,.55); }
.aa-section > summary:hover { background: rgba(0,0,0,.03); opacity: .9; }
.aa-sidebar--dark .aa-section > summary:hover { background: rgba(245,244,241,.05); color: rgba(245,244,241,.9); }
.aa-section > summary::-webkit-details-marker { display: none; }
.aa-section > summary::after { content: "▸"; font-size: 10px; transition: transform .15s ease; }
.aa-section[open] > summary::after { transform: rotate(90deg); }
.aa-section[open] > summary { opacity: .9; }
.aa-sidebar--dark .aa-section[open] > summary { color: rgba(245,244,241,.9); }
.aa-section__items { padding: 4px 0 8px; }
.aa-section__items a { display: block; padding: 6px 12px 6px 24px; font-size: 13px; color: var(--aa-graphite); opacity: .8; text-decoration: none; border-radius: 4px; margin: 1px 4px; }
.aa-sidebar--dark .aa-section__items a { color: rgba(245,244,241,.7); opacity: 1; }
.aa-section__items a:hover { background: rgba(0,0,0,.04); opacity: 1; }
.aa-sidebar--dark .aa-section__items a:hover { background: rgba(245,244,241,.05); color: #fff; }
.aa-section__items a.active { background: var(--aa-slate, #3D5A6C); color: #fff; opacity: 1; }
.aa-sidebar--dark .aa-section__items a.active { background: #C9A24A; color: #0F1418; }
.aa-section__items a.gold { color: #C9A24A; }
.aa-section__items h6 { margin: 8px 12px 2px 24px; font-size: 9px; text-transform: uppercase; letter-spacing: .14em; color: var(--aa-graphite); opacity: .4; font-weight: 500; }
.aa-section__items h6:first-child { margin-top: 4px; }
.aa-side-link { display: block; padding: 8px 12px; font-size: 13px; color: var(--aa-graphite); opacity: .85; text-decoration: none; border-radius: 6px; margin: 1px 4px; }
.aa-sidebar--dark .aa-side-link { color: rgba(245,244,241,.85); opacity: 1; }
.aa-side-link:hover { background: rgba(0,0,0,.04); opacity: 1; }
.aa-sidebar--dark .aa-side-link:hover { background: rgba(245,244,241,.05); color: #fff; }
.aa-side-link.active { background: var(--aa-slate, #3D5A6C); color: #fff; }
.aa-sidebar--dark .aa-side-link.active { background: #C9A24A; color: #0F1418; font-weight: 500; }
.aa-side-link.platform { color: #C9A24A; font-weight: 500; }
.aa-side-link.exit { color: #6B8E23; }
.aa-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--aa-line); flex-shrink: 0; z-index: 50; }
.aa-topbar__title { font-size: 14px; font-weight: 500; opacity: .7; }
.aa-topbar__right { display: flex; gap: 14px; align-items: center; }
details.aa-acct { position: relative; }
details.aa-acct > summary { cursor: pointer; list-style: none; user-select: none; font-size: 13px; color: var(--aa-graphite); padding: 6px 10px; border: 1px solid var(--aa-line); border-radius: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.aa-acct > summary::-webkit-details-marker { display: none; }
details.aa-acct[open] > summary { background: rgba(0,0,0,.03); }
details.aa-acct > .aa-acct-menu { position: absolute; top: 100%; right: 0; margin-top: 6px; min-width: 220px; background: #fff; border: 1px solid var(--aa-line); border-radius: 8px; padding: 6px 0; box-shadow: 0 12px 36px rgba(0,0,0,.10); z-index: 100; }
details.aa-acct > .aa-acct-menu a, details.aa-acct > .aa-acct-menu button { display: block; width: 100%; padding: 8px 16px; font-size: 13px; color: var(--aa-graphite); opacity: .85; text-decoration: none; background: none; border: 0; text-align: left; font-family: inherit; cursor: pointer; }
details.aa-acct > .aa-acct-menu a:hover, details.aa-acct > .aa-acct-menu button:hover { background: rgba(0,0,0,.04); }
.aa-menu-btn { display: none; background: none; border: 1px solid var(--aa-line); border-radius: 6px; padding: 6px 10px; cursor: pointer; font-size: 18px; }
@media (max-width: 1024px) { .aa-menu-btn { display: inline-block; } }
body > footer.site-footer { display: none; }
.aa-main { display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: hidden; }
.aa-content { flex: 1; padding: 28px 32px; overflow-y: auto; min-height: 0; }
.aa-impersonate-banner { background: #C9A24A; color: #0F1418; padding: 8px 14px; text-align: center; font-weight: 600; font-family: var(--aa-font-mono); font-size: 12px; }

/* ==========================================================================
   Tabs (.aa-tabs) — generic tabbed view; persists active tab via localStorage.
   Used by Employee detail, Finance hub, Sales hub, Trust accounts.
   ========================================================================== */
.aa-tabs { display: flex; flex-direction: column; }
.aa-tabs__nav {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--aa-line);
  margin-bottom: 24px;
}
.aa-tab {
  background: none; border: 0; cursor: pointer;
  padding: 10px 18px; font-size: 14px; font-family: inherit;
  color: var(--aa-graphite); opacity: .7;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: opacity .12s, border-color .12s;
}
.aa-tab:hover { opacity: 1; }
.aa-tab.is-active {
  opacity: 1; font-weight: 600; color: var(--aa-slate, #3D5A6C);
  border-bottom-color: var(--aa-slate, #3D5A6C);
}
.aa-tab-panel { display: none; }
.aa-tab-panel.is-active { display: block; }

/* ============================================================================
   Shared UI components — dialogs, toasts, flash banners, form fields,
   empty states, list toolbars. Added for the /future 01–10 build-out.
   ========================================================================== */

/* ---- Form field primitives (used by dialogs + new forms) ---------------- */
.aa-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.aa-field:first-child { margin-top: 0; }
.aa-field > label { font-size: 13px; font-weight: 500; color: var(--aa-ink); }
.aa-req { color: #A14B4B; }
.aa-field__help, .aa-field__count { font-size: 12px; margin: 2px 0 0; }
.aa-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--aa-line); border-radius: var(--r-xs);
  background: #fff; color: var(--aa-ink); font: inherit; font-size: 14px;
  transition: border-color var(--aa-d-micro) var(--aa-ease), box-shadow var(--aa-d-micro) var(--aa-ease);
}
.aa-input:focus { outline: none; border-color: var(--aa-slate); box-shadow: 0 0 0 3px rgba(76,106,133,.14); }
textarea.aa-input { resize: vertical; min-height: 80px; }

/* Modal + toast primitives live in aa_ui.css (.aa-modal*, .aa-toast*) — the
   shared dependency-free layer. The classes below are the complementary
   pieces: flash banners, list toolbars, empty states, signature pad, wizard
   chrome, and training-delivery surfaces. Inputs inside aaModal use
   .aa-modal__input/.aa-modal__label from aa_ui.css; the .aa-input/.aa-field
   helpers below are for full-page forms. */

/* ---- Flash banners (server messages) ------------------------------------ */
.aa-messages { display: flex; flex-direction: column; gap: 10px; margin: 0 0 20px; }
.aa-banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid;
  font-size: 14px; line-height: 1.45;
}
.aa-banner__icon {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.aa-banner__body { flex: 1; }
.aa-banner__x { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.aa-banner__x:hover { opacity: 1; }
.aa-banner--success { background: rgba(126,156,139,.12); border-color: rgba(126,156,139,.4); color: #3F5B4C; }
.aa-banner--success .aa-banner__icon { background: var(--aa-sage); }
.aa-banner--error   { background: rgba(161,75,75,.10); border-color: rgba(161,75,75,.4); color: #8C3F3F; }
.aa-banner--error .aa-banner__icon { background: #A14B4B; }
.aa-banner--warning { background: rgba(201,162,74,.12); border-color: rgba(201,162,74,.45); color: #7A5E1F; }
.aa-banner--warning .aa-banner__icon { background: #C9A24A; }
.aa-banner--info    { background: rgba(76,106,133,.10); border-color: rgba(76,106,133,.35); color: var(--aa-slate); }
.aa-banner--info .aa-banner__icon { background: var(--aa-slate); }

/* ---- Empty states ------------------------------------------------------- */
.aa-empty {
  border: 1px dashed var(--aa-line); border-radius: var(--r-md);
  padding: 40px 28px; text-align: center; background: rgba(245,244,241,.5);
  max-width: 620px; margin: 24px auto;
}
.aa-empty__icon { font-size: 32px; line-height: 1; opacity: .7; }
.aa-empty__title { margin: 14px 0 6px; font-size: var(--t-h3); }
.aa-empty__desc { color: var(--aa-muted); margin: 0 auto 20px; max-width: 460px; }
.aa-empty__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.aa-empty__learn { display: inline-block; margin-top: 16px; font-size: 13px; }

/* ---- List toolbar (search / filter / bulk / pagination) ----------------- */
.aa-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 20px 0 8px;
}
.aa-toolbar form.aa-search { flex: 1 1 280px; display: flex; gap: 8px; min-width: 220px; }
.aa-toolbar .aa-search input[type="search"] { flex: 1; }
.aa-toolbar__filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.aa-toolbar__spacer { flex: 1; }
.aa-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: var(--r-pill); border: 1px solid var(--aa-line);
  font-size: 13px; color: var(--aa-graphite); background: #fff; cursor: pointer; text-decoration: none;
}
.aa-chip.is-active { background: var(--aa-slate); color: var(--aa-bone); border-color: var(--aa-slate); }
.aa-bulkbar {
  display: none; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--aa-graphite); color: var(--aa-bone); border-radius: var(--r-sm); margin: 8px 0;
}
.aa-bulkbar.is-active { display: flex; }
.aa-bulkbar__count { font-weight: 600; }
.aa-bulkbar .aa-input { width: auto; }
th.aa-sort { cursor: pointer; user-select: none; white-space: nowrap; }
th.aa-sort .aa-sort__ind { opacity: .4; font-size: 11px; }
th.aa-sort.is-sorted .aa-sort__ind { opacity: 1; }
tr.aa-rowlink { cursor: pointer; }
tr.aa-rowlink:hover { background: rgba(76,106,133,.06); }
.aa-pagination { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; }
.aa-pagination a, .aa-pagination span.cur {
  padding: 6px 12px; border: 1px solid var(--aa-line); border-radius: var(--r-xs); text-decoration: none; color: var(--aa-graphite);
}
.aa-pagination span.cur { background: var(--aa-slate); color: var(--aa-bone); border-color: var(--aa-slate); }
.aa-pagination .muted { border: 0; }

/* ---- Signature pad ------------------------------------------------------ */
.aa-sigpad { border: 1px solid var(--aa-line); border-radius: var(--r-xs); background: #fff; touch-action: none; width: 100%; max-width: 460px; }
.aa-sig-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.aa-sig-tabs button { background: none; border: 1px solid var(--aa-line); border-radius: var(--r-xs); padding: 6px 14px; cursor: pointer; font: inherit; font-size: 13px; }
.aa-sig-tabs button.is-active { background: var(--aa-slate); color: var(--aa-bone); border-color: var(--aa-slate); }

/* ---- Setup wizard / checklist ------------------------------------------- */
.aa-checklist { list-style: none; padding: 0; margin: 0; }
.aa-checklist li {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--aa-line); border-radius: var(--r-sm); margin-bottom: 10px; background: #fff;
}
.aa-checklist li.is-done { opacity: .65; }
.aa-checklist__mark {
  flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--aa-line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: var(--aa-muted);
}
.aa-checklist li.is-done .aa-checklist__mark { background: var(--aa-sage); border-color: var(--aa-sage); color: #fff; }
.aa-checklist__main { flex: 1; }
.aa-checklist__main h4 { margin: 0 0 2px; font-size: 15px; }
.aa-checklist__main p { margin: 0; font-size: 13px; color: var(--aa-muted); }
.aa-steps { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.aa-steps__item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--aa-muted); }
.aa-steps__num { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--aa-line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.aa-steps__item.is-active .aa-steps__num { background: var(--aa-slate); color: #fff; border-color: var(--aa-slate); }
.aa-steps__item.is-done .aa-steps__num { background: var(--aa-sage); color: #fff; border-color: var(--aa-sage); }

/* ---- Training delivery -------------------------------------------------- */
.aa-slide { max-width: 760px; margin: 0 auto; }
.aa-slide__media img, .aa-slide__media video { max-width: 100%; border-radius: var(--r-sm); }
.aa-slide__embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--r-sm); }
.aa-slide__embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.aa-progress { height: 6px; background: var(--aa-fog); border-radius: var(--r-pill); overflow: hidden; }
.aa-progress__bar { height: 100%; background: var(--aa-sage); transition: width .3s var(--aa-ease); }
.aa-quiz__q { padding: 18px 0; border-bottom: 1px solid var(--aa-line); }
.aa-quiz__choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.aa-quiz__choice.is-correct { color: #3F5B4C; }
.aa-quiz__choice.is-wrong { color: #8C3F3F; }


/* Impersonation banner (future/12C) — sticky, loud, always-visible exit. */
.aa-impersonate-banner { position: sticky; top: 0; z-index: 300; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; background: #C0392B; color: #fff; padding: 8px 14px; text-align: center; font-weight: 600; font-family: var(--aa-font-mono); font-size: 12px; }
.aa-impersonate-banner strong { font-weight: 700; }
.aa-impersonate-banner__end { background: #0F1418; color: #fff; border: none; padding: 4px 12px; border-radius: 4px; cursor: pointer; font-weight: 700; font-family: var(--aa-font-mono); font-size: 12px; }
.aa-impersonate-banner__end:hover { background: #000; }

/* ============================================================
   Responsive sweep (future/17) + Accessibility baseline (future/18)
   ============================================================ */

/* Skip-to-content link — visible only on keyboard focus. */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--aa-graphite); color: var(--aa-bone); padding: 10px 16px; border-radius: 0 0 6px 0; }
.skip-link:focus { left: 0; }

/* Stronger, consistent keyboard focus ring everywhere. */
:focus-visible { outline: 2px solid var(--aa-slate); outline-offset: 2px; border-radius: 4px; }

/* Screen-reader-only utility (shared). */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Respect reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Slightly darker muted text for AA contrast against the bone background. */
.muted { color: #5b6470; }

/* Wrap any wide table so it scrolls instead of breaking layout on small screens. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Responsive data-table: at <=640px, stack rows as cards with field labels.
   Mark a table with class="data-table" and give each <td> a data-label="…". */
@media (max-width: 640px) {
  table.data-table thead { position: absolute; left: -9999px; }
  table.data-table, table.data-table tbody, table.data-table tr, table.data-table td { display: block; width: 100%; box-sizing: border-box; }
  table.data-table tr { border: 1px solid var(--aa-line); border-radius: 8px; margin-bottom: 12px; padding: 8px 12px; background: #fff; }
  table.data-table td { border: 0 !important; padding: 6px 0 !important; text-align: left !important; display: flex; justify-content: space-between; gap: 12px; }
  table.data-table td::before {
    content: attr(data-label); font-weight: 600; color: var(--aa-muted); font-size: 12px;
    text-transform: uppercase; letter-spacing: .04em; flex: 0 0 45%;
  }
  table.data-table td:empty { display: none; }
}

/* Form grids: collapse multi-column inline grids to one column on phones. */
@media (max-width: 640px) {
  .grid-2, .grid-3, .aa-form-grid, .plan-cards { grid-template-columns: 1fr !important; }
}

/* Mobile font/padding shrink utility. */
@media (max-width: 480px) {
  .mobile-shrink-12 { font-size: 13px; }
  .aa-content { padding-left: 16px; padding-right: 16px; }
}

/* Employee-detail sticky tab strip shouldn't collide with the mobile hamburger. */
@media (max-width: 900px) {
  .aa-tabstrip, .aa-sticky-tabs { top: 56px !important; }
}

/* Shifts calendar: week grid → horizontal-scroll lane on phones. */
@media (max-width: 760px) {
  .shifts-week, [data-shifts-grid] { display: flex !important; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; }
  .shifts-week > * , [data-shifts-grid] > * { flex: 0 0 78%; }
}

/* Hero / detail action groups wrap cleanly on small screens. */
@media (max-width: 640px) {
  .aa-hero, .detail-hero { flex-wrap: wrap; }
  .aa-hero .actions, .detail-hero .actions { width: 100%; margin-top: 12px; }
}

/* Universal fallback: any admin table that isn't an opt-in stacked .data-table
   scrolls horizontally on phones instead of squishing into an unreadable grid. */
@media (max-width: 640px) {
  .aa-content table:not(.data-table) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
}

/* ============================================================
   MULTI-PAGE ADDITIONS (2026-07) — services / platforms / about
   Built entirely from existing brand tokens. Appended so the
   original single-page system above is untouched.
   ============================================================ */

/* Compact sub-page hero — shorter than the home hero. */
.hero--compact { padding: clamp(84px, 12vw, 132px) 0 clamp(48px, 7vw, 72px); }

/* Status badges — self-contained, readable on both bone and ink. */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--aa-font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 1px solid currentColor; line-height: 1;
}
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status--live  { color: #7E9C8B; }
.status--gtm   { color: #C9A24A; }
.status--near  { color: #8FB0C8; }
.status--build { color: #D8A657; }

/* Services home grid: 2×2 instead of 3-up. */
@media (min-width: 881px) { .svc--four { grid-template-columns: repeat(2, 1fr); } }

/* Service-section lead: intro + "best for" aside. */
.svc-lead { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.svc-lead__aside {
  border: 1px solid var(--aa-line); border-radius: var(--r-md);
  padding: 22px; background: rgba(255,255,255,.5);
}
.section--ink .svc-lead__aside { background: rgba(245,244,241,.04); border-color: rgba(245,244,241,.14); }
.svc-lead__aside p:last-child { margin: 0; }
@media (max-width: 880px) { .svc-lead { grid-template-columns: 1fr; } }

/* Platform detail blocks. */
.plat { max-width: 100%; }
.plat__head h2 { margin: 0; }
.plat-tile { display: block; }
.plat-tile h4 { color: var(--aa-graphite); }

/* Pricing card (Events standalone service). */
.pricing {
  border: 1px solid var(--aa-line); border-radius: var(--r-md);
  padding: 28px; background: #fff; box-shadow: var(--e1);
}
.pricing__amount { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.pricing__num { font-family: var(--aa-font-mono); font-size: 44px; font-weight: 500; color: var(--aa-graphite); letter-spacing: -0.02em; }
.pricing__per { font-size: 15px; color: var(--aa-muted); }
.pricing__list { margin: 0; padding: 0; border-top: 1px solid var(--aa-line); padding-top: 16px; }
.pricing__list li { font-size: 14px; padding: 7px 0; display: flex; align-items: center; gap: 10px; color: var(--aa-graphite); }
.pricing__list li::before { content: ""; width: 5px; height: 5px; background: var(--aa-sage); transform: rotate(45deg); flex: none; }

/* Experience timeline. */
.tl { margin-top: 44px; border-left: 2px solid var(--aa-line); margin-left: 6px; }
.tl__item { position: relative; padding: 0 0 34px 34px; }
.tl__item:last-child { padding-bottom: 0; }
.tl__item::before {
  content: ""; position: absolute; left: -8px; top: 4px;
  width: 13px; height: 13px; background: var(--aa-graphite); transform: rotate(45deg);
}
.tl__yr { font-family: var(--aa-font-mono); font-size: 12px; letter-spacing: .14em; color: var(--aa-slate); }
.tl__item h4 { margin: 6px 0 6px; font-size: 18px; }
.tl__item p { margin: 0; font-size: 14px; }

/* Platform directory cards — CTA pinned to the bottom. */
.plat-card { display: flex; flex-direction: column; }
.plat-card__cta { align-self: flex-start; margin-top: auto; padding-top: 20px; }

/* Platform detail: prev/next cross-navigation. */
.plat-detailnav {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--aa-line);
}
.plat-detailnav a { font-size: 14px; color: var(--aa-slate); }
.plat-detailnav a:hover { color: var(--aa-graphite); }
.section--ink .plat-detailnav { border-top-color: rgba(245,244,241,.14); }
.section--ink .plat-detailnav a { color: var(--aa-sage); }

/* Detail "at a glance" spec list. */
.spec { border: 1px solid var(--aa-line); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.section--ink .spec { background: rgba(245,244,241,.03); border-color: rgba(245,244,241,.12); }
.spec__row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--aa-line); font-size: 14px; }
.section--ink .spec__row { border-bottom-color: rgba(245,244,241,.1); }
.spec__row:last-child { border-bottom: 0; }
.spec__k { color: var(--aa-muted); }
.spec__v { font-family: var(--aa-font-mono); font-size: 13px; color: var(--aa-graphite); text-align: right; }
.section--ink .spec__v { color: var(--aa-bone); }


/* ---- Contact form: PHI consent + server-rendered captcha ---- */
.form-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #E0A08A;
}
.form-error--top {
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid rgba(224, 160, 138, .45);
  border-radius: 8px;
  background: rgba(224, 160, 138, .1);
}
.field--consent { margin-top: 4px; }
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
}
.consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--aa-sage);
  cursor: pointer;
}
.consent__note {
  margin: 8px 0 0 27px;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: .62;
}
.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.captcha-svg {
  /* Digits are vector segments, not text — nothing to scrape from the DOM.
     user-select off so the shapes can't be copied out either. */
  display: block;
  opacity: .92;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.captcha-eq { font-size: 18px; opacity: .7; }
.captcha-row input { flex: 1 1 90px; min-width: 90px; }
#cf-submit.is-sending { opacity: .6; cursor: progress; }
