/* Government AI Customer Support, version 1 (2026-11-02).
   Palette: Gibraltar navy and red, grey tiles, pale-blue panels. */

:root {
  --navy: #0b2b5c;
  --navy-deep: #071d40;
  --red: #c8102e;
  --ink: #1f2937;
  --muted: #4b5563;
  --line: #e5e7eb;
  --tile: #f3f4f6;
  --pale: #e9f1fb;
  --white: #ffffff;
  --radius: 14px;
  --header-h: 72px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* The footer sits at the bottom of the window on short pages: the page
     is a column and main takes whatever height is left. */
  display: flex; flex-direction: column; min-height: 100dvh;
}
main { flex: 1; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; background: var(--navy); color: #fff;
  padding: 8px 12px; border-radius: 8px; z-index: 100; text-decoration: none;
}
.skip-link:focus { top: 8px; }

.wrap { width: min(1140px, 100% - 32px); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  min-height: var(--header-h);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 48px; height: 48px; }
.brand-text { display: grid; line-height: 1.15; }
.brand-title { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--navy); }
.brand-sub { font-size: 13.5px; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  text-decoration: none; font-size: 14.5px; color: var(--navy); padding: 8px 12px;
  border-bottom: 3px solid transparent; border-radius: 6px 6px 0 0;
}
.site-nav a:hover { background: var(--tile); }
.site-nav a[aria-current="page"] { font-weight: 600; border-bottom-color: var(--red); }
.site-nav .divider { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  /* The photo (1816×801, the Rock in its lower right, sea and beach along
     the bottom) fills the whole band, anchored to its bottom edge so the
     sea is always in view; the band is tall enough that the Rock and the
     sky above it are too. The navy deepens towards the left for the text. */
  background: var(--navy-deep) url("assets/hero.png") right bottom / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7, 29, 64, .88) 0%, rgba(7, 29, 64, .78) 38%, rgba(7, 29, 64, .3) 62%, rgba(7, 29, 64, 0) 100%);
}
/* Every page's hero is the same height as the home page's (the photo is
   the point of it); content below simply scrolls. */
.hero { display: flex; align-items: center; min-height: clamp(336px, 31vw, 480px); }
.hero .wrap { position: relative; padding: 56px 0 44px; }
.hero h1 {
  font-family: var(--serif); font-weight: 700; margin: 0 0 14px;
  font-size: clamp(38px, 6vw, 64px); line-height: 1.05; letter-spacing: -.01em;
}
.hero h1 .underline { position: relative; display: inline-block; }
.hero h1 .underline::after {
  content: ""; position: absolute; left: 2px; right: 6px; bottom: -6px; height: 5px;
  background: var(--red); border-radius: 3px; transform: rotate(-.6deg);
}
.hero p.lead { font-size: clamp(17px, 2.2vw, 22px); max-width: 30ch; margin: 0 0 28px; opacity: .95; }
.hero.compact .wrap { padding: 40px 0 36px; }
.hero.compact h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 8px; }
.hero.compact p.lead { margin-bottom: 0; max-width: 40ch; }

