/*
 * Astra public shell for CommerceGov public subpages (Sign in, Pilot / Request a Demo, Privacy, Terms, Security).
 *
 * Opt-in only: landing_base.html loads this file and adds body.astra-shell when a page sets `astra_shell`.
 * Every rule is scoped to body.astra-shell, so the legacy homepage, Learn and Sandbox Demo keep the dark shell.
 * Values mirror the approved Astra homepage (backend/static/astra-preview/styles.css, compact scale 2026-10-29):
 * same tokens, header, nav, button, field and footer treatment. This is not a new design system.
 * Legacy page variables (--bg, --panel, --text, ...) are remapped to Astra tokens so existing page bodies
 * re-theme without markup or copy changes.
 */

body.astra-shell {
  --paper: #f7f8f5;
  --white: #fff;
  --ink: #142b35;
  --muted: #4e626b;
  --teal: #00665e;
  --teal-dark: #064c48;
  --mint: #e4f1eb;
  --line: #d2ddd7;
  --field-line: #91a99c;
  --blue: #244b8d;
  --amber: #76510b;
  --soft: #eef1ec;
  --max: 1280px;

  /* Legacy landing_base / page variables -> Astra tokens. */
  --bg: var(--paper);
  --panel: var(--white);
  --panel-elevated: var(--white);
  --accent-blue: var(--teal);
  --accent-blue-soft: var(--mint);
  --accent-blue-text: var(--teal);
  --accent-green: var(--teal);
  --text: var(--ink);
  --text-secondary: var(--muted);
  --text-muted: #5b6e76;
  --border: var(--line);
  --border-strong: #b7c7bf;

  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 "Segoe UI", Arial, sans-serif;
}

body.astra-shell :is(button, input, select, textarea) { font: inherit; }
body.astra-shell :is(h1, h2, h3) { color: var(--ink); text-wrap: balance; }
body.astra-shell a { color: var(--teal); text-underline-offset: 4px; }
body.astra-shell a:hover { text-decoration: underline; }
body.astra-shell :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
body.astra-shell .muted { color: var(--muted); }
body.astra-shell code { font-family: Consolas, ui-monospace, monospace; }

/* ---- Header (Astra .site-header / .brand / nav) ---- */
body.astra-shell .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 13px max(24px, calc((100% - var(--max)) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}
body.astra-shell .site-header-inner {
  width: 100%;
  max-width: none;
  min-height: 40px;
  flex-wrap: nowrap;
  gap: 24px;
}
body.astra-shell .site-brand {
  gap: 9px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.4px;
  white-space: nowrap;
  border-radius: 0;
}
body.astra-shell .site-brand:hover { color: var(--ink); text-decoration: none; }
body.astra-shell .site-brand:hover .site-brand-mark { filter: none; }
body.astra-shell .site-brand:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; box-shadow: none; }
body.astra-shell .site-brand-mark { width: 28px; height: 28px; }

body.astra-shell .site-nav {
  flex-wrap: nowrap;
  gap: 24px;
  font-size: 13.5px;
  font-weight: 600;
}
body.astra-shell .site-nav a,
body.astra-shell .site-nav a.nav-primary {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ink);
  white-space: nowrap;
}
body.astra-shell .site-nav a:hover,
body.astra-shell .site-nav a.nav-primary:hover {
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}
body.astra-shell .site-nav a.nav-active,
body.astra-shell .site-nav a.nav-active:hover {
  color: var(--ink);
  border: 0;
  box-shadow: none;
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
/* Last nav item is the primary request action: Astra .nav-cta. */
body.astra-shell .site-nav a:last-child,
body.astra-shell .site-nav a.nav-primary:last-child {
  padding: 6px 13px;
  border: 1px solid var(--ink);
  text-decoration: none;
}
body.astra-shell .site-nav a:last-child:hover { background: var(--soft); text-decoration: none; }
body.astra-shell .site-nav a.nav-active:last-child,
body.astra-shell .site-nav a.nav-primary.nav-active:last-child {
  background: var(--mint);
  border-color: var(--teal);
  text-decoration: none;
}

/* Mobile menu (progressive enhancement: the nav collapses only after the toggle script marks the header). */
body.astra-shell .site-menu-toggle { display: none; }
@media (max-width: 1100px) {
  body.astra-shell .site-header { padding: 13px 24px; }
  body.astra-shell .site-nav { gap: 16px; }
  body.astra-shell .site-brand { font-size: 18px; }
}
@media (max-width: 850px) {
  body.astra-shell .site-header-inner { flex-wrap: wrap; gap: 14px; }
  body.astra-shell .site-nav { flex-wrap: wrap; }
  body.astra-shell .menu-ready .site-menu-toggle {
    display: block;
    min-height: 44px;
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }
  body.astra-shell .menu-ready .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 4px;
  }
  body.astra-shell .menu-ready .site-nav.open { display: flex; }
  body.astra-shell .site-nav a,
  body.astra-shell .site-nav a.nav-primary { min-height: 44px; }
  body.astra-shell .site-nav a:last-child { justify-content: center; }
}
@media (max-width: 560px) {
  body.astra-shell .site-header { padding: 11px 20px; }
}

