:root {
  --ink: #17231e;
  --ink-soft: #435149;
  --muted: #69766f;
  --line: #dfe5e1;
  --line-strong: #cbd4ce;
  --paper: #f5f4ef;
  --surface: #fff;
  --surface-soft: #f9faf8;
  --forest: #142a22;
  --forest-2: #1e3a30;
  --accent: #d96d37;
  --accent-dark: #b84f21;
  --accent-soft: #f9e9df;
  --success: #25825d;
  --success-soft: #e3f3ec;
  --warning: #a66a10;
  --warning-soft: #fff2d6;
  --danger: #ba453d;
  --danger-soft: #fbe8e6;
  --info: #3b6e8c;
  --info-soft: #e7f1f7;
  --shadow-xs: 0 1px 2px rgba(18, 34, 27, .06);
  --shadow-sm: 0 7px 24px rgba(18, 34, 27, .07);
  --shadow-md: 0 18px 48px rgba(18, 34, 27, .14);
  --radius-sm: 8px;
  --radius: 13px;
  --radius-lg: 20px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .58; }
img { max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent), transparent 40%); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 9999; left: 16px; top: -60px; padding: 11px 16px; border-radius: 0 0 8px 8px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md); font-weight: 700; }
.skip-link:focus { top: 0; }

