:root {
  color-scheme: light;
  /* CreditLift's public brand palette, with darker blue/ink for readable controls. */
  --ink: #303c49;
  --muted: #536475;
  --brand-blue: #0c9aca;
  --brand-blue-hover: #52bade;
  --brand-action-ink: #10222e;
  --brand-slate: #303c49;
  --brand-link: #006684;
  --brand-focus: #00779c;
  --page: #f0f5f9;
  --line: #d2dde8;
  --subtle-line: #e2eaf1;
  --field-line: #7b91a4;
  --sky-tint: #e3f2f8;
  --sky-soft: #edf6fa;
  --sky-pale: #f7fbfd;
  --on-slate: #fff;
  --on-slate-muted: #e1edf5;
  --slate-panel: #3a4b5b;
  --slate-panel-hover: #455c6d;
  --slate-panel-line: #7893a6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.topbar { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 1.3rem; font-weight: 760; letter-spacing: -.035em; }
.brand-mark { flex: none; color: var(--brand-blue); }
.text-link { font-size: .84rem; text-decoration-thickness: 1px; text-underline-offset: 4px; font-weight: 660; }
.text-link span { margin-left: 1px; }
.workspace { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr); gap: 16px; margin-top: clamp(22px, 5vh, 56px); }
.intro { position: relative; isolation: isolate; overflow: hidden; border-radius: 22px; background: var(--brand-slate); color: var(--on-slate); }
.contours { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; color: #69bdd9; opacity: .48; pointer-events: none; }
.intro-content { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(25px, 3.25vw, 45px); gap: 32px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 4px 0 22px; color: var(--on-slate-muted); font-size: .68rem; font-weight: 760; letter-spacing: .11em; }
.eyebrow span { width: 7px; height: 7px; background: #8cddf3; border-radius: 50%; flex: none; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 4vw, 3.7rem); line-height: .99; letter-spacing: -.045em; font-weight: 500; }
.intro-text { font-size: clamp(.94rem, 1.4vw, 1.05rem); color: var(--on-slate-muted); line-height: 1.55; margin: 20px 0 0; max-width: 30ch; text-wrap: pretty; }
.handoff { background: var(--slate-panel); border: 1px solid var(--slate-panel-line); border-radius: 15px; padding: 15px; }
.handoff p { margin: 0 0 12px; color: var(--on-slate-muted); font-size: .83rem; line-height: 1.5; }
.handoff strong { color: var(--on-slate); }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--brand-blue); color: var(--brand-action-ink); text-decoration: none; padding: 11px 12px; border-radius: 9px; font-size: .84rem; font-weight: 740; min-height: 44px; }
.cta:hover { background: var(--brand-blue-hover); }
.cta:focus-visible, .sign-in-intro a:focus-visible, .intro a:focus-visible { outline-color: var(--on-slate); }
.chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: clamp(500px, 69vh, 630px); min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 12px 32px #21384912; }
.chat-header { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--subtle-line); gap: 11px; }
.avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--sky-tint); color: var(--brand-link); display: grid; place-items: center; flex: none; }
.identity { flex: 1; min-width: 0; }
.identity h2 { margin: 0 0 2px; font-size: 1.05rem; letter-spacing: -.02em; }
.identity p { margin: 0; color: var(--muted); font-size: .76rem; }
.reset { min-height: 44px; flex: none; padding: 0 9px; background: transparent; color: var(--brand-link); border: 0; border-radius: 8px; font-size: .76rem; font-weight: 700; }
.reset:hover:not(:disabled) { background: var(--sky-soft); }
.reset:disabled { color: var(--muted); }
.chat-scroll { overflow: auto; padding: 23px 22px; overscroll-behavior: contain; }
.chat-scroll:focus-visible { outline-offset: -3px; }
.messages { display: grid; gap: 16px; }
.turn { display: grid; gap: 10px; }
.reply, .visitor { margin: 0; padding: 12px 14px; max-width: min(94%, 56ch); overflow-wrap: anywhere; font-size: .9rem; line-height: 1.55; justify-self: start; }
.reply { background: var(--sky-soft); border-radius: 4px 14px 14px; }
.reply p { margin: 0; }
.visitor { background: var(--brand-slate); color: #fff; justify-self: end; border-radius: 14px 4px 14px 14px; font-weight: 570; white-space: pre-wrap; white-space: break-spaces; unicode-bidi: isolate; }
.answer-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 9px; font-size: .78rem; color: var(--brand-link); font-weight: 700; }
.answer-links a { padding-block: 4px; text-underline-offset: 3px; }
.prompt-area { margin-top: 23px; }
.prompt-area h3 { font-size: .73rem; margin: 0 0 8px; color: var(--muted); font-weight: 700; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { min-height: 44px; text-align: left; padding: 7px 12px; background: #fff; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); font-size: .79rem; font-weight: 620; }
.chip:hover { background: var(--sky-soft); border-color: var(--field-line); }
.chat-bottom { padding: 15px 22px; border-top: 1px solid var(--subtle-line); }
#composer { display: flex; gap: 8px; }
input { min-width: 0; min-height: 46px; flex: 1; border: 1px solid var(--field-line); border-radius: 10px; padding: 9px 11px; color: var(--ink); background: var(--sky-pale); font-size: 1rem; }
input::placeholder { color: var(--muted); opacity: 1; }
.send { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 46px; padding: 0 13px; border: 0; border-radius: 10px; background: var(--brand-blue); color: var(--brand-action-ink); font-size: .85rem; font-weight: 720; }
.send:hover:not(:disabled) { background: var(--brand-blue-hover); }
.privacy { margin: 8px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.foot { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; color: var(--muted); font-size: .74rem; margin: 17px 0 22px; }
.preview-label { font-weight: 690; }
.skip-link { position: absolute; z-index: 2; left: 16px; top: -100px; padding: 10px; border-radius: 4px; background: #fff; }
.skip-link:focus { top: 9px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 780px) {
  .shell { width: min(600px, calc(100% - 32px)); }
  .topbar { min-height: 60px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
  .intro-content { padding: 16px 19px; gap: 10px; }
  .eyebrow { margin: 0 0 10px; }
  h1 { font-size: clamp(1.62rem, 7.4vw, 2.25rem); }
  h1 br { display: none; }
  .intro-text { margin-top: 8px; max-width: 47ch; }
  .handoff { padding: 0; border: 0; background: transparent; }
  .handoff p { display: none; }
  .cta { width: max-content; max-width: 100%; gap: 12px; }
  .chat { height: clamp(420px, 62dvh, 560px); border-radius: 18px; }
  .chat-header, .chat-bottom { padding: 12px 14px; }
  .chat-scroll { padding: 16px 14px; }
}
@media (max-width: 365px) {
  .top-link { font-size: .72rem; }
  .brand { font-size: 1.13rem; }
  .brand-mark { width: 27px; height: 27px; }
  .chat-header { gap: 8px; }
  .avatar { width: 37px; height: 37px; }
}
.topic-groups { display: flex; flex-wrap: wrap; gap: 3px 7px; margin: 0 0 12px; }
.topic-group { min-height: 44px; padding: 5px 8px; border: 1px solid transparent; border-radius: 8px; color: var(--brand-link); background: transparent; font-size: .76rem; font-weight: 750; }
.topic-group[aria-pressed="true"] { border-color: var(--line); background: var(--sky-tint); color: var(--ink); }
.topic-group:hover { border-color: var(--field-line); }
.details { margin-top: 8px; color: var(--brand-link); }
.details summary { cursor: pointer; font-size: .79rem; width: fit-content; min-height: 34px; padding: 7px 2px; font-weight: 720; }
.details[open] p { margin-top: 6px; }

@media (max-width: 480px) {
  .topic-groups { gap: 2px 3px; }
  .topic-group { font-size: .7rem; padding-inline: 6px; }
}
[hidden] { display: none !important; }
.sign-in-main { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin-block: clamp(24px, 7vh, 68px); }
.sign-in-intro { min-height: 360px; }
.sign-in-intro .intro-content { justify-content: space-between; }
.sign-in-note { max-width: 36ch; color: var(--on-slate-muted); font-size: .84rem; margin: 0; line-height: 1.55; }
.sign-in-card, .policy-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 3.2vw, 38px); box-shadow: 0 12px 32px #21384912; }
.sign-in-card h2, .policy-card h2 { margin: 0; color: var(--ink); letter-spacing: -.035em; }
.sign-in-card p, .policy-header p:not(.eyebrow) { color: var(--muted); font-size: .88rem; line-height: 1.5; }
.sign-in-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin-top: 21px; }
.sign-in-form label, .policy-form label { font-size: .86rem; font-weight: 700; }
.sign-in-form input + label { margin-top: 5px; }
.sign-in-form button { margin-top: 10px; justify-self: start; min-width: 112px; justify-content: space-between; }
.sign-in-card .sign-in-error { background: #fff3e8; color: #713916; border-radius: 6px; padding: 8px 10px; }
.session-tools { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 4px 12px; }
.session-tools form { margin: 0; }
.access-chip, .policy-badge { border: 1px solid var(--line); border-radius: 6px; background: var(--sky-soft); color: var(--brand-link); padding: 5px 8px; font-size: .73rem; font-weight: 750; }
.policy-card { margin: 18px 0 0; }
.policy-header { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 10px; }
.policy-tag { margin: 0 0 8px; color: var(--brand-link); }
.policy-form { display: grid; gap: 7px; margin-top: 10px; }
.policy-form select { width: 100%; min-height: 46px; border: 1px solid var(--field-line); border-radius: 10px; padding: 9px 11px; color: var(--ink); background: var(--sky-pale); font: inherit; }
.policy-form select:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 3px; }
.policy-citation { color: var(--muted); font-size: .8rem; margin: 2px 0 8px; }
.policy-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); gap: 9px 16px; }
.policy-fields label { display: block; margin: 0 0 4px; }
.policy-form .send { justify-self: start; margin-top: 7px; }
.policy-form .send:disabled { opacity: .65; }
.policy-result { margin-top: 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--sky-soft); padding: 13px 16px; line-height: 1.5; font-size: .86rem; }
.policy-result[data-state="not-met"] { background: #fcf0e8; border-color: #f0d4c1; }
.policy-result[data-state="unclear"] { background: #faf5e7; border-color: #ebdfbb; }
.policy-result :is(h3,p,ul) { margin: 4px 0; }
@media (max-width: 700px) {
  .sign-in-main { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sign-in-intro { min-height: auto; }
  .sign-in-intro .intro-content { padding: 21px; gap: 14px; }
  .session-tools { gap: 3px 5px; }
}
@media (max-width: 430px) {
  .session-tools { padding-block: 5px; }
  .session-tools .policy-jump { order: 3; font-size: .72rem; }
  .session-tools .access-chip { font-size: .65rem; }
  .session-tools .sign-out { min-height: 32px; }
}

.policy-excerpt {
  margin: 1px 0 9px;
  padding: 9px 12px;
  border-left: 3px solid var(--brand-blue);
  background: var(--page);
  color: var(--ink);
  font-size: .85rem;
  line-height: 1.55;
  white-space: pre-line;
}