/* The ask box: white pill, text, mic, red send */
.ask { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 16px; padding: 8px 8px 8px 20px; max-width: 640px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); }
.ask input {
  flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 17px; color: var(--ink); background: transparent;
}
.ask input::placeholder { color: #6b7280; }
.ask button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 0; cursor: pointer; background: transparent; color: var(--ink); }
.ask button svg { width: 22px; height: 22px; }
.ask button.send { background: var(--red); color: #fff; }
.ask button.send:hover { filter: brightness(1.08); }
.ask button.mic[aria-disabled="true"] { color: #9ca3af; cursor: not-allowed; }
.ask button.mic[aria-disabled="true"]:hover { background: transparent; }
.ask button.mic.live { color: var(--red); }
.ask button.mic.listening { background: var(--red); color: #fff; }
.ask:focus-within { outline: 3px solid rgba(200, 16, 46, .45); outline-offset: 2px; }

/* ---------- Feature strip ---------- */
.features { padding: 28px 0 40px; }
.features .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.feature { display: flex; gap: 16px; padding: 10px 28px 10px 0; }
.feature + .feature { border-left: 1px solid var(--line); padding-left: 28px; }
.feature svg { width: 40px; height: 40px; flex: none; color: var(--red); }
.feature h3 { font-family: var(--sans); font-weight: 700; font-size: 17px; margin: 0 0 4px; color: var(--navy); }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Steps (How it works) ---------- */
.steps { padding: 36px 0 48px; }
.steps .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; position: relative; }
.step { position: relative; background: var(--tile); border-radius: var(--radius); padding: 26px 22px 22px; }
.step .num {
  position: absolute; left: 16px; top: 12px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center;
}
.step svg { width: 48px; height: 48px; display: block; margin: 8px auto 12px; color: var(--navy); }
.step h3 { margin: 0 0 8px; text-align: center; font-size: 17px; color: var(--navy); }
.step p { margin: 0; font-size: 14.5px; color: var(--muted); text-align: center; }
.step::after {
  content: "→"; position: absolute; right: -19px; top: 50%; transform: translateY(-50%);
  color: #9ca3af; font-size: 22px;
}
.step:last-child::after { content: none; }

/* ---------- Accessibility ---------- */
.a11y-tiles { padding: 36px 0 24px; }
.a11y-tiles .wrap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tile { background: var(--tile); border-radius: var(--radius); padding: 20px 18px; }
.tile .head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tile .head svg { width: 30px; height: 30px; flex: none; color: var(--navy); }
.tile .head .aa { font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--navy); }
.tile h3 { margin: 0; font-size: 15.5px; color: var(--navy); }
.tile p { margin: 0; font-size: 13.5px; color: var(--muted); }
.panel { padding: 0 0 28px; }
.panel .wrap { background: var(--pale); border-radius: var(--radius); display: grid; grid-template-columns: 1fr 1fr; }
.panel .half { padding: 26px 28px; display: flex; gap: 18px; align-items: flex-start; }
.panel .half + .half { border-left: 1px solid #cfdcef; }
.panel .half svg { width: 44px; height: 44px; flex: none; color: var(--navy); }
.panel h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 6px; color: var(--navy); }
.panel p { margin: 0; font-size: 14.5px; color: var(--ink); }
.contact { padding: 0 0 48px; }
.contact .wrap { display: flex; gap: 16px; align-items: flex-start; }
.contact svg { width: 36px; height: 36px; flex: none; color: var(--red); }
.contact h3 { margin: 0 0 4px; font-size: 17px; color: var(--navy); }
.contact p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------- Privacy Policy ---------- */
.policy { padding: 32px 0 8px; }
.policy h2 { font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); margin: 0 0 10px; color: var(--navy); line-height: 1.1; }
.policy p { margin: 0; font-size: 16px; max-width: 78ch; }
.privacy-tiles { padding: 24px 0 24px; }
.privacy-tiles .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.privacy-tiles .tile { display: flex; gap: 16px; align-items: flex-start; padding: 22px 20px; }
.privacy-tiles .tile svg { width: 44px; height: 44px; flex: none; color: var(--navy); margin-top: 2px; }
.privacy-tiles .tile svg.red { color: var(--red); }
.privacy-tiles .tile h3 { margin: 0 0 6px; font-size: 17px; }
.privacy-tiles .tile p { font-size: 14px; color: var(--ink); }
.privacy-tiles .tile strong { color: var(--navy); }
.privacy-contact { padding: 0 0 20px; }
.privacy-contact .wrap { background: var(--pale); border-radius: var(--radius); display: flex; align-items: center; gap: 24px; padding: 26px 32px; }
.privacy-contact svg { width: 44px; height: 44px; flex: none; color: var(--red); }
.privacy-contact h2 {
  font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); margin: 0; color: var(--navy); line-height: 1.15;
  flex: none; padding-right: 24px; border-right: 1px solid #cfdcef;
}
.privacy-contact p { margin: 0; font-size: 15px; color: var(--ink); }
.privacy-contact a { color: var(--red); font-weight: 600; text-decoration: none; }
.privacy-contact a:hover { text-decoration: underline; }
.footnote { padding: 0 0 40px; }
.footnote p { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }

/* ---------- Chat page ---------- */
.chat-page { display: flex; flex-direction: column; min-height: 100dvh; }
.chat-page .site-header { flex: none; }
.chat-bar { background: var(--navy); color: #fff; }
.chat-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.chat-bar a { color: #fff; text-decoration: none; opacity: .9; }
.chat-bar a:hover { opacity: 1; text-decoration: underline; }
.chat-host { flex: 1; display: flex; min-height: 0; background: #fff; }
.chat-host iframe { flex: 1; width: 100%; border: 0; min-height: 480px; }
.chat-missing { margin: 40px auto; max-width: 560px; padding: 24px; border: 1px dashed #cbd5e1; border-radius: var(--radius); color: var(--muted); font-size: 15px; }
.chat-missing code { background: var(--tile); padding: 1px 6px; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features .wrap { grid-template-columns: 1fr; }
  .feature + .feature { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 18px; }
  .steps .wrap { grid-template-columns: 1fr; }
  .step::after { content: none; }
  .a11y-tiles .wrap { grid-template-columns: 1fr 1fr; }
  .panel .wrap { grid-template-columns: 1fr; }
  .privacy-tiles .wrap { grid-template-columns: 1fr 1fr; }
  .privacy-contact .wrap { flex-wrap: wrap; }
  .privacy-contact h2 { border-right: 0; padding-right: 0; flex: 1 1 100%; }
  .panel .half + .half { border-left: 0; border-top: 1px solid #cfdcef; }
}
@media (max-width: 600px) {
  :root { --header-h: auto; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; padding: 12px 0; }
  .site-nav { margin-left: -12px; }
  .brand img { width: 40px; height: 40px; }
  .brand-title { font-size: 17px; }
  .hero { min-height: 280px; background-size: cover; background-position: 62% bottom; }
  .hero .wrap { padding: 40px 0 32px; }
  .hero::before { background: linear-gradient(180deg, rgba(7, 29, 64, .88) 0%, rgba(7, 29, 64, .7) 55%, rgba(7, 29, 64, .35) 100%); }
  .ask { padding-left: 14px; border-radius: 14px; }
  .ask button.mic[aria-disabled="true"] { display: none; }
  .ask input { font-size: 16px; }
  .steps .wrap, .a11y-tiles .wrap, .privacy-tiles .wrap { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
