/* Consumer Safe Hub - Legal Support Chat */
:root {
  color-scheme: light;
  --paper: #F3EFE7;
  --card: #FFFFFF;
  --ink: #14202E;
  --ink-2: #44515F;
  --ink-3: #5F6B78;
  --navy: #0E2A47;
  --navy-2: #12385C;
  --teal-deep: #0F4A5A;
  --accent: #0D7A68;
  --accent-2: #0A6353;
  --accent-soft: #E4F3EF;
  --gold: #D4A24C;
  --gold-soft: #F4D9A6;
  --bubble: #F1F3F6;
  --line: #E2E6EB;
  --line-2: #CBD3DC;
  --danger: #B42318;
  --danger-soft: #FDEEEC;
  --online: #2BD47A;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 30px 70px -28px rgba(14, 42, 71, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: #0B1A2C;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
html.dialog-open, html.dialog-open body { overflow: hidden; }

a { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.head :focus-visible { outline-color: var(--gold); }
.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;
}
[hidden] { display: none !important; }
noscript img { position: absolute; left: -9999px; width: 1px; height: 1px; }
.sheet-body:focus { outline: none; }

/* ---------- scene: photo + motion backdrop (desktop/tablet) ---------- */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #0B1A2C; display: none; }
.scene-photo {
  position: absolute; inset: -5%;
  background: #0B1A2C url("img/skyline-900.jpg") center 58% / cover no-repeat;
  background-image: image-set(url("img/skyline-900.webp") type("image/webp"), url("img/skyline-900.jpg") type("image/jpeg"));
  animation: kenburns 42s ease-in-out infinite alternate;
  will-change: transform;
}
.scene-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 18, 32, .55) 0%, rgba(8, 18, 32, .25) 38%, rgba(8, 18, 32, 0) 58%),
    radial-gradient(120% 95% at 50% 42%, rgba(8, 18, 32, 0) 0%, rgba(8, 18, 32, .5) 68%, rgba(6, 14, 26, .9) 100%),
    linear-gradient(180deg, rgba(10, 26, 46, .66) 0%, rgba(10, 26, 46, .34) 46%, rgba(8, 18, 32, .86) 100%);
}
.aurora { position: absolute; border-radius: 50%; mix-blend-mode: screen; will-change: transform; }
.aurora.a1 { width: 64vmax; height: 64vmax; left: -22vmax; top: -26vmax; background: radial-gradient(circle, rgba(46, 196, 160, .42) 0%, rgba(46, 196, 160, 0) 62%); animation: drift1 22s ease-in-out infinite alternate; }
.aurora.a2 { width: 56vmax; height: 56vmax; right: -18vmax; bottom: -24vmax; background: radial-gradient(circle, rgba(212, 162, 76, .40) 0%, rgba(212, 162, 76, 0) 62%); animation: drift2 26s ease-in-out infinite alternate; }
.aurora.a3 { width: 42vmax; height: 42vmax; left: 34%; top: 18%; background: radial-gradient(circle, rgba(84, 132, 255, .22) 0%, rgba(84, 132, 255, 0) 64%); animation: drift3 31s ease-in-out infinite alternate; }
.beam {
  position: absolute; top: -20%; bottom: -20%; left: -30%; width: 34%;
  background: linear-gradient(90deg, rgba(255, 236, 200, 0), rgba(255, 236, 200, .07) 50%, rgba(255, 236, 200, 0));
  transform: skewX(-18deg);
  animation: beam 14s ease-in-out 1.5s infinite;
}
.motes i {
  position: absolute; bottom: -14px; left: 50%;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255, 228, 176, .95);
  box-shadow: 0 0 10px 2px rgba(255, 210, 130, .5);
  opacity: 0;
  animation: rise 18s linear infinite;
}
.motes i:nth-child(1)  { left: 4%;  animation-duration: 19s; animation-delay: -3s; }
.motes i:nth-child(2)  { left: 11%; width: 2px; height: 2px; animation-duration: 23s; animation-delay: -11s; }
.motes i:nth-child(3)  { left: 18%; width: 4px; height: 4px; animation-duration: 17s; animation-delay: -7s; }
.motes i:nth-child(4)  { left: 26%; animation-duration: 25s; animation-delay: -15s; }
.motes i:nth-child(5)  { left: 33%; width: 2px; height: 2px; animation-duration: 20s; animation-delay: -1s; }
.motes i:nth-child(6)  { left: 41%; width: 5px; height: 5px; animation-duration: 27s; animation-delay: -19s; }
.motes i:nth-child(7)  { left: 49%; animation-duration: 18s; animation-delay: -9s; }
.motes i:nth-child(8)  { left: 57%; width: 2px; height: 2px; animation-duration: 22s; animation-delay: -4s; }
.motes i:nth-child(9)  { left: 64%; width: 4px; height: 4px; animation-duration: 19s; animation-delay: -13s; }
.motes i:nth-child(10) { left: 72%; animation-duration: 24s; animation-delay: -6s; }
.motes i:nth-child(11) { left: 79%; width: 2px; height: 2px; animation-duration: 21s; animation-delay: -17s; }
.motes i:nth-child(12) { left: 86%; width: 5px; height: 5px; animation-duration: 26s; animation-delay: -2s; }
.motes i:nth-child(13) { left: 92%; animation-duration: 18s; animation-delay: -12s; }
.motes i:nth-child(14) { left: 97%; width: 2px; height: 2px; animation-duration: 23s; animation-delay: -8s; }
.grain {
  position: absolute; inset: 0; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (min-width: 560px) { .scene { display: block; } }
@media (min-width: 900px) {
  .scene-photo {
    background-image: url("img/skyline-1920.jpg");
    background-image: image-set(url("img/skyline-1920.webp") type("image/webp"), url("img/skyline-1920.jpg") type("image/jpeg"));
  }
}
@keyframes kenburns { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-2%, -1.5%, 0); } }
@keyframes drift1 { to { transform: translate3d(16vmax, 10vmax, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-14vmax, -9vmax, 0) scale(1.1); } }
@keyframes drift3 { from { transform: translate3d(-30%, -18%, 0); } to { transform: translate3d(12%, 16%, 0) scale(1.2); } }
@keyframes beam { 0% { transform: translateX(0) skewX(-18deg); opacity: 0; } 15% { opacity: 1; } 55%, 100% { transform: translateX(420%) skewX(-18deg); opacity: 0; } }
@keyframes rise { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 12% { opacity: .9; } 75% { opacity: .55; } 100% { transform: translate3d(40px, -108vh, 0); opacity: 0; } }

