/* Read-only pages. Scoped classes keep these styles separate from the map shell. */
.consultation-page,
.cp-login-body {
  --cp-forest: #0b4a35;
  --cp-ink: #233b2d;
  --cp-muted: #617067;
  --cp-border: #dce4d9;
  --cp-sage: #edf3e8;
  --cp-paper: #fbfcf9;
}
.consultation-page, .consultation-page > * { min-width: 0; }
.cp-icon { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cp-readonly-badge, .cp-demo-badge, .cp-count { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: fit-content; flex-shrink: 0; padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.35; }
.cp-readonly-badge { background: #edf3e8; color: #356047; border: 1px solid #d6e2d1; }
.cp-readonly-badge .cp-icon { width: 17px; height: 17px; flex-basis: 17px; }
.cp-demo-badge { background: #fff0cd; color: #7c4b10; }
.cp-count { background: #edf3e8; color: #356047; }
.cp-header-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cp-inline-note { display: flex; align-items: flex-start; gap: 9px; margin: 0; color: var(--cp-muted); font-size: 13px; line-height: 1.55; }
.cp-inline-note .cp-icon { color: #637e5b; }
.cp-text-link { color: #0b6544; font-size: 13px; font-weight: 750; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; line-height: 1.5; }
.cp-text-link:hover { color: #06442d; }
.consultation-page a:focus-visible, .consultation-page button:focus-visible,
.consultation-page input:focus-visible, .consultation-page select:focus-visible,
.cp-login-body a:focus-visible, .cp-login-body button:focus-visible,
.cp-login-body input:focus-visible { outline: 3px solid #6d9a54; outline-offset: 3px; }
.cp-muted { color: var(--cp-muted); font-size: 13px; line-height: 1.55; }
.cp-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 17px; }
.cp-section-heading h2 { margin: 0; color: var(--cp-ink); font-size: 21px; line-height: 1.3; }
.cp-section-heading p { margin: 5px 0 0; color: var(--cp-muted); font-size: 13px; line-height: 1.5; }
.cp-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cp-empty-state { display: grid; justify-items: center; align-content: center; gap: 9px; padding: 40px 24px; text-align: center; color: var(--cp-muted); }
.cp-empty-state h3 { margin: 0; color: var(--cp-ink); font-size: 18px; }
.cp-empty-state p { margin: 0; max-width: 440px; font-size: 14px; line-height: 1.6; }
.cp-empty-state .button { margin-top: 10px; }
.cp-empty-icon { width: 42px; height: 42px; margin-bottom: 6px; fill: none; stroke: #6c8e60; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.cp-empty-state--compact { padding: 34px 14px; }

/* Fields preserve the selectors used by demeter-map.js. */
.cp-fields-layout { min-height: 0; align-items: stretch; }
.cp-fields-page .map-frame--workspace { min-height: 500px; }
.cp-map-caption { margin: 0; color: var(--cp-muted); font-size: 12px; line-height: 1.5; }
.cp-field-inspector { max-height: none; }
.cp-field-list { max-height: 635px; gap: 12px; padding: 3px; }
.cp-field-entry { min-width: 0; padding-bottom: 11px; border-bottom: 1px solid var(--cp-border); }
.cp-field-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.cp-field-entry .field-list-item { min-height: 92px; scroll-margin-top: 90px; }
.cp-field-entry .field-list-item__body { overflow-wrap: anywhere; }
.cp-field-entry .field-list-item:disabled { cursor: default; opacity: 1; }
.cp-field-entry .field-list-item:disabled .field-list-item__icon { color: #7d877d; }
.cp-field-entry .field-list-item:target { outline: 3px solid #6d9a54; outline-offset: 2px; }
.cp-field-description { margin: 7px 7px 8px 61px; color: var(--cp-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.cp-field-book-link { display: inline-block; margin: 8px 7px 0 61px; }
.field-list-item__body > .cp-observation-tag { display: inline-flex; width: fit-content; margin-top: 7px; padding: 4px 7px; border-radius: 5px; color: #87520b; background: #fff0cf; font-size: 11px; font-weight: 700; }
.cp-fields-page .map-empty { bottom: 60px; left: 12px; right: 12px; max-width: 400px; }

/* Activity history. */
.cp-record-filter-panel { display: flex; justify-content: space-between; align-items: center; gap: 22px; }
.cp-record-filter-panel h2 { margin: 0; font-size: 18px; color: var(--cp-ink); }
.cp-record-filter-panel p { margin: 5px 0 0; font-size: 13px; color: var(--cp-muted); line-height: 1.5; }
.cp-record-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; min-width: 0; }
.cp-record-filter label { display: grid; gap: 6px; min-width: 210px; color: var(--cp-ink); font-size: 12px; font-weight: 700; }
.cp-record-filter select { width: 100%; min-width: 0; max-width: 330px; border: 1px solid #c7d4c3; border-radius: 9px; color: var(--cp-ink); background: #fff; padding: 11px 34px 11px 12px; font-size: 14px; }
.cp-record-filter > .cp-text-link { padding-block: 11px; }
.cp-table-wrap { min-width: 0; overflow-x: auto; }
.cp-responsive-table { width: 100%; table-layout: fixed; }
.cp-responsive-table th { background: #edf3e8; color: #37513d; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 750; }
.cp-responsive-table th, .cp-responsive-table td { padding: 14px 12px; overflow-wrap: anywhere; vertical-align: top; line-height: 1.55; }
.cp-responsive-table td { color: #35463c; font-size: 13px; }
.cp-records-panel .cp-responsive-table th:nth-child(1) { width: 15%; }
.cp-records-panel .cp-responsive-table th:nth-child(2) { width: 16%; }
.cp-records-panel .cp-responsive-table th:nth-child(3) { width: 16%; }
.cp-records-panel .cp-responsive-table th:nth-child(4) { width: 33%; }
.cp-records-panel .cp-responsive-table th:nth-child(5) { width: 20%; }
.cp-records-panel .activity-table td:first-child { white-space: normal; }
.cp-cell-secondary { display: block; margin-top: 3px; color: var(--cp-muted); font-size: 12px; font-weight: 400; }
.cp-activity-name { color: #17583b; }

/* Report filters and real document preview. */
.cp-report-layout { display: grid; grid-template-columns: minmax(255px, 310px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cp-report-filters { min-width: 0; }
.cp-report-filters .cp-section-heading { margin-bottom: 8px; }
.cp-filter-group { min-width: 0; margin: 0 0 19px; padding: 16px 0 0; border: 0; border-top: 1px solid var(--cp-border); }
.cp-filter-group legend { display: flex; align-items: center; gap: 8px; float: left; width: 100%; margin: 0 0 12px; padding: 0; color: var(--cp-ink); font-size: 14px; font-weight: 750; }
.cp-filter-group legend + * { clear: both; }
.cp-step-number { display: inline-grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #e8f0e2; color: #47713e; font-size: 12px; }
.cp-check-list { display: grid; gap: 4px; max-height: 255px; overflow-y: auto; padding: 2px 5px 2px 2px; }
.cp-check-row { display: flex; align-items: flex-start; gap: 10px; min-height: 42px; padding: 7px 3px; cursor: pointer; }
.cp-check-row input { position: static; opacity: 1; width: 19px; height: 19px; flex: 0 0 19px; margin: 0; accent-color: #166344; }
.cp-check-row > span { min-width: 0; }
.cp-check-row strong { display: block; color: var(--cp-ink); font-size: 13px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.cp-check-row small { display: block; margin-top: 3px; color: var(--cp-muted); font-size: 12px; line-height: 1.45; }
.cp-date-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cp-date-grid label { display: grid; gap: 6px; min-width: 0; color: var(--cp-ink); font-size: 12px; font-weight: 700; }
.cp-date-grid input { width: 100%; min-width: 0; max-width: 100%; border: 1px solid #c7d4c3; border-radius: 8px; padding: 10px 11px; color: var(--cp-ink); background: #fff; font-size: 15px; }
.cp-input-help { margin: 10px 0 0; font-size: 12px; line-height: 1.55; color: var(--cp-muted); }
.cp-reset-report { display: block; width: fit-content; margin: 15px auto 0; text-align: center; }
.cp-form-error { padding: 16px 19px; color: #843c28; background: #fff2e7; border: 1px solid #ecc8ab; border-radius: 12px; font-size: 14px; }
.cp-form-error ul { margin: 7px 0 0; padding-left: 20px; line-height: 1.6; }
.cp-report-preview.panel { padding: 0; overflow: hidden; }
.cp-report-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px; border-bottom: 1px solid var(--cp-border); }
.cp-report-toolbar h2 { margin: 0; color: var(--cp-ink); font-size: 20px; }
.cp-report-toolbar p { margin: 5px 0 0; color: var(--cp-muted); font-size: 12px; }
.cp-export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-export-actions .button { padding: 10px 13px; font-size: 13px; }
.cp-document-wrap { padding: 22px; background: #edf1e9; }
.cp-document { min-width: 0; padding: 28px; border: 1px solid #e0e6dd; background: #fff; box-shadow: 0 7px 22px rgba(28, 55, 30, .06); }
.cp-document-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding-bottom: 19px; margin-bottom: 25px; border-bottom: 2px solid #c8dcc0; font-size: 10px; color: #667567; font-weight: 700; letter-spacing: .05em; }
.cp-document-brand { display: flex; align-items: center; gap: 6px; color: var(--cp-forest); font-size: 18px; letter-spacing: -.02em; }
.cp-document > h2 { margin: 0; color: var(--cp-forest); font-size: 29px; line-height: 1.2; }
.cp-document-period { margin: 6px 0 18px; color: #617067; font-size: 14px; line-height: 1.5; }
.cp-report-selection { display: grid; gap: 9px; margin: 0 0 22px; padding: 15px 0; border-top: 1px solid #e4e9e0; border-bottom: 1px solid #e4e9e0; }
.cp-report-selection > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
.cp-report-selection dt { color: #647469; font-size: 12px; }
.cp-report-selection dd { margin: 0; color: var(--cp-ink); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.cp-report-table th, .cp-report-table td { padding: 11px 9px; font-size: 12px; }
.cp-report-table th:first-child { width: 18%; }
.cp-report-table th:nth-child(2) { width: 23%; }
.cp-report-table th:nth-child(3) { width: 25%; }
.cp-document-footer { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 26px; padding-top: 12px; border-top: 1px solid #dce4d9; color: #68756b; font-size: 11px; }
.cp-report-download-help { margin: 0; padding: 16px 20px; color: var(--cp-muted); font-size: 12px; line-height: 1.6; }

/* Weather notices and field observations have separate meaning. */
.cp-alert-section { min-width: 0; }
.cp-alert-section + .cp-alert-section { padding-top: 12px; }
.cp-alert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cp-weather-alert { padding: 22px; border: 1px solid #e8d5ad; border-top: 3px solid #c58b29; border-radius: 13px; background: #fffdf8; min-width: 0; }
.cp-alert-heading { display: flex; align-items: flex-start; gap: 12px; }
.cp-alert-heading > div { min-width: 0; }
.cp-alert-heading h3 { margin: 3px 0 0; color: var(--cp-ink); font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.cp-alert-symbol, .cp-observation-symbol { display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; color: #956219; background: #fff0cc; }
.cp-observation-symbol { color: #7e642d; background: #f7efd9; }
.cp-alert-kind { color: #6b715e; font-size: 12px; font-weight: 650; }
.cp-alert-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.cp-severity { display: inline-flex; padding: 5px 8px; border-radius: 6px; background: #f7e7c2; color: #7a4e0d; font-size: 11px; font-weight: 750; }
.cp-alert-badges .cp-demo-badge { padding: 5px 8px; font-size: 11px; }
.cp-alert-summary { margin: 16px 0; color: #516052; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.cp-alert-details { display: grid; gap: 12px; margin: 0; padding-top: 14px; border-top: 1px solid #e8e7d9; }
.cp-alert-details > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; }
.cp-alert-details dt { color: #677266; font-size: 12px; line-height: 1.5; }
.cp-alert-details dd { margin: 0; color: #344936; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.cp-alert-details dd > span { display: block; }
.cp-alert-field-links { display: flex; gap: 12px 20px; flex-wrap: wrap; margin-top: 18px; }
.cp-alert-field-links .cp-text-link { padding-block: 5px; }
.cp-observation-card { min-width: 0; }
.cp-alert-empty { grid-column: 1 / -1; min-height: 205px; }
.cp-source-message { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; padding: 13px 16px; background: #ecf2e7; color: #496043; border-radius: 10px; }
.cp-source-message p { margin: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }

/* Former creation URL: informative destination with no write controls. */
.cp-information-panel { display: grid; justify-items: center; width: min(100%, 760px); margin: 28px auto; padding: clamp(28px, 6vw, 68px); text-align: center; }
.cp-information-icon { display: grid; place-items: center; width: 80px; height: 80px; margin: 28px 0 21px; border-radius: 22px; background: #eaf2e3; color: #3f7241; }
.cp-information-icon svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cp-information-panel h1 { margin: 10px 0 14px; color: var(--cp-forest); font-size: clamp(26px, 3vw, 36px); line-height: 1.18; letter-spacing: -.035em; }
.cp-information-panel p { margin: 0; max-width: 530px; color: var(--cp-muted); font-size: 15px; line-height: 1.75; }
.cp-information-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Sign-in preserves the existing session and authentication contracts. */
.cp-login-body { margin: 0; background: #f8faf5; }
.cp-login-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100vh; }
.cp-login-visual { display: flex; flex-direction: column; justify-content: space-between; gap: 50px; min-height: 720px; padding: clamp(34px, 5vw, 76px); color: #fff; background: radial-gradient(ellipse at 20% 100%, rgba(151, 183, 111, .3), transparent 55%), linear-gradient(145deg, #0b4a35, #123d2e); }
.cp-login-brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; color: #fff; font-size: 26px; font-weight: 700; }
.cp-login-brand svg { width: 43px; height: 43px; fill: none; stroke: #bcdba3; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cp-login-brand strong { color: #c3dbaa; font-weight: 500; }
.cp-login-introduction { max-width: 540px; }
.cp-login-eyebrow { display: block; color: #c4d8b7; font-size: 12px; text-transform: uppercase; letter-spacing: .11em; font-weight: 650; }
.cp-login-introduction h1 { margin: 17px 0 20px; color: #fff; font-size: clamp(36px, 3.7vw, 57px); line-height: 1.1; letter-spacing: -.045em; }
.cp-login-introduction > p { margin: 0; max-width: 430px; color: #d3dfce; font-size: 17px; line-height: 1.7; }
.cp-login-benefits { display: grid; gap: 19px; list-style: none; padding: 0; margin: 37px 0 0; color: #e2ebdb; }
.cp-login-benefits li { display: flex; gap: 13px; align-items: center; font-size: 14px; line-height: 1.5; }
.cp-login-benefits .cp-icon { color: #b7d69b; }
.cp-login-consultation { color: #afc7ad; font-size: 12px; }
.cp-login-panel { display: grid; place-items: center; padding: clamp(26px, 5vw, 70px); }
.cp-login-card { width: min(100%, 430px); min-width: 0; }
.cp-login-card h2 { margin: 17px 0 12px; color: var(--cp-forest); font-size: clamp(27px, 2.5vw, 35px); line-height: 1.2; letter-spacing: -.04em; }
.cp-login-card > p { margin: 0 0 30px; color: var(--cp-muted); font-size: 15px; line-height: 1.6; }
.cp-login-form .field-label { margin: 0; font-size: 13px; gap: 8px; }
.cp-login-form input { font-size: 16px; }
.cp-login-form > .button { min-height: 49px; margin-top: 5px; background: var(--cp-forest); }
.cp-login-check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; color: #516650; font-size: 13px; line-height: 1.5; cursor: pointer; }
.cp-login-form .cp-login-check input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--cp-forest); }
.cp-login-card > .cp-login-demo-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 9px; color: #785426; background: #fbf0d8; font-size: 12px; }
.cp-login-public { margin-top: 28px; padding-top: 23px; border-top: 1px solid #dce5d6; text-align: center; }
.cp-login-public a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.cp-login-public p { margin: 7px 0 0; color: #73806f; font-size: 12px; line-height: 1.5; }

@media (max-width: 1180px) {
  .cp-record-filter-panel { align-items: flex-start; flex-direction: column; }
  .cp-record-filter { width: 100%; }
  .cp-record-filter label { flex: 1; }
  .cp-record-filter select { max-width: 100%; }
  .cp-report-layout { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); }
  .cp-document-wrap { padding: 14px; }
  .cp-document { padding: 20px; }
}
@media (max-width: 1000px) {
  .cp-report-layout { grid-template-columns: minmax(0, 1fr); }
  .cp-report-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
  .cp-report-filters .cp-section-heading, .cp-report-filters .cp-filter-group:last-of-type,
  .cp-report-filters > .button, .cp-reset-report { grid-column: 1 / -1; }
  .cp-report-filters .cp-filter-group:last-of-type .cp-check-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-alert-grid { grid-template-columns: minmax(0, 1fr); }
  .cp-login-layout { grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); }
  .cp-login-visual { padding: 35px; }
}
@media (max-width: 780px) {
  .cp-login-layout { grid-template-columns: minmax(0, 1fr); }
  .cp-login-visual { min-height: 0; padding: 30px; gap: 30px; }
  .cp-login-introduction h1 { max-width: 570px; margin: 10px 0 12px; font-size: 34px; }
  .cp-login-introduction > p { max-width: none; font-size: 15px; }
  .cp-login-benefits, .cp-login-consultation { display: none; }
  .cp-login-panel { padding: 36px 24px 50px; }
}
@media (max-width: 680px) {
  .cp-fields-page .map-frame--workspace { min-height: 360px; }
  .cp-field-list { max-height: none; overflow: visible; }
  .cp-responsive-table, .cp-responsive-table tbody, .cp-responsive-table tr, .cp-responsive-table td { display: block; width: 100%; }
  .cp-responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .cp-responsive-table tr { padding: 14px 0; border-bottom: 1px solid var(--cp-border); }
  .cp-responsive-table tr:last-child { border-bottom: 0; }
  .cp-responsive-table td { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; padding: 5px 0; border: 0; font-size: 13px; }
  .cp-responsive-table td::before { content: attr(data-label); color: #71806c; font-size: 12px; font-weight: 600; }
  .cp-responsive-table td > .cp-cell-secondary { grid-column: 2; margin-top: -7px; }
  .cp-records-panel .cp-section-heading { padding-bottom: 13px; margin-bottom: 0; border-bottom: 1px solid var(--cp-border); }
}
@media (max-width: 520px) {
  .cp-header-actions { width: 100%; }
  .cp-header-actions > .button { width: 100%; }
  .cp-record-filter { align-items: stretch; }
  .cp-record-filter label { min-width: 0; width: 100%; flex-basis: 100%; }
  .cp-record-filter select, .cp-date-grid input { font-size: 16px; }
  .cp-record-filter > .button { flex: 1; }
  .cp-report-filters { display: block; }
  .cp-report-filters .cp-filter-group:last-of-type .cp-check-list { grid-template-columns: minmax(0, 1fr); }
  .cp-report-toolbar { padding: 18px 16px; }
  .cp-export-actions { width: 100%; }
  .cp-export-actions .button { flex: 1; min-height: 44px; }
  .cp-document-wrap { padding: 10px; }
  .cp-document { padding: 18px 13px; }
  .cp-document-header { display: grid; gap: 9px; }
  .cp-document > h2 { font-size: 26px; }
  .cp-report-selection > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cp-report-selection dt { font-weight: 700; }
  .cp-report-download-help { padding: 15px; }
  .cp-weather-alert { padding: 18px; }
  .cp-alert-details > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .cp-alert-details dt { font-weight: 700; }
  .cp-information-panel { margin-block: 0; padding: 27px 21px; }
  .cp-information-actions { width: 100%; }
  .cp-information-actions .button { width: 100%; }
  .cp-login-visual { padding: 25px 22px 28px; gap: 28px; }
  .cp-login-brand { font-size: 23px; }
  .cp-login-brand svg { width: 34px; height: 34px; }
  .cp-login-introduction h1 { font-size: 29px; }
  .cp-login-eyebrow { font-size: 10px; }
  .cp-login-panel { padding-inline: 22px; }
  .cp-login-card h2 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .consultation-page .button, .cp-login-body .button { transition: none; }
}
