/* Protection Planner — engine styles. Mobile first; all sizes in rem so the text-size selector scales everything. */

:root {
  --indigo: #6366f1;
  --purple: #a855f7;
  --indigo-lt: #818cf8;
  --purple-lt: #c084fc;
  --pink: #f472b6;
  --font-head: "Space Grotesk", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 1.25rem;
  --radius-md: 0.875rem;
  --radius-sm: 0.625rem;
  --nav-h: 4rem;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0b24;
  --panel: #191641;
  --panel-glass: rgba(25, 22, 65, 0.74);
  --panel-strong: #221e52;
  --line: rgba(165, 170, 255, 0.24);
  --text: #f1f1ff;
  --text-2: #cfd0f4;
  --muted: #b3b5e0;
  --link: #c7cbff;
  --accent-text: #d8b4fe;
  --bubble-user: #3d38a8;
  --bubble-user-text: #ffffff;
  --bubble-bot: #241f58;
  --coral: #ff9e90;
  --focus: #f9a8d4;
  --glow-a: rgba(99, 102, 241, 0.55);
  --glow-b: rgba(168, 85, 247, 0.45);
  --glow-c: rgba(244, 114, 182, 0.32);
  --shadow: 0 1.25rem 2.75rem rgba(4, 3, 20, 0.45);
  --input-bg: #120f33;
  --send-bg: #4f46e5;
  --send-text: #ffffff;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3ff;
  --panel: #ffffff;
  --panel-glass: rgba(255, 255, 255, 0.84);
  --panel-strong: #ffffff;
  --line: rgba(79, 70, 229, 0.2);
  --text: #16133a;
  --text-2: #36326a;
  --muted: #4c4880;
  --link: #4338ca;
  --accent-text: #7e22ce;
  --bubble-user: #4f46e5;
  --bubble-user-text: #ffffff;
  --bubble-bot: #eeedff;
  --coral: #b42318;
  --focus: #be185d;
  --glow-a: rgba(99, 102, 241, 0.34);
  --glow-b: rgba(168, 85, 247, 0.26);
  --glow-c: rgba(244, 114, 182, 0.24);
  --shadow: 0 1.25rem 2.5rem rgba(49, 46, 129, 0.14);
  --input-bg: #faf9ff;
  --send-bg: #4f46e5;
  --send-text: #ffffff;
}

html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html[data-font-size="md"] { font-size: 112.5%; }
html[data-font-size="lg"] { font-size: 125%; }
html[data-font-size="xl"] { font-size: 137.5%; }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* Vibrant background glow, never dulled by a scrim. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42rem 30rem at 8% -6%, var(--glow-a), transparent 70%),
    radial-gradient(38rem 28rem at 92% 4%, var(--glow-b), transparent 70%),
    radial-gradient(44rem 30rem at 55% 108%, var(--glow-c), transparent 72%);
}

html.is-locked, html.is-locked body { overflow: hidden; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 0.1875rem solid var(--focus); outline-offset: 0.1875rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--text);
}
.skip-link:focus { top: 1rem; }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .nav {
    background: var(--panel-glass);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
  }
}
.nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.625rem 1.25rem;
  padding: 0.625rem 1rem;
  width: min(100% - 1.5rem, 90rem);
  margin-inline: auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.375rem;
  height: 2.375rem;
  flex: none;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #4338ca, #7e22ce 60%, #be185d);
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  box-shadow: 0 0.5rem 1.25rem rgba(99, 102, 241, 0.4);
}
.brand-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name strong { font-family: var(--font-head); font-size: 1rem; }
.brand-name span { font-size: 0.8125rem; color: var(--muted); }