/* ---------- shell ---------- */
.shell { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; align-items: flex-start; }
.app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--card);
  display: flex;
  flex-direction: column;
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@media (min-width: 560px) {
  .shell { padding: 44px 16px 56px; }
  .app {
    max-width: 460px;
    min-height: 0; border-radius: 28px; overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 50px 120px -30px rgba(0, 0, 0, .7), 0 0 90px -24px rgba(46, 196, 160, .38);
    animation: cardIn 1s cubic-bezier(.16, 1, .3, 1) both;
  }
  /* slow travelling gold/teal light around the card edge */
  .app::after {
    content: "";
    position: absolute; inset: 0; z-index: 6;
    border-radius: inherit;
    padding: 1.5px;
    pointer-events: none;
    background: conic-gradient(from var(--ang), rgba(212, 162, 76, 0) 0deg, rgba(212, 162, 76, .95) 50deg, rgba(95, 209, 181, .9) 110deg, rgba(95, 209, 181, 0) 170deg, rgba(212, 162, 76, 0) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ring 7s linear infinite;
  }
}
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ring { to { --ang: 360deg; } }

/* ---------- desktop side panel ---------- */
.aside { display: none; }
@media (min-width: 1024px) {
  .shell { gap: clamp(48px, 6vw, 104px); padding: 56px 40px; }
  .app { flex: 0 0 auto; width: 460px; }
  .aside {
    display: block; flex: 0 1 480px; color: #fff;
    position: sticky; top: 56px;
    margin-top: clamp(48px, 16vh, 170px);
    animation: asideIn 1.1s cubic-bezier(.16, 1, .3, 1) .12s both;
  }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  color: #E6EEF5;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.eyebrow i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--online); }
.eyebrow i::after, .avatar .dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--online);
  animation: ping 2.2s cubic-bezier(0, 0, .2, 1) infinite;
}
.aside-title {
  margin: 24px 0 18px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(42px, 4.3vw, 58px);
  line-height: 1.04; letter-spacing: -.022em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.aside-title span { color: #F0CF94; }
.aside-sub { margin: 0 0 30px; max-width: 36ch; font-size: 18px; line-height: 1.6; color: #DCE6EF; text-shadow: 0 1px 14px rgba(0, 0, 0, .55); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 430px; }
.steps li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: up .8s cubic-bezier(.16, 1, .3, 1) both;
}
.steps li:nth-child(1) { animation-delay: .45s; }
.steps li:nth-child(2) { animation-delay: .6s; }
.steps .num {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px;
  color: var(--navy);
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
}
.steps .num svg { width: 18px; height: 18px; }
.steps b { display: block; font-size: 16px; font-weight: 800; }
.steps small { display: block; font-size: 13.5px; font-weight: 600; color: #B8C9D7; }
.steps li.now { border-color: rgba(212, 162, 76, .55); box-shadow: 0 0 0 1px rgba(212, 162, 76, .22), 0 14px 34px -16px rgba(212, 162, 76, .5); }
.steps li.done .num { background: linear-gradient(145deg, #A6EBD8, #2EC4A0); }
@keyframes asideIn { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { transform: scale(1); opacity: .75; } 80%, 100% { transform: scale(2.3); opacity: 0; } }

.preview-strip {
  background: #FEF3C7;
  color: #6B4200;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  padding: 8px 14px;
  border-bottom: 1px solid #F5D98A;
}
.preview-strip.live { background: #FDECEC; color: #8A1C12; border-bottom-color: #F3B4AC; }

/* ---------- header ---------- */
.head {
  position: relative;
  isolation: isolate;
  color: #fff;
  background: var(--navy);
  padding: 16px 18px 18px;
  padding-top: max(16px, env(safe-area-inset-top));
  overflow: hidden;
}
/* skyline photo, slowly drifting, under a navy wash */
.head::before {
  content: "";
  position: absolute; inset: -12%; z-index: -2;
  background: var(--navy) url("img/skyline-900.jpg") center 62% / cover no-repeat;
  background-image: image-set(url("img/skyline-900.webp") type("image/webp"), url("img/skyline-900.jpg") type("image/jpeg"));
  animation: kenburns 30s ease-in-out infinite alternate;
  pointer-events: none;
}
.head::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(240px 240px at calc(100% + 30px) -50px, rgba(212, 162, 76, .32) 0%, rgba(212, 162, 76, 0) 70%),
    linear-gradient(158deg, rgba(14, 42, 71, .93) 0%, rgba(18, 56, 92, .80) 56%, rgba(15, 74, 90, .74) 100%);
  pointer-events: none;
}
.brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.wordmark {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.01em;
  line-height: 1.1;
}
.wordmark svg { width: 22px; height: 22px; flex: none; }
.secure-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  color: #E3ECF4;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
  white-space: nowrap;
}
.secure-pill svg { width: 13px; height: 13px; }

.agent { display: flex; align-items: center; gap: 12px; margin-top: 18px; position: relative; z-index: 1; }
.avatar {
  position: relative;
  width: 50px; height: 50px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--navy);
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .14);
}
.avatar svg { width: 26px; height: 26px; }
.avatar .dot {
  position: absolute; right: -1px; bottom: 1px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--online);
  border: 2.5px solid #10314F;
}
.agent-name { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.agent-status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #C3D5E3; font-weight: 600; }
.agent-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--online); display: inline-block; }

