/* Fallback brand tokens. Swap for the site's tokens when the brand kit is supplied. */
:root {
  --navy: #0F1E33;
  --ink: #1A1A1A;
  --paper: #F7F6F2;
  --white: #ffffff;
  --accent: #E8A33D;
  --accent-ink: #5A3A00;
  --gray: #5B6370;
  --line: #D9D7CF;
  --success: #2F7D4F;
  --danger: #A12828;
  --radius: 14px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.5; font-size: 16px; }
img, svg { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.site-header { background: var(--navy); color: var(--white); }
.header-row { display: flex; align-items: center; min-height: 56px; }
.brand { color: var(--white); text-decoration: none; font-weight: 700; letter-spacing: .2px; }

.hero { background: linear-gradient(180deg, var(--navy) 0, var(--navy) 120px, var(--paper) 120px); padding: 20px 0 36px; }
.stage { display: grid; gap: 16px; grid-template-columns: 1fr; }
.panel-card { background: var(--white); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(15, 30, 51, .14); padding: 20px 16px; }
.eyebrow { margin: 0 0 8px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray); }
h1 { font-size: 1.65rem; line-height: 1.2; margin: 0 0 10px; color: var(--navy); }
h2 { font-size: 1.35rem; line-height: 1.25; color: var(--navy); margin: 0 0 12px; }
.lead { margin: 0 0 18px; color: var(--ink); }
.small { font-size: .875rem; color: var(--gray); }

.cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 18px; }
.cat-card { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; align-items: center; text-align: left; min-height: 88px; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--navy); cursor: pointer; font: inherit; }
.cat-card:hover { border-color: var(--accent); }
.cat-icon { grid-row: span 2; color: var(--navy); }
.cat-title { font-weight: 700; font-size: 1.05rem; }
.cat-small { color: var(--gray); font-size: .9rem; }