.nav-links { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.nav-links a {
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}
.nav-links a[aria-current="page"] { background: rgba(129, 140, 248, 0.18); color: var(--text); }
.nav-links a:hover { color: var(--text); }

.prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.size-group {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.125rem;
  padding: 0.1875rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.size-btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.375rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.size-btn.s1 { font-size: 0.75rem; }
.size-btn.s2 { font-size: 0.875rem; }
.size-btn.s3 { font-size: 1rem; }
.size-btn.s4 { font-size: 1.125rem; }
.size-btn[aria-pressed="true"] { background: var(--send-bg); color: var(--send-text); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2.375rem;
  padding: 0 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: 600 0.875rem/1 var(--font-body);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 0.875rem 1rem 0.5rem;
  width: min(100% - 1.5rem, 90rem);
  margin-inline: auto;
}
.hero-chip {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(129, 140, 248, 0.14);
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
}
.hero h1 {
  margin: 0 auto 0.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.grad {
  color: var(--accent-text);
  background: linear-gradient(90deg, var(--indigo-lt), var(--purple-lt) 50%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="light"] .grad { background: linear-gradient(90deg, #4f46e5, #9333ea 50%, #db2777); -webkit-background-clip: text; background-clip: text; }
.subline {
  margin: 0 auto 0.75rem;
  max-width: 48rem;
  color: var(--text-2);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
}
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.chip-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.375rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
}
.chip-link:hover { border-color: var(--indigo-lt); }

/* ---------- Board ---------- */
.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  width: min(100% - 3rem, clamp(56.25rem, 66vw, 83.75rem));
  margin: 0.75rem auto 1rem;
}
@media (max-width: 26rem) {
  .board { width: min(100% - 1.5rem, 56.25rem); }
}
.chat-slot { grid-column: 1; grid-row: 1; min-width: 0; }
.top-card { grid-column: 1; grid-row: 2; }
.short-card { grid-column: 1; grid-row: 3; }
.detail-card { grid-column: 1; grid-row: 4; }

@media (min-width: 700px) {
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chat-slot { grid-column: 1 / -1; grid-row: 1; }
  .top-card { grid-column: 1; grid-row: 2; }
  .short-card { grid-column: 2; grid-row: 2; }
  .detail-card { grid-column: 3; grid-row: 2; }
}
@media (min-width: 1100px) {
  .board { grid-template-columns: minmax(0, 1.36fr) minmax(0, 1.06fr) minmax(0, 0.98fr) minmax(0, 0.98fr); }
  .chat-slot { grid-column: 1; grid-row: 1; }
  .top-card { grid-column: 2; grid-row: 1; }
  .short-card { grid-column: 3; grid-row: 1; }
  .detail-card { grid-column: 4; grid-row: 1; }
}

.card {
  position: relative;
  min-width: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 1rem;
  overflow: hidden;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .card {
    background: var(--panel-glass);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    backdrop-filter: blur(16px) saturate(135%);
  }
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.1875rem;
  background: linear-gradient(90deg, var(--indigo), var(--purple));
}
.top-card::before { background: linear-gradient(90deg, var(--purple), var(--pink)); }
.short-card::before { background: linear-gradient(90deg, var(--indigo-lt), var(--purple-lt)); }
.detail-card::before { background: linear-gradient(90deg, var(--pink), var(--indigo-lt)); }

.card h2 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.125rem;
  line-height: 1.25;
}

/* Scroll boxes: thin visible scrollbar, wheel/trackpad/touch/arrow keys. */
.scroll-box {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--indigo-lt) transparent;
  -webkit-overflow-scrolling: touch;
}
.scroll-box::-webkit-scrollbar, .log::-webkit-scrollbar { width: 0.5rem; }
.scroll-box::-webkit-scrollbar-thumb, .log::-webkit-scrollbar-thumb { background: var(--indigo-lt); border-radius: 999px; }
.scroll-box::-webkit-scrollbar-track, .log::-webkit-scrollbar-track { background: transparent; }
.scroll-box > * { flex: none; }

/* ---------- Chat card ---------- */
.chat-slot { position: relative; }
.chat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 34rem;
  container-type: inline-size;
  container-name: chat;
}
.chat-slot { height: 34rem; }
.chat-slot > .chat-card { height: 100%; }
@media (min-width: 1100px) {
  .chat-slot { height: clamp(22rem, 100svh - 21rem, 38rem); }
}
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.chat-titles { min-width: 0; text-align: center; flex: 1 1 10rem; }
.chat-sub { margin: 0.125rem 0 0; color: var(--muted); font-size: 0.875rem; }
.chat-tools { display: flex; align-items: center; justify-content: center; gap: 0.375rem; flex: 1 1 auto; flex-wrap: wrap; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.full-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2.375rem;
  padding: 0 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: 700 0.8125rem/1 var(--font-body);
  cursor: pointer;
  white-space: nowrap;
}
.full-btn[aria-pressed="true"] { background: rgba(129, 140, 248, 0.2); }
.composer.is-stacked { flex-direction: column; align-items: stretch; }
.composer.is-stacked textarea { width: 100%; }
.composer.is-stacked .composer-actions { justify-content: flex-end; }
@container chat (max-width: 32rem) {
  .full-btn { width: 2.375rem; padding: 0; justify-content: center; }
  .full-btn .full-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.count-chip {
  align-self: center;
  margin: 0;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.16);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 700;
}

.log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--indigo-lt) transparent;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.25rem 0.25rem 0.25rem 0;
  border-radius: var(--radius-md);
}
.log > * { flex: none; }
.msg {
  max-width: 94%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  line-height: 1.55;
  text-align: left;
}
.msg p { margin: 0 0 0.5rem; }
.msg p:last-child, .msg ul:last-child { margin-bottom: 0; }
.msg ul { margin: 0 0 0.5rem; padding-left: 1.125rem; }
.msg li { margin: 0.125rem 0; }
.msg-user { align-self: flex-end; background: var(--bubble-user); color: var(--bubble-user-text); border-bottom-right-radius: 0.25rem; }
.msg-bot { align-self: flex-start; background: var(--bubble-bot); color: var(--text); border-bottom-left-radius: 0.25rem; }
.msg-error { align-self: stretch; max-width: 100%; background: transparent; border: 1px solid var(--coral); color: var(--coral); font-weight: 600; }
.msg .next { font-weight: 700; }