.progress { margin-top: 18px; position: relative; z-index: 1; }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 700; color: #D3E0EA; }
.progress-row b { color: #fff; font-weight: 800; letter-spacing: .02em; }
.bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .15); margin-top: 8px; overflow: hidden; }
.bar > span {
  position: relative; overflow: hidden;
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #5FD1B5, var(--gold));
  transform-origin: left center;
  animation: fill 1.2s cubic-bezier(.16, 1, .3, 1) .35s both;
}
.bar > span::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .7), rgba(255, 255, 255, 0));
  transform: translateX(-100%);
  animation: sheen 3s ease-in-out 1.8s infinite;
}
@keyframes fill { from { transform: scaleX(var(--from, 0)); } }
@keyframes sheen { 55%, 100% { transform: translateX(100%); } }

/* ---------- thread ---------- */
.thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px 10px;
}
.day {
  align-self: center;
  font-size: 12px; font-weight: 700;
  color: var(--ink-3);
  background: var(--bubble);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 6px;
}
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 94%; }
.mini {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--navy);
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
}
.mini svg { width: 16px; height: 16px; }
.msg.cont .mini { visibility: hidden; }
.bubble {
  background: var(--bubble);
  color: var(--ink);
  padding: 12px 15px;
  border-radius: 20px 20px 20px 6px;
  font-size: 16.5px;
  line-height: 1.5;
}
.bubble.lead { font-size: 20px; font-weight: 800; letter-spacing: -.015em; padding: 11px 16px; }
.bubble strong { font-weight: 800; }
.bubble .amt { color: var(--accent-2); font-weight: 800; white-space: nowrap; }