/* ---- Content width (Astra .wrap) ---- */
body.astra-shell .wrap {
  max-width: var(--max);
  padding: 48px 28px 24px;
}
@media (max-width: 560px) {
  body.astra-shell .wrap { padding: 32px 20px 16px; }
}

/* ---- Buttons (Astra .btn / .btn.secondary) ---- */
body.astra-shell .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
body.astra-shell .btn:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
body.astra-shell .btn.primary,
body.astra-shell .btn.primary:visited {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
body.astra-shell .btn.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
body.astra-shell .btn.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
@media (max-width: 850px) {
  body.astra-shell .btn { min-height: 44px; }
}

/* ---- Footer (Astra footer / .footer-links / .fine) ---- */
body.astra-shell .footer.wrap {
  max-width: none;
  margin: 72px 0 0;
  padding: 36px max(24px, calc((100% - var(--max)) / 2)) 25px;
  background: var(--soft);
  border-top: 1px solid var(--line);
  align-items: flex-start;
  color: var(--muted);
  font-size: 14px;
}
body.astra-shell .footer-brand-line strong { color: var(--ink); font-size: 19px; font-weight: 650; letter-spacing: -0.4px; }
body.astra-shell .footer-brand-mark { width: 24px; height: 24px; }
body.astra-shell .footer-tagline { color: var(--muted); }
body.astra-shell .footer-disclaimer { margin-top: 14px; color: var(--muted); font-size: 11px; }
body.astra-shell .footer-links { gap: 10px 26px; font-size: 13px; }
body.astra-shell .footer-links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); }
body.astra-shell .footer-links a:hover { color: var(--ink); }
@media (max-width: 560px) {
  body.astra-shell .footer.wrap { padding: 30px 20px 20px; }
  body.astra-shell .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; width: 100%; font-size: 12px; }
}

/* ---- Legal and Security pages (.page-header / .content / .security-item) ---- */
body.astra-shell .page-header,
body.astra-shell .content { max-width: 820px; }
body.astra-shell .page-header h1 {
  font-size: clamp(32px, 3.4vw, 46px);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -1.5px;
}
body.astra-shell .content h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.4px; line-height: 1.3; }
body.astra-shell .content p,
body.astra-shell .content li { color: var(--muted); }
body.astra-shell .content a { text-decoration: underline; }
body.astra-shell .security-list { max-width: 820px; }
body.astra-shell .security-item { border-color: var(--line); border-radius: 2px; background: var(--white); }

/* ---- Sign in (auth card from auth/_auth_card_style.html) ---- */
body.astra-shell .agency-access-shell { max-width: 560px; padding-top: 56px; }
body.astra-shell .agency-access-card {
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--white);
  box-shadow: 0 13px 30px #102f3314;
}
body.astra-shell .agency-access-card h1 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 550;
  letter-spacing: -1px;
  line-height: 1.2;
}
body.astra-shell .agency-access-card p { color: var(--muted); }
body.astra-shell .agency-login-form label { color: var(--ink); font-weight: 600; }
body.astra-shell .agency-login-form input {
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--field-line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
}
body.astra-shell .sign-in-methods .btn { min-height: 48px; font-size: 15px; }
body.astra-shell .other-sign-in summary { color: var(--ink); font-weight: 600; min-height: 32px; }
body.astra-shell .sign-in-error { color: var(--ink); border-left-color: var(--amber); }
@media (max-width: 560px) {
  body.astra-shell .agency-access-shell { padding-top: 28px; }
  body.astra-shell .agency-access-card { padding: 26px 20px; }
}