.composer { margin-top: 8px; }
.composer.pinned { position: sticky; bottom: 0; background: var(--white); padding: 10px 0 6px; border-top: 1px solid var(--line); z-index: 5; }
textarea, input[type=text], input[type=email], input[type=tel], input[type=url], input[type=date], select { width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 2px solid #8b8f98; border-radius: 10px; padding: 12px; min-height: 48px; }
textarea { resize: vertical; min-height: 76px; }
label { font-weight: 600; display: block; margin-bottom: 4px; }
.composer-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.composer-actions .primary { margin-left: auto; }
.help { margin: 6px 0 0; font-size: .85rem; color: var(--gray); }
.manual { margin: 6px 0 0; }

.btn, .attach, .coverage-toggle { min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 2px solid var(--navy); background: var(--white); color: var(--navy); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.btn.primary { background: var(--navy); color: var(--white); }
.btn.ghost { background: var(--white); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.attach { border-style: dashed; text-align: left; }
.link-btn { background: none; border: 0; padding: 10px 4px; min-height: 44px; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.badge-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: .85rem; font-weight: 700; }
.review-btn { margin-top: 10px; width: 100%; }

.chat-top { display: flex; justify-content: space-between; align-items: center; }
.log { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 8px; }
.msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.msg p { margin: 0 0 8px; }
.msg p:last-child { margin: 0; }
.msg.ai { background: #EEF1F6; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--navy); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 22px; border: 2px solid var(--navy); background: var(--white); color: var(--navy); font: inherit; cursor: pointer; }
.chip[aria-pressed=true] { background: var(--navy); color: var(--white); }
.typing { color: var(--gray); font-size: .9rem; padding: 4px 8px; }
.error { color: var(--danger); font-weight: 600; margin: 8px 0; }
.file-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.file-chip { background: #EEF1F6; border-radius: 16px; padding: 4px 10px; font-size: .85rem; }

.req-card { border: 2px solid var(--navy); border-radius: var(--radius); padding: 14px; background: var(--white); align-self: stretch; }
.req-card h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--navy); }
.req-row { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.req-row input[type=checkbox], .item input[type=checkbox], .check input[type=checkbox] { width: 22px; height: 22px; margin-top: 2px; }
.req-row label { margin: 0; font-weight: 600; }
.req-row .limit { margin-top: 6px; }
.req-note { font-size: .875rem; color: var(--gray); margin: 8px 0; }

.coverage { background: var(--white); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(15, 30, 51, .14); padding: 16px; }
.coverage-head { display: flex; justify-content: space-between; align-items: center; }
.coverage-head h2 { margin: 0; font-size: 1.15rem; }
.count { font-weight: 700; color: var(--navy); }
.coverage-list { list-style: none; margin: 0 0 12px; padding: 0; }
.item { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.item label { margin: 0; }
.item .meta { font-size: .85rem; color: var(--gray); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-top: 4px; border: 1px solid currentColor; }
.tag.contract_required { color: #14532d; background: #e2f3e8; }
.tag.user_requested { color: #1e3a8a; background: #e5ecfb; }
.tag.may_apply { color: #4b5563; background: #f0f1f3; }
.tag.needs_broker_review { color: var(--accent-ink); background: #fdf0d8; }

.flow h2 { margin-top: 4px; }
.field { margin-bottom: 14px; }
.field .err { color: var(--danger); font-size: .875rem; margin-top: 4px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 8px; margin: 10px 0; }
.check label { margin: 0; font-weight: 400; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.summary-group { margin-bottom: 14px; }
.summary-group h3 { margin: 0 0 6px; font-size: 1rem; color: var(--navy); }
.summary-group ul { margin: 0; padding-left: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.calendar { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.notice { background: #fdf0d8; border-left: 4px solid var(--accent); padding: 10px 12px; border-radius: 6px; margin: 12px 0; }
.ready-list { padding-left: 20px; }

.band { padding: 36px 0; }
.band.alt { background: var(--white); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.step-n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font-weight: 700; }
.why { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.why li { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
details.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.faq summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--navy); }
details.faq p { margin: 0 0 12px; }

.site-footer { background: var(--navy); color: #d6dae1; padding: 28px 0 40px; }
.site-footer .small { color: #b9c0cc; }
.site-footer a { color: #fff; margin-right: 16px; }
.site-footer nav span { margin-right: 16px; }
.disclosure { font-weight: 600; color: #fff; }
mark.confirm { background: #ffe08a; color: #4a3200; padding: 0 4px; border-radius: 3px; }

.dialog { border: 0; border-radius: var(--radius); padding: 18px; width: min(680px, 94vw); max-height: 90vh; }
.dialog::backdrop { background: rgba(15, 30, 51, .6); }
.dialog fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 12px 0; padding: 8px 12px; }
.dialog legend { font-weight: 700; padding: 0 6px; color: var(--navy); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: var(--white); padding-top: 10px; }
.opt-note { margin: 4px 0 8px 36px; }

/* Mobile drawer for the coverage list and a compact pinned input bar */
@media (max-width: 899px) {
  .composer.pinned .help, .composer.pinned .manual { display: none; }
  .composer.pinned textarea { min-height: 52px; height: 52px; }
  .composer.pinned .attach span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .composer.pinned .attach { min-width: 44px; padding: 10px; }
  .composer.pinned .review-btn { margin-top: 6px; }
  .coverage { position: fixed; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow-y: auto; border-radius: var(--radius) var(--radius) 0 0; z-index: 30; box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); }
  .coverage:not(.open) { display: none; }
  .stage[data-mode=welcome] .coverage-toggle { display: none; }
}
@media (min-width: 900px) {
  .hero { padding: 36px 0 52px; background: linear-gradient(180deg, var(--navy) 0, var(--navy) 160px, var(--paper) 160px); }
  .panel-card { padding: 32px; }
  h1 { font-size: 2.1rem; }
  .stage[data-mode=chat] { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .stage[data-mode=welcome], .stage[data-mode=flow] { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin: 0 auto; }
  .stage[data-mode=welcome] .coverage { display: none; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cat-card { grid-template-columns: 1fr; text-align: center; justify-items: center; min-height: 190px; padding: 22px 14px; row-gap: 6px; }
  .cat-icon { grid-row: auto; }
  .coverage { position: sticky; top: 16px; }
  .coverage-toggle, .close-drawer { display: none; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .log { max-height: 480px; overflow-y: auto; }
  .composer.pinned .help, .composer.pinned .manual { display: block; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .why { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