.thinking { display: flex; flex-direction: column; gap: 0.375rem; }
.dots { display: inline-flex; gap: 0.375rem; padding: 0.25rem 0; }
.dots span {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--purple-lt);
  animation: pulse 1.2s ease-in-out infinite;
}
html[data-theme="light"] .dots span { background: #7c3aed; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); } 40% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) {
  .dots span { animation: none; opacity: 1; transform: none; }
}
.wait-note { margin: 0; color: var(--muted); font-size: 0.875rem; }

.composer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  column-gap: 0.375rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--input-bg);
}
.composer textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.5rem;
  max-height: 18rem;
  resize: none;
  overflow-y: hidden;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 1rem/1.5 var(--font-body);
  padding: 0.5rem 0.25rem;
}
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.composer:focus-within { border-color: var(--indigo-lt); box-shadow: 0 0 0 0.1875rem rgba(129, 140, 248, 0.3); }
.composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.375rem; }
/* the container is the card's content box: 16.5rem of content = an 18.5rem-wide card */
@container chat (min-width: 16.5rem) {
  .chat-head { flex-wrap: nowrap; align-items: center; }
  .chat-titles { text-align: left; flex: 1 1 auto; }
  .chat-tools { flex: 0 0 auto; justify-content: flex-end; flex-wrap: nowrap; }
  .composer { flex-direction: row; align-items: flex-end; }
  .composer textarea { flex: 1 1 auto; }
  .composer-actions { flex: none; }
}
.mic-btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.mic-btn[hidden] { display: none; }
.mic-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 0 0 0.25rem rgba(244, 114, 182, 0.28);
}
.send-btn {
  height: 2.5rem;
  min-width: 4rem;
  flex: none;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--send-bg);
  color: var(--send-text);
  font: 700 0.9375rem/1 var(--font-body);
  cursor: pointer;
}
.send-btn[aria-busy="true"], .send-btn:disabled { opacity: 0.6; cursor: progress; }
.voice-status { margin: 0; color: var(--muted); font-size: 0.8125rem; text-align: center; }
.voice-error { margin: 0; color: var(--coral); font-size: 0.8125rem; font-weight: 600; text-align: center; }
.chat-note { margin: 0; color: var(--muted); font-size: 0.75rem; text-align: center; }

/* Full page overlay: the slot keeps its size so the cards behind never reflow. */
.chat-card.is-full {
  position: fixed;
  inset: 0;
  z-index: 60;
  height: auto;
  border-radius: 0;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) calc(1rem + env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) calc(1rem + env(safe-area-inset-left, 0px));
  background: var(--panel-strong);
}
.chat-slot > .chat-card.is-full { height: auto; }
.chat-card.is-full .log { width: min(100%, 60rem); margin-inline: auto; align-self: stretch; }
.chat-card.is-full .composer, .chat-card.is-full .voice-status, .chat-card.is-full .voice-error, .chat-card.is-full .chat-note { width: min(100%, 60rem); margin-inline: auto; }