/* Shared controls */
.button { min-height: 42px; border: 1px solid transparent; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 16px; font-weight: 700; font-size: 14px; line-height: 1.2; text-decoration: none; transition: background .18s, border .18s, transform .18s, box-shadow .18s; }
.button:not(:disabled):active { transform: translateY(1px); }
.button--primary { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 5px 14px rgba(217, 109, 55, .18); }
.button--primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.button--secondary { color: var(--forest); background: var(--surface); border-color: var(--line-strong); }
.button--secondary:hover:not(:disabled), .button--ghost:hover:not(:disabled) { background: #f1f4f1; border-color: #aebbb3; }
.button--ghost { color: var(--ink-soft); background: transparent; border-color: transparent; }
.button--danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button--danger:hover:not(:disabled) { background: #9e332d; }
.button--wide { width: 100%; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; font-size: 20px; line-height: 1; }
.icon-button:hover { background: var(--surface-soft); }
.text-button { border: 0; background: none; padding: 7px 0; color: var(--accent-dark); font-size: 13px; font-weight: 750; }
.text-button:hover { text-decoration: underline; }
.eyebrow { margin: 0 0 6px; color: var(--accent-dark); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; gap: 6px; padding: 5px 9px; border-radius: 999px; background: #eef1ef; color: #53605a; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill--review, .status-pill--pending { background: var(--warning-soft); color: var(--warning); }
.status-pill--approved, .status-pill--active, .status-pill--sent { background: var(--success-soft); color: var(--success); }
.status-pill--draft { background: var(--info-soft); color: var(--info); }
.status-pill--rejected, .status-pill--inactive, .status-pill--failed { background: var(--danger-soft); color: var(--danger); }
.status-pill--automatic { background: #eee9fa; color: #694fa0; }
.progress { height: 6px; overflow: hidden; border-radius: 999px; background: #e1e6e2; }
.progress > span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--accent); transition: width .4s ease; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Admin authentication */
.admin-body { min-height: 100vh; overflow-x: hidden; }
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, .95fr) minmax(430px, 1.05fr); background: var(--surface); }
.login-art { position: relative; overflow: hidden; min-height: 100%; padding: clamp(30px, 5vw, 80px); background: var(--forest); color: #fff; display: flex; align-items: flex-end; }
.login-art::before, .login-art::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.1); }
.login-art::before { width: 430px; height: 430px; right: -120px; top: -120px; }
.login-art::after { width: 260px; height: 260px; right: -20px; top: -30px; }
.login-art__grid { position: absolute; inset: 0; opacity: .045; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 42px 42px; transform: perspective(500px) rotate(-3deg) scale(1.08); }
.login-art__content { z-index: 1; max-width: 560px; padding-bottom: 5vh; }
.login-art .brand { position: absolute; top: clamp(28px, 5vw, 64px); left: clamp(30px, 5vw, 80px); }
.login-art .eyebrow { color: #e5a37f; margin-bottom: 18px; }
.login-art h1 { max-width: 560px; margin: 0 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 5vw, 68px); font-weight: 500; line-height: 1.02; letter-spacing: -.035em; }
.login-art__content > p:not(.eyebrow) { max-width: 500px; margin: 0; color: #bccbc4; font-size: 18px; line-height: 1.65; }
.login-proof { display: flex; align-items: center; gap: 13px; margin-top: 38px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.login-proof__icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent); font-weight: 900; }
.login-proof div { display: grid; gap: 2px; }
.login-proof small { color: #9eb0a8; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 36px; }
.login-card { width: min(100%, 430px); }
.login-card h2 { margin: 0 0 9px; font-family: Georgia, "Times New Roman", serif; font-size: 38px; font-weight: 500; letter-spacing: -.025em; }
.form-intro { margin: 0 0 34px; color: var(--muted); }
.login-card .button { margin-top: 9px; min-height: 48px; }
.login-hint { margin: 22px auto 0; max-width: 330px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.5; }
.login-error { margin: 4px 0 10px; padding: 11px 13px; border: 1px solid #efc5c2; border-radius: var(--radius-sm); background: var(--danger-soft); color: #8c2c27; font-size: 13px; line-height: 1.4; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 790; letter-spacing: -.02em; text-decoration: none; }
.brand__mark { width: 31px; height: 31px; display: flex; align-items: flex-end; gap: 3px; padding: 5px; border-radius: 7px; background: var(--accent); }
.brand__mark span { display: block; width: 5px; background: #fff; border-radius: 1px 1px 0 0; }
.brand__mark span:nth-child(1) { height: 9px; }
.brand__mark span:nth-child(2) { height: 19px; }
.brand__mark span:nth-child(3) { height: 14px; }
.brand--mobile { display: none; margin-bottom: 46px; }

/* Admin layout */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: 258px; display: flex; flex-direction: column; background: var(--forest); color: #dce7e1; box-shadow: 4px 0 18px rgba(14,28,22,.08); }
.sidebar__head { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 23px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar__close { display: none; background: transparent; color: #fff; border-color: rgba(255,255,255,.15); }
.tenant-switcher { margin: 20px 15px 10px; padding: 11px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.045); }
.tenant-switcher__logo { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: #fff; font-weight: 850; }
.tenant-switcher > span:nth-child(2) { min-width: 0; display: grid; }
.tenant-switcher small { color: #879a91; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.tenant-switcher strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.nav-list { flex: 1; overflow-y: auto; padding: 8px 11px 20px; scrollbar-width: thin; }
.nav-list a { min-height: 43px; padding: 9px 12px; margin: 2px 0; display: flex; align-items: center; gap: 11px; border-radius: 8px; color: #aabcb3; font-size: 13px; font-weight: 650; text-decoration: none; transition: .16s; }
.nav-list a:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-list a.is-active { color: #fff; background: rgba(255,255,255,.1); box-shadow: inset 3px 0 var(--accent); }
.nav-icon { width: 22px; display: inline-grid; place-items: center; color: #90a69b; font-size: 17px; }
.nav-list a.is-active .nav-icon { color: #ef986a; }
.nav-label { margin: 21px 12px 7px; color: #65796f; font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.nav-badge { margin-left: auto; min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 999px; padding: 0 6px; color: #fff; background: var(--accent); font-size: 10px; }
.sidebar__foot { position: relative; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.system-status { margin: 0 6px 11px; display: flex; align-items: center; gap: 9px; color: #8fa29a; }
.system-status > span { width: 8px; height: 8px; border-radius: 50%; background: #4fbe88; box-shadow: 0 0 0 4px rgba(79,190,136,.11); }
.system-status > div { display: grid; }
.system-status strong { color: #b9c9c1; font-size: 10px; }
.system-status small { font-size: 9px; }
.sidebar-user { width: 100%; border: 0; border-radius: 9px; padding: 9px; background: transparent; color: #fff; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; text-align: left; }
.sidebar-user:hover { background: rgba(255,255,255,.06); }
.sidebar-user > span:nth-child(2) { display: grid; min-width: 0; }
.sidebar-user strong, .sidebar-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user small { color: #8fa299; font-size: 10px; }
.avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: #e8b096; color: #5c2811; display: inline-grid; place-items: center; font-size: 11px; font-weight: 850; }
.user-menu { position: absolute; bottom: 69px; left: 16px; right: 16px; padding: 6px; border: 1px solid rgba(255,255,255,.11); border-radius: 9px; background: #22392f; box-shadow: var(--shadow-md); }
.user-menu button { width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: #fff; text-align: left; font-size: 12px; }
.user-menu button:hover { background: rgba(255,255,255,.08); }
.workspace { min-height: 100vh; margin-left: 258px; }
.topbar { position: sticky; z-index: 30; top: 0; height: 76px; display: flex; align-items: center; padding: 0 clamp(22px, 3vw, 45px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.topbar__title { min-width: 0; }
.topbar__title p { margin: 0 0 1px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.topbar__title h1 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.notification-button { position: relative; }
.notification-button i { position: absolute; right: 6px; top: 6px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); }
.avatar--top { display: none; }
.menu-button { display: none; margin-right: 12px; }
.main-content { position: relative; max-width: 1600px; margin: 0 auto; padding: 34px clamp(22px, 3vw, 48px) 70px; }
.view { display: none; animation: view-in .25s ease both; }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } }
.loading-state { position: fixed; z-index: 25; inset: 76px 0 0 258px; display: grid; place-content: center; justify-items: center; gap: 10px; background: rgba(245,244,239,.72); backdrop-filter: blur(2px); color: var(--muted); font-size: 13px; }
.page-heading { min-height: 76px; margin-bottom: 26px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.page-heading h2 { margin: 0 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(27px, 3vw, 38px); font-weight: 500; line-height: 1.08; letter-spacing: -.025em; }
.page-heading p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.page-heading > .button { margin-top: 19px; flex: 0 0 auto; }
.page-heading > .page-actions { margin-top: 19px; flex: 0 0 auto; }
.page-heading--hero { min-height: 125px; align-items: center; padding: 2px 0 15px; }
.page-heading--hero h2 { font-size: clamp(31px, 4vw, 46px); }

/* Admin content */
.panel, .table-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs); }
.panel { padding: 22px; }
.panel__head { margin-bottom: 19px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel__head h3, .quick-card h3, .embed-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 550; letter-spacing: -.015em; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.metric-card { min-height: 120px; display: flex; align-items: center; gap: 16px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs); }
.metric-card--accent { border-color: #ebc5b1; background: linear-gradient(145deg, #fff 40%, #fdf2ec); }
.metric-card__icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 10px; background: #edf1ee; color: var(--forest-2); font-size: 19px; }
.metric-card--accent .metric-card__icon { color: var(--accent-dark); background: var(--accent-soft); }
.metric-card > div:last-child { min-width: 0; display: grid; }
.metric-card span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.metric-card strong { margin: 3px 0 1px; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-card small { color: #8a948e; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(285px, .8fr); align-items: start; gap: 20px; }
.dashboard-side { display: grid; gap: 20px; }
.compact-list { display: grid; }
.compact-row { min-height: 68px; display: grid; grid-template-columns: minmax(115px, .75fr) minmax(130px, 1.25fr) minmax(90px, .65fr) auto; align-items: center; gap: 14px; padding: 12px 2px; border-top: 1px solid #edf0ee; cursor: pointer; }
.compact-row:first-child { border-top: 0; }
.compact-row:hover { background: #fafbf9; }
.compact-row__primary, .compact-row__person { min-width: 0; display: grid; gap: 2px; }
.compact-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.compact-row small { color: var(--muted); font-size: 10px; }
.compact-row__price { font-weight: 800; font-size: 13px; text-align: right; }
.empty-inline { padding: 30px 10px; color: var(--muted); text-align: center; font-size: 13px; }
.setup-card .panel__head > strong { color: var(--accent-dark); font-size: 13px; }
.setup-card .progress { margin-bottom: 14px; }
.checklist { display: grid; gap: 4px; }
.checklist button { min-height: 37px; padding: 5px 2px; border: 0; background: none; display: flex; align-items: center; gap: 9px; color: var(--ink); text-align: left; font-size: 12px; }
.checklist button::before { content: ""; width: 18px; height: 18px; flex: 0 0 18px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.checklist button.is-done { color: var(--muted); text-decoration: line-through; }
.checklist button.is-done::before { content: "✓"; display: grid; place-items: center; color: #fff; border-color: var(--success); background: var(--success); font-size: 10px; text-decoration: none; }
.quick-card { background: var(--forest); color: #fff; border-color: var(--forest); }
.quick-card .eyebrow { color: #e69b76; }
.quick-card p:not(.eyebrow) { margin: 9px 0 17px; color: #adbbb4; font-size: 12px; line-height: 1.55; }
.quick-card .button { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.19); }
.filterbar, .knowledge-toolbar { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.segmented { max-width: 100%; padding: 3px; display: flex; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #ecefea; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button { min-height: 32px; flex: 0 0 auto; padding: 5px 12px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; white-space: nowrap; }
.segmented button.is-active { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(23,35,30,.1); }
.search-field { min-width: 230px; min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,109,55,.11); }
.search-field input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-field--wide { width: min(480px, 100%); }
.table-card { overflow: hidden; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 46px; padding: 9px 16px; background: #f4f6f3; color: #77827c; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { height: 68px; padding: 12px 16px; border-top: 1px solid #edf0ee; font-size: 12px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #fafbf9; }
.data-table .cell-primary { min-width: 155px; display: grid; gap: 2px; }
.cell-primary strong { font-size: 13px; }
.cell-primary small, .data-table td small { color: var(--muted); font-size: 10px; }
.cell-link { max-width: 250px; overflow: hidden; color: var(--accent-dark); font-size: 9px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.cell-link:hover { text-decoration: underline; }
.row-actions { display: flex; justify-content: flex-end; gap: 3px; }
.row-action { width: 33px; height: 33px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 17px; }
.row-action:hover { background: #edf1ee; color: var(--ink); }
.row-action--danger:hover { color: var(--danger); background: var(--danger-soft); }
.kind-chip { display: inline-flex; padding: 4px 8px; border-radius: 6px; background: #edf1ee; color: #4f5c55; font-size: 10px; font-weight: 750; }
.kind-chip--product { color: #446b89; background: #e7f0f6; }
.kind-chip--service { color: #6b5694; background: #eeeafa; }
.kind-chip--surcharge { color: #9a6111; background: #fff0d2; }
.empty-state { padding: 55px 24px; display: grid; justify-items: center; text-align: center; }
.empty-state__icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; color: var(--accent-dark); background: var(--accent-soft); font-size: 24px; }
.empty-state h3 { margin: 15px 0 6px; font-family: Georgia, serif; font-size: 21px; font-weight: 550; }
.empty-state p { max-width: 390px; margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card-list-mobile { display: none; }
.notice { margin-bottom: 17px; padding: 13px 16px; border: 1px solid; border-radius: 10px; display: flex; align-items: flex-start; gap: 11px; }
.notice > span { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 850; }
.notice p { margin: 1px 0 0; font-size: 11px; line-height: 1.5; }
.notice p strong { margin-right: 3px; }
.notice--info { border-color: #cbdfe9; background: var(--info-soft); color: #315b73; }
.notice--info > span { color: #fff; background: var(--info); }
.notice--neutral { border-color: var(--line); background: #f1f3f0; color: #526059; }
.notice--neutral > span { color: #fff; background: var(--forest-2); }
.catalog-sync-panel { margin-bottom: 17px; padding: 17px; display: grid; grid-template-columns: minmax(220px, 1.1fr) minmax(320px, 2fr) auto; align-items: center; gap: 18px; }
.catalog-sync-panel__summary { min-width: 0; display: flex; align-items: center; gap: 12px; }
.catalog-sync-panel__summary h3 { margin: 1px 0 3px; font: 600 18px/1.2 Georgia, "Times New Roman", serif; }
.catalog-sync-panel__summary p:last-child { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.catalog-sync-panel__icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 10px; color: var(--forest-2); background: #edf1ee; font-size: 20px; }
.catalog-sync-panel__facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); gap: 10px 16px; }
.catalog-sync-panel__facts div { min-width: 0; display: grid; gap: 2px; }
.catalog-sync-panel__facts dt { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.catalog-sync-panel__facts dd { margin: 0; overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.catalog-sync-panel__actions { display: flex; flex-direction: column; gap: 8px; }
.catalog-sync-panel__error { grid-column: 1 / -1; padding: 10px 12px; border: 1px solid #e7c6c0; border-radius: 8px; color: #7b3830; background: #fff3f1; }
.catalog-sync-panel__error strong { display: block; margin-bottom: 2px; font-size: 10px; }
.catalog-sync-panel__error p { margin: 0; font-size: 10px; }

/* Offerings */
.offering-layout { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); align-items: start; gap: 18px; }
.offering-list { padding: 8px; }
.offering-list-item { width: 100%; min-height: 75px; padding: 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; color: var(--ink); text-align: left; }
.offering-list-item:hover { background: #f5f7f4; }
.offering-list-item.is-active { border-color: #e7c0ac; background: #fdf4ee; }
.offering-list-item__icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; color: var(--forest); background: #e7ece8; font-size: 16px; font-weight: 850; }
.offering-list-item.is-active .offering-list-item__icon { color: var(--accent-dark); background: #f6ddcf; }
.offering-list-item > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.offering-list-item strong, .offering-list-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offering-list-item strong { font-size: 12px; }
.offering-list-item small { color: var(--muted); font-size: 10px; }
.offering-detail { min-height: 400px; padding: 0; overflow: hidden; }
.offering-detail__hero { padding: 22px 24px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(130deg, #fff, #f6f7f4); }
.offering-detail__top { display: flex; justify-content: space-between; gap: 15px; }
.offering-detail__top h3 { margin: 4px 0 6px; font-family: Georgia, serif; font-size: 25px; font-weight: 550; }
.offering-detail__top p { max-width: 650px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.offering-detail__actions { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 5px; }
.offering-facts { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.offering-facts span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); font-size: 10px; }
.offering-tabs { padding: 0 22px; display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.offering-tabs button { position: relative; min-height: 49px; padding: 9px 13px; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; white-space: nowrap; }
.offering-tabs button.is-active { color: var(--ink); }
.offering-tabs button.is-active::after { content: ""; position: absolute; height: 2px; inset: auto 10px -1px; background: var(--accent); }
.offering-tab-content { padding: 21px 24px 26px; }
.subsection-head { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.subsection-head h4 { margin: 0; font-size: 13px; }
.subsection-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.question-list, .rule-list { display: grid; gap: 8px; }
.config-row { min-height: 65px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; background: #fff; }
.config-row__order { width: 27px; height: 27px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); background: #eef1ef; font-size: 10px; font-weight: 800; }
.config-row__content { min-width: 0; display: grid; gap: 3px; }
.config-row__content strong { font-size: 12px; }
.config-row__content small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.config-row__meta { display: flex; align-items: center; gap: 6px; }
.mini-chip { padding: 3px 6px; border-radius: 5px; color: #58645e; background: #eef1ef; font-size: 9px; font-weight: 750; }
.mini-chip--required { color: var(--warning); background: var(--warning-soft); }
.empty-config { padding: 30px 15px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--muted); text-align: center; font-size: 11px; }

/* Knowledge, settings, audit */
.knowledge-toolbar select, .filterbar > select { min-height: 40px; padding: 0 33px 0 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: 12px; }
.knowledge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.knowledge-card { min-height: 190px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs); display: flex; flex-direction: column; }
.knowledge-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.knowledge-card__head span { color: var(--accent-dark); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.knowledge-card h3 { margin: 14px 0 7px; font-family: Georgia, serif; font-size: 19px; font-weight: 550; }
.knowledge-card p { margin: 0 0 18px; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.55; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.knowledge-card__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #edf0ee; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); align-items: start; gap: 18px; }
.settings-main, .settings-side { display: grid; gap: 18px; }
.form-section { padding: 25px; }
.section-heading { margin-bottom: 23px; display: flex; gap: 12px; }
.section-heading > span { width: 29px; height: 29px; flex: 0 0 29px; border-radius: 7px; display: grid; place-items: center; color: var(--accent-dark); background: var(--accent-soft); font-size: 10px; font-weight: 850; }
.section-heading h3 { margin: 0 0 3px; font-family: Georgia, serif; font-size: 20px; font-weight: 550; }
.section-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid--top-gap { margin-top: 20px; }
.form-field { display: grid; align-content: start; gap: 7px; }
.form-field--wide { grid-column: 1 / -1; }
.form-field label, .label-row label { color: #3c4942; font-size: 11px; font-weight: 750; }
.form-field input:not([type="color"]), .form-field textarea, .form-field select, .modal input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), .modal textarea, .modal select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; background: #fff; color: var(--ink); font-size: 12px; transition: .15s; }
.form-field textarea, .modal textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus, .modal input:focus, .modal textarea:focus, .modal select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,109,55,.1); }
.form-field input[aria-invalid="true"], .modal input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { min-height: 12px; color: var(--danger); font-size: 10px; }
.label-row { display: flex; justify-content: space-between; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 78px !important; }
.input-action { position: absolute; right: 5px; top: 5px; height: 32px; padding: 0 8px; border: 0; border-radius: 5px; color: var(--accent-dark); background: transparent; font-size: 10px; font-weight: 750; }
.input-action:hover { background: var(--accent-soft); }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 54px !important; }
.input-suffix span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; }
.choice-grid { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.choice-card { position: relative; min-height: 78px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--accent); background: #fdf5f0; box-shadow: 0 0 0 1px rgba(217,109,55,.12); }
.choice-card input { position: absolute; opacity: 0; }
.choice-card__mark { width: 18px; height: 18px; flex: 0 0 18px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.choice-card input:checked + .choice-card__mark { border: 5px solid var(--accent); }
.choice-card > span:last-child { display: grid; gap: 3px; }
.choice-card strong { font-size: 11px; }
.choice-card small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.color-field { display: grid; grid-template-columns: 42px 1fr; gap: 8px; }
.color-field input[type="color"] { width: 42px; height: 42px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.brand-preview { margin-top: 20px; padding: 16px; border-radius: 11px; color: #fff; background: var(--forest); overflow: hidden; }
.brand-preview > small { display: block; margin-bottom: 13px; color: rgba(255,255,255,.55); font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.brand-preview > div { display: flex; align-items: center; gap: 9px; }
.brand-preview__logo { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); font-size: 12px; font-weight: 850; }
.brand-preview > div > span:last-child { display: grid; }
.brand-preview strong { font-size: 11px; }
.brand-preview em { color: rgba(255,255,255,.65); font-size: 8px; font-style: normal; }
.brand-preview p { margin: 17px 0 10px; padding: 11px; border-radius: 9px 9px 9px 2px; color: var(--ink); background: #fff; font-size: 9px; line-height: 1.4; }
.brand-preview button { width: 100%; min-height: 31px; border: 0; border-radius: 7px; color: #fff; background: var(--accent); font-size: 9px; font-weight: 750; }
.embed-card code { display: block; max-height: 0; overflow: hidden; margin-top: 0; padding: 0 9px; border-radius: 7px; color: #b7c6be; background: #1b3027; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; transition: .25s; }
.embed-card code.is-visible { max-height: 120px; margin-top: 10px; padding: 9px; }
.embed-card > p:not(.eyebrow) { color: var(--muted); font-size: 11px; line-height: 1.5; }
.audit-panel { padding: 8px 23px; }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 24px; bottom: 24px; width: 1px; background: var(--line); }
.timeline-item { position: relative; min-height: 76px; display: grid; grid-template-columns: 29px minmax(0,1fr) auto; align-items: center; gap: 13px; border-top: 1px solid #edf0ee; }
.timeline-item:first-child { border-top: 0; }
.timeline-item__dot { z-index: 1; width: 29px; height: 29px; border: 4px solid #fff; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--forest-2); font-size: 9px; font-weight: 800; }
.timeline-item__text { min-width: 0; display: grid; gap: 3px; }
.timeline-item__text strong { font-size: 11px; }
.timeline-item__text span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.timeline-item time { color: var(--muted); font-size: 9px; white-space: nowrap; }

/* Dialogs and toasts */
dialog { padding: 0; border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(11,25,19,.59); backdrop-filter: blur(3px); }
.modal { width: min(610px, calc(100% - 30px)); max-height: min(88vh, 820px); border-radius: var(--radius-lg); background: transparent; box-shadow: var(--shadow-md); }
.modal--wide { width: min(900px, calc(100% - 30px)); }
.modal[open] { animation: modal-in .2s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal__surface { width: 100%; max-height: min(88vh, 820px); display: flex; flex-direction: column; margin: 0; background: #fff; }
.modal__head { flex: 0 0 auto; padding: 21px 24px 17px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal__head h2 { margin: 0; font-family: Georgia, serif; font-size: 26px; font-weight: 550; }
.modal-error { flex: 0 0 auto; margin: 14px 24px 0; padding: 12px 14px; border: 1px solid #e5aca5; border-radius: 10px; display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: start; gap: 10px; color: #6e2722; background: #fff0ee; box-shadow: 0 5px 18px rgba(123, 41, 32, .08); }
.modal-error[hidden] { display: none; }
.modal-error__icon { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--danger); font-size: 12px; font-weight: 850; }
.modal-error strong { display: block; margin: 1px 0 3px; font-size: 11px; }
.modal-error p { margin: 0; color: #7d3a35; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.modal-error:focus-visible { outline: 2px solid var(--danger); outline-offset: 2px; }
.modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 23px 24px; }
.modal__foot { flex: 0 0 auto; padding: 15px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #fafbf9; }
.modal__foot--split { justify-content: space-between; }
.modal__foot--split > div { display: flex; gap: 8px; }
.onboarding-promise { margin-bottom: 20px; padding: 15px; display: flex; gap: 12px; border: 1px solid #cfe6da; border-radius: 11px; background: linear-gradient(135deg, #eff8f3, #fff8f2); }
.onboarding-promise > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--forest-2); font-size: 17px; }
.onboarding-promise strong { font-size: 12px; }
.onboarding-promise p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.onboarding-result { padding: 22px; display: flex; align-items: center; gap: 17px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--forest), #285746); }
.onboarding-result__mark { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; border-radius: 50%; color: var(--forest); background: #bfe8d3; font-size: 24px; font-weight: 900; box-shadow: 0 0 0 7px rgba(255,255,255,.08); }
.onboarding-result .eyebrow { margin: 0 0 5px; color: #a8d6c0; }
.onboarding-result h3 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 23px; font-weight: 550; }
.onboarding-result p:last-child { margin: 0; color: #bdd0c7; font-size: 10px; overflow-wrap: anywhere; }
.onboarding-stats { margin: 15px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.onboarding-stats article { padding: 15px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 3px; background: #fafbf9; }
.onboarding-stats strong { color: var(--accent-dark); font-family: Georgia, serif; font-size: 24px; }
.onboarding-stats span { color: var(--muted); font-size: 9px; }
.onboarding-knowledge { margin: 18px 0; display: grid; gap: 7px; }
.onboarding-knowledge h4 { margin: 0 0 3px; font-size: 12px; }
.onboarding-knowledge > div { min-height: 43px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.onboarding-knowledge > div > span:first-child { color: var(--accent); }
.onboarding-knowledge strong { font-size: 10px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.modal-field { display: grid; gap: 6px; }
.modal-field--wide { grid-column: 1/-1; }
.modal-field > label, .modal-field > legend { color: #3e4a44; font-size: 10px; font-weight: 800; }
.modal-field > small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.modal-field label.checkbox-line { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; }
.modal-field label.checkbox-line input { margin-top: 2px; accent-color: var(--accent); }
.settings-toggle { margin-top: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: flex-start; gap: 11px; background: #fafbf9; cursor: pointer; }
.settings-toggle input { margin-top: 3px; accent-color: var(--accent); }
.settings-toggle span { display: grid; gap: 4px; }
.settings-toggle strong { font-size: 12px; }
.settings-toggle small { color: var(--muted); font-size: 10px; line-height: 1.5; }

.privacy-body { min-height: 100vh; margin: 0; padding: 42px 18px; background: #edf1ed; color: #17251f; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.privacy-document { width: min(780px, 100%); margin: 0 auto; padding: clamp(28px, 6vw, 58px); border: 1px solid #dce3de; border-radius: 18px; background: #fffdfa; box-shadow: 0 18px 60px rgba(19, 48, 38, .1); }
.privacy-document h1 { margin: 5px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 6vw, 52px); font-weight: 550; }
.privacy-document h2 { margin: 0 0 8px; font-size: 17px; }
.privacy-document section { padding: 20px 0; border-top: 1px solid #e5e9e6; }
.privacy-document p { color: #58645f; line-height: 1.7; }
.privacy-lead { margin: 0 0 25px; font-size: 16px; }
.privacy-warning { margin: 0 0 25px; padding: 14px 16px; border: 1px solid #ecd9c8; border-radius: 10px; background: #fff8f0; color: #725038; font-size: 12px; line-height: 1.55; }
.privacy-version { margin-top: 22px; font-size: 12px; }
.confirm-dialog { width: min(410px, calc(100% - 30px)); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-md); }
.confirm-dialog__surface { padding: 28px; display: grid; justify-items: center; text-align: center; }
.confirm-dialog__icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; color: var(--danger); background: var(--danger-soft); font-size: 22px; font-weight: 800; }
.confirm-dialog h2 { margin: 15px 0 7px; font-family: Georgia, serif; font-size: 24px; font-weight: 550; }
.confirm-dialog p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.confirm-dialog div { display: flex; gap: 8px; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; width: min(360px, calc(100% - 40px)); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 13px 15px; border: 1px solid #cad6cf; border-radius: 10px; background: #fff; box-shadow: var(--shadow-md); display: grid; grid-template-columns: 25px 1fr; align-items: start; gap: 9px; pointer-events: auto; animation: toast-in .25s ease both; }
.toast__icon { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--success); font-size: 11px; font-weight: 800; }
.toast--error .toast__icon { background: var(--danger); }
.toast strong { display: block; margin-bottom: 2px; font-size: 11px; }
.toast p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.quote-detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }
.quote-lines { width: 100%; border-collapse: collapse; }
.quote-lines th { padding: 8px 6px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: left; text-transform: uppercase; }
.quote-lines td { padding: 11px 6px; border-bottom: 1px solid #edf0ee; font-size: 11px; vertical-align: top; }
.quote-lines th:nth-child(n+2), .quote-lines td:nth-child(n+2) { text-align: right; }
.quote-totals { margin-top: 14px; margin-left: auto; width: min(280px, 100%); display: grid; gap: 7px; }
.quote-totals div { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 11px; }
.quote-totals div:last-child { padding-top: 9px; border-top: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: 850; }
.quote-aside { display: grid; align-content: start; gap: 12px; }
.quote-info-card { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8faf8; }
.quote-info-card small { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.quote-info-card strong, .quote-info-card span { display: block; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.quote-line-editors { display: grid; gap: 10px; }
.quote-line-editor { position: relative; margin: 0; padding: 22px 42px 14px 14px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: 1.3fr .55fr .55fr .8fr .6fr .55fr; gap: 9px; background: #fafbf9; }
.quote-line-editor legend { position: absolute; top: 6px; left: 14px; padding: 0; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.quote-line-editor__remove { position: absolute; top: 8px; right: 7px; }
.quote-line-editor .modal-field label { font-size: 8px; }

/* Widget */
.widget-body { min-height: 100dvh; background: transparent; --widget-accent: var(--accent); }
.widget-shell { width: 100%; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #f7f6f2; }
.widget-header { min-height: 69px; flex: 0 0 auto; padding: 10px clamp(14px, 4vw, 24px); display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #fff; background: var(--forest); }
.widget-company { min-width: 0; display: flex; align-items: center; gap: 10px; }
.widget-company__logo { width: 39px; height: 39px; flex: 0 0 39px; border-radius: 9px; display: grid; place-items: center; overflow: hidden; color: #fff; background: var(--widget-accent); font-size: 13px; font-weight: 850; }
.widget-company__logo img { width: 100%; height: 100%; object-fit: cover; }
.widget-company > span:last-child { min-width: 0; display: grid; gap: 2px; }
.widget-company strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.widget-company small { color: #b1c2b9; font-size: 9px; }
.widget-company small i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #5bc58e; }
.widget-header__actions { display: flex; gap: 6px; }
.widget-icon-button { width: 35px; height: 35px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; color: #d9e4de; background: rgba(255,255,255,.055); font-size: 19px; }
.widget-icon-button:hover { color: #fff; background: rgba(255,255,255,.1); }
.widget-main { width: 100%; max-width: 820px; flex: 1 1 auto; margin: 0 auto; padding: clamp(24px, 5vw, 43px) clamp(15px, 5vw, 42px) 38px; }
.widget-progress { margin: -15px 0 26px; }
.widget-progress > div:first-child { margin-bottom: 7px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; font-weight: 750; }
.widget-progress .progress { height: 4px; }
.widget-progress .progress span { background: var(--widget-accent); }
.widget-stage { animation: widget-stage-in .28s ease both; }
@keyframes widget-stage-in { from { opacity: 0; transform: translateY(7px); } }
.widget-loading { min-height: 55vh; display: grid; place-content: center; justify-items: center; gap: 17px; color: var(--muted); font-size: 12px; }
.craft-loader { display: flex; align-items: flex-end; gap: 4px; height: 34px; }
.craft-loader i { display: block; width: 7px; border-radius: 2px; background: var(--widget-accent); animation: craft 1s ease-in-out infinite alternate; }
.craft-loader i:nth-child(1) { height: 14px; }
.craft-loader i:nth-child(2) { height: 30px; animation-delay: .14s; }
.craft-loader i:nth-child(3) { height: 21px; animation-delay: .27s; }
@keyframes craft { to { opacity: .35; transform: scaleY(.75); transform-origin: bottom; } }
.widget-error { min-height: 60vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.widget-error > span { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--danger); background: var(--danger-soft); font-size: 23px; font-weight: 800; }
.widget-error h1 { margin: 17px 0 7px; font-family: Georgia, serif; font-size: 27px; font-weight: 550; }
.widget-error p { max-width: 390px; margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.assistant-message { display: flex; align-items: flex-start; gap: 12px; }
.assistant-message--welcome { align-items: center; }
.assistant-avatar { width: 37px; height: 37px; flex: 0 0 37px; border-radius: 10px 10px 10px 3px; display: grid; place-items: center; color: #fff; background: var(--forest); font-size: 14px; }
.assistant-message > div { min-width: 0; flex: 1; }
.message-label, .stage-label { margin: 0 0 5px; color: color-mix(in srgb, var(--widget-accent), #76310e 35%); font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.assistant-message h1 { margin: 0 0 9px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 5vw, 35px); font-weight: 550; line-height: 1.12; letter-spacing: -.02em; }
.assistant-message p:last-child:not(.message-label) { max-width: 620px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.privacy-note { margin: 25px 0 27px 49px; padding: 10px 12px; border: 1px solid #dbe3de; border-radius: 9px; display: flex; align-items: center; gap: 8px; background: #f0f4f1; color: #607069; }
.privacy-note span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--success); font-size: 9px; }
.privacy-note p { margin: 0; font-size: 9px; line-height: 1.4; }
.service-section { margin-left: 49px; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.service-card { min-height: 92px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 11px; display: grid; grid-template-columns: 39px 1fr 20px; align-items: center; gap: 11px; color: var(--ink); background: #fff; text-align: left; transition: .18s; }
.service-card:hover { border-color: var(--widget-accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.service-card__icon { width: 39px; height: 39px; border-radius: 9px; display: grid; place-items: center; color: color-mix(in srgb, var(--widget-accent), #5d260b 45%); background: color-mix(in srgb, var(--widget-accent), white 85%); font-weight: 850; }
.service-card > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.service-card strong { font-size: 12px; }
.service-card small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.service-card__arrow { color: var(--widget-accent); font-size: 18px; }
.widget-empty { padding: 27px; border: 1px dashed var(--line-strong); border-radius: 10px; text-align: center; }
.widget-empty p { margin: 0 0 4px; font-size: 12px; font-weight: 750; }
.widget-empty small { color: var(--muted); font-size: 10px; }
.chat-history { margin: 0 0 24px 49px; display: grid; gap: 8px; }
.history-row { display: flex; align-items: flex-start; justify-content: flex-end; gap: 7px; }
.history-bubble { max-width: 78%; padding: 9px 12px; border-radius: 11px 11px 3px 11px; color: #fff; background: var(--forest-2); font-size: 10px; line-height: 1.45; }
.history-edit { width: 28px; height: 28px; flex: 0 0 28px; border: 0; border-radius: 6px; color: var(--muted); background: #e9edea; font-size: 10px; }
.question-content { padding: 20px 21px; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; background: #fff; box-shadow: var(--shadow-xs); }
.question-content h1 { font-size: clamp(22px, 4vw, 29px); }
.answer-form { margin-top: 21px; }
.answer-form input:not([type="radio"]):not([type="checkbox"]), .answer-form select, .answer-form textarea { width: 100%; min-height: 49px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; color: var(--ink); background: #fff; font-size: 13px; }
.answer-form textarea { min-height: 100px; resize: vertical; }
.answer-form input:focus, .answer-form select:focus, .answer-form textarea:focus { border-color: var(--widget-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--widget-accent), transparent 87%); }
.answer-form .input-unit { position: relative; }
.answer-form .input-unit input { padding-right: 62px !important; }
.answer-form .input-unit span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.option-card { position: relative; min-height: 47px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 11px; font-weight: 650; }
.option-card:hover { border-color: var(--widget-accent); }
.option-card:has(input:checked) { border-color: var(--widget-accent); color: color-mix(in srgb, var(--widget-accent), #4e210b 42%); background: color-mix(in srgb, var(--widget-accent), white 91%); }
.option-card input { width: 17px; height: 17px; margin: 0; accent-color: var(--widget-accent); }
.answer-actions { margin-top: 17px; display: flex; justify-content: space-between; gap: 9px; }
.widget-button { min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 800; text-decoration: none; transition: .18s; }
.widget-button--primary { color: #fff; background: var(--widget-accent); border-color: var(--widget-accent); }
.widget-button--primary:hover:not(:disabled) { filter: brightness(.9); box-shadow: 0 6px 17px color-mix(in srgb, var(--widget-accent), transparent 72%); }
.widget-button--secondary, .widget-button--unknown, .widget-button--ghost { border-color: var(--line-strong); }
.widget-button--ghost { margin-right: auto; }
.widget-button--secondary:hover, .widget-button--unknown:hover { border-color: var(--widget-accent); color: color-mix(in srgb, var(--widget-accent), #4c1f09 45%); }
.widget-button--wide { width: 100%; }
.widget-button--large { min-height: 52px; font-size: 12px; }
.answer-error { margin: 10px 0 0; color: var(--danger); font-size: 10px; }
.contact-form { margin: 25px 0 0 49px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.widget-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.widget-form-field { margin-bottom: 13px; display: grid; gap: 6px; }
.widget-form-field label { color: #3d4943; font-size: 10px; font-weight: 750; }
.widget-form-field label small { color: var(--muted); font-weight: 500; }
.widget-form-field input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; }
.widget-form-field input:focus { border-color: var(--widget-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--widget-accent), transparent 87%); }
.widget-form-field input[aria-invalid="true"] { border-color: var(--danger); }
.consent-check { margin: 3px 0 17px; display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 9px; line-height: 1.45; cursor: pointer; }
.consent-check input { width: 16px; height: 16px; margin: 1px 0 0; flex: 0 0 16px; accent-color: var(--widget-accent); }
.consent-check a { color: color-mix(in srgb, var(--widget-accent), #5c250a 42%); font-weight: 700; }
.welcome-consent { margin: -8px 0 18px 49px; max-width: 650px; }
.welcome-consent-error { margin: -10px 0 16px 49px; }
.summary-card { margin: 16px 0 0 49px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; }
.summary-card__head { min-height: 63px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f1f4f1; }
.summary-card__head > span { display: grid; gap: 3px; }
.summary-card__head small { color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.summary-card__head strong { font-size: 12px; }
.summary-edit { border: 0; background: transparent; color: color-mix(in srgb, var(--widget-accent), #5b2409 42%); font-size: 9px; font-weight: 800; }
.summary-list { margin: 0; padding: 5px 15px; }
.summary-list > div { min-height: 46px; padding: 9px 0; border-top: 1px solid #edf0ee; display: grid; grid-template-columns: minmax(100px, .8fr) 1.2fr auto; align-items: center; gap: 10px; }
.summary-list > div:first-child { border-top: 0; }
.summary-list dt { color: var(--muted); font-size: 9px; }
.summary-list dd { margin: 0; font-size: 10px; font-weight: 700; }
.summary-list button { border: 0; background: none; color: var(--muted); font-size: 9px; text-decoration: underline; }
.summary-contact { padding: 13px 15px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.assumption-note { margin: 13px 0 0 49px; padding: 11px 13px; border-radius: 9px; display: flex; gap: 9px; color: #815412; background: var(--warning-soft); }
.assumption-note > span { width: 19px; height: 19px; flex: 0 0 19px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 800; }
.assumption-note p { margin: 1px 0 0; font-size: 9px; line-height: 1.45; }
#stage-summary > .widget-button, #stage-summary > .answer-error, .submit-note { width: calc(100% - 49px); margin-left: 49px; }
#stage-summary > .widget-button { margin-top: 18px; }
.submit-note { color: var(--muted); text-align: center; font-size: 8px; }
.result-hero { display: grid; justify-items: center; text-align: center; }
.result-check { width: 62px; height: 62px; margin-bottom: 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--success); box-shadow: 0 0 0 8px var(--success-soft); font-size: 27px; font-weight: 850; }
.result-hero h1 { margin: 0 0 9px; font-family: Georgia, serif; font-size: clamp(27px, 5vw, 36px); font-weight: 550; }
.result-hero > p:last-child { max-width: 530px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.quote-result { max-width: 560px; margin: 25px auto; border: 1px solid #d5ded8; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.quote-result__head { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #f3f5f2; }
.quote-result__head > span:first-child { display: grid; }
.quote-result__head small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.quote-result__head strong { font-size: 11px; }
.quote-result__price { padding: 21px 16px 16px; display: grid; justify-items: center; }
.quote-result__price small { color: var(--muted); font-size: 9px; }
.quote-result__price strong { margin: 4px 0; font-family: Georgia, serif; font-size: 30px; }
.quote-result__price em { color: var(--muted); font-size: 8px; font-style: normal; }
.quote-result .widget-button { margin: 0 16px 16px; width: calc(100% - 32px); }
.next-steps { max-width: 560px; margin: 26px auto; }
.next-steps h2 { margin: 0 0 13px; font-size: 12px; }
.next-steps ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.next-steps li { padding: 10px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.62); }
.next-steps li > span { width: 27px; height: 27px; flex: 0 0 27px; border-radius: 50%; display: grid; place-items: center; color: color-mix(in srgb, var(--widget-accent), #522009 43%); background: color-mix(in srgb, var(--widget-accent), white 86%); font-size: 9px; font-weight: 850; }
.next-steps p { margin: 0; display: grid; gap: 2px; }
.next-steps strong { font-size: 10px; }
.next-steps small { color: var(--muted); font-size: 9px; }
#new-request { max-width: 560px; margin: 0 auto; display: flex; }
.widget-footer { min-height: 35px; flex: 0 0 auto; padding: 8px 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; color: #8a938e; background: #f1f2ef; font-size: 8px; }
.widget-footer i { width: 2px; height: 2px; border-radius: 50%; background: #9da59f; }
.widget-toast { position: fixed; z-index: 20; left: 50%; bottom: 50px; transform: translateX(-50%); max-width: calc(100% - 30px); padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--forest); box-shadow: var(--shadow-md); font-size: 10px; }

/* E-mail copilot and governed knowledge import */
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.knowledge-policy { margin-bottom: 18px; padding: 17px 19px; display: grid; grid-template-columns: minmax(220px,1fr) minmax(210px,.55fr) minmax(260px,.8fr) auto auto; align-items: center; gap: 13px; }
.knowledge-policy h3 { margin: 2px 0 3px; font-size: 14px; }
.knowledge-policy p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 10px; }
.knowledge-policy .form-field { margin: 0; }
.knowledge-policy__toggle { margin: 0; }
.knowledge-card--candidate { border-color: color-mix(in srgb, var(--warning), white 62%); background: linear-gradient(145deg, #fff, var(--warning-soft)); }
.row-action--approve { color: var(--success); background: var(--success-soft); }
.data-chips { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.data-chips > strong { margin-right: 2px; color: var(--muted); font-size: 9px; }
.data-chip { max-width: 100%; padding: 4px 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

/* Structured company handbook */
.knowledge-document-placeholder { min-height: 170px; margin-bottom: 28px; display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.knowledge-document-placeholder h3 { margin: 0 0 5px; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 550; }
.knowledge-document-placeholder p { margin: 0; font-size: 12px; }
.crawl-progress { margin-bottom: 20px; padding: 20px; border: 1px solid #c9dcd3; border-radius: 15px; background: linear-gradient(135deg, #f0f8f4, #fffaf6); box-shadow: var(--shadow-xs); }
.crawl-progress--completed { border-color: #b8ddcb; background: linear-gradient(135deg, var(--success-soft), #fbfdfc); }
.crawl-progress--failed { border-color: #e5b8b4; background: linear-gradient(135deg, var(--danger-soft), #fff); }
.crawl-progress__head { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.crawl-progress__symbol { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--forest-2); font-size: 20px; font-weight: 850; }
.crawl-progress--completed .crawl-progress__symbol { background: var(--success); }
.crawl-progress--failed .crawl-progress__symbol { background: var(--danger); }
.crawl-progress__symbol .spinner { width: 23px; height: 23px; border-width: 2px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.crawl-progress__head .eyebrow { margin-bottom: 3px; font-size: 9px; }
.crawl-progress__head h3 { margin: 0 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 550; }
.crawl-progress__head p:last-child { max-width: 820px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.crawl-progress__percent { color: var(--forest-2); font-family: Georgia, "Times New Roman", serif; font-size: 25px; white-space: nowrap; }
.crawl-progress__bar { height: 8px; margin-top: 16px; background: rgba(30,58,48,.12); }
.crawl-progress__bar > span { background: linear-gradient(90deg, var(--forest-2), var(--accent)); }
.crawl-progress--completed .crawl-progress__bar > span { background: var(--success); }
.crawl-progress--failed .crawl-progress__bar > span { background: var(--danger); }
.crawl-progress__stats { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.crawl-progress__stats span { padding: 5px 8px; border: 1px solid rgba(30,58,48,.1); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.62); font-size: 9px; }
.crawl-progress__stats strong { color: var(--ink); font-size: 10px; }
.crawl-progress__phases { margin: 17px 0 0; padding: 16px 0 0; border-top: 1px solid rgba(30,58,48,.12); list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.crawl-progress__phases li { min-width: 0; display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: start; gap: 7px; color: #859089; }
.crawl-progress__phases li > span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #ced6d1; border-radius: 50%; color: #7a8780; background: #fff; font-size: 9px; font-weight: 850; }
.crawl-progress__phases li > div { min-width: 0; display: grid; gap: 2px; }
.crawl-progress__phases strong { font-size: 9px; line-height: 1.3; }
.crawl-progress__phases small { color: inherit; font-size: 8px; line-height: 1.35; }
.crawl-progress__phases li.is-current { color: var(--accent-dark); }
.crawl-progress__phases li.is-current > span { border-color: var(--accent); color: #fff; background: var(--accent); box-shadow: 0 0 0 4px rgba(217,109,55,.1); }
.crawl-progress__phases li.is-complete { color: var(--success); }
.crawl-progress__phases li.is-complete > span { border-color: var(--success); color: #fff; background: var(--success); }
.crawl-progress__error { margin-top: 15px; padding: 11px 13px; border: 1px solid #e6b4af; border-radius: 9px; color: #7d302a; background: #fff; }
.crawl-progress__error strong { font-size: 10px; }
.crawl-progress__error p { margin: 3px 0 0; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.knowledge-document { margin-bottom: 38px; overflow: clip; border: 1px solid #d7ded9; border-radius: 19px; background: var(--surface); box-shadow: 0 16px 46px rgba(20,42,34,.08); }
.knowledge-document__cover { min-height: 190px; padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 23px; color: #fff; background: radial-gradient(circle at 88% 15%, rgba(217,109,55,.22), transparent 27%), linear-gradient(135deg, #142a22, #24483b); }
.knowledge-document__mark { width: 64px; height: 78px; padding: 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; display: flex; align-items: flex-end; gap: 5px; background: rgba(255,255,255,.08); }
.knowledge-document__mark span { width: 9px; border-radius: 2px 2px 0 0; background: #fff; }
.knowledge-document__mark span:nth-child(1) { height: 25px; }
.knowledge-document__mark span:nth-child(2) { height: 48px; background: #ed9a70; }
.knowledge-document__mark span:nth-child(3) { height: 35px; }
.knowledge-document__title .eyebrow { color: #efaa86; }
.knowledge-document__title h3 { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(27px, 3vw, 38px); font-weight: 500; letter-spacing: -.025em; line-height: 1.08; }
.knowledge-document__title > p:not(.eyebrow) { margin: 0; color: #c4d3cc; font-size: 13px; }
.knowledge-document__meta { margin-top: 19px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; color: #becdc6; font-size: 10px; }
.knowledge-document__meta .status-pill { color: #bfe7d3; background: rgba(66,169,120,.17); }
.knowledge-document__meta a { color: #fff; font-weight: 750; text-decoration: none; }
.knowledge-document__meta a:hover { text-decoration: underline; }
.document-generation-badge { padding: 5px 8px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #e8f0ec; background: rgba(255,255,255,.08); font-size: 8px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.knowledge-generation-notice { margin: 0; padding: 13px clamp(22px, 4vw, 42px); border-bottom: 1px solid #cbdfe9; display: flex; align-items: flex-start; gap: 10px; color: #315b73; background: var(--info-soft); }
.knowledge-generation-notice--warning { border-color: #ead8b6; color: #705018; background: var(--warning-soft); }
.knowledge-generation-notice > span { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--info); font-size: 10px; font-weight: 850; }
.knowledge-generation-notice--warning > span { background: var(--warning); }
.knowledge-generation-notice strong { display: block; margin: 1px 0 3px; font-size: 10px; }
.knowledge-generation-notice p { margin: 0; font-size: 9px; line-height: 1.5; }
.knowledge-document__publish { min-height: 32px; padding: 6px 11px; color: #fff; border-color: rgba(255,255,255,.28); background: var(--accent); font-size: 10px; }
.knowledge-document__publish:hover:not(:disabled) { border-color: #fff; background: var(--accent-dark); }
.knowledge-document__body { display: grid; grid-template-columns: minmax(210px, 255px) minmax(0, 1fr); align-items: start; }
.knowledge-document__toc { position: sticky; top: 94px; max-height: calc(100vh - 115px); padding: 34px 26px; overflow-y: auto; border-right: 1px solid var(--line); background: #f7f7f3; }
.knowledge-document__toc > .eyebrow { margin-bottom: 14px; color: var(--muted); font-size: 9px; }
.knowledge-document__toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.knowledge-document__toc li { min-width: 0; }
.knowledge-document__toc button { width: 100%; min-height: 37px; padding: 7px 8px; border: 0; border-radius: 7px; display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 7px; color: var(--ink-soft); background: transparent; font: inherit; font-size: 10px; line-height: 1.35; text-align: left; cursor: pointer; }
.knowledge-document__toc button:hover, .knowledge-document__toc button:focus-visible { color: var(--accent-dark); background: #fff; }
.knowledge-document__toc button > span { color: #9aa49e; font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.knowledge-document__toc > p:last-child { color: var(--muted); font-size: 10px; line-height: 1.5; }
.knowledge-document__limit { margin-top: 22px; padding: 12px; border: 1px solid #d9e1dc; border-radius: 9px; display: grid; gap: 3px; background: #fff; }
.knowledge-document__limit strong { color: var(--forest-2); font-size: 10px; }
.knowledge-document__limit span { color: var(--muted); font-size: 8px; line-height: 1.4; }
.knowledge-document__chapters { min-width: 0; padding: 8px clamp(27px, 5vw, 70px) 48px; }
.knowledge-chapter { padding: 45px 0 48px; border-bottom: 1px solid var(--line); scroll-margin-top: 95px; }
.knowledge-chapter:last-child { border-bottom: 0; }
.knowledge-chapter__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.knowledge-chapter__number { display: block; margin-bottom: 7px; color: var(--accent-dark); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.knowledge-chapter__head h4 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(23px, 2.5vw, 31px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.knowledge-chapter__edit { min-height: 36px; flex: 0 0 auto; padding: 7px 10px; color: var(--muted); font-size: 10px; }
.knowledge-chapter__labels { margin: 16px 0 24px; display: flex; flex-wrap: wrap; gap: 7px; }
.document-label { max-width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: #65726b; background: #f8faf8; font-size: 9px; font-weight: 700; line-height: 1.2; }
.document-label--public { color: var(--success); border-color: #bfddce; background: var(--success-soft); }
.document-label--public span { margin-right: 5px; font-size: 7px; }
.document-label--internal { color: #5a6680; border-color: #cfd6e2; background: #f1f4f8; }
.document-label--confidential, .document-label--strictly_confidential { color: #8b4c16; border-color: #e8c9a8; background: #fff5e8; }
.document-label--strictly_confidential { color: var(--danger); border-color: #e5b8b4; background: var(--danger-soft); }
.document-label--dynamic { color: #72519d; border-color: #d9ccec; background: #f3eef9; }
.knowledge-chapter__content { color: #334139; font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.78; overflow-wrap: anywhere; }
.knowledge-chapter__content p { margin: 0 0 18px; }
.knowledge-chapter__content p:last-child { margin-bottom: 0; }
.knowledge-chapter__content h5 { margin: 28px 0 10px; color: var(--ink); font-family: var(--font); font-size: 13px; }
.knowledge-chapter__content ul, .knowledge-chapter__content ol { margin: 0 0 19px; padding-left: 23px; }
.knowledge-chapter__content li { padding-left: 4px; margin: 5px 0; }
.knowledge-chapter__content blockquote { margin: 18px 0; padding: 13px 17px; border-left: 3px solid var(--accent); color: var(--ink-soft); background: #faf6f2; }
.knowledge-chapter__empty { color: var(--muted); font-style: italic; }
.knowledge-chapter__sources { margin-top: 30px; padding-top: 18px; border-top: 1px dashed #d7ded9; }
.knowledge-chapter__sources > strong { display: block; margin-bottom: 9px; color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.knowledge-chapter__sources ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.knowledge-chapter__sources a { width: fit-content; max-width: 100%; display: flex; align-items: center; gap: 7px; color: var(--info); font-size: 10px; text-decoration: none; }
.knowledge-chapter__sources a > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-chapter__sources a:hover { text-decoration: underline; }
.knowledge-chapter__sources p { margin: 0; color: #909b95; font-size: 9px; }
.knowledge-document__no-chapters { padding: 60px 0; text-align: center; }
.knowledge-document__no-chapters h4 { margin: 0 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; }
.knowledge-document__no-chapters p { margin: 0; color: var(--muted); font-size: 11px; }
.knowledge-document-empty { min-height: 220px; margin-bottom: 35px; padding: clamp(25px, 4vw, 42px); display: flex; align-items: center; justify-content: center; gap: 21px; text-align: left; }
.knowledge-document-empty > span { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 14px; display: grid; place-items: center; color: var(--forest-2); background: #e7eeea; font-family: Georgia, serif; font-size: 26px; }
.knowledge-document-empty--error > span { color: var(--danger); background: var(--danger-soft); }
.knowledge-document-empty h3 { margin: 0 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; }
.knowledge-document-empty p:not(.eyebrow) { max-width: 680px; margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.knowledge-raw-heading { margin: 44px 0 16px; padding-top: 31px; border-top: 1px solid var(--line-strong); }
.knowledge-raw-heading h3 { margin: 0 0 5px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; }
.knowledge-raw-heading p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.knowledge-section-edit-meta { padding: 11px; border: 1px solid var(--line); border-radius: 9px; display: flex; flex-wrap: wrap; gap: 7px; background: var(--surface-soft); }
.knowledge-section-edit-meta span { padding: 5px 8px; border-radius: 999px; color: var(--muted); background: #fff; font-size: 9px; }
.crawl-progress--embedded { margin: 15px 0; box-shadow: none; }
.onboarding-result--running { background: linear-gradient(135deg, #18372c, #315c4c); }
.onboarding-result--failed { background: linear-gradient(135deg, #592c28, #8b4039); }
.onboarding-result--running .onboarding-result__mark { background: rgba(255,255,255,.13); box-shadow: 0 0 0 7px rgba(255,255,255,.06); }
.onboarding-result--failed .onboarding-result__mark { color: #762d27; background: #f5cbc7; }
.onboarding-result__mark .spinner { width: 26px; height: 26px; border-color: rgba(255,255,255,.32); border-top-color: #fff; }
.onboarding-document-summary { margin: 15px 0; padding: 14px; border: 1px solid #cce1d6; border-radius: 10px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; background: var(--success-soft); }
.onboarding-document-summary > span:first-child { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--success); font-size: 18px; }
.onboarding-document-summary div { display: grid; gap: 3px; }
.onboarding-document-summary strong { font-size: 11px; }
.onboarding-document-summary p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.onboarding-document-summary > span:last-child { color: var(--success); font-size: 9px; font-weight: 800; }
.email-layout { display: grid; grid-template-columns: minmax(270px,.7fr) minmax(480px,1.3fr); align-items: start; gap: 16px; }
.email-inbox, .email-detail { min-height: 620px; }
.email-inbox { padding: 18px; position: sticky; top: 96px; }
.email-inbox .search-field { margin: 11px 0 14px; }
.email-list { margin: 0 -7px; display: grid; gap: 3px; }
.email-list-item { width: 100%; padding: 13px 12px; border: 1px solid transparent; border-radius: 10px; display: grid; gap: 7px; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.email-list-item:hover { background: var(--surface-alt); }
.email-list-item.is-active { border-color: color-mix(in srgb, var(--accent), white 45%); background: color-mix(in srgb, var(--accent), white 91%); }
.email-list-item > span:nth-child(2) { overflow: hidden; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.email-list-item__top, .email-list-item__bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.email-list-item__top strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.email-list-item small { color: var(--muted); font-size: 8px; }
.email-detail { padding: 22px; }
.email-detail__head { padding-bottom: 17px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.email-detail__head h3 { margin: 3px 0 5px; font-size: 19px; }
.email-detail__head p:last-child { margin: 0; color: var(--muted); font-size: 10px; }
.original-mail, .evidence-list { margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-alt); }
.original-mail summary, .evidence-list summary { padding: 12px 14px; font-size: 10px; font-weight: 800; cursor: pointer; }
.original-mail pre { max-height: 230px; margin: 0; padding: 14px; overflow: auto; border-top: 1px solid var(--line); font: inherit; font-size: 10px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; }
.original-mail .data-chips { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); }
.email-editor { display: grid; gap: 7px; }
.email-editor label { margin-top: 4px; font-size: 9px; font-weight: 800; }
.email-editor input, .email-editor textarea { width: 100%; border: 1px solid #cfd7d2; border-radius: 9px; color: var(--text); background: #fff; font: inherit; }
.email-editor input { height: 42px; padding: 0 12px; }
.email-editor textarea { min-height: 270px; padding: 12px; resize: vertical; line-height: 1.6; }
.email-editor :disabled { color: #59645f; background: #f5f6f4; }
.email-analysis-grid { margin-top: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.email-analysis-grid section { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-alt); }
.email-analysis-grid h4 { margin: 0 0 8px; font-size: 10px; }
.email-analysis-grid ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.email-analysis-grid dl { margin: 0; display: grid; gap: 5px; }
.email-analysis-grid dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; }
.email-analysis-grid dt { color: var(--muted); }
.email-analysis-grid dd { margin: 0; font-weight: 750; }
.evidence-list ul { margin: 0; padding: 0 14px 14px; list-style: none; display: grid; gap: 8px; }
.evidence-list li { padding: 10px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 3px; background: #fff; }
.evidence-list li strong { font-size: 10px; }
.evidence-list li small { color: var(--muted); font-size: 8px; }
.evidence-list li p { margin: 4px 0 0; color: #4f5b55; font-size: 9px; line-height: 1.5; }
.risk-note { margin: 10px 0; padding: 10px 12px; border-radius: 8px; color: var(--warning); background: var(--warning-soft); font-size: 9px; }
.risk-note--high { color: var(--danger); background: var(--danger-soft); }
.email-detail__actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.free-chat { min-height: 650px; padding: 0; overflow: hidden; }
.free-chat__head { padding: 22px 24px 19px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.free-chat__head h3 { margin: 3px 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 550; }
.free-chat__head p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.free-chat__head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.free-chat__privacy { margin: 16px 22px 0; padding: 11px 13px; border: 1px solid #cbdfe9; border-radius: 9px; display: flex; align-items: flex-start; gap: 9px; color: #315b73; background: var(--info-soft); }
.free-chat__privacy > span { width: 23px; height: 23px; flex: 0 0 23px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--info); font-weight: 800; }
.free-chat__privacy p { margin: 2px 0 0; font-size: 9px; line-height: 1.55; }
.free-chat__messages { min-height: 355px; max-height: 56vh; padding: 24px max(22px, 8%); overflow-y: auto; display: flex; flex-direction: column; gap: 15px; background: linear-gradient(180deg, #fafbf9, #f5f7f4); }
.free-chat__welcome { max-width: 600px; margin: auto; padding: 34px 22px; color: var(--muted); text-align: center; }
.free-chat__welcome > span { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 13px; display: grid; place-items: center; color: var(--accent-dark); background: var(--accent-soft); font-size: 21px; }
.free-chat__welcome h4 { margin: 0 0 7px; color: var(--text); font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 550; }
.free-chat__welcome p { margin: 0; font-size: 10px; line-height: 1.6; }
.chat-turn { max-width: min(720px, 86%); display: grid; gap: 6px; }
.chat-turn--user { align-self: flex-end; }
.chat-turn--assistant { align-self: flex-start; }
.chat-turn__label { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.chat-turn--user .chat-turn__label { text-align: right; }
.chat-turn__bubble { padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px 13px 13px 3px; color: var(--text); background: #fff; box-shadow: var(--shadow-xs); font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-turn--user .chat-turn__bubble { border-color: #315c4c; border-radius: 13px 13px 3px 13px; color: #fff; background: var(--forest-2); }
.chat-turn__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.chat-turn__sources .chat-turn__meta { padding: 0 10px 9px; }
.chat-turn__actions { display: flex; justify-content: flex-end; }
.chat-turn__meta span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.chat-turn__sources { margin: 0; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.72); }
.chat-turn__sources summary { padding: 8px 10px; color: var(--muted); cursor: pointer; font-size: 8px; font-weight: 800; }
.chat-turn__sources ul { margin: 0; padding: 0 10px 9px 26px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.chat-turn--loading .chat-turn__bubble { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.chat-turn--loading .spinner { width: 15px; height: 15px; }
.free-chat__composer { padding: 17px 22px 20px; border-top: 1px solid var(--line); background: #fff; }
.free-chat__composer textarea { width: 100%; min-height: 84px; padding: 12px 14px; border: 1px solid #cbd3ce; border-radius: 10px; color: var(--text); background: #fff; font: inherit; font-size: 11px; line-height: 1.55; resize: vertical; }
.free-chat__composer textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent), transparent 70%); border-color: var(--accent); }
.free-chat__composer > div { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.free-chat__composer small { color: var(--muted); font-size: 8px; }

@media (min-width: 700px) {
  .widget-body { padding: 18px; background: radial-gradient(circle at 15% 5%, #e9eee9, transparent 33%), #dfe5e0; }
  .widget-shell { width: min(780px, 100%); min-height: calc(100dvh - 36px); margin: 0 auto; border: 1px solid rgba(20,42,34,.12); border-radius: 17px; box-shadow: 0 24px 70px rgba(20,42,34,.18); }
}

@media (max-width: 1120px) {
  .catalog-sync-panel { grid-template-columns: 1fr 1.4fr; }
  .catalog-sync-panel__actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .knowledge-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .settings-layout { grid-template-columns: minmax(0,1fr) minmax(260px,.65fr); }
  .knowledge-policy { grid-template-columns: 1fr 1fr; }
  .crawl-progress__phases { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .knowledge-document__body { grid-template-columns: 220px minmax(0, 1fr); }
  .email-layout { grid-template-columns: minmax(240px,.65fr) minmax(420px,1.35fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: transform .24s ease; box-shadow: var(--shadow-md); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar__close, .menu-button { display: grid; }
  .sidebar-scrim { position: fixed; z-index: 35; inset: 0; background: rgba(10,24,18,.53); }
  .workspace { margin-left: 0; }
  .loading-state { left: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-side { grid-template-columns: 1fr 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-side { grid-template-columns: 1fr 1fr; }
  .offering-layout { grid-template-columns: 245px minmax(0,1fr); }
  .email-layout { grid-template-columns: 1fr; }
  .email-inbox { min-height: 0; position: static; }
  .email-list { max-height: 360px; overflow: auto; }
  .knowledge-document__chapters { padding-inline: 32px; }
}

@media (max-width: 720px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100dvh; align-items: flex-start; padding: 50px 22px; }
  .brand--mobile { display: inline-flex; }
  .topbar { height: 65px; padding: 0 15px; }
  .topbar__actions .button { display: none; }
  .avatar--top { display: inline-grid; }
  .main-content { padding: 25px 14px 60px; }
  .loading-state { top: 65px; }
  .page-heading { min-height: auto; margin-bottom: 21px; align-items: flex-end; flex-wrap: wrap; }
  .page-heading h2 { font-size: 28px; }
  .page-heading > .button { min-width: 42px; padding-inline: 12px; }
  .page-heading > .page-actions { margin-top: 0; }
  .page-heading--hero { display: block; }
  .page-heading--hero .button { margin-top: 18px; width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 110px; padding: 14px; display: grid; grid-template-columns: 32px 1fr; gap: 9px; }
  .metric-card__icon { width: 32px; height: 32px; font-size: 14px; }
  .metric-card strong { font-size: 22px; }
  .dashboard-side { grid-template-columns: 1fr; }
  .catalog-sync-panel { grid-template-columns: 1fr; align-items: stretch; }
  .catalog-sync-panel__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-sync-panel__actions { grid-column: auto; display: grid; grid-template-columns: 1fr; }
  .compact-row { grid-template-columns: 1fr auto; }
  .compact-row__person { display: none; }
  .compact-row > .status-pill { display: none; }
  .filterbar, .knowledge-toolbar { align-items: stretch; flex-direction: column; }
  .segmented { width: 100%; }
  .search-field, .search-field--wide { width: 100%; min-width: 0; }
  .knowledge-toolbar select, .filterbar > select { width: 100%; }
  .data-table-wrap { display: none; }
  .card-list-mobile { display: grid; }
  .mobile-data-card { padding: 15px; border-top: 1px solid var(--line); display: grid; gap: 11px; }
  .mobile-data-card:first-child { border-top: 0; }
  .mobile-data-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .mobile-data-card__head > span:first-child { min-width: 0; display: grid; gap: 3px; }
  .mobile-data-card__head strong { font-size: 12px; }
  .mobile-data-card__head small { color: var(--muted); font-size: 9px; }
  .mobile-data-card__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 9px; }
  .mobile-data-card__actions { display: flex; gap: 7px; }
  .mobile-data-card__actions .button { flex: 1; min-height: 37px; font-size: 10px; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .free-chat__head { flex-direction: column; }
  .free-chat__head-actions { width: 100%; justify-content: flex-start; }
  .knowledge-policy { grid-template-columns: 1fr; }
  .crawl-progress { padding: 16px; }
  .crawl-progress__head { grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
  .crawl-progress__symbol { width: 40px; height: 40px; }
  .crawl-progress__percent { grid-column: 2; font-size: 20px; }
  .crawl-progress__phases { grid-template-columns: 1fr 1fr; }
  .knowledge-document__cover { min-height: 0; padding: 29px 23px; grid-template-columns: 48px minmax(0, 1fr); gap: 15px; }
  .knowledge-document__mark { width: 48px; height: 62px; padding: 10px; gap: 3px; }
  .knowledge-document__mark span { width: 7px; }
  .knowledge-document__mark span:nth-child(1) { height: 19px; }
  .knowledge-document__mark span:nth-child(2) { height: 38px; }
  .knowledge-document__mark span:nth-child(3) { height: 28px; }
  .knowledge-document__title h3 { font-size: 27px; }
  .knowledge-document__body { grid-template-columns: 1fr; }
  .knowledge-document__toc { position: static; max-height: none; padding: 24px 21px; border-right: 0; border-bottom: 1px solid var(--line); }
  .knowledge-document__toc ol { grid-template-columns: 1fr 1fr; gap: 3px 10px; }
  .knowledge-document__limit { max-width: 260px; }
  .knowledge-document__chapters { padding: 0 21px 24px; }
  .knowledge-chapter { padding: 32px 0 36px; scroll-margin-top: 72px; }
  .knowledge-chapter__content { font-size: 14px; }
  .knowledge-document-empty { min-height: 0; align-items: flex-start; flex-direction: column; }
  .onboarding-document-summary { grid-template-columns: 36px minmax(0, 1fr); }
  .onboarding-document-summary > span:last-child { grid-column: 2; }
  .email-detail { padding: 16px; }
  .email-analysis-grid { grid-template-columns: 1fr; }
  .email-detail__actions .button { flex: 1 1 45%; }
  .offering-layout { grid-template-columns: 1fr; }
  .offering-list { display: flex; overflow-x: auto; }
  .offering-list-item { min-width: 220px; }
  .offering-detail__top { display: block; }
  .offering-detail__actions { margin-top: 13px; }
  .settings-side { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .quote-detail-grid { grid-template-columns: 1fr; }
  .quote-line-editor { grid-template-columns: 1fr 1fr; }
  .quote-line-editor__description { grid-column: 1 / -1; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-field--wide { grid-column: auto; }
  .modal { width: 100%; max-width: none; max-height: 94dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .modal__surface { max-height: 94dvh; }
  .modal__head, .modal__body, .modal__foot { padding-left: 17px; padding-right: 17px; }
}

@media (max-width: 520px) {
  .login-card h2 { font-size: 32px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { grid-template-columns: 1fr; }
  .metric-card__icon { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field--wide { grid-column: auto; }
  .onboarding-result { align-items: flex-start; flex-direction: column; }
  .onboarding-stats { grid-template-columns: 1fr; }
  .onboarding-knowledge > div { grid-template-columns: 22px minmax(0, 1fr); }
  .onboarding-knowledge .status-pill { grid-column: 2; justify-self: start; }
  .crawl-progress__phases { grid-template-columns: 1fr; }
  .crawl-progress__stats { display: grid; grid-template-columns: 1fr 1fr; }
  .crawl-progress__stats span { text-align: center; }
  .knowledge-document__cover { grid-template-columns: 1fr; }
  .knowledge-document__mark { display: none; }
  .knowledge-document__meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .knowledge-document__toc ol { grid-template-columns: 1fr; }
  .knowledge-chapter__head { flex-direction: column; }
  .knowledge-chapter__edit { align-self: flex-start; }
  .document-label { white-space: normal; }
  .form-section { padding: 19px 16px; }
  .hide-mobile { display: none !important; }
  .widget-body { padding: 0; }
  .widget-shell { min-height: 100dvh; }
  .widget-main { padding-top: 27px; }
  .widget-header { min-height: 64px; }
  .assistant-message { gap: 9px; }
  .assistant-avatar { width: 31px; height: 31px; flex-basis: 31px; border-radius: 8px 8px 8px 2px; font-size: 11px; }
  .assistant-message h1 { font-size: 25px; }
  .privacy-note, .welcome-consent, .welcome-consent-error, .service-section, .chat-history, .contact-form, .summary-card, .assumption-note, #stage-summary > .widget-button, #stage-summary > .answer-error, .submit-note { margin-left: 40px; }
  #stage-summary > .widget-button, #stage-summary > .answer-error, .submit-note { width: calc(100% - 40px); }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 78px; }
  .question-content { padding: 17px 15px; }
  .option-grid { grid-template-columns: 1fr; }
  .answer-actions { flex-direction: column-reverse; }
  .answer-actions .widget-button { width: 100%; }
  .contact-form { padding: 15px; }
  .widget-form-grid { grid-template-columns: 1fr; gap: 0; }
  .summary-list > div { grid-template-columns: 1fr auto; }
  .summary-list dt { grid-column: 1/-1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.ml-steps { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; list-style: none; color: var(--text-muted, #61716d); }
.ml-steps li { padding: 10px 16px; border-radius: 20px; background: #edf3ef; }
.ml-panel { padding: 24px; margin: 20px 0; scroll-margin-top: 96px; }
.ml-panel h3 { margin-top: 0; }
.ml-panel p { color: #52635d; line-height: 1.6; }
.ml-controls, .ml-connect-form { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin: 18px 0; }
.ml-panel label { display: flex; flex-direction: column; gap: 7px; }
.ml-panel input:not([type=checkbox]), .ml-panel select, .ml-panel textarea { width: 100%; border: 1px solid #cad6d0; border-radius: 8px; padding: 10px 12px; background: #fff; color: #20352c; font: inherit; }
.ml-connect-form > label { flex: 1 1 210px; }
.ml-connect-form > p { flex-basis: 100%; margin: 0; }
.ml-panel summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.ml-search { max-width: 560px; margin: 16px 0; }
.ml-rows { max-height: 480px; overflow-y: auto; }
.ml-thread { border-bottom: 1px solid #dce4df; padding: 10px 0; }
.ml-panel .ml-message, .ml-panel .ml-check { flex-direction: row; align-items: start; gap: 12px; padding: 12px 0; cursor: pointer; }
.ml-message small { display: block; color: #61716d; margin-top: 5px; overflow-wrap: anywhere; }
.ml-message strong { overflow-wrap: anywhere; }
.ml-message input, .ml-check input { margin-top: 5px; width: 18px; height: 18px; flex-shrink: 0; }
.ml-check { margin: 14px 0; line-height: 1.6; }
.ml-notice { padding: 14px 18px; border-radius: 8px; background: #edf3ef; margin: 14px 0; line-height: 1.6; }
.ml-error { background: #fff0ea; color: #8f3020; }
#mail-learning-root[aria-busy=true] { cursor: progress; }
@media (max-width: 650px) { .ml-panel { padding: 16px; } .ml-controls > label { width: 100%; } .ml-steps { font-size: 12px; gap: 6px; } }

@media print {
  .sidebar, .topbar, .button, .filterbar { display: none !important; }
  .workspace { margin: 0; }
  .main-content { max-width: none; padding: 0; }
  .panel, .table-card { box-shadow: none; }
  .crawl-progress, .knowledge-raw-heading, .knowledge-policy, .knowledge-toolbar, .knowledge-grid, #knowledge-empty, .knowledge-chapter__edit { display: none !important; }
  .knowledge-document { border: 0; box-shadow: none; }
  .knowledge-document__cover { color: #000; background: #fff; }
  .knowledge-document__title > p:not(.eyebrow), .knowledge-document__meta { color: #444; }
  .knowledge-document__body { display: block; }
  .knowledge-document__toc { position: static; max-height: none; border: 0; }
}

.ml-message-item { padding-bottom: 12px; }
.ml-message-preview { margin: 12px 0; padding: 14px; border-radius: 8px; background: #f4f6f4; }
.ml-message-preview p { font-size: 12px; margin-top: 0; }
.ml-message-preview pre { max-height: 210px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.5; }
.ml-change { padding: 18px; margin: 14px 0; border: 1px solid #dce4df; border-radius: 10px; }
.ml-change--added { background: #f0f8f2; border-left: 4px solid #358553; }
.ml-change-label { color: #356448; font-size: 12px; font-weight: 700; }
.ml-change h4 { margin: 8px 0; font-size: 17px; }
.ml-change p, .ml-change blockquote { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Employee review is visually separate from the customer mail editor. */
.email-review { padding: 18px; margin: 16px 0; border: 1px solid #d6e0ea; border-radius: 12px; background: #f5f8fb; }
.email-review h4 { margin: 0 0 10px; }
.email-review pre { max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.6; }
.email-review textarea { display: block; width: 100%; margin: 8px 0; min-height: 100px; }
.email-review li { margin-bottom: 8px; }
.email-review .checkbox-line { margin: 10px 0; }
.email-comment { border-bottom: 1px solid #d6e0ea; padding: 12px 0; }
.email-comment p { white-space: pre-wrap; overflow-wrap: anywhere; }
.email-comment small { margin-left: 10px; }
.email-pdf, .email-provenance { margin: 1rem 0; padding: 1.1rem; border: 1px solid var(--border, #dce3e8); border-radius: 12px; background: #f8fafb; }
.email-pdf h4 { margin-top: 0; }
.email-pdf .button { margin: .25rem .25rem .25rem 0; }
.email-provenance > summary { cursor: pointer; font-weight: 700; font-size: 1rem; }
.email-provenance p, .email-provenance small { line-height: 1.6; }
.email-provenance__grid, .email-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.email-provenance h5 { font-size: .95rem; margin: .6rem 0; }
.email-source, .email-price-proof { padding: 1rem; background: white; border: 1px solid #e0e7eb; border-radius: 10px; min-width: 0; overflow-wrap: anywhere; }
.email-source__meta { color: #52606d; font-size: .85rem; }
.email-provenance blockquote { margin: .7rem 0; padding: .6rem .8rem; border-left: 3px solid #9bb6c6; background: #f4f7f9; white-space: pre-wrap; overflow-wrap: anywhere; }
.email-facts { margin: .6rem 0; }
.email-facts > div { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr; gap: .65rem; padding: .3rem 0; border-bottom: 1px solid #edf1f4; }
.email-facts dt { color: #52606d; }
.email-facts dd { margin: 0; overflow-wrap: anywhere; }
.email-style-proof { margin: 1rem 0; }
@media (max-width: 900px) { .email-provenance__grid, .email-source-grid { grid-template-columns: 1fr; } }

/* Central tenant mailbox configuration */
.mail-setup { margin-top: 24px; border-top: 1px solid var(--border, #e6e5e1); padding-top: 20px; }
.mail-setup fieldset { border: 0; padding: 12px 0; margin: 0; min-width: 0; }
.mail-setup fieldset:disabled { opacity: .55; }
.mail-setup .modal-field input, .mail-setup .modal-field select { width: 100%; min-width: 0; }
.mail-card { margin-top: 16px; padding: 24px; }
.mail-tag { display: inline-block; font-size: 12px; padding: 4px 8px; border-radius: 12px; background: #e4efe8; color: #173f35; }
.mail-message { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid #e6e5e1; }
.mail-message input { flex: 0 0 auto; margin-top: 5px; }
.mail-message span { min-width: 0; overflow-wrap: anywhere; }
.mail-message small { display: block; margin-top: 5px; color: #626860; }
/* Personal staff conversations */
.staff-layout { display:grid; grid-template-columns:230px minmax(0,1fr); gap:20px; align-items:start; }
.staff-history { padding:18px 14px; border:1px solid var(--line); border-radius:16px; background:#eeefe9; }
.staff-history > .eyebrow { margin:25px 8px 10px; }
.staff-history > small { display:block; padding:20px 8px 0; color:var(--muted); font-size:10px; }
#staff-list { max-height:58vh; overflow:auto; }
.staff-thread { display:flex; width:100%; text-align:left; flex-direction:column; gap:5px; padding:12px; margin:3px 0; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--ink); }
.staff-thread span { display:block; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12px; }
.staff-thread small { font-size:9px; color:var(--muted); }
.staff-thread:hover, .staff-thread.is-active { background:#fff; border-color:var(--line); }
.staff-list-empty { padding:6px 8px; font-size:12px; color:var(--muted); }
.staff-main { min-width:0; border:1px solid var(--line); border-radius:17px; background:#fff; overflow:hidden; box-shadow:var(--shadow-xs); }
.staff-head { padding:18px 24px; display:flex; gap:16px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.staff-head h3 { margin:0; font-size:14px; overflow-wrap:anywhere; }
.staff-head .text-button { flex-shrink:0; font-size:10px; }
.staff-profile { padding:12px 24px; background:#f7f8f4; color:var(--muted); font-size:11px; }
.staff-profile summary { cursor:pointer; }
.staff-profile p { white-space:pre-wrap; line-height:1.8; }
.staff-profile a { color:var(--forest); }
.staff-scroll { padding:25px; min-height:330px; height:clamp(360px,48vh,650px); overflow:auto; overscroll-behavior:contain; }
.staff-welcome { max-width:530px; margin:22px auto 32px; }
.staff-mark { display:inline-grid; place-items:center; width:45px; height:45px; border-radius:14px; background:#edf2ee; color:var(--forest); font-size:25px; }
.staff-welcome h3 { margin:20px 0 12px; font:500 29px Georgia,serif; letter-spacing:-.02em; }
.staff-welcome > p { font-size:13px; line-height:1.7; color:var(--muted); }
.staff-prompts { display:grid; gap:8px; margin-top:20px; }
.staff-prompts button { padding:12px 14px; text-align:left; border:1px solid var(--line); border-radius:10px; background:#fcfcfa; color:var(--forest); font-size:12px; }
.staff-prompts button:hover { background:#f1f4ee; }
.staff-message { max-width:92%; margin:0 0 24px; padding:17px 19px; border-radius:14px; background:#f5f6f1; overflow-wrap:anywhere; }
.staff-message--user { margin-left:auto; background:#ecf1ed; }
.staff-message--assistant { padding-left:0; background:transparent; }
.staff-message__author { display:block; margin-bottom:9px; color:var(--muted); font-size:10px; font-weight:750; }
.staff-message__body { white-space:pre-wrap; font-size:14px; line-height:1.8; }
.staff-message__body code { padding:2px 4px; border-radius:4px; background:#eef0eb; }
.staff-sources { margin-top:15px; padding-top:10px; border-top:1px solid var(--line); font-size:10px; color:var(--muted); }
.staff-sources summary { cursor:pointer; }
.staff-sources p { margin:9px 0; }
.staff-sources span { display:block; padding-top:3px; }
.staff-review { display:block; margin-top:10px; color:var(--muted); }
.staff-notice, .staff-error { margin:10px 22px; padding:10px; border-radius:8px; background:#fcf3e3; font-size:12px; }
.staff-error { background:var(--danger-soft); color:var(--danger); }
.staff-composer { margin:0 20px; padding:12px; border:1px solid #cdd6ce; border-radius:14px; background:#fff; }
.staff-composer textarea { border:0; min-height:68px; width:100%; resize:vertical; outline-offset:3px; font-size:13px; box-shadow:none; }
.staff-composer > div { display:flex; gap:10px; align-items:center; justify-content:space-between; }
.staff-composer small { color:var(--muted); font-size:9px; }
.staff-privacy { margin:12px 24px 17px; color:var(--muted); font-size:9px; line-height:1.6; }
#staff-pending { color:var(--muted); font-size:12px; }
@media (max-width:1000px) { .staff-layout { grid-template-columns:190px minmax(0,1fr); gap:12px; } }
@media (max-width:700px) {
  .staff-layout { grid-template-columns:minmax(0,1fr); }
  .staff-history { padding:12px; }
  #staff-list { max-height:125px; }
  .staff-history > .eyebrow { margin-top:15px; }
  .staff-history > small { padding-top:8px; }
  .staff-head { padding:16px; flex-wrap:wrap; }
  .staff-scroll { padding:18px; height:48vh; min-height:320px; }
  .staff-profile { padding:12px 16px; }
  .staff-message { max-width:100%; }
  .staff-composer { margin:0 12px; }
  .staff-composer > div { flex-wrap:wrap; }
  .staff-welcome h3 { font-size:25px; }
  .staff-privacy { margin-inline:16px; }
}

/* Mail-client view inside the E-Mail-Copilot */
.email-tabs { margin-bottom: 16px; width: fit-content; }
.mail-client { display: grid; grid-template-columns: 200px minmax(250px, .75fr) minmax(420px, 1.45fr); align-items: start; gap: 16px; }
.mail-client__nav, .mail-client__list { padding: 16px; position: sticky; top: 96px; }
.mail-client__nav .modal-field { font-size: 10px; font-weight: 800; }
.mail-client__nav select { width: 100%; min-width: 0; }
.mail-client__hint { margin: 12px 0 6px; font-size: 9px; line-height: 1.5; }
.mail-folders { margin-top: 12px; display: grid; gap: 2px; }
.mail-folders button { width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; color: var(--ink-soft); background: transparent; font-size: 11px; font-weight: 700; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.mail-folders button:hover { background: var(--surface-alt); }
.mail-folders button.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.mail-client__toolbar { display: flex; align-items: center; gap: 8px; }
.mail-client__toolbar .search-field { flex: 1; min-width: 0; }
.mail-rows { margin: 12px -7px; display: grid; gap: 3px; max-height: 620px; overflow-y: auto; overflow-x: hidden; }
.mail-row { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid transparent; border-radius: 10px; display: grid; gap: 5px; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.mail-row:hover { background: var(--surface-alt); }
.mail-row.is-active { border-color: color-mix(in srgb, var(--accent), white 45%); background: color-mix(in srgb, var(--accent), white 91%); }
.mail-row__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mail-row__top strong { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.mail-row__top small { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
.mail-row__subject { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mail-row.is-unread .mail-row__top strong, .mail-row.is-unread .mail-row__subject { font-weight: 850; color: var(--ink); }
.mail-row__state { width: fit-content; padding: 3px 7px; border-radius: 999px; background: var(--info-soft); color: var(--info); font-size: 8px; font-weight: 800; }
.mail-client__reader { min-height: 620px; padding: 22px; }
.mail-reader__head { padding-bottom: 15px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.mail-reader__head h3 { margin: 0 0 9px; font-size: 19px; overflow-wrap: anywhere; }
.mail-reader__meta { margin: 0; display: grid; gap: 3px; }
.mail-reader__meta div { display: flex; gap: 8px; font-size: 10px; }
.mail-reader__meta dt { flex: 0 0 44px; color: var(--muted); }
.mail-reader__meta dd { margin: 0; overflow-wrap: anywhere; }
.mail-reader__attachments { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 10px; }
.mail-reader__attachments small { flex-basis: 100%; color: var(--muted); font-size: 9px; }
.mail-body { max-height: 520px; margin: 14px 0 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-preview pre { max-height: 260px; }
.mail-reader__actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.mail-compose { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-alt); display: grid; gap: 7px; }
.mail-compose h4 { margin: 0 0 4px; font-size: 12px; }
.mail-compose label { font-size: 9px; font-weight: 800; }
.mail-compose label.checkbox-line { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; }
.mail-compose input:not([type="checkbox"]), .mail-compose textarea { width: 100%; border: 1px solid #cfd7d2; border-radius: 9px; color: var(--text); background: #fff; font: inherit; }
.mail-compose input:not([type="checkbox"]) { height: 40px; padding: 0 12px; }
.mail-compose textarea { padding: 12px; resize: vertical; line-height: 1.6; }
.mail-compose small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.mail-privacy { margin: 4px 0 0; padding: 10px 12px; border-radius: 8px; display: flex; gap: 9px; align-items: flex-start; background: var(--info-soft); color: #315b73; font-size: 10px; line-height: 1.5; }
.mail-privacy > span:first-child { flex: 0 0 auto; font-weight: 850; }
.mail-compose__actions { margin-top: 6px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 1240px) {
  .mail-client { grid-template-columns: 180px minmax(0, 1fr); }
  .mail-client__reader { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .mail-client { grid-template-columns: 1fr; }
  .mail-client__nav, .mail-client__list { position: static; }
  .mail-rows { max-height: 360px; }
}

/* Bedienvereinfachung: Aufgabenliste, sichtbare Beschriftungen, geführte Editoren */
.nav-list .nav-label:first-child { margin-top: 10px; }
.todo-panel { margin-bottom: 18px; padding: 18px 22px; }
.todo-list { display: grid; gap: 6px; }
.todo-item { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 12px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.todo-item:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent), white 93%); }
.todo-item__kind { padding: 4px 8px; border-radius: 999px; background: var(--info-soft); color: var(--info); font-size: 9px; font-weight: 800; text-align: center; }
.todo-item__text { min-width: 0; display: grid; }
.todo-item__text strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.todo-item__text small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.todo-item__step { color: var(--accent-dark); font-size: 10px; font-weight: 800; white-space: nowrap; }
.todo-empty { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.row-action--labelled { width: auto; padding: 0 9px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.config-row__meta { flex-wrap: wrap; justify-content: flex-end; }
.technical-details summary { color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.technical-details dl { margin: 10px 0 0; display: grid; gap: 5px; }
.technical-details dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; }
.technical-details dt { color: var(--muted); }
.technical-details dd { margin: 0; font-weight: 750; }
.catalog-sync-panel__technical details summary { color: var(--accent-dark); font-size: 9px; cursor: pointer; }
.catalog-sync-panel__technical p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.knowledge-policy summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.knowledge-policy summary::-webkit-details-marker { display: none; }
.knowledge-policy summary > span { display: grid; gap: 2px; }
.knowledge-policy summary strong { font-size: 12px; }
.knowledge-policy summary small { color: var(--muted); font-size: 9px; }
.knowledge-policy summary::after { content: "›"; color: var(--muted); font-size: 18px; transform: rotate(90deg); }
.knowledge-policy[open] summary::after { transform: rotate(-90deg); }
.knowledge-policy[open] summary { margin-bottom: 12px; }
.modal-advanced { padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 9px; }
.modal-advanced summary { color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.modal-advanced[open] summary { margin-bottom: 8px; }
.condition-builder__row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr) minmax(0, 1fr); gap: 8px; }
.condition-builder__row select, .condition-builder__row input { width: 100%; min-width: 0; }
.input-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.rule-example { padding: 12px 14px; border-radius: 9px; background: var(--info-soft); color: #315b73; }
.rule-example:empty { display: none; }
.rule-example strong { font-size: 10px; }
.rule-example p { margin: 4px 0; font-size: 11px; }
.rule-example small { color: #4d6f83; font-size: 9px; }
.form-section--collapsible > summary { list-style: none; cursor: pointer; }
.form-section--collapsible > summary::-webkit-details-marker { display: none; }
.form-section--collapsible > summary .section-heading { margin-bottom: 0; }
.form-section--collapsible[open] > summary .section-heading { margin-bottom: 18px; }
.mail-setup__servers { margin-top: 12px; }
.mail-setup__servers summary { color: var(--accent-dark); font-size: 11px; font-weight: 800; cursor: pointer; }
.mail-setup__servers[open] summary { margin-bottom: 10px; }
.mail-setup .modal-field small { color: var(--muted); font-size: 9px; line-height: 1.4; }
@media (max-width: 720px) {
  .todo-item { grid-template-columns: minmax(0, 1fr); }
  .condition-builder__row, .input-pair { grid-template-columns: 1fr; }
}
.form-section--collapsible > summary { position: relative; padding-right: 32px; }
.form-section--collapsible > summary::after { content: "›"; position: absolute; right: 4px; top: 2px; color: var(--muted); font-size: 22px; transform: rotate(90deg); transition: transform .2s; }
.form-section--collapsible[open] > summary::after { transform: rotate(-90deg); }
.mail-setup { margin-top: 0; border-top: 0; padding-top: 0; }
.mail-setup h3 { margin: 0 0 6px; font-size: 14px; }
.mail-setup > p, .mail-setup fieldset > p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.mail-setup .modal-field { color: #3e4a44; font-size: 10px; font-weight: 800; }
.mail-setup .modal-field input, .mail-setup .modal-field select { font-weight: 500; font-size: 12px; }
.mail-setup .checkbox-line { font-size: 11px; font-weight: 500; }

/* Public conversation: free questions first, optional quote details alongside. */
.customer-composer { display: grid; gap: 12px; margin: 24px 0; }
.customer-composer label { font-size: 14px; font-weight: 600; }
.customer-composer textarea { width: 100%; box-sizing: border-box; padding: 16px; border: 1px solid var(--line, #dce3df); border-radius: 14px; font: inherit; resize: vertical; min-height: 86px; background: white; color: #14231d; }
.customer-composer textarea:focus { outline: 2px solid var(--widget-accent); outline-offset: 2px; }
.customer-composer > button { justify-self: end; }
.customer-transcript { display: flex; flex-direction: column; gap: 20px; max-height: 560px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.customer-bubble { max-width: 92%; border-radius: 16px; padding: 18px 20px; background: white; border: 1px solid #e2e8e4; overflow-wrap: anywhere; }
.customer-bubble strong { font-size: 12px; color: #587064; }
.customer-bubble p { white-space: pre-wrap; line-height: 1.65; margin: 8px 0 0; }
.customer-bubble--customer { align-self: flex-end; background: #e7eee8; border-color: #d6e1d8; }
.customer-bubble--assistant { align-self: flex-start; }
.customer-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.customer-options p { flex: 0 0 100%; font-size: 14px; margin: 0 0 4px; }
.customer-options .widget-button { min-height: 38px; font-size: 13px; }
.customer-preview { background: #f0f5ef; border: 1px solid #d2dfd0; border-radius: 18px; padding: 24px; margin-top: 24px; }
.customer-preview-total { font-size: 34px; letter-spacing: -1px; }
.customer-preview > p { font-size: 13px; }
.customer-preview dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; }
.customer-preview dd { white-space: nowrap; margin: 0; }
.customer-facts { margin-top: 20px; padding: 16px; border: 1px solid #e2e8e4; border-radius: 12px; }
.customer-facts summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.customer-next-actions { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid #e2e8e4; padding-top: 18px; }
#customer-typing { font-size: 13px; color: #587064; padding: 12px; }
#customer-quote-notice { line-height: 1.6; }
@media (max-width: 520px) { .customer-bubble { max-width: 100%; padding: 14px; } .customer-preview { padding: 18px; } .customer-next-actions > button { width: 100%; } }
