/* canadachat web UI.
   Black and white first: white page, warm light greys, near-black ink. One maple-red accent used sparingly
   (the headline period, the leaf moment). Blue only for links and citations inside answers. The three logo
   dots are the only other colour, used as tiny level-of-government markers. Light theme only.
   Spacious layout: floating nav, a full-height hero, mono section labels, soft rounded cards, and small
   animated sketches that only play while on screen. Self-hosted fonts. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #ffffff;
  --canvas: #f3f2ef;
  --paper: #f5f4f1;
  --paper-2: #eeede9;
  --ink: #141413;
  --ink-2: #3a3a37;
  --muted: #676661;
  --faint: #9c9b95;
  --line: #e7e6e1;
  --line-2: #d7d6d0;
  --red: #c8281e;
  --link: #1d5bd8;
  --link-bg: #edf2fd;
  --fed: #e2432f; --prov: #2f6fe4; --muni: #1f9a5a;
  --r-xl: 36px; --r-lg: 28px; --r-md: 18px; --r-sm: 12px;
  --shadow-ask: 0 0 0 1px rgba(20, 20, 19, .07), 0 18px 48px -22px rgba(20, 20, 19, .3);
  --shadow-ask-focus: 0 0 0 1px rgba(20, 20, 19, .5), 0 18px 48px -20px rgba(20, 20, 19, .34);
  --shadow-card: 0 0 0 1px rgba(20, 20, 19, .05), 0 16px 36px -18px rgba(20, 20, 19, .28);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.45, .64, 1);
  --gutter: clamp(16px, 3.2vw, 40px);
  --topbar: 72px;
  --read: 760px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--canvas); }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 16px/1.6 var(--font); font-optical-sizing: auto; font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.ico { width: 18px; height: 18px; flex: none; }

.eyebrow { margin: 0; font: 400 12.5px/1.4 var(--mono); color: var(--muted); letter-spacing: .01em; text-wrap: balance; }
.h2 { margin: 14px 0 0; font-size: clamp(34px, 4.4vw, 60px); font-weight: 560; letter-spacing: -.045em; line-height: 1.02; text-wrap: balance; }

/* ------------------------------------------------------------------ top bar: two floating islands */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--topbar);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 clamp(12px, 2.4vw, 28px); pointer-events: none; transition: background .25s;
}
.topbar > * { pointer-events: auto; }
body.chatting .topbar { background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 var(--line); }
body.chatting .island { padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.island {
  display: flex; align-items: center; gap: 2px; min-width: 0; padding: 5px; border-radius: 16px;
  background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
  box-shadow: 0 0 0 1px rgba(20, 20, 19, .06); transition: box-shadow .25s;
}
body:not(.chatting) .topbar.scrolled .island { box-shadow: 0 0 0 1px rgba(20, 20, 19, .07), 0 10px 30px -16px rgba(20, 20, 19, .28); }
.brand { display: inline-flex; align-items: center; padding: 6px 12px 7px; border-radius: 12px; text-decoration: none; color: var(--ink); }
/* The logo: the name, lowercase and set tight, with a maple-red full stop (see web/brand/README.md). */
.wordmark { font-size: 21px; font-weight: 640; letter-spacing: -.045em; line-height: 1; white-space: nowrap; color: var(--ink); }
.wordmark .dot { color: var(--red); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 8px 12px; border-radius: 11px; font-size: 14px; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--paper); color: var(--ink); }
body.chatting .nav-links { display: none; }
.top-actions { min-width: 0; }
.top-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 11px; border: 0;
  background: transparent; font-size: 14px; font-weight: 500; white-space: nowrap; max-width: 34vw; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.top-btn span { overflow: hidden; text-overflow: ellipsis; }
