/* Quote experience — calm surfaces, clear focus states, no continuous motion near inputs. */

.quote-page { max-width: var(--maxw); margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter) 40px; }
.quote-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vw, 44px); }
.quote-title { font-size: clamp(2.6rem, 7vw, 5.6rem); letter-spacing: -0.045em; font-weight: 800; }
.quote-lead { margin-top: 14px; max-width: 60ch; font-size: clamp(1.02rem, .6vw + .9rem, 1.2rem); color: var(--ink-2); }
.draft-status { display: inline-flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); }
.draft-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(46, 211, 160, .25); }

.notice { padding: 12px 16px; border-radius: var(--radius-sm); border: 2px solid var(--ink); font-size: .95rem; }
.notice--info { background: #fff3d1; margin-top: 12px; }
.notice--warn { background: var(--sun); margin-bottom: 20px; }

.quote-tabs { display: none; }
.quote-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr); gap: 22px; align-items: start; }
.quote-panel { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-lg); }
.form-panel { padding: clamp(18px, 3vw, 36px); box-shadow: 8px 8px 0 var(--ink); }

/* ---------------- stepper */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 14px; }
.stepper-btn {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 4px; border: 0; background: none; cursor: pointer;
  text-align: left; border-radius: 10px; color: var(--muted); font-size: .8rem; font-weight: 650; line-height: 1.15;
}
.stepper-btn:hover { background: var(--paper); }
.stepper-num {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid var(--line-strong); font-weight: 800; font-size: .82rem; transition: background-color .3s, border-color .3s, color .3s;
}
.stepper .is-done .stepper-num { background: var(--mint); border-color: var(--ink); color: var(--ink); }
.stepper-btn[aria-current="step"] { color: var(--ink); }
.stepper-btn[aria-current="step"] .stepper-num { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.progress-wrap { position: relative; padding-top: 52px; margin-bottom: clamp(20px, 3vw, 32px); }
.progress { height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.guide {
  --p: 0; position: absolute; left: calc(var(--p) * (100% - 46px)); top: 0; width: 46px; height: 54px;
  transition: left .7s var(--ease-out); pointer-events: none; z-index: 2;
}
.guide-yagi { display: block; width: 46px; }
.guide-bubble {
  position: absolute; bottom: 22px; left: 52px; width: max-content; max-width: min(320px, 60vw); padding: 7px 12px;
  border-radius: 14px 14px 14px 4px; background: var(--card); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-size: .84rem; font-weight: 650; line-height: 1.3; opacity: 0; transform: translateY(6px) scale(.96); transform-origin: left bottom;
  transition: opacity .25s, transform .35s var(--ease-spring);
}
.guide.is-flipped .guide-bubble { left: auto; right: 52px; border-radius: 14px 14px 4px 14px; transform-origin: right bottom; }
.guide-bubble.is-on { opacity: 1; transform: none; }
.guide.is-error .guide-bubble { background: #fde8e6; border-color: #b42318; box-shadow: 3px 3px 0 #b42318; color: #7a1610; }
@media (prefers-reduced-motion: no-preference) {
  .guide.is-walking .m-figure { animation: walk .35s var(--ease-in-out) 2; }
  .guide.is-walking .m-legs rect:first-child { animation: stepl .35s var(--ease-in-out) 2; }
  .guide.is-walking .m-legs rect:nth-child(2) { animation: stepr .35s var(--ease-in-out) 2; }
}
@keyframes walk { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes stepl { 50% { transform: translateY(-5px); } }
@keyframes stepr { 0%, 100% { transform: translateY(-5px); } 50% { transform: none; } }
.progress span { display: block; height: 100%; background: var(--tomato); transform-origin: left; transform: scaleX(.16); transition: transform .5s var(--ease-out); }

/* ---------------- steps + fields */
.step { border: 0; padding: 0; margin: 0; min-width: 0; }
.step-legend { padding: 0; margin-bottom: 22px; font-family: var(--font-display); font-weight: 750; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.03em; line-height: 1.05; outline: none; }
.step-count { display: block; margin-bottom: 8px; font-family: var(--font-body); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field { margin-bottom: 24px; border-radius: 14px; transition: background-color .4s, box-shadow .4s; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.date-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.date-row input[type=date] { width: auto; min-width: 210px; }
.field-label { display: block; margin-bottom: 8px; font-weight: 700; }
.req { color: var(--tomato-deep); }
.opt { font-weight: 500; color: var(--muted); font-size: .9em; }
.field-hint { margin: -2px 0 10px; color: var(--muted); font-size: .92rem; }
.field-hint--small { font-size: .84rem; margin-top: 8px; }
/* Errors are always in the DOM and open smoothly, so nothing jumps. */
.field-error {
  display: grid; grid-template-rows: 0fr; opacity: 0; margin: 0; color: #b42318; font-weight: 650; font-size: .92rem; line-height: 1.35;
  transition: grid-template-rows .28s var(--ease-out), opacity .2s, margin-top .28s var(--ease-out);
}
.field-error > span { overflow: hidden; min-height: 0; display: flex; gap: 8px; align-items: flex-start; }
.field-error > span::before {
  content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: #b42318; color: #fff; font-size: .72rem; font-weight: 800;
}
.field-error.is-shown { grid-template-rows: 1fr; opacity: 1; margin-top: 8px; }
.field-error--top.is-shown { margin: 0 0 10px; }
.has-error .field-hint--small { display: none; }
.has-error input:not([type=radio]):not([type=checkbox]), .has-error textarea { border-color: #b42318; box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.has-error .choice-body, .has-error .choice-check > span { border-color: rgba(180, 35, 24, .55); }
@media (prefers-reduced-motion: no-preference) {
  .field.is-shaking input:not([type=radio]):not([type=checkbox]), .field.is-shaking textarea, .field.is-shaking .choice-grid { animation: fieldshake .42s var(--ease-out); }
}
@keyframes fieldshake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.field.is-valid input:not([type=radio]):not([type=checkbox]) { border-color: var(--mint); }
.field.is-updated { animation: fieldflash 1.6s var(--ease-out); }
@keyframes fieldflash { 0% { background: rgba(255, 200, 61, .55); box-shadow: 0 0 0 8px rgba(255, 200, 61, .55); } 100% { background: transparent; box-shadow: 0 0 0 8px transparent; } }

input[type=text], input[type=email], input[type=url], input[type=tel], input[type=date], textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line-strong);
  background: #fff; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(43, 78, 255, .25); }
input::placeholder, textarea::placeholder { color: #8f887a; }
.char-count { margin-top: 6px; text-align: right; font-size: .8rem; color: var(--muted); }

/* choice cards */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-card, .choice-check, .pill, .segmented label, .toggle, .check { position: relative; cursor: pointer; }
.choice-card input, .choice-check input, .pill input, .segmented input, .toggle input {
  position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer;
}
.choice-body {
  display: grid; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line-strong); background: #fff;
  transition: border-color .2s, background-color .2s, box-shadow .25s var(--ease-out), transform .25s var(--ease-out);
}
.choice-body strong { font-size: 1rem; }
.choice-body small { color: var(--muted); font-size: .86rem; line-height: 1.35; }
.choice-card:hover .choice-body { border-color: var(--ink); }
.choice-card input:checked + .choice-body { border-color: var(--ink); background: var(--sun); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.choice-card input:checked + .choice-body small { color: var(--ink-2); }
.choice-card input:focus-visible + .choice-body, .choice-check input:focus-visible + span, .pill input:focus-visible + span,
.segmented input:focus-visible + span, .toggle input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }

.choice-check > span {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line-strong);
  background: #fff; font-weight: 600; font-size: .95rem; transition: border-color .2s, background-color .2s;
}
.choice-check > span::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--ink); background: #fff;
  transition: background-color .2s;
}
.choice-check input:checked + span { border-color: var(--ink); background: #e9f9f2; }
.choice-check input:checked + span::before { background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%2315130f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.choice-check.is-complex input:checked + span { background: #fff3d1; }
.complex-badge { position: absolute; right: 12px; top: 50%; translate: 0 -50%; font-style: normal; color: var(--tomato-deep); pointer-events: none; }
.choice-check.is-unknown > span { border-style: dashed; }
.choice-check > span { flex-wrap: wrap; }
.choice-hint { flex-basis: 100%; padding-left: 30px; margin-top: -2px; font-size: .82rem; font-weight: 500; color: var(--muted); line-height: 1.35; }
.choice-check:has(.choice-hint) { grid-column: 1 / -1; }
.choice-check:has(.choice-hint) > span { background: #f2fbf7; border-style: solid; }

.choice-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill > span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line-strong);
  background: #fff; font-weight: 600; font-size: .95rem; transition: border-color .2s, background-color .2s, transform .25s var(--ease-spring);
}
.pill:hover > span { border-color: var(--ink); }
.pill input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 16px; background: var(--paper-2); }
.segmented > label > span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 12px; font-weight: 600; font-size: .92rem; transition: background-color .2s, box-shadow .2s; }
.segmented input:checked + span { background: #fff; box-shadow: 0 0 0 2px var(--ink); }
.content-matrix { display: grid; gap: 10px; }
.content-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; }
.content-kind { font-weight: 700; }

.toggle > span { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; font-weight: 650; }
.toggle > span::before { content: ""; width: 44px; height: 26px; border-radius: 99px; background: var(--paper-2); border: 2px solid var(--ink); box-shadow: inset 0 0 0 0 var(--mint); transition: box-shadow .3s var(--ease-out); }
.toggle > span::after { content: ""; position: absolute; left: 6px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--ease-spring); }
.toggle input:checked + span::before { box-shadow: inset 0 0 0 20px var(--mint); }
.toggle input:checked + span::after { transform: translateX(18px); }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.check input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--ink); cursor: pointer; }
.check a { color: var(--cobalt); font-weight: 650; }
.consents { margin-top: 26px; padding-top: 22px; border-top: 2px dashed var(--line-strong); }