/* ---- Pilot / Request a Demo (landing/pilot.html) ---- */
body.astra-shell .pilot-page { max-width: none; }
body.astra-shell .pilot-hero h1 {
  font-size: clamp(36px, 3.7vw, 56px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -2px;
}
body.astra-shell .pilot-content h2 { font-weight: 550; letter-spacing: -0.7px; }
body.astra-shell .pilot-eyebrow,
body.astra-shell .pilot-section-label {
  color: var(--teal) !important;
  font-family: Consolas, ui-monospace, monospace;
  letter-spacing: 0.1em;
}
body.astra-shell .pilot-pillar h3 { color: var(--teal); }
body.astra-shell :is(.pilot-summary-item, .pilot-scope-card, .pilot-dashboard-item, .pilot-measurement-step,
  .pilot-metric-card, .pilot-outcome-card, .pilot-post-pilot, .pilot-benefit-card, .pilot-fit-note, .pilot-period,
  .pilot-comparison, .pilot-lane) {
  background: var(--white);
  box-shadow: none;
  border-radius: 2px;
}
body.astra-shell .pilot-hero-aside { border-left-color: var(--teal); background: linear-gradient(90deg, var(--mint), transparent); }
body.astra-shell .pilot-period-governed { border-color: var(--teal); background: linear-gradient(135deg, var(--mint), var(--white)); }
body.astra-shell .pilot-lane-governed { border-color: var(--teal); }
body.astra-shell .pilot-boundary { border-left-color: var(--teal); background: var(--mint); }
body.astra-shell .pilot-content .pilot-hypothesis { border-left-color: var(--amber); background: #fbf4e6; }
body.astra-shell .pilot-authority-step + .pilot-authority-step::before { color: var(--teal); }
body.astra-shell .pilot-final-cta { border-color: var(--teal); border-radius: 2px; background: linear-gradient(135deg, var(--mint), var(--white)); }

body.astra-shell .pilot-modal-backdrop { background: rgba(20, 43, 53, 0.55); }
body.astra-shell .pilot-form-panel { border-color: var(--line); border-radius: 2px; background: var(--white); box-shadow: 0 13px 30px #102f3333; }
body.astra-shell .pilot-modal-close { border-color: var(--line); background: var(--white); color: var(--ink); }
body.astra-shell .pilot-form label { color: var(--ink); }
body.astra-shell .pilot-form input:not([type="checkbox"]):not([type="radio"]),
body.astra-shell .pilot-form select,
body.astra-shell .pilot-form textarea {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
}
body.astra-shell .pilot-form textarea { min-height: 96px; }
body.astra-shell .pilot-form .checkbox-option { border-color: var(--line); border-radius: 2px; background: var(--white); }
body.astra-shell .pilot-form .checkbox-option:hover { background: var(--soft); }
body.astra-shell .pilot-form .checkbox-option:has(input:checked) { border-color: var(--teal); background: var(--mint); }
body.astra-shell .pilot-form-error { border-color: #c9433a; background: #fdeeed; color: var(--ink); border-radius: 2px; }
/* Astra controlled-demo page: keep all demo content on the public light surface. */
body.astra-shell .demo-card,
body.astra-shell .demo-capability {
  background: var(--white);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 2px;
}
body.astra-shell .demo-card h1,
body.astra-shell .demo-capability h2,
body.astra-shell .demo-workflow strong { color: var(--ink); }
body.astra-shell .demo-body,
body.astra-shell .demo-hint,
body.astra-shell .demo-store-label,
body.astra-shell .demo-workflow,
body.astra-shell .demo-workflow span,
body.astra-shell .demo-capability p { color: var(--muted); }
body.astra-shell .demo-store-pill { background: var(--soft); border-color: var(--line); color: var(--ink); }
body.astra-shell .demo-cta { background: var(--teal); border-color: var(--teal); color: var(--white); border-radius: 2px; }
body.astra-shell .demo-cta:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); }