.top-btn .ico { width: 16px; height: 16px; }
.top-btn:hover { background: var(--paper); color: var(--ink); }
.top-btn.primary { margin-left: 4px; background: var(--ink); color: #fff; }
.top-btn.primary:hover { background: var(--ink-2); }
.top-btn.set { color: var(--ink); }
.top-btn.set .ico { color: var(--red); }
.top-btn .short { display: none; }
.kbd {
  margin-left: 2px; padding: 3px 6px; border-radius: 6px; background: var(--paper); color: var(--muted);
  font: 500 11px/1 var(--mono); box-shadow: inset 0 -1px 0 var(--line-2);
}
@media (hover: none), (max-width: 600px) { .kbd { display: none; } }
/* The line under the composer: the notice, which rolls away for the "Press Esc again" confirmation. */
.composer-foot { position: relative; display: grid; max-width: var(--read); margin: 10px auto 0; overflow: hidden; }
.composer-foot > * { grid-area: 1 / 1; margin: 0; text-align: center; transition: transform .38s var(--ease), opacity .24s var(--ease); }
.composer-foot .notice.small { margin: 0; }
.leave-hint { display: block; opacity: 0; transform: translateY(110%); color: var(--ink); font: 500 12.5px/1.5 var(--font); }
.leave-hint kbd { margin: 0 2px; padding: 1px 6px; border-radius: 5px; background: var(--paper-2); font: 500 11px/1.4 var(--mono); box-shadow: inset 0 -1px 0 var(--line-2); }
.leave-hint::after { content: ""; display: block; width: 96px; height: 2px; margin: 5px auto 0; border-radius: 2px; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.composer.leaving .composer-foot .notice { opacity: 0; transform: translateY(-110%); }
.composer.leaving .leave-hint { opacity: 1; transform: none; }
.composer.leaving .leave-hint::after { animation: drain 2.2s linear both; }
.composer.leaving .composer-box { box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 6px rgba(20, 20, 19, .07), 0 16px 40px -18px rgba(20, 20, 19, .3); }
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ------------------------------------------------------------------ page sheet (sits over the footer) */
.sheet { position: relative; z-index: 1; display: flow-root; background: var(--bg); border-radius: 0 0 var(--r-xl) var(--r-xl); }
main { width: 100%; }

/* ------------------------------------------------------------------ hero */
/* An inset, rounded photo card. The first photo is in the HTML (and preloaded); the rest arrive one at a time. */
.hero {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 32px;
  /* Starts below the floating header, with its side edges lined up with the header's pills. */
  margin: calc(var(--topbar) + 6px) clamp(12px, 2.4vw, 28px) 0;
  min-height: calc(100svh - var(--topbar) - 16px); display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 88px 20px 104px; text-align: center; background: #5a3b65; color: #fff;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; width: 100%; }
.hero-photo { position: absolute; inset: 0; z-index: -1; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero-img.is-on { opacity: 1; }
.hero-img:not([src]) { visibility: hidden; }
.hero-grain, .photo-grain { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1.5 0 0 0 -.78'/%3E%3C/filter%3E%3Cfilter id='b' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.5 0 0 -.78'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23a%29'/%3E%3Crect width='100%25' height='100%25' filter='url%28%23b%29'/%3E%3C/svg%3E") 0 0 / 180px 180px; opacity: .5; pointer-events: none; }
/* A soft wash behind the words and along the top and bottom edges, so white text reads on any photo. */
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(78% 58% at 50% 47%, rgba(10, 12, 16, .5), rgba(10, 12, 16, .16) 72%),
    linear-gradient(180deg, rgba(10, 12, 16, .36), rgba(10, 12, 16, 0) 24%, rgba(10, 12, 16, 0) 64%, rgba(10, 12, 16, .5));
}
.hero .eyebrow { color: rgba(255, 255, 255, .88); }
.hero .headline { color: #fff; text-shadow: 0 2px 34px rgba(10, 12, 16, .3); }
.hero .tagline { color: rgba(255, 255, 255, .95); }
.hero .notice { color: rgba(255, 255, 255, .8); }
.hero .chip { background: rgba(255, 255, 255, .93); color: var(--ink); box-shadow: none; }
.hero .chip:hover { background: #fff; }
.hero-credit, .photo-credit {
  position: absolute; right: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(10, 12, 16, .44); color: rgba(255, 255, 255, .92);
  font: 500 12.5px/1.3 var(--font); white-space: nowrap;
}
.hero-credit a, .photo-credit a { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: #fff; text-decoration: none; }
.hero-credit a span, .photo-credit a span { overflow: hidden; text-overflow: ellipsis; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hero-credit a:hover span, .photo-credit a:hover span { text-decoration-thickness: 2px; }
.hero-credit .ico, .photo-credit .ico { flex: none; width: 13px; height: 13px; }

/* A wide photo between sections: same inset, radius, grain and credit as the hero. */
.photo-band {
  position: relative; isolation: isolate; overflow: hidden;
  /* About 30% less space than between sections: the negative top margin trims the gap the section above leaves. */
  margin: calc(clamp(140px, 16vw, 240px) * -.3) clamp(12px, 2.4vw, 28px) calc(clamp(140px, 16vw, 240px) * .7);
  height: clamp(300px, 54vh, 600px); border-radius: 32px;
}
.photo-band-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.photo-band-img.is-on { opacity: 1; }
.photo-band-img:not([src]) { visibility: hidden; }
.photo-band figcaption { display: contents; }
.headline {
  margin: 22px 0 24px; font-size: clamp(60px, 10.5vw, 148px); font-weight: 560; letter-spacing: -.055em; line-height: .92;
}
.headline .dot, .empty h1 .dot { color: var(--red); }
.tagline { margin: 0 auto 46px; max-width: 72ch; font-size: clamp(18px, 1.7vw, 22px); color: var(--ink-2); text-wrap: balance; }

.askbox {
  display: flex; align-items: flex-end; gap: 8px; width: min(720px, 100%); margin: 0 auto; text-align: left;
  background: var(--bg); border: 0; border-radius: 34px; padding: 11px 11px 11px 28px;
  box-shadow: var(--shadow-ask); transition: box-shadow .2s;
}
.askbox:focus-within { box-shadow: var(--shadow-ask-focus); }
.askbox textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent;
  font-size: 18px; line-height: 1.5; padding: 10px 0; min-height: 46px; max-height: 200px;
  overflow-y: hidden; scrollbar-width: thin;
}
.askbox textarea::placeholder { color: var(--faint); }
.send, .stop {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 0;
  transition: background .15s, transform .15s var(--spring), opacity .15s;
}
.send { background: var(--ink); color: #fff; }
.send:hover { background: var(--ink-2); }
.send:active { transform: scale(.92); }
.send:disabled { opacity: .3; cursor: default; }
.stop { background: var(--ink); color: #fff; }
.stop:hover { background: var(--ink-2); }
/* One slot, two faces: the arrow spins out and the square spins in while an answer streams. */
.send-slot { position: relative; flex: none; width: 46px; height: 46px; }
.send-slot .send, .send-slot .stop { position: absolute; inset: 0; transition: transform .32s var(--spring), opacity .16s ease, background .15s; }
.send-slot .stop { opacity: 0; transform: scale(.55) rotate(-90deg); pointer-events: none; }
.composer.busy .send-slot .stop { opacity: 1; transform: none; pointer-events: auto; }
.composer.busy .send-slot .send { opacity: 0; transform: scale(.55) rotate(90deg); pointer-events: none; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px auto 0; max-width: 760px; }
.chip {
  border: 0; background: rgba(255, 255, 255, .72); color: var(--ink-2); border-radius: 999px; box-shadow: 0 0 0 1px rgba(20, 20, 19, .07);
  padding: 9px 17px; font-size: 14.5px; transition: background .15s, color .15s, transform .25s var(--ease);
}
.chip:hover { background: var(--bg); color: var(--ink); transform: translateY(-1px); }
.chip:active, .pill-btn:active, .top-btn:active, .btn:active, button.meta-chip:active { transform: scale(.96); }
.situation:active, .svc-link:active { transform: scale(.985); }
.notice { margin: 34px 0 0; font: 12px/1.5 var(--mono); color: var(--muted); }
.notice.small { margin-top: 10px; font-size: 11.5px; text-align: center; }

/* hero entrance */
.js .hero-inner > .eyebrow { animation: rise .6s var(--ease) .04s backwards; }
.js .hero-inner > .headline { animation: blur-in .8s var(--ease) .08s backwards; }
.js .hero-inner > .tagline { animation: rise .6s var(--ease) .22s backwards; }
.js .hero-inner > .askbox { animation: rise-pop .65s var(--ease) .3s backwards; }
.js .hero-inner > .chips { animation: rise .6s var(--ease) .4s backwards; }
.js .hero-inner > .notice { animation: rise .6s var(--ease) .48s backwards; }
.js .hero-credit { animation: rise .6s var(--ease) .6s backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes blur-in { from { opacity: 0; filter: blur(12px); transform: translateY(8px) scale(.985); } }
/* As you scroll away, the hero content eases back (scroll-linked, no JS; skipped where unsupported). */
@supports (animation-timeline: scroll()) {
  .hero-inner { animation: hero-out linear both; animation-timeline: scroll(root); animation-range: 0 85vh; }
  @keyframes hero-out { to { opacity: .35; transform: translateY(-7vh) scale(.965); } }
}

/* ------------------------------------------------------------------ sources strip */
.trust { width: min(1200px, calc(100% - 2 * var(--gutter))); margin: clamp(64px, 8vw, 104px) auto clamp(130px, 15vw, 210px); text-align: center; }
.marquee {
  margin-top: 26px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee var(--dur, 70s) linear infinite; }
.marquee:hover .marquee-track, .marquee.is-idle .marquee-track { animation-play-state: paused; }   /* idle: off screen */
.mq-group { display: flex; }
.mq-item {
  display: inline-flex; align-items: center; gap: 30px; padding-right: 30px; white-space: nowrap;
  font-size: clamp(20px, 2vw, 26px); font-weight: 560; letter-spacing: -.025em; color: #b3b2ac;
}
.mq-leaf { width: 18px; height: 18px; color: var(--line-2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ sections */
.section { width: min(1200px, calc(100% - 2 * var(--gutter))); margin: 0 auto clamp(140px, 16vw, 240px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 28px 64px; margin-bottom: 48px; }
.section-head .h2 { max-width: 16ch; }
.section-sub { margin: 0; max-width: 390px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 520; white-space: nowrap;
  transition: background .15s, transform .15s;
}
.pill-btn .ico { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.pill-btn:hover { background: var(--paper-2); }
.pill-btn:hover .ico { transform: translateX(3px); }
.pill-btn.dark { background: var(--ink); color: #fff; height: 54px; padding: 0 26px; font-size: 16px; }
.pill-btn.dark:hover { background: var(--ink-2); }
.textlink {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 0;
  color: var(--ink); font-weight: 560; font-size: 16px; text-decoration: none;
}
.textlink .ico { width: 17px; height: 17px; transition: transform .25s var(--ease); }
.textlink:hover .ico { transform: translateX(4px); }

/* scroll reveal */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .75s var(--ease), transform .75s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* milestones */
.situation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.situation {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: 236px;
  padding: 28px; border: 0; border-radius: var(--r-lg); background: var(--paper); color: var(--ink); text-align: left;
  transition: background .25s, transform .35s var(--ease);
}
.s-ico { width: 32px; height: 32px; color: var(--ink); }
.s-go {
  position: absolute; top: 22px; right: 22px; width: 42px; height: 42px; border-radius: 50%; background: var(--bg);
  display: grid; place-items: center; transition: background .25s, color .25s, transform .35s var(--ease);
}
.s-go .ico { width: 17px; height: 17px; }
.s-text strong { display: block; margin-bottom: 6px; font-size: 22px; font-weight: 580; letter-spacing: -.022em; line-height: 1.2; }
.s-desc { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; }
.situation:hover { background: var(--paper-2); transform: translateY(-3px); }
.situation:hover .s-go { background: var(--ink); color: #fff; transform: rotate(-45deg); }
.js .situations:not(.in) .situation { opacity: 0; }
.situations.in .situation { animation: rise .8s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }

/* statement with inline icons */
.statement-block { width: min(1120px, calc(100% - 2 * var(--gutter))); margin: 0 auto clamp(140px, 16vw, 240px); text-align: center; }
.statement {
  margin: 0; font-size: clamp(32px, 4.8vw, 68px); font-weight: 540; letter-spacing: -.045em; line-height: 1.12; text-wrap: balance;
}
.inl {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; height: .95em;
  position: relative; top: -.06em; margin: 0 .07em;
}
.inl-dots { gap: .13em; padding: 0 .24em; border-radius: 999px; background: var(--bg); box-shadow: 0 0 0 1px var(--line), 0 10px 22px -12px rgba(20, 20, 19, .35); }
.inl-dots i { width: .2em; height: .2em; border-radius: 50%; }
.inl-dots .fed { background: var(--fed); } .inl-dots .prov { background: var(--prov); } .inl-dots .muni { background: var(--muni); }
.inl-cite {
  font-size: .36em; height: 2.2em; min-width: 2.2em; padding: 0 .55em; top: -.14em; border-radius: .6em;
  background: var(--link-bg); color: var(--link); font-weight: 700; letter-spacing: 0;
}
.inl-go { width: .95em; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: 0 10px 20px -10px rgba(20, 20, 19, .45); }
.inl-go .ico { width: 45%; height: 45%; }
.inl-mark { width: .95em; }
.inl-mark svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 14px rgba(20, 20, 19, .22)); }
.js .statement .inl { opacity: 0; transform: scale(.3); transition: transform .8s var(--spring), opacity .35s; }
.statement.in .inl { opacity: 1; transform: none; }
.statement.in .inl:nth-of-type(2) { transition-delay: .15s; }
.statement.in .inl:nth-of-type(3) { transition-delay: .3s; }
.statement.in .inl:nth-of-type(4) { transition-delay: .45s; }

/* how it works: four cards with small animated sketches */
.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.media {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.08; overflow: hidden;
  border-radius: var(--r-lg); background: var(--paper);
}
.step-card h3 { margin: 24px 0 8px; font-size: 21px; font-weight: 580; letter-spacing: -.02em; }
.step-card p { margin: 0; max-width: 32ch; color: var(--muted); font-size: 15px; line-height: 1.55; }
.sk-card { width: 84%; border-radius: 18px; background: var(--bg); box-shadow: var(--shadow-card); text-align: left; }
.media:not(.live) *, .f-media:not(.live) * { animation-play-state: paused !important; }

.sk-lang { position: absolute; top: 18px; left: 18px; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg); box-shadow: 0 0 0 1px rgba(20, 20, 19, .06); font: 500 11px/1 var(--mono); }
.sk-lang span { padding: 5px 8px; border-radius: 7px; color: var(--muted); }
.sk-lang .on { background: var(--ink); color: #fff; }
.sk-ask { display: flex; align-items: flex-end; gap: 10px; min-height: 62px; padding: 10px 10px 10px 16px; }
.sk-typing { flex: 1; min-width: 0; align-self: center; font-size: 14px; line-height: 1.4; min-height: 1.4em; }
.sk-typing::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.2em; background: var(--ink); animation: blink 1s steps(2) infinite; }
.sk-send { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; transition: transform .3s var(--spring); }
.sk-send .ico { width: 16px; height: 16px; }
.media.sent .sk-send { transform: scale(.86); box-shadow: 0 0 0 6px rgba(20, 20, 19, .1); }

.sk-answer { padding: 16px; font-size: 13px; line-height: 1.55; color: var(--ink); }
.sk-answer p { margin: 0 0 12px; animation: sk-fade 7s var(--ease) infinite; }
.sk-answer .cite { animation: sk-pop 7s var(--spring) infinite; }
.sk-src { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.35; animation: sk-rise 7s var(--ease) infinite; }
.sk-src small { display: block; margin-top: 2px; color: var(--muted); font: 10.5px/1.3 var(--mono); }
@keyframes sk-fade { 0%, 4% { opacity: 0; transform: translateY(6px); } 14%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes sk-pop { 0%, 18% { transform: scale(0); } 26%, 90% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes sk-rise { 0%, 30% { opacity: 0; transform: translateY(10px); } 40%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.sk-steps { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.sk-steps li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; font-size: 12.5px; line-height: 1.3; animation: sk-row 7s var(--ease) infinite; }
.sk-steps li:nth-child(2) { animation-delay: .35s; }
.sk-steps li:nth-child(3) { animation-delay: .7s; }
.sk-steps li:first-child { background: var(--paper); }
.sk-steps b { display: block; font-weight: 580; }
.sk-steps small { display: block; margin-top: 1px; color: var(--muted); font: 10.5px/1.3 var(--mono); }
.sk-steps .svc-num { width: 24px; height: 24px; font-size: 11px; }
@keyframes sk-row { 0% { opacity: 0; transform: translateX(-14px); } 10%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }

.sk-browser { overflow: hidden; }
.sk-bar { display: flex; align-items: center; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sk-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.sk-url { flex: 1; display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 6px 10px; border-radius: 8px; background: var(--paper); font: 11px/1 var(--mono); color: var(--ink-2); }
.sk-url .ico { width: 11px; height: 11px; }
.sk-page { display: flex; flex-direction: column; gap: 8px; padding: 18px 16px; }
.sk-line { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--paper-2) 0 40%, #f8f7f4 50%, var(--paper-2) 60% 100%) 0 0 / 250% 100%; animation: shimmer 2.4s linear infinite; }
.sk-line.hd { width: 52%; height: 12px; margin-bottom: 4px; }
.sk-line.w90 { width: 90%; } .sk-line.w75 { width: 75%; } .sk-line.w60 { width: 60%; }
.sk-cta { align-self: flex-start; margin-top: 10px; padding: 9px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 580; animation: sk-press 7s ease infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes sk-press {
  0%, 52% { transform: none; box-shadow: 0 0 0 0 rgba(20, 20, 19, .18); }
  56% { transform: scale(.93); }
  62% { transform: none; box-shadow: 0 0 0 7px rgba(20, 20, 19, .12); }
  76%, 100% { box-shadow: 0 0 0 14px rgba(20, 20, 19, 0); }
}

/* feature rows */
.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(48px, 8vw, 128px); align-items: center; }
.feature.flip .f-media { order: 2; }
.f-media { position: relative; display: grid; place-items: center; aspect-ratio: 1.08; overflow: hidden; border-radius: var(--r-xl); background: var(--paper); }
.f-text { max-width: 480px; }
.f-text p:not(.eyebrow) { margin: 22px 0 30px; max-width: 42ch; color: var(--muted); font-size: 18px; line-height: 1.6; }

.layers { width: 82%; display: flex; flex-direction: column; gap: 10px; }
.lay-q {
  align-self: flex-end; max-width: 88%; margin-bottom: 12px; padding: 12px 18px; border-radius: 22px 22px 6px 22px;
  background: var(--paper-2); font-size: 15px; line-height: 1.45;
}
.f-media .lay-q { background: var(--bg); box-shadow: 0 0 0 1px rgba(20, 20, 19, .05); }
.layer { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-md); background: var(--bg); box-shadow: var(--shadow-card); }
.layer .lvl-dot { width: 10px; height: 10px; }
.lay-body { flex: 1; min-width: 0; }
.lay-body b { display: block; font-weight: 580; font-size: 15px; letter-spacing: -.01em; line-height: 1.3; }
.lay-body small { display: block; margin-top: 2px; color: var(--muted); font: 11px/1.3 var(--mono); }
.lay-level { flex: none; padding: 5px 10px; border-radius: 999px; background: var(--paper); font: 11px/1 var(--mono); color: var(--ink-2); }
.js .feature .lay-q, .js .feature .layer { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.feature.in .lay-q, .feature.in .layer { opacity: 1; transform: none; }
.feature.in .layer:nth-child(2) { transition-delay: .2s; }
.feature.in .layer:nth-child(3) { transition-delay: .35s; }
.feature.in .layer:nth-child(4) { transition-delay: .5s; }

.doc { width: 84%; padding: 26px; border-radius: 24px; background: var(--bg); box-shadow: var(--shadow-card); text-align: left; }
.doc-q { margin: 0 0 12px; font-size: 19px; font-weight: 580; letter-spacing: -.02em; line-height: 1.3; }
.doc p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.doc-srcs { display: grid; gap: 8px; margin-top: 20px; }
.doc-src { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 14px; background: var(--paper); font-size: 13.5px; line-height: 1.3; box-shadow: inset 0 0 0 1.5px transparent; }
.doc-src small { display: block; margin-top: 2px; color: var(--muted); font: 10.5px/1.3 var(--mono); }
.doc .cite { transition: none; }
.doc .cite.c1 { animation: cite-a 6s var(--ease) infinite; }
.doc .cite.c2 { animation: cite-b 6s var(--ease) infinite; }
.doc-src.s1 { animation: src-a 6s var(--ease) infinite; }
.doc-src.s2 { animation: src-b 6s var(--ease) infinite; }
@keyframes cite-a { 0%, 44% { background: var(--bg); box-shadow: 0 0 0 2px var(--link); } 50%, 100% { background: var(--link-bg); box-shadow: 0 0 0 2px transparent; } }
@keyframes cite-b { 0%, 48% { background: var(--link-bg); box-shadow: 0 0 0 2px transparent; } 54%, 94% { background: var(--bg); box-shadow: 0 0 0 2px var(--link); } 100% { background: var(--link-bg); box-shadow: 0 0 0 2px transparent; } }
@keyframes src-a { 0%, 44% { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink); } 50%, 100% { background: var(--paper); box-shadow: inset 0 0 0 1.5px transparent; } }
@keyframes src-b { 0%, 48% { background: var(--paper); box-shadow: inset 0 0 0 1.5px transparent; } 54%, 94% { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink); } 100% { background: var(--paper); box-shadow: inset 0 0 0 1.5px transparent; } }

.pv { width: 84%; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.pv-in, .pv-out { max-width: 100%; padding: 16px 18px; line-height: 1.5; text-align: left; }
.pv-in { border-radius: 22px 22px 22px 6px; background: var(--bg); box-shadow: var(--shadow-card); font-size: clamp(15px, 1.4vw, 18px); letter-spacing: -.01em; }
.pv-out { border-radius: 6px 22px 22px 22px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); font: clamp(13px, 1.2vw, 15px)/1.55 var(--mono); color: var(--ink-2); animation: pv-out 6s var(--ease) infinite; }
.pv-step { display: inline-flex; align-items: center; gap: 8px; padding-left: 16px; color: var(--muted); font: 12px/1.3 var(--mono); animation: pv-step 6s var(--ease) infinite; }
.pv-step .ico { width: 14px; height: 14px; }
.sin-raw { border-radius: 5px; padding: 0 2px; animation: pv-scan 6s var(--ease) infinite; }
.redact { display: inline-block; padding: 1px 7px; border-radius: 7px; background: var(--ink); color: #fff; font-weight: 500; animation: pv-token 6s var(--spring) infinite; }
.pv-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pv-tag { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--bg); box-shadow: 0 0 0 1px rgba(20, 20, 19, .07); font: 12px/1.2 var(--mono); color: var(--ink-2); }
.pv-tag .ico { width: 14px; height: 14px; }
.pv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 46ch; }
.pv-list li { position: relative; padding-left: 28px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.pv-list li::before {
  content: ""; position: absolute; left: 3px; top: .38em; width: 11px; height: 6px;
  border-left: 1.8px solid var(--ink); border-bottom: 1.8px solid var(--ink); transform: rotate(-45deg);
}
@keyframes pv-scan { 0%, 6% { background: transparent; } 12%, 28% { background: #fde9e6; box-shadow: inset 0 -2px 0 var(--red); } 36%, 100% { background: transparent; box-shadow: none; } }
@keyframes pv-step { 0%, 20% { opacity: .25; } 28%, 94% { opacity: 1; } 100% { opacity: .25; } }
@keyframes pv-out { 0%, 24% { opacity: 0; transform: translateY(10px); } 32%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes pv-token { 0%, 32% { transform: scale(.4); } 42%, 100% { transform: none; } }

/* stats band */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 28px; border-top: 1px solid var(--line-2); }
.stat { display: flex; flex-direction: column; gap: 10px; padding: 30px 20px 0 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat .num { font-size: clamp(40px, 5vw, 68px); font-weight: 520; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font: 12.5px/1.4 var(--mono); }
.coverage { margin: 34px 0 0; max-width: 62ch; color: var(--muted); font-size: 15px; }

/* closing call to action */
.cta { margin-bottom: clamp(88px, 10vw, 136px); padding: clamp(72px, 10vw, 140px) 24px; border-radius: var(--r-xl); background: var(--paper); text-align: center; }
.cta-mark { margin: 0; line-height: 1; }
.cta-mark .wordmark { font-size: clamp(26px, 3.4vw, 40px); }
.cta .h2 { margin: 20px auto 16px; max-width: 18ch; }
.cta p:not(.eyebrow, .cta-mark, .photo-credit) { margin: 0 auto 36px; max-width: 46ch; color: var(--muted); font-size: 18px; }
/* The closing card sits on a photo. */
.cta { position: relative; isolation: isolate; overflow: hidden; color: #fff; }
.cta-photo { position: absolute; inset: 0; z-index: -1; }
.cta-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cta-scrim { position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 50%, rgba(10, 12, 16, .5), rgba(10, 12, 16, .22)); }
.cta .wordmark { color: #fff; }
.cta p:not(.eyebrow, .cta-mark, .photo-credit) { color: rgba(255, 255, 255, .9); }
.pill-btn.light { background: #fff; color: var(--ink); height: 54px; padding: 0 26px; font-size: 16px; }
.pill-btn.light:hover { background: var(--paper); }


/* ------------------------------------------------------------------ footer (home only) */
.footer { padding: clamp(80px, 9vw, 120px) clamp(20px, 3.4vw, 48px) 40px; color: var(--ink-2); }
.footer > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.footer-top {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 28px 40px;
  padding-bottom: clamp(48px, 6vw, 72px); border-bottom: 1px solid var(--line-2);
}
.f-brand .brand { padding: 0; }
.f-brand .wordmark { font-size: 34px; }
.f-tagline { margin: 18px 0 0; font-size: clamp(24px, 2.6vw, 34px); font-weight: 540; letter-spacing: -.035em; line-height: 1.15; color: var(--ink); max-width: 22ch; text-wrap: balance; }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 6fr); gap: 40px;
  padding: clamp(44px, 5vw, 64px) 0;
}
.f-label { margin: 0 0 18px; font: 400 12.5px/1.4 var(--mono); color: var(--muted); }
.f-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.f-link {
  border: 0; padding: 0 0 2px; color: var(--ink); font-size: 16px; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease);
}
.f-link:hover { background-size: 100% 1px; }
.f-link[aria-current="true"] { font-weight: 620; }
.f-link[aria-current="true"]::after { content: " ·"; color: var(--red); }
.f-small { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.f-data .f-small { margin-top: 0; max-width: 62ch; }
.f-data .f-small + .f-small { margin-top: 14px; font-family: var(--mono); font-size: 12.5px; }
.footer-base { display: flex; flex-direction: column; gap: 18px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.f-disclaimer { margin: 0; max-width: 90ch; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.f-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font: 12.5px/1.5 var(--mono); }

/* ------------------------------------------------------------------ chat (full screen, no footer) */
body.chatting { background: var(--bg); }
body.chatting .footer { display: none; }
body.chatting .sheet { border-radius: 0; min-height: 100dvh; }
body.chatting main { padding: 0 clamp(16px, 3vw, 32px); }
.thread {
  max-width: var(--read); margin: 0 auto; min-height: 100dvh;
  padding: calc(var(--topbar) + 40px) 0 calc(190px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 64px;
}
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6vh 0; animation: rise .6s var(--ease) backwards; }
.empty h1 { margin: 0 0 14px; font-size: clamp(48px, 7vw, 84px); font-weight: 560; letter-spacing: -.055em; line-height: .95; }
.empty p { margin: 0 0 30px; color: var(--muted); font-size: 18px; }
.empty .chips { margin-top: 0; }
.empty .chip { background: var(--bg); }
.empty-privacy { display: inline-flex; align-items: center; gap: 8px; margin: 28px 0 0 !important; max-width: 52ch; color: var(--muted); font-size: 13.5px !important; text-align: left; }
.empty-privacy .ico { width: 15px; height: 15px; flex: none; }
.turn { display: flex; flex-direction: column; gap: 22px; scroll-margin-top: calc(var(--topbar) + 24px); }
@keyframes bubble-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.user-msg {
  align-self: flex-end; max-width: min(85%, 560px); padding: 13px 20px; border-radius: 24px 24px 6px 24px;
  background: var(--paper-2); color: var(--ink); font-size: 16.5px; white-space: pre-wrap; overflow-wrap: anywhere;
  animation: bubble-in .45s var(--spring) backwards;
}
.bot { display: flex; flex-direction: column; gap: 20px; min-width: 0; animation: rise .6s var(--ease) .1s backwards; }
.user-msg.flown { animation: none; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.meta-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none;
  color: var(--ink-2); font: 500 13.5px/1.3 var(--font); white-space: nowrap; animation: rise .35s var(--ease) backwards;
}
.meta-chip:nth-child(2) { animation-delay: 40ms; } .meta-chip:nth-child(3) { animation-delay: 80ms; } .meta-chip:nth-child(4) { animation-delay: 120ms; }
.meta-chip .ico { width: 14px; height: 14px; }
.meta-chip .src { color: var(--muted); font-weight: 400; }
button.meta-chip { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button.meta-chip:hover { color: var(--ink); }
button.meta-chip .ico { color: var(--red); }
.lvl-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.lvl-dot.federal { background: var(--fed); } .lvl-dot.provincial, .lvl-dot.territorial { background: var(--prov); } .lvl-dot.municipal { background: var(--muni); }

.status { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 15px; }
.steps { display: inline-flex; gap: 4px; }
.steps i { width: 20px; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .3s; }
.steps i.done { background: var(--ink); }
.steps i.now { background: var(--ink); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.answer { font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }
.answer.caret {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2.6em), rgba(0, 0, 0, .35));
  mask-image: linear-gradient(to bottom, #000 calc(100% - 2.6em), rgba(0, 0, 0, .35));
}
.next-head, .svc-list li, .sources h3, .sources li, .followups h3, .followups .chip, .tool-slot > *, .loc-prompt {
  animation: rise .5s var(--ease) backwards;
}
.svc-list li:nth-child(2), .sources li:nth-child(2), .followups .chip:nth-of-type(2) { animation-delay: 60ms; }
.svc-list li:nth-child(3), .sources li:nth-child(3), .followups .chip:nth-of-type(3) { animation-delay: 120ms; }
.svc-list li:nth-child(4), .sources li:nth-child(4), .followups .chip:nth-of-type(4) { animation-delay: 180ms; }
.svc-list li:nth-child(n+5), .sources li:nth-child(n+5), .followups .chip:nth-of-type(n+5) { animation-delay: 240ms; }
.answer > :first-child { margin-top: 0; }
.answer > :last-child { margin-bottom: 0; }
.answer p { margin: 0 0 .9em; }
.answer ul, .answer ol { margin: 0 0 1em; padding-left: 1.35em; }
.answer li { margin: .4em 0; padding-left: .2em; }
.answer ul { list-style: square; }
.answer li::marker { color: var(--ink-2); }
.answer strong { font-weight: 640; }
.answer h3, .answer h4 { margin: 1.6em 0 .5em; font-size: 18.5px; font-weight: 650; letter-spacing: -.018em; line-height: 1.35; }
/* every answer opens with a title, like a service page */
.answer > h3:first-child { margin-bottom: .5em; font-size: clamp(23px, 2.1vw, 27px); letter-spacing: -.03em; line-height: 1.2; text-wrap: balance; }
.answer a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.answer a:not(.cite)::after, .src-body a::after {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-left: .22em; vertical-align: -.02em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8.5 7H17v8.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8.5 7H17v8.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.answer code { padding: 1px 6px; border-radius: 6px; background: var(--paper); font-size: .92em; }
.cite {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin: 0 1px;
  border-radius: 6px; background: var(--link-bg); color: var(--link) !important; font-size: 11.5px; font-weight: 700;
  line-height: 1; text-decoration: none !important; vertical-align: 2px; transition: background .15s, color .15s;
}
.answer .cite {
  display: inline; min-width: 0; height: auto; margin: 0; padding: 0 .08em; border-radius: 3px; background: none;
  font-size: .7em; font-weight: 650; line-height: 0; vertical-align: super; font-variant-numeric: tabular-nums;
}
.answer .cite + .cite::before { content: ","; color: var(--muted); }
.answer .cite:hover { background: var(--link-bg); color: var(--link) !important; }
.nowrap { white-space: nowrap; }
.caret::after { content: ""; display: inline-block; width: 7px; height: 1.05em; margin-left: 3px; vertical-align: -3px; border-radius: 2px; background: var(--ink); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.alert, .error { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: 15.5px; }
.alert { background: #fdf2f1; color: #7d1a12; border: 1px solid #f4cfcb; font-weight: 500; }
.alert a { color: inherit; font-weight: 700; }
.error { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }

/* next steps */
.next { position: relative; margin-top: 10px; overflow-x: clip; overflow-clip-margin: 0; }
.next-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.next-head h3 { position: relative; margin: 0; font-size: 20px; font-weight: 620; letter-spacing: -.02em; }
.next-head p { margin: 0; color: var(--muted); font-size: 14px; }
.svc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.svc-link {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 16px 16px 16px 18px;
  border-radius: var(--r-md); background: var(--paper); color: var(--ink); text-decoration: none;
  transition: background .2s, transform .25s var(--ease);
}
.svc-link:hover { background: var(--paper-2); transform: translateY(-1px); }
.svc-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--ink); font-size: 13px; font-weight: 700; flex: none; }
.svc-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.svc-name { font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.svc-meta { overflow: hidden; color: var(--muted); font-size: 13.5px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.go {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s;
}
.go .ico { width: 15px; height: 15px; }
.svc-link:hover .go { background: var(--ink-2); }

/* a small leaf moment when next steps arrive (skipped for sensitive topics and reduced motion) */
.leaf-burst { position: absolute; left: calc(100% + 16px); top: -30px; width: 170px; height: 0; pointer-events: none; z-index: 2; }
.falling-leaf {
  position: absolute; top: 0; left: var(--x); width: var(--s); height: var(--s); color: var(--c); opacity: 0;
  animation: leaf-fall var(--d) cubic-bezier(.3, .6, .4, 1) var(--delay) forwards;
}
@keyframes leaf-fall {
  0% { opacity: 0; transform: translate(0, -12px) rotate(var(--r0)); }
  8% { opacity: .95; }
  100% { opacity: 0; transform: translate(var(--dx), 34px) rotate(var(--r1)); }
}

/* live data cards */
.block-label { margin: 0 0 12px; color: var(--muted); font: 12.5px/1.4 var(--mono); }
.reps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rep { padding: 16px; border-radius: var(--r-md); background: var(--paper); font-size: 14px; }
.rep-top { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--bg); font-weight: 650; font-size: 13px; }
.r-office { display: block; color: var(--muted); font: 11.5px/1.3 var(--mono); }
.r-name { font-weight: 620; }
.r-name a { text-decoration: none; }
.r-name a:hover { text-decoration: underline; }
.r-district { color: var(--muted); font-size: 13px; }
.r-links { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.r-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--link); text-decoration: none; font-size: 13px; overflow-wrap: anywhere; }
.r-links a:hover { text-decoration: underline; }
.r-links .ico { width: 14px; height: 14px; }
.tool-note { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
.live-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--paper); }
.live-card .ico { width: 22px; height: 22px; }
.live-card strong { display: block; font-weight: 620; }
.live-card span { color: var(--muted); font-size: 13px; }

/* sources */
.sources { padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.sources h3, .followups h3 { margin: 0 0 14px; color: var(--ink); font: 650 16px/1.3 var(--font); letter-spacing: -.012em; }
.sources ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sources li { display: flex; gap: 12px; align-items: flex-start; }
.sources li.flash { animation: flash 1.2s ease; border-radius: 10px; }
@keyframes flash { 0%, 40% { background: var(--link-bg); } 100% { background: transparent; } }
.src-n { flex: none; min-width: 22px; color: var(--muted); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.src-n::after { content: "."; }
.src-body { min-width: 0; display: flex; flex-direction: column; }
.src-body a { color: var(--link); font-weight: 520; line-height: 1.45; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.src-body a:hover { color: var(--link); text-decoration: underline; }
.src-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.provenance { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; color: var(--muted); font-size: 14px; }
.provenance .ico { width: 17px; height: 17px; color: var(--ink); }
.provenance a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.provenance a:hover { color: var(--ink); }
.src-meta .lvl { display: inline-flex; align-items: center; gap: 5px; }
.src-meta > span + span::before { content: "\00B7"; margin-right: 12px; color: var(--faint); }
.sources li.uncited { opacity: .72; }
.more-btn { border: 0; background: none; padding: 0; color: var(--muted); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.more-btn:hover { color: var(--ink); }

/* related questions (the .chip class is kept for automated checks) */
.followups { display: flex; flex-direction: column; }
.followups .chip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 15px 2px;
  border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none;
  color: var(--ink); font-size: 16px; text-align: left; transform: none;
}
.followups .chip:last-of-type { border-bottom: 1px solid var(--line); }
.followups .chip .ico { color: var(--faint); transition: transform .2s var(--ease), color .2s; }
.followups .chip:hover { background: none; color: var(--link); transform: none; }
.followups .chip:hover .ico { color: var(--link); transform: translateX(3px); }

.loc-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border-radius: var(--r-md); background: var(--paper); font-size: 15px; }
.loc-prompt .btn { margin-left: auto; }

/* composer: a bordered pill fixed to the bottom of the chat */
.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 26px clamp(12px, 3vw, 32px) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgba(255, 255, 255, 0));
}
.composer-box { max-width: var(--read); box-shadow: 0 0 0 1.5px var(--ink), 0 16px 40px -18px rgba(20, 20, 19, .3); }
.composer-box:focus-within { box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 6px rgba(29, 91, 216, .12), 0 16px 40px -18px rgba(20, 20, 19, .3); }
.composer-box textarea { font-size: 17px; }

/* ------------------------------------------------------------------ dialog */
dialog {
  border: 0; border-radius: 28px; padding: 0; width: min(460px, calc(100vw - 32px)); color: var(--ink);
  background: var(--bg); box-shadow: 0 30px 80px -20px rgba(20, 20, 19, .35);
}
dialog[open] { animation: dialog-in .35s var(--spring); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
dialog::backdrop { background: rgba(20, 20, 19, .32); backdrop-filter: blur(3px); }
dialog form { padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
dialog h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
dialog .muted { margin: 4px 0 6px; font-size: 15px; line-height: 1.5; }
dialog label { margin-top: 10px; color: var(--muted); font: 12.5px/1.4 var(--mono); }
dialog input, dialog select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid transparent; border-radius: 14px; background: var(--paper); }
dialog input:focus, dialog select:focus { outline: none; border-color: var(--ink); background: var(--bg); }
dialog input { text-transform: uppercase; letter-spacing: .04em; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
.or { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; color: var(--faint); font: 12px/1 var(--mono); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--paper); }
.icon-btn:hover { background: var(--paper-2); }
.btn { height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--ink-2); }
.btn.secondary { background: var(--paper); color: var(--ink); }
.btn.secondary:hover { background: var(--paper-2); }
.btn.quiet { background: transparent; color: var(--muted); }
.btn.quiet:hover { background: var(--paper); color: var(--ink); }

/* ------------------------------------------------------------------ view transition (home box -> composer) */
::view-transition-group(ask) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .9, .25, 1); }
::view-transition-old(ask), ::view-transition-new(ask) { animation-duration: .5s; animation-timing-function: var(--ease); height: 100%; }
::view-transition-new(composer) { animation: composer-in .5s cubic-bezier(.2, .9, .25, 1) .08s both; }
::view-transition-old(root) { animation: vt-fade-out .22s var(--ease) both; }
::view-transition-new(root) { animation: vt-fade-in .32s var(--ease) .06s both; }
@keyframes composer-in { from { opacity: 0; transform: translateY(48px) scale(.98); } }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
dialog[open]::backdrop { animation: vt-fade-in .25s var(--ease); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .f-data { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .nav-links { display: none; }
}
@media (max-width: 860px) {
  .situation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .f-media { order: 0; }
  .f-text { max-width: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { margin-top: 24px; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  :root { --topbar: 64px; }
  .topbar { padding: 0 10px; }
  .island { border-radius: 14px; padding: 4px; }
  .brand { padding: 6px 8px 7px; }
  .wordmark { font-size: 19px; }
  .top-btn { height: 36px; padding: 0 10px; }
  .top-btn .long { display: none; }
  .top-btn .short { display: inline; }
  #location-btn, #new-btn { width: 36px; padding: 0; justify-content: center; }
  .hero { margin: calc(var(--topbar) + 2px) 10px 0; border-radius: 24px; min-height: calc(100svh - var(--topbar) - 12px); padding: 72px 16px 84px; }
  .hero-credit, .photo-credit { right: 50%; translate: 50% 0; bottom: 12px; }
  .photo-band { margin-left: 10px; margin-right: 10px; height: clamp(240px, 46vh, 420px); border-radius: 24px; }
  .cta { padding-bottom: 92px; }
  .headline { margin: 16px 0 18px; }
  .tagline { margin-bottom: 32px; }
  .askbox { border-radius: 28px; padding: 8px 8px 8px 20px; }
  .askbox textarea { font-size: 16px; }
  .send, .stop, .send-slot { width: 42px; height: 42px; }
  .chips { gap: 6px; }
  .chip { padding: 7px 13px; font-size: 13.5px; }
  .section-head { margin-bottom: 32px; }
  .situation-grid, .steps-grid { grid-template-columns: 1fr; }
  .situation { min-height: 0; gap: 36px; padding: 24px; }
  .s-text strong { font-size: 20px; }
  .statement { font-size: clamp(30px, 8.4vw, 40px); }
  .media { aspect-ratio: 1.2; }
  .f-media { aspect-ratio: .95; border-radius: 28px; }
  .layers, .doc, .pv { width: 90%; }
  .doc { padding: 20px; }
  .lay-level { display: none; }
  .stat .num { font-size: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .f-data { grid-column: 1 / -1; }
  .footer-top { align-items: flex-start; }
  .thread { gap: 48px; }
  .svc-link { grid-template-columns: auto 1fr; }
  .go { grid-column: 2; justify-self: start; }
  .svc-meta { white-space: normal; }
  .user-msg { max-width: 92%; }
  dialog form { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .media *, .f-media *, .marquee-track, .sk-typing::after { animation: none !important; }
  .marquee-track { flex-wrap: wrap; justify-content: center; width: auto; }
  .mq-group + .mq-group { display: none; }
  .mq-group { flex-wrap: wrap; justify-content: center; row-gap: 10px; }
  .js [data-reveal], .js .statement .inl, .js .feature .lay-q, .js .feature .layer, .js .situations:not(.in) .situation { opacity: 1; transform: none; }
  .hero-inner { animation: none !important; }
  .hero-img { transition: none; }
  .answer.caret { -webkit-mask-image: none; mask-image: none; }
  .leaf-burst { display: none; }
}


/* ------------------------------------------------------------------ connect your AI (bring your own key) */
.ai-chip { gap: 8px; }
.ai-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--muni); flex: none;
  box-shadow: 0 0 0 3px rgba(31, 154, 90, .16); animation: ai-pulse 2.4s ease-in-out infinite;
}
@keyframes ai-pulse { 50% { box-shadow: 0 0 0 6px rgba(31, 154, 90, 0); } }

.key-sheet { width: min(480px, calc(100vw - 32px)); overflow: hidden; }
.key-sheet form { padding: 26px 28px 24px; gap: 0; }
.key-sheet[open] { animation: sheet-in .6s cubic-bezier(.16, 1, .3, 1); }
.key-sheet[open]::backdrop { animation: backdrop-in .45s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(34px) scale(.955); } }
/* Opacity only: animating the blur itself re-renders the whole page every frame. */
@keyframes backdrop-in { from { opacity: 0; } }
.key-sheet.closing { animation: sheet-out .32s cubic-bezier(.4, 0, .6, 1) forwards; }
.key-sheet.closing::backdrop { animation: vt-fade-out .32s cubic-bezier(.4, 0, .6, 1) forwards; }
@keyframes sheet-out { to { opacity: 0; transform: translateY(18px) scale(.975); } }
.key-sheet > form > * { animation: key-rise .55s cubic-bezier(.16, 1, .3, 1) both; }
.key-sheet > form > :nth-child(2) { animation-delay: .05s; }
.key-sheet > form > :nth-child(3) { animation-delay: .09s; }
.key-sheet > form > :nth-child(4) { animation-delay: .13s; }
.key-sheet > form > :nth-child(5) { animation-delay: .17s; }
.key-sheet > form > :nth-child(n + 6) { animation-delay: .21s; }
@keyframes key-rise { from { opacity: 0; transform: translateY(12px); } }
/* The page holds still under the sheet; --sbw (set by the script) keeps its width when the scrollbar goes. */
html.sheet-open { overflow: hidden; }
html.sheet-open body { padding-right: var(--sbw, 0px); }
html.sheet-open .topbar, html.sheet-open .composer { right: var(--sbw, 0px); }
.key-sheet { will-change: transform, opacity; }
.turn .status { animation: key-rise .4s var(--ease) both; }
.ai-chip.pop { animation: chip-pop .5s var(--spring) both; }
@keyframes chip-pop { from { opacity: 0; transform: scale(.8); } }
.error-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--paper); animation: key-rise .45s var(--ease) both;
}
.error-card p { margin: 0; flex: 1; min-width: 200px; font-size: 15.5px; color: var(--ink-2); }

.key-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.key-orb {
  position: relative; width: 52px; height: 52px; border-radius: 16px; background: var(--ink); color: #fff;
  display: grid; place-items: center; transition: background .4s var(--ease), transform .5s var(--spring);
}
.key-orb svg { position: absolute; width: 24px; height: 24px; transition: opacity .3s var(--ease), transform .45s var(--spring); }
.orb-check { opacity: 0; transform: scale(.6); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round;
  stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.key-sheet.checking .key-orb { animation: orb-breathe 1.1s ease-in-out infinite; }
@keyframes orb-breathe { 50% { transform: scale(.94); } }
.key-sheet.success .key-orb { background: var(--muni); transform: scale(1.06); }
.key-sheet.success .orb-key { opacity: 0; transform: rotate(-40deg) scale(.5); }
.key-sheet.success .orb-check { opacity: 1; transform: none; animation: draw-check .5s .1s var(--ease) forwards; }
@keyframes draw-check { to { stroke-dashoffset: 0; } }

.key-sheet h2 { font-size: 28px; letter-spacing: -.035em; }
.key-sheet #key-why { margin: 8px 0 20px; }

.prov-tabs {
  position: relative; display: grid; grid-template-columns: repeat(5, auto); gap: 2px; padding: 4px;
  border-radius: 999px; background: var(--paper); isolation: isolate;
}
.prov-thumb {
  position: absolute; z-index: -1; top: 4px; left: 0; height: calc(100% - 8px); width: 0; border-radius: 999px;
  background: var(--bg); box-shadow: 0 1px 2px rgba(20, 20, 19, .08), 0 4px 12px -4px rgba(20, 20, 19, .18);
  transition: transform .45s var(--spring), width .45s var(--spring), opacity .2s;
}
.prov-tab {
  height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 560; white-space: nowrap; transition: color .2s var(--ease);
}
.prov-tab:hover { color: var(--ink); }
.prov-tab[aria-checked="true"] { color: var(--ink); }
.prov-tab.more { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.prov-tab.more::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .3s var(--ease);
}
.prov-tab.more[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.prov-more { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; animation: key-rise .35s var(--ease) both; }
.prov-more .prov-tab { background: var(--paper); height: 34px; font-size: 13.5px; }
.prov-more .prov-tab[aria-checked="true"] { background: var(--ink); color: #fff; }

.key-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 22px; }
.key-row label { margin: 0; }
.key-get { font-size: 13.5px; color: var(--link); text-decoration: none; white-space: nowrap; }
.key-get:hover { text-decoration: underline; }
.key-get::after { content: " \2197"; }
.key-field { position: relative; margin-top: 8px; }
.key-sheet .key-field input {
  height: 54px; padding: 0 52px 0 16px; border-radius: 16px; font: 15px/1 var(--mono); letter-spacing: 0; text-transform: none;
  transition: border-color .2s, background .2s, box-shadow .25s;
}
.key-sheet .key-field input:focus { box-shadow: 0 0 0 5px rgba(29, 91, 216, .12); }
.key-field.invalid input { border-color: var(--red); background: #fff; }
.key-field.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(5px); } 45%, 55% { transform: translateX(-6px); }
}
.key-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 12px;
  background: transparent; color: var(--muted); display: grid; place-items: center;
}
.key-eye:hover { background: var(--paper-2); color: var(--ink); }
.key-eye .ico { grid-area: 1 / 1; transition: opacity .2s, transform .3s var(--spring); }
.key-eye .eye-closed, .key-eye[aria-pressed="true"] .eye-open { opacity: 0; transform: scale(.6); }
.key-eye[aria-pressed="true"] .eye-closed { opacity: 1; transform: none; }
.key-msg { min-height: 20px; margin: 8px 2px 0; font-size: 13.5px; color: var(--muted); transition: color .2s; }
.key-msg.is-error { color: var(--red); }
.key-msg.is-good { color: var(--muni); }
.key-msg:not(:empty) { animation: key-rise .3s var(--ease) both; }

.key-remember { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; font: 14.5px/1.4 var(--font); color: var(--ink-2); }
.key-remember input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); transition: background .25s var(--ease); flex: none; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(20, 20, 19, .25); transition: transform .35s var(--spring);
}
.key-remember input:checked + .switch { background: var(--ink); }
.key-remember input:checked + .switch::after { transform: translateX(16px); }
.key-remember input:focus-visible + .switch { outline: 3px solid var(--link); outline-offset: 2px; }

.key-privacy { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 12px 14px; border-radius: 14px;
  background: var(--paper); color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.key-privacy .ico { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }

.key-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 20px; }
.key-connect { position: relative; min-width: 132px; overflow: hidden; transition: background .3s var(--ease), min-width .4s var(--spring); }
.key-connect .kc-label { display: inline-block; transition: opacity .2s, transform .3s var(--ease); }
.kc-spin {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; opacity: 0; transition: opacity .2s;
}
.key-sheet.checking .key-connect .kc-label { opacity: 0; transform: translateY(-8px); }
.key-sheet.checking .kc-spin { opacity: 1; animation: spin .7s linear infinite; }
.key-sheet.success .key-connect { background: var(--muni); }
@keyframes spin { to { transform: rotate(360deg); } }

/* The question waits in the thread while the visitor connects. */
.await-key {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-md); background: var(--paper);
  animation: key-rise .45s var(--ease) both;
}
.await-key .ico { width: 22px; height: 22px; color: var(--ink); }
.await-key p { margin: 0; flex: 1; font-size: 15.5px; color: var(--ink-2); }

@media (max-width: 600px) {
  .key-sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 28px 28px 0 0; max-height: 92dvh; overflow-y: auto; }
  .key-sheet[open] { animation: sheet-up .5s cubic-bezier(.2, .9, .25, 1); }
  .key-sheet.closing { animation: sheet-down .3s var(--ease) forwards; }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  @keyframes sheet-down { to { transform: translateY(100%); } }
  .key-sheet form { padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
  .prov-tabs { grid-template-columns: repeat(3, auto) repeat(2, auto); overflow-x: auto; }
  .prov-tab { padding: 0 10px; font-size: 13.5px; }
  .key-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .key-sheet[open], .key-sheet[open]::backdrop, .key-sheet.closing, .key-sheet.closing::backdrop, .key-sheet > form > *,
  .key-field.shake, .ai-dot, .key-sheet.checking .key-orb, .turn .status, .ai-chip.pop, .error-card { animation: none !important; }
  .prov-thumb, .switch::after, .key-orb, .key-orb svg { transition: none; }
  .key-sheet.success .orb-check { stroke-dashoffset: 0; }
}

/* audit: stacked tool cards, quiet focus on a streaming turn, no-JS notice */
.tool-slot { display: grid; gap: 12px; }
.tool-slot:empty { display: none; }
.turn:focus { outline: none; }
.noscript { margin: 12px auto 0; max-width: 60ch; text-align: center; }