.ref-list { display: grid; gap: 8px; margin-bottom: 4px; }
.ref-row { display: flex; gap: 8px; align-items: center; }

.dropzone { display: block; position: relative; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone-inner {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 84px; padding: 16px; border-radius: 16px;
  border: 2px dashed var(--ink); background: var(--paper); font-weight: 700; transition: background-color .2s;
}
.dropzone:hover .dropzone-inner { background: #fff3d1; }
.dropzone input:focus-visible + .dropzone-inner { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.dropzone-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); }
.file-list { list-style: none; display: grid; gap: 6px; margin-top: 10px; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--paper); font-size: .9rem; overflow-wrap: anywhere; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-alert { margin-bottom: 18px; padding: 12px 16px; border-radius: 14px; border: 2px solid #b42318; background: #fde8e6; color: #7a1610; font-weight: 650; }
.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--paper-2); }
.form-nav [data-next], .form-nav [data-submit] { margin-left: auto; }
.form-nav [hidden] { display: none; }

/* submit loading */
.submit-loading { display: none; gap: 5px; }
.submit-loading i, .typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.is-loading .submit-loading { display: inline-flex; }
@media (prefers-reduced-motion: no-preference) {
  .submit-loading i, .typing-dots i { animation: dot 1s var(--ease-in-out) infinite; }
  .submit-loading i:nth-child(2), .typing-dots i:nth-child(2) { animation-delay: .15s; }
  .submit-loading i:nth-child(3), .typing-dots i:nth-child(3) { animation-delay: .3s; }
}
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }

/* summary */
.summary { display: grid; gap: 12px; }
.summary-group { padding: 16px 18px; border-radius: 16px; background: var(--paper); border: 1.5px solid var(--line); }
.summary-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.summary-head h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
.summary dl { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 6px 14px; margin: 0; font-size: .94rem; }
.summary dt { color: var(--muted); font-weight: 600; }
.summary dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* success */
.success { text-align: center; padding: clamp(10px, 3vw, 30px) 0; outline: none; }
.success-mascot { position: relative; width: 170px; margin: 0 auto 18px; }
.success-title { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.04em; }
.success-text { margin-top: 10px; color: var(--ink-2); }
.success-code-label { margin-top: 24px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.success-code { display: inline-block; margin-top: 6px; padding: 10px 18px; border-radius: 14px; border: 2px dashed var(--ink); background: var(--sun); font-family: ui-monospace, Menlo, monospace; font-size: 1.35rem; font-weight: 700; letter-spacing: .06em; }
.success-mail { margin-top: 14px; }
.success-disclaimer { margin: 14px auto 0; max-width: 46ch; font-size: .9rem; color: var(--muted); }
.success-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; left: 50%; top: 40%; width: 10px; height: 14px; border-radius: 3px; opacity: 0; }
.confetti i:nth-child(odd) { background: var(--tomato); } .confetti i:nth-child(even) { background: var(--cobalt); }
.confetti i:nth-child(3n) { background: var(--sun); } .confetti i:nth-child(4n) { background: var(--mint); }
@media (prefers-reduced-motion: no-preference) {
  .success:not([hidden]) .mascot--success .m-figure { animation: hop .9s var(--ease-spring) 2; }
  .success:not([hidden]) .confetti i { animation: burst 1.3s var(--ease-out) forwards; }
  .confetti i:nth-child(1) { --x: -90px; --y: -80px; --r: 200deg; } .confetti i:nth-child(2) { --x: 80px; --y: -100px; --r: -160deg; }
  .confetti i:nth-child(3) { --x: -110px; --y: 10px; --r: 120deg; } .confetti i:nth-child(4) { --x: 110px; --y: -10px; --r: -220deg; }
  .confetti i:nth-child(5) { --x: -40px; --y: -120px; --r: 300deg; } .confetti i:nth-child(6) { --x: 40px; --y: -130px; --r: -90deg; }
  .confetti i:nth-child(7) { --x: -70px; --y: 60px; --r: 160deg; } .confetti i:nth-child(8) { --x: 70px; --y: 50px; --r: -260deg; }
}
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(4px) scale(1.06, .94); } 60% { transform: translateY(-26px) scale(.96, 1.04); } }
@keyframes burst { 0% { opacity: 1; transform: translate(-50%, 0) rotate(0); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r)); } }