.typing { display: none; align-items: flex-end; gap: 8px; }
.typing.on { display: flex; }
.typing .bubble { display: inline-flex; gap: 5px; padding: 15px 16px; }
.typing .bubble span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #8E99A6;
  animation: blink 1s infinite ease-in-out;
}
.typing .bubble span:nth-child(2) { animation-delay: .15s; }
.typing .bubble span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* progressive reveal (only while html.js-anim is set) */
.js-anim [data-seq]:not(.is-in) { display: none; }
[data-seq].is-in { animation: pop .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- reply / CTA ---------- */
.reply { margin-top: 10px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 14px 22px;
  border: 0;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--accent);
  background-image: linear-gradient(135deg, #14A088 0%, var(--accent) 48%, #0A5C4E 100%);
  color: #fff;
  font: 800 17.5px/1.2 var(--font);
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 26px -12px rgba(13, 122, 104, .75), inset 0 -2px 0 rgba(0, 0, 0, .14);
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
/* light sweep across the button every few seconds */
.btn::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -70%; z-index: -1;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .38), rgba(255, 255, 255, 0));
  transform: skewX(-20deg);
  animation: shine 4.2s ease-in-out 2.4s infinite;
  pointer-events: none;
}
.thread .btn { animation: glow 2.8s ease-in-out 1.5s infinite; }
@keyframes shine { 0% { left: -70%; } 38%, 100% { left: 130%; } }
@keyframes glow {
  0%, 100% { box-shadow: 0 12px 26px -12px rgba(13, 122, 104, .75), 0 0 0 0 rgba(46, 196, 160, 0), inset 0 -2px 0 rgba(0, 0, 0, .14); }
  50% { box-shadow: 0 16px 34px -12px rgba(13, 122, 104, .9), 0 0 0 7px rgba(46, 196, 160, .16), inset 0 -2px 0 rgba(0, 0, 0, .14); }
}
.btn svg { width: 20px; height: 20px; flex: none; transition: transform .15s ease; }
.btn:hover { background-color: var(--accent-2); background-image: linear-gradient(135deg, #10907A 0%, var(--accent-2) 55%, #084E42 100%); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); box-shadow: 0 6px 14px -8px rgba(13, 122, 104, .75); }
.btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.btn[aria-disabled="true"] { opacity: .7; cursor: progress; }
.footnote { margin: 10px 4px 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* ---------- step 2 composer ---------- */
.composer {
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 14px 30px -22px rgba(14, 42, 71, .45);
}
.field-label { display: block; font-weight: 800; font-size: 14px; margin: 0 0 8px 2px; color: var(--ink); }
.phone-wrap {
  display: flex; align-items: center;
  min-height: 62px;
  padding: 0 14px;
  border: 2px solid var(--line-2);
  border-radius: 15px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.phone-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(13, 122, 104, .16); }
.phone-wrap .cc {
  flex: none;
  font-weight: 800; font-size: 17px; color: var(--ink-2);
  padding-right: 12px; margin-right: 12px;
  border-right: 1.5px solid var(--line);
  line-height: 28px;
}
.phone-wrap input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  padding: 14px 0;
  color: var(--ink);
  font: 800 22px/1.2 var(--font);
  letter-spacing: .01em;
}
.phone-wrap input::placeholder { color: #8A95A2; font-weight: 700; }
.field.is-invalid .phone-wrap { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(180, 35, 24, .12); }
.err {
  display: none;
  align-items: flex-start; gap: 6px;
  margin: 8px 2px 0;
  color: var(--danger);
  font-size: 14px; font-weight: 700; line-height: 1.4;
}
.err.on { display: flex; }
.err svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.consent {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 15px;
  background: #F7F8FA;
  border: 1.5px solid var(--line);
  transition: border-color .15s ease, background-color .15s ease;
}
.consent input[type="checkbox"] {
  -webkit-appearance: none; appearance: none;
  flex: none;
  width: 26px; height: 26px;
  margin: 1px 0 0;
  border: 2px solid #7D8895;
  border-radius: 8px;
  background: #fff;
  display: grid; place-content: center;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}
.consent input[type="checkbox"]::after {
  content: "";
  width: 12px; height: 7px;
  border-left: 2.75px solid #fff;
  border-bottom: 2.75px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform .12s ease;
}
.consent input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.consent input[type="checkbox"]:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.consent label { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); cursor: pointer; }
.consent label a { color: var(--accent-2); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.consent label a:focus-visible, .sheet-body a:focus-visible { outline-width: 2px; outline-offset: 1px; border-radius: 3px; }
.consent.is-invalid { border-color: var(--danger); background: var(--danger-soft); }

.instruction { margin: 16px 2px 14px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.instruction strong { color: var(--ink); }

/* ---------- trust row ---------- */
.trust {
  list-style: none;
  margin: 0;
  padding: 14px 16px 2px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.trust li {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px;
  text-align: center;
  font-size: 12px; font-weight: 700; line-height: 1.3;
  color: var(--ink-2);
  background: #FAFBFC;
  border: 1px solid var(--line);
  border-radius: 14px;
  animation: up .7s cubic-bezier(.16, 1, .3, 1) backwards;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.trust li:nth-child(1) { animation-delay: .5s; }
.trust li:nth-child(2) { animation-delay: .62s; }
.trust li:nth-child(3) { animation-delay: .74s; }
.trust li:hover { transform: translateY(-2px); border-color: #CFE7E0; box-shadow: 0 10px 22px -16px rgba(13, 122, 104, .6); }
.trust svg { width: 22px; height: 22px; color: var(--accent); }

/* ---------- footer ---------- */
.foot {
  padding: 14px 16px 22px;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 14px; }
.foot a, .foot .linklike {
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--ink-2);
  font: 600 13px/1.2 var(--font);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none; border: 0; cursor: pointer;
}
.foot p { margin: 2px 0 0; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(14, 42, 71, .62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.loader.on { display: flex; }
.loader-card {
  background: #fff;
  border-radius: 22px;
  padding: 26px 28px 22px;
  text-align: center;
  max-width: 300px;
  box-shadow: var(--shadow);
}
.spinner {
  width: 46px; height: 46px; margin: 0 auto 14px;
  border-radius: 50%;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-card p { margin: 0; font-weight: 800; font-size: 16px; color: var(--ink); }
.loader-card small { display: block; margin-top: 4px; color: var(--ink-3); font-size: 13px; font-weight: 600; }

/* ---------- dialogs ---------- */
dialog.sheet {
  width: min(640px, calc(100vw - 24px));
  max-height: min(84vh, 780px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(10, 25, 45, .6);
  overflow: hidden;
}
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: rgba(14, 30, 50, .58); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 14px 12px 20px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.sheet-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.sheet-close {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--bubble);
  color: var(--ink);
  cursor: pointer;
}
.sheet-close:hover { background: #E4E8ED; }
.sheet-close svg { width: 20px; height: 20px; }
.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px 22px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.sheet-body h3 { font-size: 15px; color: var(--ink); margin: 18px 0 6px; font-weight: 800; }
.sheet-body p { margin: 0 0 10px; }
.sheet-body ul { margin: 0 0 10px; padding-left: 20px; }
.sheet-body li p { margin: 0 0 4px; }
.sheet-body.frame { padding: 0; overflow: hidden; }
.sheet-body.frame iframe { display: block; width: 100%; height: min(70vh, 680px); border: 0; }

.preview-body p { font-size: 15px; color: var(--ink); }
.preview-tag {
  display: inline-block;
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #6B4200; background: #FEF3C7;
  padding: 4px 9px; border-radius: 99px;
  margin-bottom: 10px;
}
.kv { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 12px; }
.kv th, .kv td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; word-break: break-all; }
.kv th { color: var(--ink); font-weight: 800; white-space: nowrap; width: 1%; }
.kv td { color: var(--ink-2); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
.kv td.empty { color: #8A95A2; font-family: var(--font); font-style: italic; }

/* phones: compact header so the chat gets most of the screen */
@media (max-width: 559px) {
  .head { padding: 12px 16px 14px; padding-top: max(12px, env(safe-area-inset-top)); }
  .wordmark { font-size: 16.5px; white-space: nowrap; }
  .wordmark svg { width: 20px; height: 20px; }
  .secure-pill { padding: 5px 9px; font-size: 11.5px; }
  .agent { margin-top: 12px; gap: 10px; }
  .avatar { width: 42px; height: 42px; }
  .avatar svg { width: 22px; height: 22px; }
  .avatar .dot { width: 12px; height: 12px; border-width: 2px; }
  .agent-name { font-size: 16px; }
  .agent-status { font-size: 12.5px; }
  .progress { margin-top: 12px; }
  .bar { margin-top: 6px; height: 5px; }
  .thread { padding-top: 14px; }
}
@media (max-width: 359px) {
  .wordmark { font-size: 15px; }
  .secure-pill { padding: 5px 7px; }
  .bubble { font-size: 15.5px; }
  .trust li { font-size: 11px; }
  .phone-wrap input { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
