/* FairFinanz · clear, comfortably readable insurance workspace. */
:root {
  --sidebar-width: 272px;
  --canvas: #f5f7f9;
  --ink: #173446;
  --muted: #566977;
  --subtle: #627480;
  --teal: #19765f;
  --teal-dark: #115a49;
  --line: #dde5e8;
}
html { font-size: 100%; }
body { font-size: 1rem; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
small { font-size: .8125rem; }

/* These type floors intentionally supersede the compact v1/v2 styles. */
.nav-item, .user-button, .btn, .btn.small, .entry-submit, .support-link,
.workspace-tab, .product-tab, .section-link, .filter-btn, .tab-btn,
.panel-body > p, .page-description, .hero-description, .section-description,
.benefit-text, .benefit-card p, .step-text, .promise-panel p, .workflow-teaser p,
.simple-compare-aside p, .simple-compare-aside .check-list li,
.document-first-panel .checkbox-row, .checkbox-row, .radio-row,
.entry-description, .entry-card > p, #support-dialog p,
.input, .select, .textarea, .entry-card .input, .object-search .search-field .input,
.condition-source p, .condition-panel .panel-header p, .condition-source strong,
.condition-source a, .timeline-note p, .supplement-form > p,
.compact-object-copy > strong, .object-result strong, .selected-claim-object strong,
.contract-card > p, .contract-card .detail-value, .contract-card .detail-item > strong,
.comparison-table td, .data-table td, .table-main, .detail-value, .detail-item > strong,
.notice, .notice p, .modal-body p, .modal-body li, .empty-state p,
.file-name, .download-row, .entry-card .input::placeholder,
.prefill-action p, .prefill-section p, .claim-detail p {
  font-size: 1rem !important;
}
.badge, .badge.demo, .field-label, .detail-label, .contract-card .detail-label,
.form-label, .upload-description, .document-first-panel .upload-description,
.upload-choose, .document-first-panel .upload-choose, .supplement-form .upload-description,
.data-table th, .comparison-table th, .table-sub, .row-meta, .form-step,
.tab, .compare-toolbar .tab, .source-reference, .source-document-list > span,
.tariff-clause small,
.workspace-copy strong, .fixed-workspace .workspace-copy strong,
.object-row-status .badge, .object-row-status > strong, .record-meta,
.condition-source > div, .source-note, .sidebar-service button,
.entry-demo, .entry-demo strong, .entry-error, .timeline-note > strong {
  font-size: .875rem !important;
}
.field-hint, .entry-footnote, .entry-footer, .entry-card .entry-footnote,
.brand-sub, .nav-group-label, .sidebar-foot, .breadcrumb, .eyebrow,
.entry-card > .eyebrow, .hero-eyebrow, .hero-art-caption,
.workspace-copy small, .fixed-workspace .workspace-copy small,
.compact-object-copy > span, .object-result small, .object-row-status > strong > small,
.timeline-note small, .timeline-note time, .file-meta, .file-size,
.document-flow, .extracted-summary span, .source-label,
.hero-floating-card small, .hero-floating-card span, .nav-count {
  font-size: .8125rem !important;
}
.page-description, .section-description, .benefit-text, .step-text,
.field-hint, .table-sub, .entry-description, .entry-footnote,
.contract-card > p, .timeline-note p, .compact-object-copy > span,
.object-result small, .detail-label, .source-note, .condition-source p {
  color: var(--muted);
}
.btn { min-height: 48px; padding: .75rem 1.15rem; border-radius: 9px; }
.btn.small { min-height: 42px; padding: .5rem .85rem; }
.btn.icon-only { min-width: 42px; min-height: 42px; }
.btn .icon { width: 19px; height: 19px; }
.input, .select, .textarea { min-height: 49px; padding: .75rem .9rem; border-radius: 8px; }
.textarea { min-height: 112px; }
.field-label { margin-bottom: .5rem; color: #294b5b; }
.field { margin-bottom: 1.2rem; }
.field-hint { display: block; margin-top: .45rem; line-height: 1.6; }
.form-grid { gap: 1.1rem 1.5rem; }
.checkbox-row { gap: .75rem; line-height: 1.55; }
.checkbox-row input, .radio-row input { width: 19px; height: 19px; min-width: 19px; margin-top: .2rem; accent-color: var(--teal); }
.badge { padding: .4rem .65rem; white-space: normal; }
.badge.success { color: #166345; background: #e8f5ed; }
.badge.warning { color: #845714; background: #fff3dc; }
.badge.neutral { color: #52626d; background: #eef2f4; }
.badge.info { color: #2f607b; background: #e9f2f9; }
.badge.demo { color: #675b39; background: #f3f1e9; text-transform: none; }

/* Fewer visual levels and generous spacing. */
.sidebar { padding: 30px 20px 22px; }
.brand-name { font-size: 1.3rem; letter-spacing: -.4px; }
.brand-sub { max-width: 180px; letter-spacing: .6px; text-transform: none; color: #b4c6d0; }
.nav-item { min-height: 52px; padding: .8rem .85rem; margin: 5px 0; }
.nav-group-label { letter-spacing: .7px; color: #a1b8c7; }
.sidebar-foot { color: #a6bdc9; }
.workspace-card { padding: 15px 12px; }
.workspace-copy strong { white-space: normal; }
.workspace-copy small { color: #b0c3cd; }
.sidebar-service { gap: .7rem; flex-wrap: wrap; }
.sidebar-service button { color: #b5cbd5; min-height: 40px; }
.topbar { min-height: 80px; height: auto; padding: 1rem 2rem; gap: 1rem; }
.topbar-actions { gap: 1rem; }
.page-content { max-width: 1400px; padding: 2rem clamp(1.25rem, 3vw, 2.5rem) 3rem; }
.page-head { align-items: center; margin-bottom: 2rem; gap: 1.5rem; }
.page-title { font-size: clamp(1.9rem, 2.5vw, 2.6rem); letter-spacing: -.8px; margin-bottom: .6rem; }
.eyebrow { letter-spacing: 1px; margin-bottom: .7rem; }
.page-description { max-width: 45rem; line-height: 1.65; }
.page-actions { gap: .65rem; }
.panel { border-radius: 14px; box-shadow: none; margin-bottom: 1.5rem; }
.panel-header { padding: 1.4rem 1.6rem; gap: 1rem; align-items: center; }
.panel-header h2 { font-size: 1.35rem; margin-bottom: 0; }
.panel-header p { margin: .4rem 0 0; font-size: 1rem; color: var(--muted); }
.panel-body { padding: 1.6rem; }
.section-title { font-size: 1.6rem; }
.form-actions { padding-top: 1.5rem; gap: 1rem; }
.detail-grid { gap: 1.3rem 1.5rem; }
.data-table th, .data-table td, .comparison-table th, .comparison-table td { padding: 1rem 1.2rem; }
.data-table td { line-height: 1.65; }
.table-sub { margin-top: .35rem; line-height: 1.5; }
.row-actions { gap: .5rem; flex-wrap: wrap; }
.empty-state { padding: 2.5rem 1.25rem; }
.empty-state h3 { font-size: 1.3rem; }

/* Entry and presentation. */
.entry-screen { background: #f3f7f9; }
.entry-card { width: min(100%, 480px); padding: 2.5rem; box-shadow: 0 15px 50px #193e4a0a; }
.entry-wordmark { font-size: 1.5rem; }
.entry-card > h1 { font-size: 2.2rem; }
.entry-card .input { min-height: 52px; height: auto; }
.entry-card .entry-description { margin-bottom: 1.8rem; }
.entry-demo { padding: 1rem; margin-top: 1.5rem; }
.entry-footer { color: #607482; }
.support-link { min-height: 46px; padding: .6rem 1rem; }
#support-dialog { width: min(520px, calc(100vw - 36px)); }
.hero { min-height: 370px; margin-bottom: 2rem; }
.hero-content { padding: 2.5rem 0 2.5rem 2.5rem; }
.hero-title { font-size: clamp(2.6rem, 4vw, 3.6rem); line-height: 1.12; }
.hero-description { max-width: 30rem; line-height: 1.7; }
.hero-actions { gap: .75rem; }
.hero-proof { font-size: .875rem; gap: 1rem; flex-wrap: wrap; }
.hero-proof .icon { width: 17px; height: 17px; }
.hero-floating-card { max-width: 280px; padding: 1rem; }
.hero-floating-card strong { font-size: 1rem; }
.hero-art-caption { color: #526e65; }
.product-tabs { gap: .65rem; flex-wrap: wrap; }
.product-tab { min-height: 50px; padding: .8rem 1rem; }
.benefit-grid { gap: 1.2rem; }
.benefit-card { padding: 1.5rem; }
.benefit-title { font-size: 1.2rem; line-height: 1.4; }
.benefit-text { line-height: 1.7; }
.product-aside { padding: 1.6rem; }
.product-aside h3 { font-size: 1.5rem; }
.promise-panel { gap: 1.5rem; padding: 1.8rem; }
.promise-panel h3 { font-size: 1.4rem; }
.promise-panel p { margin-bottom: 0; }
.concept-strip { font-size: .875rem; line-height: 1.6; padding: 1rem 1.2rem; }

/* Upload, workspace and comparison remain task focused. */
.document-first-layout { gap: 1.5rem; }
.document-first-panel > .panel-body { padding: 1.6rem; }
.document-first-panel .upload-card { min-height: 260px; padding: 1.75rem 1.25rem; }
.upload-title, .document-first-panel .upload-title, .supplement-form .upload-title { font-size: 1.25rem; }
.document-first-panel .upload-description { max-width: 30rem; }
.document-flow { display: none; }
.simple-compare-aside { padding: 1.8rem; background: #edf5f1; }
.simple-compare-aside > h3 { font-size: 1.5rem; }
.simple-compare-aside .check-list { padding-left: 0; }
.simple-compare-aside .check-list li { line-height: 1.6; margin-bottom: .7rem; }
.extracted-summary strong { font-size: 1rem; }
.extracted-summary span { color: #536a62; letter-spacing: .3px; }
.workspace-tabs { gap: .4rem; margin-bottom: 1.8rem; }
.workspace-tab { min-height: 48px; padding: .8rem 1rem; }
.compact-object-row { padding: 1.25rem 0; }
.compact-object-copy > strong { line-height: 1.5; }
.compact-object-copy > span { margin-top: .4rem; }
.object-row-status { max-width: 220px; }
.object-row-status > strong { font-weight: 650; }
.object-result { padding: 1rem; }
.object-result small { line-height: 1.6; }
.selected-claim-object { padding: 1.25rem; }
.contract-card { padding: 1.4rem; }
.contract-card h3, .contract-card h4 { font-size: 1.2rem; }
.condition-source p, .timeline-note p { line-height: 1.7; }
.notice { padding: 1rem 1.2rem; }
.modal { width: min(620px, calc(100vw - 32px)); }
.modal.wide { width: min(960px, calc(100vw - 32px)); }
.modal-header h2 { font-size: 1.5rem; }
.modal-body { padding: 1.6rem; }
.modal-footer { padding: 1.25rem 1.6rem; gap: .7rem; flex-wrap: wrap; }
.modal-section-title { font-size: 1.2rem; }

/* Versioned concept library. */
.tariff-label { display: block; font-size: .8125rem; color: #566e65; font-weight: 600; letter-spacing: .03em; margin-bottom: .45rem; }
.tariff-active-card { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.6rem 1.8rem; background: #edf6f1; border: 1px solid #cbded3; border-radius: 14px; margin-bottom: 1.8rem; }
.tariff-active-card h2 { font-size: 1.55rem; color: #194b3b; margin-bottom: .4rem; }
.tariff-active-card p { margin: 0; color: #4f685e; font-size: .9375rem; }
.tariff-version-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; margin: 2rem 0 1rem; }
.tariff-version-heading h2 { font-size: 1.5rem; margin: .6rem 0 0; }
.tariff-step-note { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin: 0 0 1.5rem; }
.tariff-step-note p { max-width: 50rem; margin: 0; color: var(--muted); }
.tariff-step-note .btn { flex: 0 0 auto; }
.tariff-working { display: flex; gap: 1.1rem; align-items: center; border: 1px solid #c7dae8; background: #edf5fb; padding: 1.2rem 1.5rem; border-radius: 12px; }
.tariff-working .spinner { flex: 0 0 26px; width: 26px; height: 26px; }
.tariff-working strong { font-size: 1rem; }
.tariff-working p { color: var(--muted); margin: .25rem 0 0; font-size: .875rem; }
.tariff-document-list { padding: 0 1.6rem; }
.tariff-document { display: flex; align-items: flex-start; gap: 1rem; padding: 1.3rem 0; border-top: 1px solid var(--line); }
.tariff-document:first-child { border-top: 0; }
.tariff-document-icon { width: 38px; height: 44px; flex: 0 0 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #eff4f7; color: #587487; }
.tariff-document-copy { min-width: 0; flex: 1; }
.tariff-document-copy strong { display: block; font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; }
.tariff-document-copy > span { display: block; color: #526b7a; font-size: .875rem; margin-top: .35rem; }
.tariff-document-copy > small { display: block; color: #627581; font-size: .8125rem; margin-top: .3rem; }
.tariff-document-actions { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; max-width: 290px; }
.tariff-delta-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tariff-delta-stats > div { padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fa; }
.tariff-delta-stats strong { font-size: 2rem; line-height: 1.2; color: #214b5b; display: block; font-weight: 600; }
.tariff-delta-stats span { font-size: .875rem; color: var(--muted); display: block; margin-top: .4rem; }
.tariff-notes { background: #f6f8fa; border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; margin: 1rem 0; font-size: .9375rem; }
.tariff-notes > summary { cursor: pointer; font-size: 1rem; color: #355767; font-weight: 600; }
.tariff-notes[open] > summary { margin-bottom: .8rem; }
.tariff-notes p { margin-bottom: .6rem; color: var(--muted); }
.tariff-notes p:last-child { margin-bottom: 0; }
.tariff-notes ul { padding-left: 1.2rem; margin: .4rem 0 0; }
.tariff-notes li { margin: .5rem 0; line-height: 1.65; overflow-wrap: anywhere; }
.tariff-provenance { margin-bottom: 1.5rem; }
.tariff-review .tariff-notes[open] { background: #fff8ea; border-color: #e7d9b6; }
.tariff-change { border: 1px solid var(--line); border-radius: 10px; margin: .8rem 0; background: #fff; }
.tariff-change > summary { padding: 1.05rem 1.2rem; display: flex; align-items: center; gap: .8rem; cursor: pointer; list-style: none; }
.tariff-change > summary::-webkit-details-marker { display: none; }
.tariff-change > summary::after { content: '+'; font-size: 1.4rem; margin-left: auto; color: #607884; font-weight: 400; }
.tariff-change[open] > summary::after { content: '−'; }
.tariff-change > summary > strong { font-size: 1rem; font-weight: 600; }
.tariff-change > summary .badge { flex: 0 0 auto; min-width: 84px; justify-content: center; }
.tariff-change-body { border-top: 1px solid var(--line); padding: 1.2rem; }
.tariff-clause-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; }
.tariff-clause { padding: 1.2rem; background: #f7f9fa; border-radius: 9px; min-width: 0; }
.tariff-clause p { font-size: 1rem; margin-bottom: .75rem; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.tariff-clause small { display: block; font-size: .875rem; color: #556f7e; line-height: 1.65; overflow-wrap: anywhere; }
.tariff-no-changes { padding: 1rem 0; color: var(--muted); }
.tariff-decision { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--line); }
.tariff-decision > p { max-width: 34rem; color: var(--muted); margin: 0; }
.tariff-decision .page-actions { flex: 0 0 auto; }
.tariff-history > summary { cursor: pointer; }
.tariff-history > summary h2 { margin-bottom: 0; }
.tariff-history-list { padding: 0 1.6rem 1rem; }
.tariff-history-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 1rem 0; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); color: var(--ink); }
.tariff-history-row:hover { color: var(--teal-dark); }
.tariff-history-row strong { display: block; font-size: 1rem; }
.tariff-history-row small { display: block; color: var(--muted); font-size: .8125rem; margin-top: .25rem; }
.settings-simple-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; align-items: start; }
.settings-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.25rem 0; }
.settings-advanced > summary { cursor: pointer; }
.tenant-grid { gap: 1.4rem; }
.tenant-card { padding: 1.5rem; }
.tenant-card h3 { font-size: 1.35rem; }
.tenant-card p { font-size: 1rem; }
.subdomain-preview { font-size: .9375rem; overflow-wrap: anywhere; }
.tenant-stats { gap: .6rem; margin: 1.2rem 0; }
.tenant-stats span { font-size: .8125rem; }
.tenant-stats strong { font-size: 1.6rem; }

@media (max-width: 1180px) {
  :root { --sidebar-width: 252px; }
  .page-content { padding: 1.6rem; }
  .topbar { padding: 1rem 1.6rem; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .hero-content { padding-left: 2rem; }
  .tariff-document { flex-wrap: wrap; }
  .tariff-document-copy { flex-basis: calc(100% - 60px); }
  .tariff-document-actions { max-width: none; margin-left: 54px; justify-content: flex-start; }
  .tariff-decision { align-items: flex-start; flex-direction: column; }
  .settings-simple-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .topbar { flex-wrap: wrap; min-height: 72px; }
  .page-content { padding: 1.3rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-content { padding: 2rem; }
  .hero-art { max-height: 300px; min-height: 240px; }
  .tariff-active-card, .tariff-version-heading, .tariff-step-note { align-items: flex-start; flex-direction: column; }
  .tariff-active-card { padding: 1.5rem; }
  .tariff-clause-grid { grid-template-columns: 1fr; }
  .panel-header { align-items: flex-start; flex-wrap: wrap; }
  .tariff-document-actions { margin-left: 0; }
  .promise-panel { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .entry-top { padding: 1.2rem; }
  .entry-main { padding: .8rem 1rem 2rem; }
  .entry-card { padding: 2rem 1.4rem; }
  .entry-card > h1 { font-size: 1.9rem; }
  .entry-footer { padding: 0 1rem 1.3rem; }
  .entry-footer > span { margin: 0 .3rem; }
  .topbar { padding: .85rem 1rem; }
  .topbar-actions { gap: .65rem; flex-wrap: wrap; }
  .page-content { padding: 1.2rem 1rem 2rem; }
  .page-title { font-size: 1.85rem; }
  .page-actions { width: 100%; }
  .page-actions > .btn { flex: 1 1 auto; }
  .hero-content { padding: 1.8rem 1.4rem; }
  .hero-title { font-size: 2.5rem; }
  .hero-actions > .btn { width: 100%; }
  .hero-art { min-height: 210px; max-height: 250px; }
  .hero-floating-card { right: 14px; bottom: 16px; }
  .panel-header, .panel-body { padding: 1.25rem; }
  .document-first-panel > .panel-body { padding: 1.2rem; }
  .document-first-panel .upload-card { padding: 1.4rem 1rem; }
  .simple-compare-aside { padding: 1.4rem; }
  .data-table th, .data-table td { padding: .9rem; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .contract-card .detail-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 1.25rem; }
  .modal-footer { padding: 1rem 1.25rem; }
  .modal-footer > .btn { flex: 1 1 auto; }
  .tariff-active-card { padding: 1.25rem; }
  .tariff-active-card h2 { font-size: 1.35rem; }
  .tariff-document-list { padding: 0 1.2rem; }
  .tariff-document { gap: .8rem; }
  .tariff-document-icon { width: 31px; flex-basis: 31px; }
  .tariff-document-copy { flex-basis: calc(100% - 46px); }
  .tariff-document-actions { width: 100%; gap: .2rem; }
  .tariff-delta-stats { gap: .5rem; }
  .tariff-delta-stats > div { padding: .85rem; }
  .tariff-delta-stats strong { font-size: 1.65rem; }
  .tariff-change > summary { padding: 1rem; gap: .6rem; flex-wrap: wrap; }
  .tariff-change > summary > strong { flex-basis: calc(100% - 112px); }
  .tariff-change-body { padding: .85rem; }
  .tariff-clause { padding: 1rem; }
  .tariff-notes { padding: 1rem; }
  .tariff-decision .page-actions { width: 100%; }
  .tariff-history-list { padding: 0 1.25rem 1rem; }
  .tariff-history-row { align-items: flex-start; flex-wrap: wrap; }
  .tariff-working { padding: 1rem; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  body { font-size: 11pt; color: #172d3a; }
  .tariff-active-card, .tariff-clause { background: #fff; }
  .tariff-document-actions, .tariff-decision .page-actions { display: none !important; }
  .tariff-clause, .tariff-change, .tariff-document { break-inside: avoid; }
}
