:root {
  --ink: #101315;
  --ink-soft: #1a1f22;
  --paper: #f2f1ec;
  --white: #fff;
  --yellow: #f4c400;
  --yellow-hot: #ffda21;
  --line: #d9d9d3;
  --muted: #707679;
  --success: #27724f;
  --danger: #ae392f;
  --display: "Bahnschrift Condensed", "Aptos Display", "Franklin Gothic Medium", sans-serif;
  --body: "Aptos", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); }
button, textarea, input, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .8rem 1rem; color: var(--ink); background: var(--yellow); font-weight: 900; }
.skip-link:focus { top: 1rem; }

.app-header { position: sticky; z-index: 20; top: 0; min-height: 82px; display: flex; align-items: stretch; justify-content: space-between; color: #fff; background: var(--ink); border-bottom: 5px solid var(--yellow); box-shadow: 0 8px 30px #0002; }
.brand-lockup { min-width: 310px; display: flex; align-items: center; gap: 1.1rem; padding: 1rem clamp(1rem, 3vw, 2.6rem); }
.brand-lockup strong { max-width: 180px; font: 900 1.25rem/.88 var(--display); letter-spacing: -.02em; text-transform: uppercase; }
.brand-lockup img { width: 120px; height: 34px; object-fit: cover; object-position: center; }
.brand-rule { width: 1px; height: 36px; background: #484e51; }
.header-actions { display: flex; align-items: center; }
.header-button, .logout-button { align-self: stretch; padding: 0 1.2rem; color: #c1c6c8; background: transparent; border: 0; border-left: 1px solid #2c3235; font: 800 .72rem var(--display); letter-spacing: .07em; text-transform: uppercase; }
.header-button:hover, .logout-button:hover { color: var(--ink); background: var(--yellow); }
.header-button.is-active { color: var(--ink); background: var(--yellow); }
.connection { display: flex; align-items: center; gap: .65rem; padding: 0 1.2rem; border-left: 1px solid #2c3235; font-size: .72rem; }
.connection i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px #f4c40018; }
.connection small, .operator-badge small { display: block; margin-top: .15rem; color: #858c8f; font-size: .62rem; }
.operator-badge { align-self: stretch; display: flex; align-items: center; gap: .7rem; padding: 0 1.2rem; color: inherit; background: transparent; border: 0; border-left: 1px solid #2c3235; text-align: left; }
.operator-badge:hover { background: #1a1f22; }
.operator-badge > span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 50%; font: 900 .78rem var(--display); }
.operator-badge strong { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
.logout-button { width: 54px; padding: 0; font-size: 1.2rem; }

.chat-page { height: calc(100vh - 82px); min-height: 540px; padding: clamp(1.2rem, 3vw, 2.6rem); overflow: hidden; background: radial-gradient(circle at 80% 12%, #f4c4000d, transparent 25%), var(--paper); }
.chat-shell { width: min(1120px, 100%); height: 100%; min-height: 0; margin: 0 auto; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #fff; border: 1px solid #d6d6d0; box-shadow: 0 18px 60px #1111; }
.chat-heading { position: relative; display: grid; grid-template-columns: auto 1fr minmax(230px, .6fr); align-items: center; gap: 1rem; padding: 1.5rem 2rem; color: #fff; background: linear-gradient(120deg, #0d1012 0%, #1b2023 100%); border-bottom: 4px solid var(--yellow); overflow: hidden; }
.chat-heading::after { content: ""; position: absolute; right: -45px; width: 150px; height: 150px; border: 1px solid #f4c40030; border-radius: 50%; }
.assistant-mark, .message-avatar { flex: 0 0 auto; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 50%; font: 900 1rem var(--display); }
.assistant-mark { width: 50px; height: 50px; }
.online-label { color: var(--yellow); font: 800 .64rem var(--display); letter-spacing: .13em; }
.chat-heading h1 { margin: .25rem 0 0; font: 900 clamp(1.7rem, 3.5vw, 2.8rem)/.9 var(--display); letter-spacing: -.025em; text-transform: uppercase; }
.chat-heading p { position: relative; z-index: 1; margin: 0; color: #aeb4b6; font-size: .8rem; line-height: 1.45; }

.chat-thread { min-height: 0; padding: 2rem clamp(1rem, 4vw, 3.2rem); overflow-y: auto; scroll-behavior: smooth; background-color: #fafaf7; background-image: linear-gradient(#e9e9e4 1px, transparent 1px), linear-gradient(90deg, #e9e9e4 1px, transparent 1px); background-size: 32px 32px; background-position: -1px -1px; }
.message { max-width: 88%; display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.25rem; animation: message-in .24s ease both; }
.message-avatar { width: 34px; height: 34px; margin-top: .15rem; font-size: .72rem; box-shadow: 0 0 0 5px #f4c40020; }
.message-content { min-width: 0; padding: 1rem 1.1rem; background: #fff; border: 1px solid #d9d9d3; border-radius: 2px 14px 14px 14px; box-shadow: 0 4px 14px #1110d; }
.message-content p { margin: 0; line-height: 1.55; }
.message-content p + p { margin-top: .55rem; }
.user-message { margin-left: auto; flex-direction: row-reverse; }
.user-message .message-avatar { color: #fff; background: var(--ink); box-shadow: none; }
.user-message .message-content { color: #fff; background: var(--ink); border-color: var(--ink); border-radius: 14px 2px 14px 14px; }
.system-message .message-content { border-left: 4px solid var(--yellow); }
.welcome-message .message-content { max-width: 650px; }
.example-prompt { display: block; margin-top: .8rem; padding: .8rem 1rem; color: #343a3c; background: #f5f5f1; border: 1px solid #d3d5d1; border-left: 4px solid var(--yellow); text-align: left; font-size: .85rem; }
.example-prompt:hover { background: #fff8cc; }
.typing-message .message-content { display: flex; align-items: center; gap: .3rem; min-height: 46px; }
.typing-message span { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); animation: typing .7s ease-in-out infinite alternate; }
.typing-message span:nth-child(2) { animation-delay: .15s; }
.typing-message span:nth-child(3) { animation-delay: .3s; }
.typing-message em { margin-left: .45rem; color: var(--muted); font-size: .72rem; font-style: normal; }

.options-bubble { width: 100%; max-width: 100%; }
.options-bubble .message-content { width: calc(100% - 46px); padding: 0; overflow: hidden; }
.options-intro { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.options-intro strong { display: block; font: 900 1.15rem var(--display); text-transform: uppercase; }
.options-intro span { color: var(--muted); font-size: .78rem; }
.option-list { display: grid; }
.option-card { position: relative; display: grid; grid-template-columns: 46px minmax(220px, 1fr) minmax(170px, .46fr) 120px; min-height: 142px; background: #fff; border-bottom: 1px solid var(--line); transition: background .15s ease; }
.option-card:last-child { border-bottom: 0; }
.option-card:hover { background: #fffdf2; }
.option-card.is-selected { background: #fff9d8; }
.option-index { display: grid; place-items: start center; padding-top: 1.1rem; color: var(--yellow); background: var(--ink); font: 900 1.45rem var(--display); }
.option-copy { min-width: 0; padding: 1rem 1.15rem; }
.option-brand { color: #737a7d; font: 800 .64rem var(--display); letter-spacing: .14em; text-transform: uppercase; }
.option-model { margin: .25rem 0; font: 900 1.35rem/1 var(--display); text-transform: uppercase; }
.option-size { margin: 0 0 .7rem !important; font-weight: 900; }
.option-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.option-badges span { padding: .35rem .5rem; color: #4d5558; background: #eff0ec; font-size: .65rem; }
.option-badges b { color: var(--ink); }
.option-price { display: flex; flex-direction: column; justify-content: center; padding: 1rem; border-left: 1px solid var(--line); }
.option-price small { color: #777e81; font: 800 .6rem var(--display); letter-spacing: .1em; }
.option-price strong { margin: .2rem 0; font: 900 1.75rem var(--display); }
.option-price span { color: #858b8d; font-size: .64rem; line-height: 1.25; }
.option-availability { margin-top: .55rem; color: var(--success); font-size: .68rem; font-style: normal; font-weight: 800; }
.option-select { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; background: #f5f5f1; border-left: 1px solid var(--line); cursor: pointer; }
.option-select input { position: absolute; opacity: 0; }
.option-select span { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid #979d9f; }
.option-select input:checked + span { background: var(--yellow); border-color: var(--yellow); }
.option-select input:checked + span::after { content: "✓"; font-weight: 900; }
.option-select b { font: 800 .64rem var(--display); text-transform: uppercase; }
.result-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; padding: .8rem 1rem; color: #fff; background: var(--ink); }
.result-actions span { margin-right: auto; color: #d7dbdc; font-size: .75rem; }
.result-actions strong { color: var(--yellow); }
.action-button, .primary-button { min-height: 44px; padding: .7rem 1rem; border: 1px solid #5c6366; font: 900 .7rem var(--display); letter-spacing: .05em; text-transform: uppercase; }
.action-button { color: #fff; background: transparent; }
.action-button:hover { border-color: var(--yellow); }
.primary-button { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.primary-button:hover { background: var(--yellow-hot); }
.action-button:disabled, .primary-button:disabled { opacity: .45; cursor: not-allowed; }

.comparison-bubble .message-content, .quote-bubble .message-content, .history-bubble .message-content { width: min(760px, calc(100vw - 8rem)); max-width: 100%; }
.bubble-title { display: block; margin-bottom: .7rem; font: 900 1rem var(--display); text-transform: uppercase; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: .75rem; }
.comparison-table th, .comparison-table td { padding: .65rem; border: 1px solid #dedfd9; text-align: left; }
.comparison-table thead th { color: #fff; background: var(--ink); font-family: var(--display); text-transform: uppercase; }
.comparison-table tbody th { color: #6c7376; background: #f2f2ee; text-transform: uppercase; }
.comparison-table .best { background: #fff5b7; font-weight: 900; }
.inline-quote-form { display: grid; grid-template-columns: 1fr 1fr .65fr; gap: .7rem; min-width: min(680px, 70vw); }
.inline-quote-form > p, .inline-quote-form > button { grid-column: 1 / -1; }
.inline-quote-form > p { margin-bottom: .3rem; }
.inline-quote-form label { color: #6d7477; font: 800 .63rem var(--display); letter-spacing: .07em; text-transform: uppercase; }
.inline-quote-form input, .inline-quote-form select { width: 100%; height: 42px; margin-top: .3rem; padding: 0 .65rem; background: #f4f4f0; border: 1px solid #cfd1cc; }
.inline-quote-form input, .inline-quote-form select, .composer textarea, .access-form input { font-size: 16px; }
.inline-quote-form .primary-button { width: max-content; }
.quote-ready { display: flex; align-items: center; gap: 1rem; }
.quote-ready i { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 50%; font-style: normal; font-weight: 900; }
.quote-ready p { margin-bottom: .65rem; font-weight: 800; }
.download-button, .download-mini { padding: .6rem .8rem; color: #fff; background: var(--ink); border: 0; font: 900 .66rem var(--display); letter-spacing: .05em; text-transform: uppercase; }
.download-button:hover, .download-mini:hover { color: var(--ink); background: var(--yellow); }
.history-list { display: grid; gap: .45rem; margin-top: .7rem; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem; background: #f4f4f0; border-left: 3px solid var(--yellow); }
.history-item strong, .history-item span { display: block; }
.history-item span { color: var(--muted); font-size: .72rem; }

.quotes-shell { width: min(1240px, 100%); height: 100%; min-height: 0; margin: 0 auto; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #fff; border: 1px solid #d6d6d0; box-shadow: 0 18px 60px #1111; }
.quotes-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.6rem 2rem; color: #fff; background: linear-gradient(120deg, #0d1012 0%, #1b2023 100%); border-bottom: 4px solid var(--yellow); overflow: hidden; }
.quotes-heading::after { content: ""; position: absolute; right: 180px; width: 150px; height: 150px; border: 1px solid #f4c40030; border-radius: 50%; }
.quotes-heading > * { position: relative; z-index: 1; }
.quotes-heading h1 { margin: .2rem 0 0; font: 900 clamp(2rem, 4vw, 3.3rem)/.86 var(--display); letter-spacing: -.03em; text-transform: uppercase; }
.quotes-heading p { margin: .55rem 0 0; color: #aeb4b6; font-size: .8rem; }
.quotes-workspace { min-height: 0; overflow-y: auto; background-color: #fafaf7; background-image: linear-gradient(#ecece7 1px, transparent 1px), linear-gradient(90deg, #ecece7 1px, transparent 1px); background-size: 32px 32px; }
.quotes-index { min-height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: #f4f4ef; }
.quotes-index > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.2rem; background: #e9e9e3; border-bottom: 1px solid var(--line); }
.quotes-index > header span { display: block; color: var(--muted); font: 800 .58rem var(--display); letter-spacing: .14em; }
.quotes-index > header strong { display: block; margin-top: .15rem; font: 900 1rem var(--display); text-transform: uppercase; }
.quotes-index > header b { min-width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 50%; font: 900 .75rem var(--display); }
.quotes-list-columns { display: grid; grid-template-columns: 1.1fr .65fr 1.15fr 1.25fr .7fr 28px; gap: 1rem; padding: .7rem 1.35rem; color: var(--muted); background: #f7f7f3; border-bottom: 1px solid var(--line); font: 800 .58rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.quotes-list { min-height: 0; padding: .8rem 1rem 1.2rem; overflow-y: auto; }
.quotes-list-empty { padding: 1.5rem 1rem; color: var(--muted); line-height: 1.5; text-align: center; }
.quote-list-item { width: 100%; display: grid; grid-template-columns: 1.1fr .65fr 1.15fr 1.25fr .7fr 28px; align-items: center; gap: 1rem; margin-bottom: .5rem; padding: 1rem 1.1rem; color: var(--ink); background: #fff; border: 1px solid #d7d8d2; border-left: 4px solid transparent; text-align: left; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.quote-list-item:hover { background: #fffbed; border-left-color: var(--yellow); transform: translateX(2px); }
.quote-list-item.is-active { background: #fff7c7; border-color: #dfc75e; border-left-color: var(--ink); }
.quote-list-number { font: 900 1rem var(--display); letter-spacing: .01em; }
.quote-list-date { color: var(--muted); font-size: .68rem; }
.quote-list-customer { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555d60; font-size: .76rem; }
.quote-list-measure { color: var(--muted); font: 800 .64rem var(--display); letter-spacing: .04em; text-transform: uppercase; }
.quote-list-options { color: #555d60; font: 800 .66rem var(--display); text-transform: uppercase; }
.quote-list-open { color: var(--ink); font-size: 1.15rem; text-align: right; }
.quote-detail { display: none; min-height: 100%; padding: clamp(1.2rem, 3vw, 2.4rem); }
.quotes-workspace.is-detail-open .quotes-index { display: none; }
.quotes-workspace.is-detail-open .quote-detail { display: block; }
.quote-detail-empty { min-height: 100%; display: grid; place-content: center; justify-items: center; padding: 2rem; color: var(--muted); text-align: center; }
.quote-detail-empty span { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 1rem; color: var(--ink); background: var(--yellow); border-radius: 50%; font-size: 1.5rem; }
.quote-detail-empty strong { color: var(--ink); font: 900 1.25rem var(--display); text-transform: uppercase; }
.quote-detail-empty p { max-width: 360px; line-height: 1.5; }
.quote-document { max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid #d6d7d1; box-shadow: 0 12px 35px #1111; }
.quote-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; color: #fff; background: var(--ink); border-bottom: 5px solid var(--yellow); }
.quote-detail-header small { color: var(--yellow); font: 800 .6rem var(--display); letter-spacing: .13em; }
.quote-detail-header h2 { margin: .25rem 0 0; font: 900 clamp(1.55rem, 3vw, 2.35rem)/.9 var(--display); text-transform: uppercase; }
.quote-status { padding: .42rem .65rem; color: var(--ink); background: var(--yellow); font: 900 .62rem var(--display); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.quote-detail-actions { display: flex; gap: .6rem; padding: 1rem 1.5rem; background: #f1f1ec; border-bottom: 1px solid var(--line); }
.quote-detail-actions .primary-button { min-width: 150px; }
.quote-back-button { min-height: 44px; padding: .7rem 1rem; color: var(--ink); background: #fff; border: 1px solid #bfc2bd; font: 900 .7rem var(--display); letter-spacing: .05em; text-transform: uppercase; }
.quote-back-button:hover { border-color: var(--ink); }
.quote-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.quote-fact { min-width: 0; padding: 1rem 1.2rem; border-right: 1px solid var(--line); }
.quote-fact:nth-child(3n) { border-right: 0; }
.quote-fact:nth-child(n+4) { border-top: 1px solid var(--line); }
.quote-fact small { display: block; margin-bottom: .3rem; color: var(--muted); font: 800 .58rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.quote-fact strong { display: block; overflow-wrap: anywhere; font-size: .82rem; }
.quote-alternatives { padding: 1.3rem 1.5rem 1.5rem; }
.quote-alternatives > h3 { margin: 0 0 .8rem; font: 900 1rem var(--display); text-transform: uppercase; }
.quote-alternative { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem 1.2rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.quote-alternative:first-of-type { border-top: 3px solid var(--ink); }
.quote-alternative-brand { color: var(--muted); font: 800 .6rem var(--display); letter-spacing: .12em; text-transform: uppercase; }
.quote-alternative h4 { margin: .2rem 0; font: 900 1.1rem var(--display); text-transform: uppercase; }
.quote-alternative p { margin: 0; color: #687073; font-size: .72rem; }
.quote-alternative-price { grid-row: 1 / 4; grid-column: 2; align-self: center; text-align: right; }
.quote-alternative-price small { display: block; color: var(--muted); font: 800 .55rem var(--display); letter-spacing: .08em; }
.quote-alternative-price strong { display: block; margin-top: .15rem; font: 900 1.45rem var(--display); }

.composer { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: stretch; gap: .7rem; padding: .9rem 1rem; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -10px 30px #1110a; }
.voice-button { width: 72px; min-height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; color: var(--ink); background: var(--yellow); border: 0; border-radius: 50%; }
.voice-button:hover { background: var(--yellow-hot); }
.voice-button.is-listening { color: #fff; background: var(--danger); animation: listening 1s ease-in-out infinite alternate; }
.voice-button svg { width: 24px; height: 24px; fill: currentColor; }
.voice-button span { font: 900 .6rem var(--display); text-transform: uppercase; }
.composer-field { min-width: 0; padding: .55rem .9rem; background: #f5f5f1; border: 1px solid #d2d3ce; }
.composer-field:focus-within { background: #fffdf0; border-color: var(--yellow); }
.composer textarea { width: 100%; max-height: 120px; padding: .15rem 0; resize: none; color: var(--ink); background: transparent; border: 0; outline: 0; line-height: 1.45; }
.composer textarea::placeholder { color: #858b8d; }
.composer-field small { display: block; color: #8b9092; font-size: .65rem; }
.send-button { min-width: 120px; display: flex; align-items: center; justify-content: center; gap: .6rem; color: #fff; background: var(--ink); border: 0; font: 900 .72rem var(--display); text-transform: uppercase; }
.send-button:hover { color: var(--ink); background: var(--yellow); }
.send-button svg { width: 20px; fill: currentColor; }

.profile-modal { width: min(980px, calc(100vw - 2rem)); max-height: min(760px, calc(100vh - 2rem)); padding: 0; color: var(--ink); background: #fff; border: 0; box-shadow: 0 30px 110px #000b; }
.profile-modal::backdrop { background: #0b0e0fd9; }
.profile-modal[open] { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(520px, 1.55fr); }
.profile-rail { position: relative; min-height: 620px; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 2.5rem; color: #fff; background: linear-gradient(145deg, #080a0b, #202629); border-bottom: 8px solid var(--yellow); overflow: hidden; }
.profile-rail::after { content: ""; position: absolute; right: -90px; top: 110px; width: 230px; height: 230px; border: 1px solid #f4c4002e; border-radius: 50%; }
.profile-rail > * { position: relative; z-index: 1; }
.profile-rail h2 { margin: .6rem 0 1rem; font: 900 clamp(2.8rem, 5vw, 4.5rem)/.82 var(--display); letter-spacing: -.035em; text-transform: uppercase; }
.profile-rail p { margin: 0; color: #aeb4b6; font-size: .82rem; line-height: 1.55; }
.profile-close { position: absolute; z-index: 2; top: 1rem; right: 1rem; width: 38px; height: 38px; color: #fff; background: transparent; border: 1px solid #4b5255; font-size: 1.4rem; line-height: 1; }
.profile-close:hover { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.profile-source { display: grid; gap: .8rem; margin: 0; }
.profile-source div { padding-top: .8rem; border-top: 1px solid #394044; }
.profile-source dt { color: var(--yellow); font: 800 .58rem var(--display); letter-spacing: .12em; text-transform: uppercase; }
.profile-source dd { margin: .28rem 0 0; overflow-wrap: anywhere; color: #d9ddde; font-size: .76rem; }
.profile-form { min-height: 620px; display: grid; grid-template-rows: auto 1fr auto auto; align-content: start; padding: 2.3rem 2.5rem 2rem; }
.profile-form > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1.3rem; border-bottom: 3px solid var(--ink); }
.profile-form > header .section-label { margin-bottom: .25rem; }
.profile-form > header strong { display: block; font: 900 1.05rem var(--display); text-transform: uppercase; }
.profile-status { padding: .45rem .6rem; color: var(--success); background: #e9f3ed; font: 900 .58rem var(--display); letter-spacing: .08em; white-space: nowrap; }
.profile-form fieldset { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0; padding: 1.5rem 0; border: 0; }
.profile-field { color: #646b6e; font: 800 .64rem var(--display); letter-spacing: .08em; text-transform: uppercase; }
.profile-field-wide { grid-column: 1 / -1; }
.profile-field input { width: 100%; height: 48px; margin-top: .4rem; padding: 0 .8rem; color: var(--ink); background: #f4f4f0; border: 1px solid #cfd1cc; font-size: 16px; font-family: var(--body); letter-spacing: 0; text-transform: none; }
.profile-field input:focus { background: #fffdf0; border-color: var(--yellow); outline: 0; box-shadow: 0 0 0 2px var(--yellow); }
.profile-form fieldset:disabled { opacity: .7; }
.profile-note { margin: 0 0 1rem; padding: .8rem 1rem; color: #5c6265; background: #f3f3ee; border-left: 4px solid var(--yellow); font-size: .75rem; }
.profile-form > footer { display: flex; justify-content: flex-end; gap: .7rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.profile-cancel { min-height: 44px; padding: .7rem 1rem; color: var(--ink); background: #fff; border: 1px solid #bfc2bd; font: 900 .7rem var(--display); letter-spacing: .05em; text-transform: uppercase; }
.profile-cancel:hover { border-color: var(--ink); }

.access-modal { width: min(920px, calc(100vw - 2rem)); padding: 0; color: var(--ink); background: #fff; border: 0; box-shadow: 0 30px 110px #000c; }
.access-modal::backdrop { background: #0b0e0ff2; }
.access-modal[open] { display: grid; grid-template-columns: minmax(250px, .7fr) minmax(360px, 1.3fr); }
.access-brand { min-height: 620px; display: flex; flex-direction: column; justify-content: space-between; padding: 2.4rem; color: #fff; background: linear-gradient(145deg, #07090a, #202629); border-bottom: 8px solid var(--yellow); }
.access-brand img { width: 170px; height: 50px; object-fit: cover; object-position: center; }
.access-brand span { color: #b8bec1; font: 800 .76rem/1.45 var(--display); letter-spacing: .14em; }
.access-step { padding: clamp(2rem, 5vw, 4.5rem); align-self: center; }
.section-label { display: inline-block; margin-bottom: .7rem; color: #747b7e; font: 800 .68rem var(--display); letter-spacing: .13em; }
.access-step h2 { margin: 0 0 .7rem; font: 900 clamp(2.4rem, 5vw, 4rem)/.86 var(--display); text-transform: uppercase; }
.access-step > p { color: #72787b; line-height: 1.55; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 1.5rem; border-bottom: 1px solid #d5d6d1; }
.auth-tabs button { padding: .9rem; background: transparent; border: 0; border-bottom: 3px solid transparent; font: 800 .7rem var(--display); text-transform: uppercase; }
.auth-tabs button.is-active { border-color: var(--yellow); }
.access-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.access-form label { color: #666d70; font: 800 .68rem var(--display); letter-spacing: .08em; text-transform: uppercase; }
.access-form label small { font-weight: 500; text-transform: none; }
.access-form input { width: 100%; height: 50px; margin-top: .4rem; padding: 0 .8rem; background: #f5f5f2; border: 1px solid #cbceca; }
.access-form .primary-button { width: 100%; }
.form-error { min-height: 1.2em; margin: 0; color: var(--danger); font-size: .75rem; }
.import-note { display: grid; gap: .2rem; padding: 1rem; background: #fff8ce; border-left: 4px solid var(--yellow); font-size: .78rem; }
.toast { position: fixed; z-index: 80; right: 1.2rem; bottom: 1.2rem; max-width: 360px; padding: .9rem 1rem; color: #fff; background: var(--ink); border-left: 4px solid var(--yellow); box-shadow: 0 10px 35px #0005; }
.toast.is-error { border-color: var(--danger); }

@keyframes message-in { from { opacity: 0; transform: translateY(7px); } }
@keyframes typing { to { transform: translateY(-4px); opacity: .5; } }
@keyframes listening { to { box-shadow: 0 0 0 9px #ae392f22; } }

@media (max-width: 900px) {
  .connection, .operator-badge > div { display: none; }
  .brand-lockup { min-width: 230px; }
  .chat-heading { grid-template-columns: auto 1fr; }
  .chat-heading p { display: none; }
  .option-card { grid-template-columns: 42px 1fr minmax(155px, .42fr); }
  .option-select { grid-column: 2 / -1; min-height: 48px; flex-direction: row; border-top: 1px solid var(--line); border-left: 0; }
  .quote-facts { grid-template-columns: repeat(2, 1fr); }
  .quote-fact:nth-child(3n) { border-right: 1px solid var(--line); }
  .quote-fact:nth-child(2n) { border-right: 0; }
  .quote-fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 650px) {
  input, textarea, select { font-size: 16px !important; }
  .app-header { min-height: 68px; }
  .brand-lockup { min-width: 0; flex: 1; gap: .65rem; padding: .7rem .8rem; }
  .brand-lockup strong { max-width: 112px; font-size: .86rem; }
  .brand-lockup img { width: 76px; height: 24px; }
  .brand-rule { height: 28px; }
  .header-button { width: 43px; padding: 0; color: var(--yellow); font-size: 0; }
  .header-button::before { font-size: 1rem; }
  #new-chat-button::before { content: "+"; }
  #history-button::before { content: "▤"; }
  .operator-badge { padding: 0 .55rem; }
  .operator-badge > span { width: 34px; height: 34px; }
  .logout-button { display: none; }
  .chat-page { height: calc(100vh - 68px); min-height: 500px; padding: 0; }
  .chat-shell { height: 100%; min-height: 0; border: 0; box-shadow: none; }
  .chat-heading { padding: 1rem; }
  .assistant-mark { width: 42px; height: 42px; }
  .chat-heading h1 { font-size: 1.55rem; }
  .chat-thread { min-height: 0; max-height: none; padding: 1.2rem .8rem 7.4rem; }
  .message { max-width: 96%; }
  .message-avatar { width: 30px; height: 30px; }
  .message-content { padding: .85rem; }
  .options-bubble { width: 100%; max-width: 100%; }
  .options-bubble .message-avatar { display: none; }
  .options-bubble .message-content { width: 100%; }
  .option-card { grid-template-columns: 34px 1fr; }
  .option-index { grid-row: 1 / 3; }
  .option-price { grid-column: 2; border-top: 1px solid var(--line); border-left: 0; }
  .option-select { grid-column: 2; }
  .result-actions { flex-wrap: wrap; }
  .result-actions span { width: 100%; }
  .result-actions button { flex: 1; }
  .comparison-bubble .message-content, .quote-bubble .message-content, .history-bubble .message-content { width: calc(100vw - 4rem); }
  .comparison-table { min-width: 540px; }
  .comparison-bubble .message-content { overflow-x: auto; }
  .inline-quote-form { min-width: 0; grid-template-columns: 1fr; }
  .inline-quote-form > * { grid-column: 1 !important; }
  .quotes-shell { height: 100%; border: 0; box-shadow: none; }
  .quotes-heading { padding: 1rem; gap: .8rem; }
  .quotes-heading h1 { font-size: 1.65rem; }
  .quotes-heading p, .quotes-heading::after { display: none; }
  .quotes-heading .primary-button { min-height: 40px; padding: .55rem .7rem; font-size: .6rem; }
  .quotes-workspace { overflow-y: auto; }
  .quotes-index { min-height: 100%; display: block; }
  .quotes-list-columns { display: none; }
  .quotes-list { display: block; padding: .65rem; overflow: visible; }
  .quote-list-item { grid-template-columns: 1fr auto; gap: .35rem .7rem; padding: .9rem; }
  .quote-list-date { grid-column: 2; grid-row: 1; }
  .quote-list-customer, .quote-list-measure { grid-column: 1 / -1; }
  .quote-list-options { grid-column: 1; }
  .quote-list-open { grid-column: 2; grid-row: 4; }
  .quote-detail { min-height: 100%; padding: .8rem; }
  .quote-document { box-shadow: none; }
  .quote-detail-header { padding: 1rem; }
  .quote-detail-actions { padding: .8rem 1rem; }
  .quote-detail-actions { flex-wrap: wrap; }
  .quote-detail-actions .primary-button, .quote-detail-actions .quote-back-button { flex: 1; }
  .quote-facts { grid-template-columns: 1fr 1fr; }
  .quote-fact { padding: .85rem; }
  .quote-alternatives { padding: 1rem; }
  .quote-alternative { grid-template-columns: 1fr; }
  .quote-alternative-price { grid-row: auto; grid-column: 1; text-align: left; }
  .composer { position: fixed; z-index: 18; right: 0; bottom: 0; left: 0; grid-template-columns: auto 1fr auto; gap: .4rem; padding: .55rem; }
  .voice-button { width: 56px; min-height: 56px; }
  .composer-field { padding: .35rem .55rem; }
  .composer-field small { display: none; }
  .send-button { min-width: 54px; font-size: 0; }
  .send-button svg { width: 23px; }
  .access-modal[open] { display: block; max-height: calc(100vh - 1rem); }
  .profile-modal { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); overflow-y: auto; }
  .profile-modal[open] { display: block; }
  .profile-rail { min-height: 235px; padding: 1.5rem; border-bottom-width: 5px; }
  .profile-rail h2 { font-size: 2.6rem; }
  .profile-rail p { max-width: 85%; }
  .profile-source { grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: 1.5rem; }
  .profile-source div:last-child { display: none; }
  .profile-form { min-height: 0; padding: 1.4rem 1.1rem; }
  .profile-form > header { align-items: center; }
  .profile-form > header strong { font-size: .85rem; }
  .profile-status { display: none; }
  .profile-form fieldset { grid-template-columns: 1fr; gap: .8rem; padding: 1.1rem 0; }
  .profile-field-wide { grid-column: 1; }
  .profile-form > footer > * { flex: 1; }
  .access-brand { min-height: 92px; flex-direction: row; align-items: center; padding: 1rem; border-bottom-width: 5px; }
  .access-brand img { width: 105px; height: 31px; }
  .access-brand span { text-align: right; font-size: .52rem; }
  .access-step { padding: 1.7rem 1.2rem; }
}

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