:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #14201b;
  --ink-muted: #46544e;
  --primary: #0f5c4d;
  --on-primary: #ffffff;
  --ok: #1b6e3c;
  --warn: #8a4b00;
  --ai: #3b3f9e;
  --focus: #0b57d0;
  --navy: #123d35;
  --green: #0f5c4d;
  --green-dark: #094438;
  --mint: #eaf4ee;
  --sky: #f4f6f5;
  --cream: #fff8e9;
  --orange: #8a4b00;
  --danger: #b42318;
  --danger-bg: #fff4f2;
  --muted: #46544e;
  --border: #b8c4be;
  --surface: #f4f6f5;
  --page: #ffffff;
  --shadow: 0 10px 26px rgba(13, 59, 54, .08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--page); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h2 { margin-bottom: 8px; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.035em; line-height: 1.15; }
h3 { margin-bottom: 8px; font-size: 1.05rem; line-height: 1.2; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; border-radius: 9px; background: var(--navy); color: #fff; font-weight: 800; transform: translateY(-160%); transition: transform .16s ease; }
.skip-link:focus { transform: translateY(0); }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: 248px; flex-direction: column; padding: 28px 18px 20px; background: var(--navy); color: #dceee9; }
.app-shell { min-height: 100vh; margin-left: 248px; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 10px 48px; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: #a7e5ca; color: var(--navy); font-weight: 850; letter-spacing: -.08em; }
.brand strong { display: block; color: #fff; font-size: 1rem; }
.brand small { display: block; color: #a7c8c1; font-size: .72rem; }
.primary-nav { display: grid; gap: 7px; }
.nav-link { display: flex; min-height: 48px; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid transparent; border-radius: 12px; color: #aecac4; font-weight: 700; transition: background .15s ease, color .15s ease; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: #e6f5ee; color: var(--navy); }
.nav-link svg { width: 21px; height: 21px; flex: 0 0 auto; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin: auto 10px 0; color: #a7c8c1; font-size: .78rem; }
.offline-dot, .status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e8a05d; }
.status-dot.online { background: #45ba83; }
.topbar { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(20px, 4vw, 56px); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.9); }
.topbar h1 { margin: 0; color: var(--navy); font-size: 1.35rem; letter-spacing: -.02em; }
.eyebrow { margin-bottom: 5px; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow.accent { color: var(--green); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.status-chip { min-height: 36px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.status-chip .status-mark { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px rgba(138, 75, 0, .12); }
.status-chip.online .status-mark { background: var(--ok); box-shadow: 0 0 0 3px rgba(27, 110, 60, .12); }
.status-chip.pending .status-mark { background: var(--warn); box-shadow: 0 0 0 3px rgba(138, 75, 0, .12); }
.status-chip.attention { border-color: #e0c48d; color: var(--warn); }
.status-chip.attention .status-mark { background: var(--warn); }
.status-chip.conflict { border-color: rgba(180, 35, 24, .35); color: var(--danger); }
.status-chip.conflict .status-mark { background: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.status-chip.offline { background: var(--sky); }
.button, .small-button, .text-button { min-height: 46px; border: 0; border-radius: 10px; font-weight: 800; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; }
.button.primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(22,118,99,.18); }
.button.primary:hover { background: var(--green-dark); }
.button:active, .small-button:active, .capture-mode-button:active, .record-card:active, .recent-row:active { transform: scale(.98); }
.button.secondary { border: 1px solid var(--border); background: #fff; color: var(--navy); }
.button.secondary:hover, .small-button:hover { border-color: #a9cbc2; background: var(--mint); }
.primary-action { align-self: end; min-width: 140px; }
.text-button { padding: 8px 0; background: transparent; color: var(--green-dark); }
.text-button:hover { color: var(--orange); }
.small-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); background: #fff; color: var(--green-dark); }
#main { max-width: 1440px; margin: 0 auto; padding: clamp(24px, 4vw, 54px) clamp(20px, 4vw, 56px) 72px; }
.welcome-row, .page-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.welcome-row h2, .page-intro h2 { max-width: 700px; }
.welcome-row h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.lede { max-width: 710px; margin-bottom: 0; color: var(--muted); font-size: 1rem; }
.card, .ai-card, .empty-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card { padding: clamp(18px, 3vw, 28px); }
.ai-card { margin-bottom: 34px; overflow: hidden; border-color: rgba(59, 63, 158, .3); background: linear-gradient(135deg, #fff 0%, #f4f4ff 100%); }
.ai-card-heading { display: flex; align-items: flex-start; gap: 14px; padding: clamp(20px, 3vw, 30px); border-bottom: 1px solid var(--border); }
.ai-card-heading h2 { margin-bottom: 5px; }
.ai-card-heading p:last-child { max-width: 680px; margin-bottom: 0; color: var(--muted); }
.ai-badge { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--ai); color: #fff; font-size: .8rem; font-weight: 900; letter-spacing: .04em; }
.ai-badge.small { width: 32px; height: 32px; margin-bottom: 15px; border-radius: 10px; font-size: .7rem; }
.ai-live, .confidence-pill { margin-left: auto; padding: 5px 10px; border-radius: 100px; background: #e9e9ff; color: var(--ai); font-size: .72rem; font-weight: 850; white-space: nowrap; }
.assistant-input { padding: clamp(20px, 3vw, 30px); }
label { display: grid; gap: 8px; color: var(--navy); font-size: .84rem; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid #cbdcda; border-radius: 10px; outline: none; background: #fff; color: var(--ink); }
input, select { min-height: 46px; padding: 10px 12px; }
textarea { min-height: 120px; padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,118,99,.12); }
.input-with-action { position: relative; }
.input-with-action textarea { padding-right: 94px; }
.voice-button { position: absolute; right: 10px; bottom: 10px; display: inline-flex; min-height: 42px; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--green-dark); font-size: .75rem; font-weight: 850; }
.voice-button.listening { border-color: #e09a6d; background: #fff4ec; color: #b14f20; }
.voice-icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; line-height: 1; }
.voice-icon svg, .small-button svg { width: 18px; height: 18px; }
.assistant-actions, .form-actions, .result-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.hint, .field-help, .muted, .rail-copy { color: var(--muted); font-size: .82rem; }
.ai-empty { display: flex; gap: 8px; padding: 0 clamp(20px, 3vw, 30px) 26px; color: var(--muted); font-size: .83rem; }
.ai-empty strong { color: var(--navy); }
.attention-card { margin-bottom: 30px; padding: 20px; border: 1px solid #e0c48d; border-radius: var(--radius); background: #fffaf1; }
.attention-card h2 { margin-bottom: 0; font-size: 1.2rem; }
.attention-count { display: inline-grid; min-width: 30px; height: 30px; place-items: center; border-radius: 999px; background: #f7e4ba; color: var(--warn); font-size: .8rem; font-weight: 900; }
.attention-list { display: grid; gap: 8px; margin-top: 16px; }
.attention-row { display: flex; width: 100%; min-height: 56px; align-items: center; gap: 10px; padding: 10px; border: 1px solid transparent; border-radius: 10px; background: rgba(255,255,255,.7); color: var(--ink); text-align: left; }
.attention-row:hover { border-color: #e0c48d; background: #fff; }
.attention-row > span:nth-child(2) { display: grid; flex: 1; gap: 2px; }
.attention-row strong { color: var(--navy); font-size: .86rem; }
.attention-row small { color: var(--muted); font-size: .77rem; }
.attention-mark { display: inline-grid; width: 23px; height: 23px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #f7e4ba; color: var(--warn); font-size: .75rem; font-weight: 900; }
.attention-arrow { color: var(--warn); font-size: 1.3rem; }
.ai-result { margin: 0 clamp(20px, 3vw, 30px) 30px; padding: 20px; border: 1px dashed rgba(59, 63, 158, .55); border-radius: 14px; background: rgba(255,255,255,.86); }
.ai-result .eyebrow.accent, .visit-ai-panel .eyebrow.accent { color: var(--ai); }
.result-header, .card-heading, .form-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.result-header h3 { margin-bottom: 0; }
.suggestions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.suggestion-row { display: grid; gap: 3px; padding: 10px; border-radius: 9px; background: var(--sky); }
.suggestion-row span, .original-note > span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.suggestion-row strong { overflow-wrap: anywhere; color: var(--navy); font-size: .84rem; }
.original-note { padding-top: 14px; border-top: 1px solid var(--border); }
.original-note p { margin: 4px 0 0; color: var(--ink); font-size: .9rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading h2 { margin-bottom: 0; }
.metrics { display: grid; gap: 12px; margin-bottom: 30px; }
.metrics-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { display: grid; min-height: 132px; align-content: space-between; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.metric-card span, .metric-card small { color: var(--muted); font-size: .8rem; }
.metric-card strong { color: var(--navy); font-size: 2rem; line-height: 1; letter-spacing: -.05em; }
.recent-card { margin-bottom: 30px; }
.recent-list { margin-top: 16px; }
.recent-row { display: flex; width: 100%; min-height: 64px; align-items: center; gap: 12px; padding: 10px 0; border: 0; border-top: 1px solid var(--border); background: transparent; text-align: left; }
.recent-row:hover .recent-main strong { color: var(--green); }
.record-status { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #e2a058; }
.record-status.confirmed { background: #46a878; }
.recent-main { display: grid; flex: 1; gap: 2px; }
.recent-main strong { color: var(--navy); }
.recent-main small, .row-state { color: var(--muted); font-size: .78rem; }
.row-state { display: inline-flex; align-items: center; gap: 8px; }
.row-state span { color: var(--green); font-size: 1.35rem; }
.empty-card { display: grid; max-width: 560px; justify-items: start; padding: 34px; }
.empty-icon { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 18px; border-radius: 12px; background: var(--mint); color: var(--green-dark); font-size: 1.5rem; }
.empty-card p { margin-bottom: 20px; color: var(--muted); }
.save-state { align-self: start; padding: 6px 10px; border-radius: 100px; background: #fff0e3; color: #a65326; font-size: .75rem; font-weight: 850; }
.save-state.synced { background: var(--mint); color: var(--green-dark); }
.visit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 20px; }
.form-card-heading { margin-bottom: 20px; }
.required-note { color: var(--muted); font-size: .75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-divider { height: 1px; margin: 26px 0; background: var(--border); }
.note-heading { margin-bottom: 0; }
.visit-form textarea { margin-top: 8px; }
.issue-list { display: grid; gap: 8px; margin: 18px 0; padding-left: 20px; color: #a85326; font-size: .83rem; }
.ready-state { display: flex; gap: 10px; margin-top: 18px; color: var(--green-dark); }
.ready-state span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--mint); font-weight: 900; }
.ready-state p { margin: 2px 0 0; font-size: .84rem; }
.assistant-tip { margin-top: 16px; background: #f0f8fa; box-shadow: none; }
.visit-ai-panel { margin-top: 18px; padding: 18px; border: 1px dashed rgba(59, 63, 158, .55); border-radius: 14px; background: linear-gradient(135deg, #fafaff 0%, #f3f8f8 100%); }
.visit-ai-heading { display: flex; align-items: flex-start; gap: 12px; }
.visit-ai-heading h3 { margin-bottom: 4px; color: var(--navy); }
.visit-ai-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: .82rem; }
.visit-ai-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #cde6de; }
.visit-ai-empty { margin-top: 14px; color: var(--muted); font-size: .78rem; }
.visit-ai-panel .ai-result { margin: 18px 0 0; padding: 16px; background: rgba(255,255,255,.86); }
.visit-ai-panel .suggestions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.assistant-tip p { color: var(--muted); font-size: .82rem; }
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--border); text-align: left; font-size: .83rem; }
th { color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--sky); }
tbody tr:last-child td { border-bottom: 0; }
.table-status { padding: 4px 8px; border-radius: 100px; background: #fff0e3; color: #a65326; font-size: .7rem; font-weight: 850; }
.table-status.confirmed { background: var(--mint); color: var(--green-dark); }
.report-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bar-list { display: grid; gap: 16px; margin-top: 22px; }
.bar-row { display: grid; gap: 6px; }
.bar-row > div:first-child { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; }
.bar-row strong { color: var(--navy); }
.bar-track { height: 9px; overflow: hidden; border-radius: 100px; background: var(--sky); }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.privacy-callout { display: flex; gap: 10px; margin-top: 18px; padding: 12px; border-radius: 10px; background: var(--cream); color: #79512f; font-size: .78rem; }
.privacy-callout span { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #f1ca94; font-weight: 900; }
.privacy-callout p { margin: 1px 0 0; }
.public-demo-card { border-color: #a9d8c4; background: #f5fcf7; }
.public-demo-status { display: flex; align-items: center; gap: 9px; margin-top: 20px; color: var(--green-dark); }
.public-demo-status .status-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(27, 110, 60, .12); }
.notice { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(420px, calc(100vw - 40px)); padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow); color: var(--navy); font-size: .84rem; font-weight: 700; }
.notice.success { border-color: #a9d8c4; background: #effaf3; }
.notice.warning { border-color: #f1c49f; background: #fff6ee; }
.notice.info { background: #eff7fa; }
.mobile-nav { display: none; }

@media (max-width: 1050px) {
  .app-sidebar { width: 220px; }
  .app-shell { margin-left: 220px; }
  .metrics-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit-layout { grid-template-columns: 1fr; }
  .review-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .assistant-tip { margin-top: 0; }
}

@media (max-width: 760px) {
  .app-sidebar { display: none; }
  .app-shell { margin-left: 0; }
  .topbar { min-height: 72px; flex-wrap: wrap; padding: 14px 18px; }
  .topbar-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .connection { max-width: calc(100% - 72px); overflow: hidden; font-size: .72rem; text-overflow: ellipsis; }
  .topbar .button { min-height: 40px; padding: 8px 11px; font-size: .78rem; }
  #main { padding: 24px 16px 105px; }
  .welcome-row, .page-intro { display: block; }
  .welcome-row .button, .page-intro .button { width: 100%; margin-top: 18px; }
  .ai-card-heading { flex-wrap: wrap; }
  .ai-live { margin-left: 56px; margin-top: -8px; }
  .assistant-actions, .form-actions, .result-actions { align-items: stretch; flex-direction: column; }
  .assistant-actions .button, .form-actions .button, .result-actions .button { width: 100%; }
  .hint { order: 2; }
  .visit-ai-actions { align-items: stretch; flex-direction: column; }
  .visit-ai-actions .button { width: 100%; }
  .suggestions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-four, .metrics-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 112px; padding: 15px; }
  .metric-card strong { font-size: 1.65rem; }
  .form-grid, .report-grid, .settings-grid, .review-rail { grid-template-columns: 1fr; }
  .review-rail { display: grid; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(255,255,255,.96); box-shadow: 0 -10px 24px rgba(13,59,54,.08); }
  .mobile-nav .nav-link { min-height: 58px; flex-direction: column; justify-content: center; gap: 3px; padding: 4px; border-radius: 10px; font-size: .68rem; }
  .mobile-nav .nav-link svg { width: 20px; height: 20px; }
  .notice { right: 12px; bottom: 88px; left: 12px; max-width: none; }
}

@media (max-width: 430px) {
  .suggestions-grid { grid-template-columns: 1fr; }
  .ai-card-heading p:last-child { font-size: .86rem; }
  .recent-main small { font-size: .7rem; }
  .row-state { font-size: .7rem; }
}

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

@media print {
  .app-sidebar, .topbar-actions, .mobile-nav, .button, .text-button, .notice { display: none !important; }
  .app-shell { margin-left: 0; }
  #main { padding: 20px; }
  .card, .metric-card { box-shadow: none; }
}
.capture-mode { margin-bottom: 24px; padding: 18px; border: 1px solid rgba(13, 83, 73, .16); border-radius: 16px; background: linear-gradient(135deg, rgba(224, 246, 239, .92), rgba(255, 255, 255, .96)); }
.capture-mode h3 { margin-bottom: 4px; }
.capture-mode-copy { max-width: 62ch; margin-bottom: 14px; color: var(--muted); font-size: .84rem; }
.capture-mode-actions { display: flex; gap: 10px; margin-top: 14px; }
.capture-mode-button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--navy); border-radius: 10px; background: var(--navy); color: #fff; font-weight: 800; cursor: pointer; }
.capture-mode-button.secondary-mode { background: #fff; color: var(--navy); }
.capture-mode-button.secondary-mode.active { border-color: var(--green-dark); background: var(--mint); color: var(--green-dark); }
.capture-mode-button.active { box-shadow: 0 0 0 3px rgba(13, 83, 73, .12); }
.visit-form.manual-mode .visit-ai-panel, .visit-form.manual-mode #form-voice { display: none; }
.button.confirm-button { background: var(--navy); }
@media (max-width: 640px) {
  .capture-mode-actions { flex-direction: column; }
  .capture-mode-button { width: 100%; }
}
.capture-mode-button:not(.active) { background: #fff; color: var(--navy); }
.speak-capture-area { margin-bottom: 24px; padding: 20px; border: 1px solid rgba(13, 83, 73, .16); border-radius: 16px; background: #fff; }
.speak-capture-area .form-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.speak-capture-area textarea { min-height: 132px; }
.field-missing > input, .field-missing > select, .field-missing > textarea { border-color: var(--danger); background: var(--danger-bg); box-shadow: 0 0 0 3px rgba(180, 35, 24, .09); }
.field-error { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; color: var(--danger); font-size: .76rem; font-weight: 750; line-height: 1.35; }
.field-error > span { display: inline-grid; width: 17px; height: 17px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 900; }
.visit-error-summary { display: flex; align-items: baseline; gap: 8px; margin: 0 0 20px; padding: 12px 14px; border-left: 4px solid var(--danger); border-radius: 8px; background: var(--danger-bg); color: var(--danger); font-size: .83rem; }
.visit-error-summary strong { white-space: nowrap; }
.visit-error-summary a { color: var(--danger); font-weight: 850; text-decoration: underline; text-underline-offset: 2px; }
.ai-applied-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--green-dark); font-size: .82rem; }
.ai-applied-note > span:first-child { display: inline-grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--mint); font-weight: 900; }
@media (max-width: 640px) {
  .speak-capture-area { padding: 16px; }
  .speak-capture-area .form-card-heading { align-items: stretch; flex-direction: column; }
  .speak-capture-area .small-button { width: 100%; }
  .visit-error-summary { align-items: flex-start; flex-direction: column; gap: 2px; }
}
.button.danger { border: 1px solid rgba(180, 35, 24, .24); background: var(--danger-bg); color: var(--danger); }
.button.danger:hover { border-color: var(--danger); background: #ffe7e3; }
.boot-error { max-width: 560px; margin: 12vh auto; padding: 32px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-align: center; }
.boot-error p { margin-bottom: 22px; color: var(--muted); }
.records-list { display: grid; gap: 12px; }
.record-card { display: grid; width: 100%; gap: 12px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); color: var(--ink); text-align: left; }
.record-card:hover, .record-card:focus-visible { border-color: #9fcabd; background: #fbfffd; outline: none; }
.record-card-heading, .record-card-footer, .record-card-details { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.record-card-heading strong { color: var(--navy); font-size: 1rem; }
.record-card-details { justify-content: flex-start; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.record-card-details span + span::before { margin-right: 10px; content: '·'; color: #9bb5af; }
.record-card-footer { padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: .76rem; }
.record-card-footer span:last-child { color: var(--green-dark); font-weight: 800; }
.sync-conflict { margin-bottom: 20px; border-color: #f0c39c; background: #fffaf4; box-shadow: none; }
.sync-conflict h3 { margin-bottom: 6px; color: var(--navy); }
.conflict-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.conflict-compare > div { display: grid; gap: 5px; padding: 12px; border: 1px solid #edd8bd; border-radius: 10px; background: #fff; }
.conflict-compare strong { color: var(--navy); font-size: .8rem; }
.conflict-compare span { overflow-wrap: anywhere; color: var(--muted); font-size: .78rem; }
.conflict-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 640px) {
  .record-card-heading, .record-card-footer { align-items: flex-start; flex-direction: column; }
  .conflict-compare { grid-template-columns: 1fr; }
  .conflict-actions { align-items: stretch; flex-direction: column; }
  .conflict-actions .button { width: 100%; }
}