/* ---------- Side cards ---------- */
.side-card { display: flex; flex-direction: column; gap: 0.5rem; text-align: center; }
.pill {
  align-self: center;
  padding: 0.1875rem 0.75rem;
  border-radius: 999px;
  background: rgba(192, 132, 252, 0.18);
  color: var(--accent-text);
  font-size: 0.8125rem !important;
  font-weight: 700;
}
.match-tile {
  border-radius: var(--radius-md);
  padding: 0.875rem;
  background: linear-gradient(135deg, #4338ca, #7e22ce 60%, #be185d);
  color: #ffffff;
  flex: none;
}
.tile-kind { margin: 0 0 0.25rem; font-size: 0.75rem; font-weight: 700; opacity: 0.95; }
.tile-title { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 1.0625rem; line-height: 1.3; }
.fit { display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; flex: none; }
.fit-score { font-family: var(--font-head); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--text); }
.fit-label { color: var(--muted); font-size: 0.8125rem; }
.fit-why { margin: 0; color: var(--text-2); font-size: 0.875rem; min-height: 0; }

.short-head { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex: none; }
.gauge { width: 3.5rem; height: 3.5rem; flex: none; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: rgba(129, 140, 248, 0.22); stroke-width: 7; }
.gauge-fill { fill: none; stroke: url(#gauge-grad); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray 0.4s ease; }
.gauge-text { transform: rotate(90deg); transform-origin: 32px 32px; fill: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .gauge-fill { transition: none; } }
.rank-note { margin: 0; color: var(--muted); font-size: 0.8125rem; flex: none; }
.short-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.375rem; min-height: 0; text-align: left; }
.short-list li { flex: none; }
.short-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: 600 0.875rem/1.35 var(--font-body);
  text-align: left;
  cursor: pointer;
}
.short-item[aria-pressed="true"] { border-color: var(--purple-lt); background: rgba(192, 132, 252, 0.16); }
.short-item .t { min-width: 0; }
.short-item .s { flex: none; font-family: var(--font-head); font-weight: 700; color: var(--accent-text); }

.detail-scroll { display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; flex: 1 1 auto; text-align: left; }
.detail-name { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 0.9375rem; line-height: 1.3; text-align: center; }
.detail-fields { margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.detail-fields div { flex: none; padding: 0.375rem 0.5rem; border-radius: var(--radius-sm); background: rgba(129, 140, 248, 0.1); }
.detail-fields dt { font-size: 0.6875rem; font-weight: 700; color: var(--muted); line-height: 1.3; }
.detail-fields dd { margin: 0.0625rem 0 0; font-size: 0.8125rem; line-height: 1.35; color: var(--text); }
.guide-link { align-self: center; font-weight: 700; font-size: 0.875rem; }
.guide-link[hidden] { display: none; }
.next-step {
  flex: none;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(244, 114, 182, 0.1);
  text-align: left;
}
.next-step h3 { margin: 0 0 0.25rem; font-family: var(--font-head); font-size: 0.9375rem; color: var(--text); }
.next-step p { margin: 0; color: var(--text-2); font-size: 0.8125rem; line-height: 1.45; }

/* ---------- Notes & footer ---------- */
.notes {
  width: min(100% - 3rem, clamp(56.25rem, 66vw, 83.75rem));
  margin: 0 auto 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
}
.notes p { margin: 0 0 0.375rem; }
.foot {
  padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
}
.foot p { margin: 0 0 0.25rem; }

@media (min-width: 700px) {
  .nav-row { justify-content: space-between; }
  .chat-titles { text-align: left; }
  .chat-tools { justify-content: flex-end; flex: 0 0 auto; }
}

@media (min-width: 1100px) {
  .hero { padding: 0.625rem 1rem 0.25rem; }
  .hero-chip { margin-bottom: 0.375rem; }
  .hero h1 { margin-bottom: 0.375rem; }
  .subline { margin-bottom: 0.5rem; font-size: 0.9375rem; }
  .board { margin-top: 0.5rem; }
  .side-card { padding: 0.875rem; }
}