/* ---------------- assistant */
/* Fixed-height panel: the conversation scrolls inside it instead of growing the page. */
.assistant { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - 32px); overflow: hidden; }
.assistant:has([data-ai-chat]:not([hidden])) { height: min(760px, calc(100vh - var(--header-h) - 32px)); }
.assistant-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 2px solid var(--ink); background: var(--paper-2); }
.assistant-avatar { width: 52px; flex: none; }
.assistant-title { font-size: 1.25rem; letter-spacing: -0.02em; }
.assistant-status { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.assistant-status span { width: 8px; height: 8px; border-radius: 50%; background: #9a9182; }
.assistant-status.is-on span { background: var(--mint); }
.assistant-status.is-off span { background: var(--tomato); }
.assistant-restart { margin-left: auto; font-size: .85rem; }
.assistant-intro, .assistant-off { padding: 20px; display: grid; gap: 14px; }
.assistant-notice { padding: 12px 14px; border-radius: 14px; background: var(--paper); font-size: .88rem; color: var(--ink-2); border: 1.5px solid var(--line); }
.assistant-chat { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat-log { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.chat-msg { max-width: 92%; }
.chat-msg p { padding: 10px 14px; border-radius: 16px; white-space: pre-line; overflow-wrap: anywhere; font-size: .95rem; }
.chat-msg--assistant p { background: var(--paper); border: 1.5px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg--user { align-self: flex-end; }
.chat-msg--user p { background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; }
.chat-msg--system { align-self: center; max-width: 100%; }
.chat-msg--system p { background: #fff3d1; border: 1.5px dashed var(--ink); font-size: .9rem; border-radius: 12px; }
.chat-note { display: block; margin-top: 4px; font-size: .74rem; color: var(--muted); }
.chat-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.chat-chip { padding: 3px 9px; border-radius: 999px; background: #e9f9f2; border: 1.5px solid var(--mint); color: var(--ink); }
.chat-summary { margin-top: 8px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--ink); background: #fff; display: grid; gap: 8px; }
.chat-summary p { padding: 0; border: 0; background: none; }
.chat-summary .btn { justify-self: start; }
/* special-assessment card inside the chat */
.chat-review { margin-top: 10px; display: grid; gap: 10px; max-width: 100%; }
.chat-msg .chat-review p { padding: 0; border: 0; background: none; border-radius: 0; }
.chat-review-note { padding: 10px 12px !important; border-radius: 12px !important; background: #fff3d1 !important; border: 1.5px solid #e8b100 !important; font-size: .86rem; line-height: 1.45; overflow-wrap: anywhere; }
.chat-review-form { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: #fff; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--tomato); }
.chat-review-form > strong { font-family: var(--font-display); font-size: 1.05rem; }
.chat-review-form > p { font-size: .84rem; color: var(--ink-2); }
.chat-review-field { display: grid; gap: 4px; font-size: .8rem; font-weight: 700; }
.chat-review-field input { min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--line-strong); background: #fff; font-size: .95rem; }
.chat-review-field input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(43, 78, 255, .2); }
.chat-review-check { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: start; font-size: .8rem; }
.chat-review-check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--ink); }
.chat-review-check a { color: var(--cobalt); font-weight: 650; }
.chat-review-check .chat-review-err { grid-column: 1 / -1; }
.chat-review-err { font-style: normal; color: #b42318; font-weight: 650; font-size: .78rem; min-height: 0; }
.chat-review-err:empty { display: none; }
.chat-review-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.chat-review-actions .btn { flex: 1 1 auto; }
.chat-review-later { --bg: var(--card); --fg: var(--ink-2); --hover-bg: var(--paper-2); --hover-fg: var(--ink); border-color: var(--line-strong); font-weight: 650; }
.chat-review-later:hover, .chat-review-later:focus-visible { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.chat-review-done { padding: 10px 12px !important; border-radius: 12px !important; background: #e9f9f2 !important; border: 1.5px solid var(--mint) !important; font-weight: 650; font-size: .88rem; }
.chat-go-form { align-self: center; }
.chat-typing { display: flex; align-items: center; gap: 10px; padding: 0 18px 10px; font-size: .85rem; color: var(--muted); }
.typing-dots { display: inline-flex; gap: 4px; color: var(--tomato); }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 2px solid var(--paper-2); }
.chat-compose textarea { min-height: 50px; max-height: 160px; resize: none; }
.chat-compose textarea:disabled { background: var(--paper); }
.chat-meta { padding: 0 18px 12px; font-size: .78rem; color: var(--muted); min-height: 1em; }

body.is-submitting { cursor: progress; }

/* ---------------- responsive */
@media (max-width: 900px) {
  .quote-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 18px;
    background: var(--paper-2); border: 2px solid var(--ink); position: sticky; top: calc(var(--header-h) + 6px); z-index: 5;
  }
  .quote-tabs button { min-height: 46px; border: 0; border-radius: 14px; background: none; font-weight: 700; cursor: pointer; }
  .quote-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
  .quote-tabs small { font-weight: 500; opacity: .8; }
  .quote-layout { grid-template-columns: 1fr; }
  .quote-panel[data-panel] { display: none; }
  .quote-panel[data-panel].is-active { display: flex; flex-direction: column; }
  .form-panel.is-active { display: block !important; }
  .form-panel { box-shadow: 5px 5px 0 var(--ink); }
  .assistant { position: static; max-height: none; }
  .assistant:has([data-ai-chat]:not([hidden])) { height: min(78svh, 680px); }
  .stepper { grid-template-columns: repeat(6, 1fr); }
  .stepper-label { display: none; }
  .stepper-btn { justify-content: center; }
}
@media (max-width: 640px) {
  .choice-grid, .choice-grid--cards, .field-row { grid-template-columns: 1fr; }
  .content-row { grid-template-columns: 1fr; gap: 6px; }
  .summary dl { grid-template-columns: 1fr; gap: 0; }
  .summary dd { margin-bottom: 8px; }
  .form-nav { flex-wrap: wrap; }
  .form-nav .btn { flex: 1; }
  .form-nav [data-submit] { width: 100%; }
  .guide-bubble { max-width: 58vw; font-size: .8rem; }
  .ref-row input { min-width: 0; }
}
