@charset "UTF-8";

:root {
  color-scheme: light;
  --brand-navy: #00284C;
  --brand-teal: #007985;
  --brand-teal-hover: #00636D;
  --brand-pale: #EAF5F6;
  --ink: #17364C;
  --muted: #566B7D;
  --green: var(--brand-teal);
  --green-dark: var(--brand-navy);
  --green-pale: var(--brand-pale);
  --paper: #ffffff;
  --canvas: #F4F7FA;
  --surface-soft: #F7F9FB;
  --line: #DCE4EB;
  --mobile-tabs-height: 72px;
  --radius: 10px;
  --font: "Noto Sans JP", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; }
body { margin: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); background: var(--canvas); color: var(--ink); font: 14px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea, a { outline-offset: 3px; }
:focus-visible { outline: 3px solid var(--brand-teal); }
button { color: inherit; }
svg { flex-shrink: 0; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.4; font-weight: 650; letter-spacing: .015em; }
h1 { margin-bottom: 9px; font-size: clamp(26px, 2.2vw, 32px); }
h2 { font-size: 19px; margin-bottom: 16px; }
h3 { font-size: 16px; margin-bottom: 12px; }
p { margin-bottom: 12px; }
small { font-size: 12px; }
dl, dd { margin: 0; }
hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.icon { width: 20px; height: 20px; vertical-align: middle; stroke-width: 1.65; }
.muted { color: var(--muted); font-weight: 400; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.initial-loading { padding: 48px; color: var(--muted); }

.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 28px 18px 22px; background: var(--paper); color: var(--ink); border-right: 1px solid var(--line); overflow-y: auto; z-index: 30; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 0 4px 32px; color: var(--brand-navy); }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 176px; max-width: 100%; height: auto; }
.brand-sub { display: block; margin: 0; font-size: 9px; color: var(--muted); letter-spacing: .11em; }
.workspace-label { color: var(--muted); font-size: 10px; letter-spacing: .13em; padding: 0 15px; margin: 0 0 12px; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 13px; min-height: 49px; padding: 12px 15px; border: 1px solid transparent; background: transparent; border-radius: 7px; color: var(--muted); text-align: left; font-size: 14px; font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--canvas); color: var(--brand-navy); text-decoration: none; }
.nav-item.active { background: var(--brand-teal); border-color: var(--brand-teal); box-shadow: none; color: #fff; }
.menu-icon { display: block; width: 24px; height: 24px; flex: 0 0 24px; object-fit: contain; }
.nav-item.active .menu-icon { filter: brightness(0) invert(1); }
.nav-item .nav-count { margin-left: auto; color: var(--muted); font-size: 11px; }
.nav-item.active .nav-count { color: inherit; }
.sidebar-bottom { margin-top: auto; padding: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.sidebar-bottom .btn { color: var(--muted); border-color: var(--line); font-size: 12px; width: 100%; margin-top: 10px; }
.sidebar-bottom .btn:hover { background: var(--brand-navy); color: #fff; }
.sidebar-bottom .workspace-label { padding: 0; margin-bottom: 6px; }
.workspace { min-width: 0; }
.topbar { min-height: 52px; display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding: 0 42px; background: var(--paper); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.breadcrumb strong, .breadcrumb span:last-child { color: var(--muted); font-weight: 500; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.demo-banner { display: flex; align-items: center; gap: 9px; min-height: 37px; padding: 8px 42px; background: var(--canvas); color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .015em; }
.demo-banner strong { font-size: 9px; letter-spacing: .09em; color: var(--muted); padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; line-height: 1.5; }
.demo-banner .icon { width: 14px; height: 14px; }
.page-content { max-width: 1540px; margin: 0 auto; padding: 36px 42px 56px; }
.account-workspace-shell .account-layout { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 28px; }
.account-workspace-shell .account-card { min-width: 0; }
@media (max-width:1100px) { .account-workspace-shell .account-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.eyebrow { margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.subtitle { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.7; }
.subtitle:empty, .account-intro:empty { display: none; }
.heading-actions, .inline-actions, .row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.heading-actions { flex-shrink: 0; }
.row-actions { justify-content: flex-end; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-weight: 550; font-size: 13px; line-height: 1.5; text-align: center; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn .icon { width: 17px; height: 17px; }
.btn:hover { background: var(--canvas); border-color: var(--line); text-decoration: none; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--brand-teal-hover); border-color: var(--brand-teal-hover); }
.btn.secondary { background: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--canvas); }
.btn.small { min-height: 31px; padding: 5px 10px; font-size: 12px; }
.btn.danger { background: #fff; color: #b25345; border-color: #e6c7bd; }
.btn.danger:hover { background: #fbefec; }
.link-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--green); font-size: 13px; font-weight: 550; text-align: left; }
.link-button:hover { color: var(--ink); text-decoration: underline; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; }

.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 26px; padding: 2px 0 23px; border-bottom: 1px solid var(--line); }
.stat-item { min-width: 0; padding: 0 25px; border-left: 1px solid var(--line); }
.stat-item:first-child { border-left: 0; padding-left: 0; }
.stat-label { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.stat-value { color: var(--ink); font-size: 28px; line-height: 1.4; font-weight: 550; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-value small { margin-left: 6px; color: var(--muted); font-size: 11px; font-weight: 400; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font-size: 15px; font-weight: 600; }
.panel-heading .muted, .count-label { font-size: 11px; color: var(--muted); font-weight: 400; }
.panel-body { padding: 24px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 19px 24px; border-bottom: 1px solid var(--line); }
.search-box { position: relative; display: flex; align-items: center; gap: 8px; min-width: 210px; max-width: 370px; flex: 1 1 250px; }
.search-box input { width: 100%; min-width: 0; height: 39px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--ink); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select { min-width: 106px; height: 39px; padding: 7px 28px 7px 11px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); font-size: 12px; }
.filter-summary, .list-summary { padding: 12px 24px; color: var(--muted); font-size: 11px; }
.filter-summary { background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.data-table th { padding: 13px 17px; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--surface-soft); letter-spacing: .025em; }
.data-table td { padding: 18px 17px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--muted); line-height: 1.7; }
.data-table th:first-child, .data-table td:first-child { padding-left: 24px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 24px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .clickable-row { cursor: pointer; }
.data-table .clickable-row:hover td { background: var(--surface-soft); }
.data-table .clickable-row:focus-visible { outline-offset: -3px; }
.data-table .number, .data-table .price { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); font-weight: 550; }
.data-table .muted { font-size: 13px; }
.data-table span.muted, .data-table a.muted { display: block; }
.data-table .badge { font-size: 13px; }
.property-cell { display: flex; align-items: center; gap: 13px; min-width: 230px; }
.property-mark { display: grid; place-items: center; width: 39px; height: 42px; border: 1px solid var(--line); background: var(--canvas); color: var(--muted); border-radius: 5px; flex-shrink: 0; }
.property-mark .icon { width: 21px; height: 21px; }
.property-name { display: block; color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 500; line-height: 1.6; white-space: nowrap; background: var(--canvas); color: var(--muted); border: 1px solid transparent; }
.badge.green { background: var(--brand-pale); color: var(--brand-teal-hover); border-color: #CCE5E8; }
.badge.amber { background: #f8f1e3; color: #806c37; border-color: #f1e7cc; }
.badge.gray { background: var(--canvas); color: var(--muted); border-color: var(--line); }
.badge.blue { background: var(--canvas); color: var(--muted); border-color: var(--line); }
.badge.red { background: #faece8; color: #9b4b3e; border-color: #efd5cf; }
.paused-feature { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.sidebar-bottom > .paused-feature { padding: 11px 13px; }
.csv-input-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.csv-file-input { max-width: 100%; font-size: 12px; }
.csv-input-actions label { margin-bottom: 0; cursor: pointer; }
.csv-summary { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0; }
.csv-preview-table { min-width: 720px; }
.csv-preview-table input { width: 17px; height: 17px; accent-color: var(--green); }
.csv-preview-table td { vertical-align: top; overflow-wrap: anywhere; }
.csv-preview-table th:first-child, .csv-preview-table td:first-child { width: 50px; padding-left: 12px; }
.csv-preview-table td:nth-child(3) { min-width: 200px; max-width: 250px; }
.csv-preview-table td:nth-child(5) { min-width: 180px; max-width: 250px; }
.csv-row-error { display: block; color: #9b4b3e; }
.followup-cell { min-width: 170px; max-width: 240px; }
.followup-date { display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }
.followup-memo { display: block; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: var(--canvas); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.empty-state { padding: 62px 24px; text-align: center; color: var(--muted); }
.empty-state .icon { width: 35px; height: 35px; margin-bottom: 12px; color: var(--muted); }
.empty-state h3 { color: var(--muted); margin-bottom: 8px; font-size: 16px; }
.empty-state p { font-size: 12px; max-width: 420px; margin: 0 auto 18px; }
.quick-start { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 27px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.quick-start h3 { margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.quick-start p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.welcome-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.step-guide { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.step-guide .step-number { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface-soft); font-size: 10px; font-weight: 600; }
.step-guide.active { color: var(--green); font-weight: 600; }
.step-guide.active .step-number { background: var(--green); border-color: var(--green); color: #fff; }

.two-column { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); align-items: start; gap: 24px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; padding: 0 24px; }
.detail-item { min-width: 0; padding: 15px 0; border-bottom: 1px solid var(--line); }
.detail-item dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.detail-item dd { color: var(--ink); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.detail-item.full { grid-column: 1 / -1; }
.detail-grid .detail-item:last-child { margin-bottom: 12px; }
.tabs { display: flex; align-items: center; gap: 25px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 24px; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; gap: 7px; min-height: 45px; padding: 10px 0 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tab.active { border-bottom-color: var(--green); color: var(--green); font-weight: 600; }
.tab:hover { color: var(--green); }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.version-row:last-child { border-bottom: 0; }
.version-row strong { color: var(--muted); font-size: 13px; }
.version-row .muted { font-size: 11px; }
.agency-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.agency-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 23px; }
.agency-card h3 { margin-bottom: 7px; font-size: 15px; color: var(--ink); }
.agency-card p { font-size: 12px; color: var(--muted); }
.agency-card .tags { margin: 12px 0; }
.agency-card .inline-actions { padding-top: 15px; margin-top: 15px; border-top: 1px solid var(--line); }
.agency-card .match-reason { color: var(--muted); font-size: 11px; line-height: 1.8; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 9px 0; }
.info-note { padding: 13px 17px; background: var(--brand-pale); border: 1px solid #CCE5E8; border-radius: 6px; color: var(--ink); font-size: 12px; line-height: 1.8; margin: 0 0 18px; }
.warning { padding: 13px 17px; border: 1px solid #eadfbd; background: #faf5e9; border-radius: 6px; color: #9a8549; font-size: 12px; line-height: 1.8; margin: 0 0 18px; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, 1fr); align-items: start; gap: 27px; }
.form-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.form-section { padding: 25px 27px 28px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.section-label { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.section-label small { color: var(--muted); font-size: 10px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.field .required { color: #a38e60; font-size: 9px; background: #f8f2e5; border-radius: 3px; padding: 1px 5px; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea, .number-input { display: block; width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; font-size: 13px; line-height: 1.6; transition: border-color .15s; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-teal); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field textarea { min-height: 95px; resize: vertical; }
.field input:read-only, .field input:disabled { background: var(--canvas); color: var(--muted); }
.field-help { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.form-error { padding: 12px 16px; border: 1px solid #e6c0ae; border-radius: 6px; background: #fff0e8; color: #ac6240; font-size: 12px; margin-bottom: 18px; }
.form-error:empty { display: none; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding: 20px 27px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.form-actions .hint { margin-right: auto; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.checkbox-row input { width: 15px; height: 15px; flex-shrink: 0; margin-top: 4px; accent-color: var(--green); }
.import-options { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.import-option { display: flex; flex: 1 1 130px; justify-content: center; align-items: center; gap: 7px; min-height: 49px; padding: 10px; border: 1px dashed var(--line); border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: 12px; cursor: pointer; }
.import-option:hover { border-color: var(--brand-teal); background: var(--brand-pale); }
.import-option.selected, .import-option.active { border-style: solid; border-color: var(--brand-teal); background: var(--brand-pale); color: var(--brand-teal-hover); }
.import-option .icon { width: 17px; height: 17px; }
.preview-side { position: sticky; top: 24px; min-width: 0; }
.preview-side > h3, .preview-side .preview-label { color: var(--muted); font-size: 11px; font-weight: 500; margin-bottom: 13px; letter-spacing: .04em; }
.overview-paper { background: #fff; border: 1px solid var(--line); padding: 25px 24px 22px; width: 100%; max-width: 610px; margin: 0 auto; color: var(--ink); box-shadow: 0 4px 13px #00284C07; }
.overview-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 20px; }
.overview-header h2 { color: var(--ink); font-size: 20px; letter-spacing: .1em; margin-bottom: 0; }
.overview-type { color: var(--muted); font-size: 11px; }
.overview-title { color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 16px; overflow-wrap: anywhere; }
.overview-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.6; }
.overview-table th, .overview-table td { padding: 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.overview-table th { width: 31%; font-weight: 400; background: var(--surface-soft); color: var(--muted); }
.overview-table td { color: var(--muted); }
.overview-note { margin-top: 18px; color: var(--muted); font-size: 10px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.overview-note strong { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.overview-footer { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 22px; color: var(--muted); font-size: 9px; line-height: 1.8; overflow-wrap: anywhere; }
.preview-side .hint { font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 26px; background: #00284C73; backdrop-filter: blur(3px); }
.modal { display: flex; flex-direction: column; width: min(100%, 610px); max-height: min(90dvh, 1050px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 80px #00284C2e; overflow: hidden; }
.modal.wide { width: min(100%, 910px); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-shrink: 0; padding: 23px 26px 19px; border-bottom: 1px solid var(--line); }
.modal-title { color: var(--ink); font-size: 18px; margin: 0; font-weight: 600; }
.modal-header .hint { margin-bottom: 0; }
.modal-header .modal-close { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--muted); font-size: 12px; line-height: 1.5; white-space: nowrap; flex-shrink: 0; }
.modal-header .modal-close:hover { background: var(--canvas); color: var(--brand-navy); }
.modal-body { padding: 24px 26px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.modal-body .overview-paper { padding: 32px 35px; }
.modal-body .overview-table { font-size: 13px; }
.modal-footer { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; flex-shrink: 0; padding: 17px 26px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.modal-footer .hint { margin: 0 auto 0 0; }
body:has(.modal-backdrop) { overflow: hidden; }
#toast-root { position: fixed; bottom: 25px; right: 28px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; max-width: min(430px, calc(100vw - 40px)); pointer-events: none; }
.toast { padding: 13px 20px; background: var(--brand-navy); color: #E4EFF4; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 7px 22px #00284C1a; font-size: 12px; animation: toast-in .18s ease-out; pointer-events: auto; }
.toast.error { background: #8e4d35; border-color: #a4664c; color: #fff4ec; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

/* Application-specific components. */
[hidden] { display: none !important; }
#app { width: 100%; min-height: 100vh; }
.app-shell { width: 100%; }
.workspace-label > span { display: inline-block; margin-left: 4px; padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 8px; letter-spacing: .04em; }
.sidebar-bottom .nav-item { min-height: 35px; padding: 8px 10px; gap: 9px; font-size: 11px; }
.sidebar-bottom .nav-item .icon { width: 15px; height: 15px; }
.sidebar-bottom > p { margin: 13px 10px 0; color: var(--muted); font-size: 10px; }
.storage-status { display: flex; align-items: center; gap: 6px; margin: 22px 10px 0; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.storage-status .status-dot { width: 5px; height: 5px; margin: 0; color: var(--muted); }
.demo-label { display: inline-flex; flex-shrink: 0; align-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; font-size: 8px; letter-spacing: .09em; padding: 1px 5px; }
.demo-banner > button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; margin-left: auto; background: transparent; color: var(--muted); white-space: nowrap; font-size: 10px; }
.demo-banner > button:hover { text-decoration: underline; color: var(--ink); }
.demo-banner > button .icon { width: 13px; height: 13px; }
.stats-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-value, .stat-label { display: block; }
.stat-value { margin-bottom: 3px; }
.price-text { color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.intro-count { font-size: 14px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.intro-count small { font-size: 11px; color: var(--muted); font-weight: 400; }
.list-summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.list-summary > span:first-child { color: var(--muted); font-weight: 550; }
.list-summary > .muted { text-align: right; font-size: 10px; }
.step-number { display: inline-grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 600; flex-shrink: 0; }
.quick-start > .step-number { width: 33px; height: 33px; }
.quick-start > div { flex: 1; }
.quick-start strong { color: var(--muted); font-size: 12px; font-weight: 550; }
.quick-start > .link-button { font-size: 11px; flex-shrink: 0; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 21px; color: var(--muted); font-size: 11px; }
.back-link .icon { width: 14px; height: 14px; }
.back-link:hover { color: var(--green); text-decoration: none; }
.detail-topline { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: -5px 0 26px; padding: 0 0 26px; border-bottom: 1px solid var(--line); }
.detail-topline > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 13px; }
.detail-topline .muted { font-size: 11px; }
.detail-price { font-size: 29px; font-weight: 550; color: var(--ink); letter-spacing: -.025em; line-height: 1.5; font-variant-numeric: tabular-nums; }
.detail-topline select, .compact-select { max-width: 100%; padding: 7px 24px 7px 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); font-size: 13px; line-height: 1.5; }
.detail-note { margin: 14px 24px 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-note > strong { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 600; }
.detail-note p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.internal-note { margin: 0 24px 22px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 5px; background: var(--surface-soft); }
.internal-note > strong { display: block; color: var(--muted); font-size: 11px; font-weight: 550; }
.internal-note > strong span { display: inline-block; padding-left: 8px; color: var(--muted); font-size: 10px; font-weight: 400; }
.internal-note p { margin: 5px 0 0; font-size: 12px; line-height: 1.8; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.panel-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-footnote { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 10px; line-height: 1.8; }
.panel-message { padding: 23px; color: var(--muted); font-size: 12px; line-height: 1.85; margin: 0; }
.panel-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 550; }
.panel-link:hover { background: var(--surface-soft); text-decoration: none; }
.panel-link .icon { width: 14px; height: 14px; }
.file-mark { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 37px; background: var(--canvas); border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.file-mark .icon { width: 18px; height: 18px; }
.version-row { justify-content: flex-start; gap: 11px; }
.version-row > div { min-width: 0; flex: 1; }
.version-row strong { font-size: 12px; }
.version-row .tag { margin-left: 3px; font-size: 9px; padding: 0 4px; }
.version-row .muted { display: block; margin-top: 4px; font-size: 10px; }
.agency-initial { display: grid; place-items: center; width: 39px; height: 39px; flex-shrink: 0; background: var(--canvas); border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 15px; font-weight: 550; }
.candidate-row { display: flex; align-items: center; gap: 10px; padding: 17px 20px; color: inherit; border-bottom: 1px solid var(--line); }
.candidate-row:hover { background: var(--surface-soft); text-decoration: none; }
.candidate-row .agency-initial { width: 32px; height: 32px; font-size: 12px; }
.candidate-row > div { min-width: 0; flex: 1; }
.candidate-row strong { display: block; color: var(--muted); font-size: 11px; font-weight: 550; line-height: 1.7; }
.candidate-row .muted { display: block; font-size: 10px; margin-top: 3px; }
.candidate-row > .icon { width: 13px; height: 13px; color: var(--muted); }
.info-note { display: flex; align-items: flex-start; gap: 9px; }
.info-note > .icon { width: 16px; height: 16px; margin-top: 3px; }
.info-note > span { min-width: 0; }
.warning { white-space: pre-line; }
.panel .agency-grid { padding: 4px 22px 22px; }
.agency-card { display: flex; flex-direction: column; }
.agency-card-top { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 21px; }
.agency-card-top > div:not(.agency-roles) { min-width: 0; flex: 1; }
.agency-card-top h2 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--muted); }
.agency-card-top .muted { display: block; font-size: 11px; }
.agency-card-top a:hover { text-decoration: none; }
.agency-roles { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 88px; }
.agency-criteria { display: grid; gap: 10px; margin-bottom: 18px; }
.agency-criteria > div { display: grid; grid-template-columns: 65px minmax(0, 1fr); align-items: baseline; gap: 7px; }
.agency-criteria span { color: var(--muted); font-size: 11px; }
.agency-criteria strong { color: var(--muted); font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.agency-card .agency-note { margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.85; white-space: pre-wrap; }
.match-reasons { display: flex; flex-wrap: wrap; gap: 7px 11px; padding: 12px 0 16px; border-top: 1px solid var(--line); }
.match-reasons > span { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.match-reasons .icon { width: 12px; height: 12px; }
.match-reasons .amber-text { color: #a08a4c; }
.agency-card-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line); }
.agency-card-bottom .muted { font-size: 10px; }
.contact-row { display: grid; gap: 5px; padding: 19px 23px; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row strong { color: var(--muted); font-size: 13px; font-weight: 550; }
.contact-row span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.contact-row .muted { color: var(--muted); font-size: 10px; }
.filter-summary:has(> div) { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 7px; }
.filter-summary > div { display: grid; gap: 3px; }
.filter-summary strong { font-size: 13px; font-weight: 550; color: var(--muted); }
.filter-summary .muted { font-size: 10px; }
.history-table { min-width: 660px; }
.history-table td { font-size: 13px; }
.history-table .link-button { display: flex; margin-top: 4px; font-size: 13px; }
.history-table .property-name { max-width: 240px; white-space: normal; }
.two-column .history-table { min-width: 600px; }
.preview-label { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.preview-label span { color: var(--muted); font-size: 10px; }
.overview-header > span:first-child { color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: .1em; }
.overview-demo { color: var(--muted); font-size: 9px; margin: -7px 0 17px; letter-spacing: .025em; }
.overview-note p { margin: 0; line-height: 1.8; }
.overview-template { color: #20252b; }
.template-heading { text-align: center; font-size: 20px; letter-spacing: .12em; border-bottom: 2px solid var(--pdf-accent); padding-bottom: 12px; margin-bottom: 15px; }
.template-property h3 { font-size: 16px; line-height: 1.6; margin: 0 0 12px; overflow-wrap: anywhere; color: #20252b; }
.template-price { display: flex; align-items: baseline; gap: 15px; border: 1px solid var(--pdf-border); background: var(--pdf-soft); padding: 11px 12px; }
.template-price > span { font-size: 11px; flex: 0 0 auto; }
.template-price strong { font-weight: 500; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.template-status { font-size: 9px; color: #59616b; text-align: right; margin: 9px 0; }
.template-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 11px; line-height: 1.6; }
.template-table tbody + tbody:before { content: ''; display: block; height: 6px; }
.template-table th,.template-table td { border: 1px solid var(--pdf-border); text-align: left; vertical-align: top; padding: 5px 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.template-table th { font-size: 10px; font-weight: 400; background: var(--pdf-soft); color: #444c55; }
.template-table td { color: #20252b; }
.template-table .template-section th { border-left: 3px solid var(--pdf-accent); font-size: 11px; color: #20252b; }
.saved-pdf-preview { width: 100%; max-width: 740px; margin-inline: auto; min-width: 0; }
.saved-pdf-preview canvas { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); box-shadow: 0 3px 12px #00284c0a; margin-bottom: 14px; }
.saved-pdf-preview > .hint { overflow-wrap: anywhere; }
.pdf-preview-info { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; max-width: 610px; margin: 0 auto 17px; color: var(--muted); font-size: 11px; }
.import-options > div { flex-basis: 100%; margin-bottom: 2px; }
.import-options > div > strong { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.import-options > div > .muted { display: block; font-size: 10px; }
.import-option { flex-direction: column; gap: 3px; font-size: 11px; min-height: 77px; padding: 10px 8px; }
.import-option .icon { margin-bottom: 2px; }
.import-option small { color: var(--muted); font-size: 9px; }
.form-panel > .tabs { margin: 0; padding: 0 24px; gap: 22px; }
.form-panel .tab { min-height: 52px; gap: 6px; font-size: 11px; }
.form-panel .tab > span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); font-size: 9px; line-height: 1; }
.form-panel .tab.active > span { border-color: var(--line); background: var(--canvas); }
.form-section h2 { font-size: 16px; margin-bottom: 5px; }
.form-section > .hint { margin-top: 0; margin-bottom: 20px; }
.field .number-input { position: relative; display: flex; align-items: center; padding: 0; border: 0; border-radius: 0; min-height: 0; background: transparent; }
.field .number-input input { padding-right: 75px; }
.number-input > span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 10px; pointer-events: none; }
.form-section > .field { margin-top: 22px; }
.form-section > .field .tags { gap: 9px 18px; }
.form-section .checkbox-row { margin-bottom: 0; }
.welcome-steps { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 24px; margin: 0 0 25px; }
.welcome-steps > div { display: flex; align-items: flex-start; gap: 16px; }
.welcome-steps > div > div { min-width: 0; flex: 1; }
.welcome-steps h3 { color: var(--muted); font-size: 14px; margin: 1px 0 5px; }
.welcome-steps p { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.85; }
.modal-open { overflow: hidden; }

@media (min-width:1600px) {
  .page-content { padding-top: 43px; }
  .data-table td { padding-top: 21px; padding-bottom: 21px; }
}
@media (max-width:1200px) {
  .app-shell { grid-template-columns: 195px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .brand { padding-left: 0; padding-right: 0; }
  .page-content { padding: 29px 27px 45px; }
  .topbar, .demo-banner { padding-left: 27px; padding-right: 27px; }
  .heading-actions { gap: 7px; }
  .heading-actions .btn { padding-left: 12px; padding-right: 12px; }
  .form-layout { grid-template-columns: minmax(0, 1.4fr) minmax(290px, 1fr); gap: 20px; }
  .form-section { padding: 23px 21px; }
  .two-column { grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr); gap: 20px; }
  .overview-paper { padding: 23px 18px; }
  .data-table th, .data-table td { padding-left: 13px; padding-right: 13px; }
  .property-cell { gap: 10px; min-width: 200px; }
}
@media (max-width:1000px) {
  .page-heading { align-items: flex-start; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .form-layout { grid-template-columns: minmax(0, 1fr); }
  .preview-side { position: static; }
  .preview-side .overview-paper { max-width: 540px; }
  .two-column { grid-template-columns: minmax(0, 1fr); }
  .agency-grid { grid-template-columns: minmax(0, 1fr); }
  .welcome-steps { gap: 13px; }
  .step-guide { gap: 6px; font-size: 10px; }
  .stats-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-item { padding: 0 17px; }
  .data-table { min-width: 710px; }
  .quick-start { align-items: flex-start; }
}
@media (max-width:760px) {
  .app-shell { display: block; padding-bottom: calc(var(--mobile-tabs-height) + env(safe-area-inset-bottom, 0px)); }
  .sidebar { position: sticky; top: env(safe-area-inset-top, 0px); height: auto; min-height: 62px; padding: 12px 18px 9px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; flex: 1 1 176px; }
  .brand-logo { width: 176px; }
  .brand-sub { display: none; }
  .sidebar > .workspace-label, .sidebar-bottom { display: none; }
  .menu-icon { width: 22px; height: 22px; flex-basis: 22px; }
  .nav-item .icon { width: 16px; height: 16px; }
  .nav-item .nav-count { display: none; }
  .topbar { display: none; }
  .demo-banner { min-height: 36px; font-size: 10px; padding: 8px 21px; gap: 7px; flex-wrap: wrap; }
  .breadcrumb { font-size: 11px; gap: 8px; }
  .topbar .user-chip { display: none; }
  .page-content { padding: 25px 21px 40px; }
  .page-heading { flex-wrap: wrap; gap: 17px; margin-bottom: 22px; }
  .page-heading h1 { font-size: 26px; }
  .eyebrow { font-size: 9px; }
  .subtitle { font-size: 12px; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .stats-strip { margin-bottom: 20px; padding-bottom: 20px; }
  .stat-label { font-size: 10px; }
  .stat-item { padding: 0 15px; }
  .stat-value { font-size: 25px; }
  .stat-value small { font-size: 10px; margin-left: 3px; }
  .panel { border-radius: 8px; }
  .panel-heading, .toolbar { padding: 16px 18px; }
  .panel-heading { gap: 10px; }
  .panel-title { font-size: 14px; }
  .toolbar { gap: 10px; }
  .search-box { max-width: none; flex-basis: 100%; }
  .filters { width: 100%; gap: 7px; }
  .filters select { flex: 1; min-width: 90px; }
  .list-summary, .filter-summary { padding-left: 18px; padding-right: 18px; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 18px; }
  .data-table th:last-child, .data-table td:last-child { padding-right: 18px; }
  .data-table td { padding-top: 17px; padding-bottom: 17px; }
  .quick-start { padding: 16px 18px; flex-wrap: wrap; gap: 14px; }
  .welcome-steps { width: 100%; gap: 13px; }
  .quick-start .btn { margin-left: auto; }
  .detail-grid { padding: 0 18px; gap: 0 20px; }
  .panel-body { padding: 19px; }
  .tabs { margin-bottom: 19px; gap: 21px; }
  .tab { font-size: 12px; }
  .version-row { padding: 17px 18px; align-items: flex-start; flex-wrap: wrap; }
  .agency-card { padding: 19px; }
  .form-section { padding: 21px 18px; }
  .form-grid { gap: 17px 15px; }
  .form-actions { padding: 17px 18px; }
  .preview-side { margin-top: 3px; }
  .modal-backdrop { padding: 15px; }
  .modal { max-height: 92dvh; border-radius: 10px; }
  .modal-header { padding: 19px 20px 16px; }
  .modal-title { font-size: 17px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 15px 20px; }
  .modal-body .overview-paper { padding: 26px 24px; }
  #toast-root { right: 19px; bottom: 19px; }
  body:has(.has-mobile-tabs) #toast-root { bottom: calc(var(--mobile-tabs-height) + env(safe-area-inset-bottom, 0px) + 12px); }
  .responsive-hide { display: none !important; }
  .storage-status { display: none; }
  .demo-banner > button { display: none; }
  .quick-start > .link-button { margin-left: auto; }
  .detail-topline { padding-bottom: 22px; margin-bottom: 23px; gap: 18px; flex-wrap: wrap; }
  .detail-price { font-size: 26px; }
  .detail-note { margin-left: 18px; margin-right: 18px; }
  .internal-note { margin-left: 18px; margin-right: 18px; }
  .panel .agency-grid { padding-left: 18px; padding-right: 18px; }
  .form-panel > .tabs { padding-left: 18px; padding-right: 18px; gap: 19px; }
  .import-option { flex-basis: 120px; }
  .filter-summary:has(> div) { padding: 14px 17px; gap: 15px; }
}
@media (max-width:480px) {
  .sidebar { padding: 12px 15px 9px; gap: 11px; }
  .topbar, .demo-banner { padding-left: 17px; padding-right: 17px; }
  .page-content { padding: 22px 16px 35px; }
  .page-heading h1 { font-size: 25px; }
  .heading-actions { gap: 7px; }
  .heading-actions .btn { flex: 1; padding-left: 8px; padding-right: 8px; }
  .heading-actions .btn.ghost { flex: 0 1 auto; }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 17px; padding: 0 0 20px; }
  .stat-item { padding: 0 20px; }
  .stat-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat-label { margin-bottom: 2px; }
  .stat-value { font-size: 25px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .field.full { grid-column: auto; }
  .form-actions .btn { flex: 1; }
  .form-actions .hint { width: 100%; margin: 0 0 4px; }
  .import-options { gap: 7px; }
  .import-option { flex-basis: 90px; min-height: 74px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-item.full { grid-column: auto; }
  .modal-backdrop { padding: 8px; }
  .modal-body { padding: 18px 16px; }
  .modal-header, .modal-footer { padding-left: 17px; padding-right: 17px; }
  .modal-title { font-size: 16px; }
  .modal-footer .btn { flex: 1; }
  .modal-footer .hint { width: 100%; margin-bottom: 2px; }
  .modal-body .overview-paper { padding: 22px 17px; }
  .overview-paper { padding: 22px 17px; }
  .overview-table th, .overview-table td { padding: 7px 6px; }
  .modal-body .overview-table { font-size: 13px; }
  .overview-header h2 { font-size: 19px; }
  .welcome-steps { gap: 11px; }
  .step-guide { font-size: 10px; }
  .step-guide .step-number { width: 21px; height: 21px; }
  .quick-start { gap: 12px; }
  .quick-start > .step-number { width: 28px; height: 28px; }
  .quick-start > .link-button { margin-left: 40px; }
  .quick-start > div { flex-basis: calc(100% - 45px); }
  .list-summary > .muted { max-width: 55%; font-size: 9px; }
  .agency-card-top { gap: 10px; }
  .agency-card-top h2 { font-size: 14px; }
  .agency-initial { width: 34px; height: 34px; font-size: 13px; }
  .detail-topline > div:first-child { gap: 9px; }
  .detail-price { font-size: 25px; }
  .filter-summary:has(> div) { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .pdf-preview-info { align-items: flex-start; flex-direction: column; gap: 7px; }
}
@media (max-width:760px) {
  html { scroll-padding-bottom: calc(var(--mobile-tabs-height) + env(safe-area-inset-bottom, 0px) + 16px); }
  .page-heading--function h1, .account-shell.has-mobile-tabs .account-card > h1, .account-workspace-shell .account-card > h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
  .page-heading--function > div:first-child:not(:has(.subtitle:not(:empty))) { display: contents; }
  .account-shell.has-mobile-tabs { padding-bottom: calc(var(--mobile-tabs-height) + env(safe-area-inset-bottom, 0px) + 32px); }
  :is(.sidebar, .account-shell) .main-navigation {
    position: fixed; inset: auto 0 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
    height: calc(var(--mobile-tabs-height) + env(safe-area-inset-bottom, 0px));
    width: 100%; margin: 0;
    padding: 5px max(2px, env(safe-area-inset-right, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(2px, env(safe-area-inset-left, 0px));
    background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px #00284C08;
  }
  :is(.sidebar, .account-shell) .main-navigation > a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; min-width: 0; min-height: 60px; gap: 4px; padding: 5px 0;
    border: 0; border-radius: 6px; background: transparent; box-shadow: none;
    color: var(--muted); font-size: clamp(10px, 2.8vw, 11px); line-height: 16px;
    text-align: center; white-space: nowrap; text-decoration: none;
  }
  :is(.sidebar, .account-shell) .main-navigation > a:hover { background: var(--surface-soft); color: var(--brand-teal); }
  :is(.sidebar, .account-shell) .main-navigation > a[aria-current="page"] { background: var(--brand-teal); color: #fff; font-weight: 650; }
  :is(.sidebar, .account-shell) .main-navigation .menu-icon { width: 24px; height: 24px; flex: 0 0 24px; filter: none; }
  :is(.sidebar, .account-shell) .main-navigation > a[aria-current="page"] .menu-icon { filter: brightness(0) invert(1); }
  :is(.sidebar, .account-shell) .main-navigation > a:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: -2px; }
  :is(.sidebar, .account-shell) .main-navigation > a[aria-current="page"]:focus-visible { outline-color: #fff; }
  :is(.sidebar, .account-shell) .main-navigation > a[data-menu="overviews"]:not([aria-current="page"]) { background: var(--brand-pale); color: var(--brand-teal); font-weight: 650; }
  :is(.sidebar, .account-shell) .main-navigation > a[data-menu="overviews"] .menu-icon { width: 28px; height: 28px; flex-basis: 28px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  .sidebar, .topbar, .demo-banner, .page-heading, .form-panel, .modal-header, .modal-footer, #toast-root { display: none !important; }
  body, .workspace, .page-content, .modal-backdrop, .modal, .modal-body { display: block; position: static; background: #fff; margin: 0; padding: 0; border: 0; box-shadow: none; overflow: visible; width: auto; max-height: none; }
  .overview-paper { border: 0; box-shadow: none; max-width: none; }
}

/* Actual document import and candidate review. */
.modal.import-modal { width: min(1280px,96vw); max-width: 1280px; }
.import-progress { display: flex;gap: 24px;flex-wrap: wrap;padding: 0 0 19px;margin-bottom: 18px;border-bottom: 1px solid var(--line);color: var(--muted);font-size: 13px; }
.import-progress .active { color: var(--green);font-weight: 650; }
.import-input-grid { display: grid;grid-template-columns: minmax(0,1.5fr) minmax(260px,1fr);gap: 28px; }
.import-input-grid > div,.import-explanation { min-width: 0; }
.import-input-grid .field { margin-bottom: 18px; }
.import-input-grid textarea { min-height: 280px;font-size: 14px; }
.import-explanation { padding: 24px;background: var(--canvas);border-radius: 8px; }
.import-explanation h3 { font-size: 17px; }
.import-explanation p { font-size: 13px;line-height: 1.8; }
.import-tabs { margin-bottom: 24px; }
.ai-connection-state { display: flex;align-items: flex-start;gap: 9px;flex-wrap: wrap;font-size: 12px;line-height: 1.7;margin: 16px 0; }
.ai-connection-state .badge { font-size: 11px; }
.pdf-dropzone { display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 14px;min-height: 245px;border: 1px dashed var(--line);border-radius: 8px;background: var(--surface-soft);padding: 26px;text-align: center; }
.pdf-dropzone input { max-width: 100%; }
.pdf-dropzone[data-import-dropzone] { cursor: pointer; transition: border-color .15s, background .15s; }
.pdf-dropzone.is-dragover, .pdf-dropzone:focus-within { border-color: var(--brand-teal); background: var(--brand-pale); outline: 2px solid var(--brand-teal); outline-offset: 2px; }
.pdf-dropzone strong { font-size: 17px; }
.pdf-dropzone small,.pdf-dropzone span { color: var(--muted);font-size: 13px;overflow-wrap: anywhere; }
.import-result-heading { display: flex;justify-content: space-between;align-items: center;flex-wrap: wrap;gap: 16px;margin: 0 0 18px; }
.import-result-heading > div { display: grid;gap: 4px; }
.import-result-heading .muted { font-size: 12px; }
.import-warnings p { margin: 0 0 4px; }
.review-layout { display: grid;grid-template-columns: minmax(0,1.55fr) minmax(300px,1fr);gap: 22px;align-items: start; }
.review-candidates { min-width: 0; }
.candidate-table { width: 100%;border-collapse: collapse;table-layout: fixed;font-size: 13px; }
.candidate-table th { background: var(--canvas);padding: 10px 8px;border-bottom: 1px solid var(--line);text-align: left;color: var(--muted);font-weight: 500; }
.candidate-table th:first-child { width: 48px;text-align: center; }
.candidate-table th:nth-child(2) { width: 46%; }
.candidate-table td { border-bottom: 1px solid var(--line);padding: 13px 8px;vertical-align: top;overflow-wrap: anywhere; }
.candidate-table td:first-child { text-align: center;padding-top: 16px; }
.candidate-table input[type=checkbox],.review-confirmation input { width: 17px;height: 17px;accent-color: var(--green); }
.candidate-table td > label { display: block;font-size: 12px;font-weight: 600;margin: 0 0 7px; }
.candidate-table input:not([type=checkbox]),.candidate-table select,.candidate-table textarea { display: block;width: 100%;padding: 8px;border: 1px solid var(--line);border-radius: 5px;background: white;min-height: 38px;font: inherit; }
.candidate-table textarea { resize: vertical; }
.current-value { display: block;font-size: 11px;color: var(--muted);margin-top: 6px; }
.conflict-row { background: #fff8eb; }
.conflict-label { display: block;color: #8a6522;font-size: 11px;margin-top: 5px; }
.evidence-button { border: 0;padding: 0;background: none;text-align: left;color: var(--muted);line-height: 1.8;font-size: 12px;white-space: normal;overflow-wrap: anywhere; }
.evidence-button:hover { text-decoration: underline; }
.alternatives { margin-top: 10px;font-size: 11px;line-height: 1.7;color: #8a6522; }
.alternatives p { margin-bottom: 6px; }
.source-review { min-width: 0;position: sticky;top: 0; }
.source-toolbar { display: flex;align-items: center;justify-content: space-between;gap: 14px;padding: 11px 13px;background: var(--canvas);border: 1px solid var(--line);border-radius: 6px 6px 0 0;font-size: 13px; }
.source-toolbar label { font-size: 12px;color: var(--muted); }
.source-toolbar select { min-height: 32px;margin-left: 5px; }
.source-text { font: 12px/1.95 var(--font);margin: 0;padding: 18px;white-space: pre-wrap;overflow-wrap: anywhere;background: var(--surface-soft);min-height: 300px;max-height: 480px;overflow-y: auto;border: 1px solid var(--line); }
.source-pdf-frame { display: block;width: 100%;height: 460px;border: 1px solid var(--line); }
.source-pdf-render { border: 1px solid var(--line);background: var(--canvas);min-height: 300px;max-height: 530px;overflow: auto;padding: 10px; }
.source-pdf-render canvas { display: block;width: 100%;height: auto;background: white;box-shadow: 0 1px 5px #0001; }
.source-pdf-render .hint { padding: 8px;margin: 0; }
.source-review .tabs { margin: 0;padding: 0 10px;gap: 20px;border-left: 1px solid var(--line);border-right: 1px solid var(--line); }
.ai-review-panel { padding: 16px;margin-top: 16px;border: 1px solid var(--line);border-radius: 7px; }
.ai-review-panel p { font-size: 12px; }
.ai-review-panel .checkbox-row { margin-bottom: 14px; }
.ai-review-panel .link-button { margin: 10px 0 0;display: block; }
.review-confirmation { margin-top: 25px;padding: 18px;background: var(--canvas);border-radius: 7px; }
.review-confirmation .checkbox-row { font-size: 13px; }
.review-confirmation .hint { margin-bottom: 0; }
.ai-preparation ol { padding-left: 23px;margin-top: 24px; }
.ai-preparation li { padding: 0 0 14px 7px; }
.ai-preparation li p { margin: 7px 0 0;font-size: 13px; }
.ai-preparation code { font-size: 12px;background: var(--canvas);padding: 2px 5px;border-radius: 3px; }
.preparation-links { display: flex;gap: 16px;flex-wrap: wrap;font-size: 12px; }
.import-applied-note { background: var(--brand-pale);border: 1px solid #CCE5E8;padding: 15px;border-radius: 7px;margin-bottom: 19px; }
.import-applied-note strong,.import-applied-note span { display: block;font-size: 12px; }
.import-applied-note span { margin-top: 5px;color: var(--muted);overflow-wrap: anywhere; }
.import-applied-note p { margin: 9px 0 0;font-size: 11px; }
@media (max-width:900px) { .import-input-grid,.review-layout { grid-template-columns: minmax(0,1fr); } .source-review { position: static; } .import-modal .modal-body { padding: 20px; } }
@media (max-width:480px) { .import-progress { gap: 10px;font-size: 11px; } .candidate-table th:first-child { width: 38px; } .candidate-table th:nth-child(2) { width: 48%; } .candidate-table td { padding: 10px 4px; } .candidate-table td > label,.evidence-button { font-size: 11px; } .modal.import-modal { width: calc(100vw - 16px); } .import-explanation { padding: 17px; } }
