.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.login-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.login-header h1 {
  margin: 5px 0 8px;
  font-size: 2rem;
}

.login-header p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.login-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-option__code {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #dcefe8;
  color: var(--green-dark);
  font-weight: 800;
}

.login-option h2 {
  margin: 2px 0 8px;
  font-size: 1.15rem;
}

.login-option p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-option .primary-action {
  grid-column: 1 / -1;
  align-self: end;
  width: 100%;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  background: #dcefe8;
  color: var(--green-dark);
  font-weight: 800;
}

.brand > div strong,
.brand > div span {
  display: block;
}

.brand > div strong {
  letter-spacing: 0;
}

.brand > div span {
  margin-top: 3px;
  color: #afc8bf;
  font-size: 0.85rem;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 14px;
  background: transparent;
  color: #dce9e4;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  background: #1b3a31;
  border-color: #2d584c;
  color: #ffffff;
}

.sidebar-panel {
  margin-top: auto;
  padding: 16px;
  border: 1px solid #2b4c43;
  border-radius: var(--radius);
  background: #153027;
}

.sidebar-panel strong {
  display: block;
  margin: 6px 0 8px;
}

.sidebar-panel p {
  margin: 0;
  color: #b9ccc5;
  font-size: 0.9rem;
  line-height: 1.45;
}

.sidebar-logout {
  width: 100%;
  min-height: 44px;
  border: 1px solid #78978c;
  border-radius: var(--radius);
  background: #f4fbf8;
  color: #10251f;
  font-weight: 800;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  border-color: #ffffff;
  background: #dcefe8;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.role-switcher {
  min-width: 190px;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.role-switcher select {
  min-height: 42px;
  color: var(--ink);
  font-weight: 800;
  text-transform: none;
}

.role-switcher small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
}

.status-pill,
.primary-action,
.secondary-action {
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2aa66f;
  box-shadow: 0 0 0 4px rgba(42, 166, 111, 0.16);
}

.status-pill.is-offline .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(183, 121, 31, 0.16);
}

.primary-action {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.primary-action:hover {
  background: var(--green-dark);
}

.secondary-action:hover,
.status-pill:hover {
  border-color: var(--green);
}

.queue-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.danger-action {
  border-color: #a33b35;
  color: #8b2f2a;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 128px;
  padding: 18px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 2.1rem;
  line-height: 1;
}

.panel {
  padding: 18px;
}

.panel-copy {
  color: var(--muted);
  line-height: 1.5;
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.activity-list,
.queue-list,
.toggle-list,
.sensitive-list {
  display: grid;
  gap: 10px;
}

.activity-item,
.queue-item,
.sensitive-card,
.restricted-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.activity-item strong,
.queue-item strong,
.sensitive-card strong,
.restricted-card strong {
  display: block;
  margin-bottom: 5px;
}

.ranger-start-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ranger-start-actions strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
}

.ranger-start-actions__buttons,
.record-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}

.record-action-button {
  min-height: 38px;
}

.archive-success-notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(42, 166, 111, 0.42);
  border-radius: var(--radius);
  background: #edf8f3;
  color: var(--green-dark);
  font-weight: 700;
  line-height: 1.45;
}

.sensitive-panel {
  margin-top: 18px;
}

.sensitive-card {
  border-color: rgba(185, 58, 50, 0.28);
  background: #fff8f7;
}

.restricted-card {
  border-color: rgba(183, 121, 31, 0.34);
  background: #fffaf0;
}

.activity-meta,
.queue-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.check-list {
  display: grid;
  gap: 12px;
  padding-left: 18px;
  color: #32423d;
  line-height: 1.45;
}

.protected-area-assist {
  grid-column: 1 / -1;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.protected-area-assist.is-match,
.protected-area-assist.is-selected {
  border-color: rgba(25, 113, 91, 0.28);
  background: #eff8f4;
  color: var(--green-dark);
}

.protected-area-assist.is-warning {
  border-color: rgba(183, 121, 31, 0.32);
  background: #fff8e9;
  color: #76500e;
}

.boundary-mismatch-panel {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: var(--warning-strong);
}

.boundary-mismatch-panel[hidden] {
  display: none;
}

.boundary-mismatch-panel textarea {
  margin-top: 8px;
  background: #ffffff;
}

.record-type-selector {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.record-type-selector legend {
  padding: 0 6px;
  color: var(--ink);
  font-weight: 800;
}

.record-type-selector legend span {
  display: inline-block;
  margin-right: 8px;
  color: var(--blue);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.record-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.record-type-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.record-type-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.record-type-option > span {
  display: block;
  height: 100%;
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.record-type-option strong,
.record-type-option small {
  display: block;
}

.record-type-option strong {
  color: var(--ink);
}

.record-type-option small {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.record-type-option.is-selected > span {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  background: #eef7f2;
}

.record-type-option input:focus-visible + span {
  outline: 3px solid rgba(31, 102, 115, 0.28);
  outline-offset: 2px;
}

.record-type-selector p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.event-source-field {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.event-source-field legend {
  padding: 0 4px;
  color: var(--ink);
  font-weight: 800;
}

.event-source-field label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 8px;
}

.event-source-field input {
  width: auto;
  min-height: auto;
  margin-top: 2px;
}

.received-report-details {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.record-entry-body {
  display: grid;
  gap: 20px;
}

.prototype-warning,
.form-error {
  border: 1px solid rgba(183, 121, 31, 0.34);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff8e9;
  color: #76500e;
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-error {
  border-color: rgba(185, 58, 50, 0.32);
  background: #fff3f1;
  color: #862c27;
  font-weight: 700;
}

.form-section {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.official-form {
  gap: 18px;
}

.reference-asset-details { margin: 0; min-width: 0; }
.reference-asset-details dt { font-weight: 700; margin-top: .65rem; }
.reference-asset-details dd { margin: .2rem 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }

html[data-form-rules="staging-v1"] .form-error {
  overflow-wrap: anywhere;
  scroll-margin-block: 2rem;
}
html[data-form-rules="staging-v1"] .form-error ul { padding-left: 1.25rem; }
.form-error-link {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  padding: .35rem 0;
  min-height: 44px;
  white-space: normal;
  cursor: pointer;
}
.form-field-error { display: block; color: #a02621; overflow-wrap: anywhere; }
html[data-form-rules="staging-v1"] [aria-invalid="true"] { outline: 2px solid #a02621; outline-offset: 2px; }
html[data-form-rules="staging-v1"] .official-form-heading p { margin: .5rem 0; }

.official-form-heading h3 {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.official-form-group {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
}

.official-form-group.is-sensitive {
  border-left: 4px solid #a33f36;
  background: #fffaf9;
}

.official-form-group legend {
  padding: 0 7px;
  color: var(--ink);
  font-weight: 800;
}

.official-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.official-form-field {
  min-width: 0;
}

.official-form-field > span {
  display: block;
  min-height: 20px;
}

.official-form-field textarea {
  resize: vertical;
}

.section-heading-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-heading-inline h3 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.privacy-badge {
  border: 1px solid rgba(185, 58, 50, 0.28);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff3f1;
  color: #862c27;
  font-size: 0.72rem;
  font-weight: 800;
}

.signature-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.signature-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #34423d;
  font-size: 0.92rem;
  font-weight: 800;
}

.signature-choice label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-soft);
}

.signature-choice input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.prototype-scenarios {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid #d7e4df;
  border-radius: var(--radius);
  padding: 10px;
  background: #f4faf7;
}

.prototype-scenarios strong {
  margin-right: 4px;
  color: #34423d;
  font-size: 0.82rem;
}

.signature-outcome-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.signature-refusal {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(185, 58, 50, 0.32);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff3f1;
}

.signature-refusal[hidden] {
  display: none;
}

.signature-refusal label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 800;
}

.signature-refusal input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.signature-refusal small {
  color: #6f302c;
  line-height: 1.45;
}

.signature-panel {
  display: grid;
  gap: 10px;
}

.profile-panel .signature-panel {
  margin-top: 18px;
}

.ranger-signature-preview {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #ffffff;
}

.ranger-signature-preview[hidden] {
  display: none;
}

.ranger-signature-preview img {
  width: min(460px, 100%);
  height: 110px;
  object-fit: contain;
  object-position: left center;
}

.ranger-signature-preview small {
  color: #8a2f2a;
  font-weight: 800;
}

.signature-panel[hidden] {
  display: none;
}

.signature-panel canvas {
  width: 100%;
  height: 180px;
  border: 1px solid #aebfb9;
  border-radius: var(--radius);
  background: #ffffff;
  touch-action: none;
}

.signature-panel__footer,
.panel-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.signature-panel__footer small,
.panel-actions small {
  color: var(--muted);
  line-height: 1.4;
}

.evidence-control {
  display: grid;
  gap: 6px;
  min-width: min(280px, 100%);
}

.evidence-control small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.archive-search {
  min-width: 0;
}

.archive-panel .panel-copy {
  max-width: 680px;
  margin: 7px 0 0;
}

body[data-workspace-role="archive_admin"] .sidebar {
  background: #142b31;
}

body[data-workspace-role="archive_admin"] .nav-item.is-active {
  background: #24454d;
  border-color: #416b74;
}

body[data-workspace-role="archive_admin"] .archive-panel {
  border-top: 4px solid var(--green);
}

.archive-source-status {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(420px, 1.25fr);
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface);
}

.archive-source-status[hidden] {
  display: none;
}

.archive-source-status h2 {
  margin: 4px 0 6px;
  font-size: 1.05rem;
}

.archive-source-status p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.archive-source-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.archive-source-tab {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.archive-source-tab span,
.archive-source-tab small,
.archive-source-tab strong {
  display: block;
}

.archive-source-tab span {
  font-weight: 800;
}

.archive-source-tab small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.3;
}

.archive-source-tab strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.25rem;
}

.archive-source-tab.is-selected {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  background: #eef7f2;
}

.archive-source-tab:focus-visible {
  outline: 3px solid rgba(31, 102, 115, 0.28);
  outline-offset: 2px;
}

.archive-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(170px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.archive-export-actions {
  display: flex;
  gap: 8px;
}

.archive-clear-filters {
  white-space: nowrap;
}

.archive-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.archive-result-bar strong {
  color: var(--ink);
}

.archive-privacy-notice {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: var(--warning-strong);
  line-height: 1.4;
}

.archive-privacy-notice[hidden] {
  display: none;
}

.archive-list {
  display: grid;
  gap: 10px;
}

.archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-soft);
}

body[data-workspace-role="archive_admin"] .archive-item {
  background: #ffffff;
}

.archive-item__body strong {
  display: block;
  margin-bottom: 5px;
}

.archive-item__body p {
  margin: 0 0 9px;
  line-height: 1.45;
}

.archive-document-button {
  white-space: nowrap;
}

.archive-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.archive-item.is-newly-saved {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(42, 166, 111, 0.12);
}

.institution-report-card.is-expanded {
  align-items: start;
  border-color: var(--green);
}

.institution-report-details {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.institution-report-details__heading,
.institution-report-document-actions,
.institution-report-evidence article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.institution-report-details__heading h3 {
  margin: 3px 0 0;
  font-size: 1rem;
}

.institution-report-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.institution-report-meta div {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.institution-report-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.institution-report-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.institution-report-description p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.institution-report-evidence-section {
  display: grid;
  gap: 10px;
}

.institution-report-evidence {
  display: grid;
  gap: 8px;
}

.institution-report-evidence article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #ffffff;
}

.institution-report-evidence small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 0 12px;
  font-weight: 700;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented .is-selected {
  background: var(--green);
  color: #ffffff;
}

.toggle-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.toggle-list input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.table-wrap {
  overflow-x: auto;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  border-radius: 999px;
  padding: 9px 12px;
  background: #edf5f1;
  color: var(--green-dark);
  font-weight: 800;
}
.prototype-badge {
  align-items: center;
  background: var(--warning-soft);
  border: 1px solid var(--warning-border);
  color: var(--warning-strong);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 800;
  min-height: 2rem;
  padding: 0.35rem 0.6rem;
  text-transform: uppercase;
}

/* Live institution entry: startup and bounded directory. */
.institution-startup { max-width: 42rem; margin: 8vh auto; padding: 2rem; }
.institution-startup button { margin: .5rem .5rem 0 0; }
html[data-runtime="institution"] [data-view-panel="admin"] > .panel { margin-bottom: 1.5rem; }
html[data-runtime="institution"] .activity-item { overflow-wrap: anywhere; }

/* Institution reference editor, isolated from the field map. */
.reference-editor-layout { display: grid; grid-template-columns: minmax(200px, .7fr) minmax(0, 2fr); gap: 1.25rem; }
.reference-editor-layout > *, .reference-editor-fields > *, .boundary-toolbar > * { min-width: 0; }
.reference-editor-tabs, .reference-editor-toolbar, .boundary-toolbar, .boundary-file-tools { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-bottom: 1rem; }
.reference-editor-toolbar label, .boundary-toolbar label { display: grid; gap: .35rem; flex: 1 1 150px; }
.reference-editor-layout button, .reference-editor-tabs button, .reference-editor-toolbar button { min-height: 44px; padding: .6rem .85rem; border: 1px solid #bdcfca; border-radius: .5rem; background: #fff; color: #173c33; cursor: pointer; font: inherit; }
.reference-editor-tabs button[aria-pressed="true"], .boundary-toolbar button[aria-pressed="true"] { background: #176f5c; color: white; }
.reference-editor-layout button:disabled { opacity: .55; cursor: default; }
.reference-editor-list { max-height: 720px; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; align-self: start; }
.reference-editor-item { display: grid; gap: .3rem; text-align: left; overflow-wrap: anywhere; }
.reference-editor-item.is-selected { box-shadow: inset 4px 0 #176f5c; background: #edf7f3; }
.reference-editor-item span, .reference-editor-detail [data-version] { font-size: .86rem; color: #53665f; }
.reference-editor-detail fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1rem; min-width: 0; }
.reference-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.reference-editor-detail label { display: grid; gap: .35rem; }
.reference-editor-detail input, .reference-editor-detail select, .reference-editor-detail textarea, .reference-editor-toolbar input, .reference-editor-toolbar select { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; padding: .6rem; border: 1px solid #bdcfca; border-radius: .4rem; background: white; color: #182b24; }
.reference-editor-detail input[type="checkbox"] { width: 24px; height: 24px; }
.reference-editor-detail input[readonly] { background: #f0f4f2; }
.reference-editor-warning { background: #fff6df; color: #665019; border-left: 3px solid #b88419; padding: .75rem; }
.reference-editor-detail [data-error] { color: #9b261f; white-space: pre-wrap; }
.reference-history-row { display: grid; gap: .4rem; padding: 1rem 0; border-bottom: 1px solid #dbe5e1; }
.reference-history-row p { margin: 0; overflow-wrap: anywhere; }
.reference-editor-detail [data-history] { margin-top: 1.25rem; }
.boundary-map { height: 430px; position: relative; overflow: hidden; border: 1px solid #a8beb4; border-radius: .6rem; background: #edf1ed; touch-action: none; }
.boundary-tiles, .boundary-vectors { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.boundary-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; }
.boundary-map-tools { position: absolute; top: .5rem; right: .5rem; display: flex; gap: .3rem; }
.boundary-attribution { position: absolute; right: 0; bottom: 0; background: #fffffff0; padding: .2rem .4rem; color: #234b3f; font-size: .75rem; }
.boundary-shape { fill: #19886e25; stroke: #13755d; stroke-width: 2; }
.boundary-shape.is-selected { stroke-width: 3; }
.boundary-original { fill: none; stroke: #5d666b; stroke-dasharray: 5 4; stroke-width: 2; }
.boundary-vertex { fill: white; stroke: #13755d; stroke-width: 2; }
.boundary-vertex.is-selected { fill: #c35d14; stroke: white; }
.boundary-drawing { fill: none; stroke: #c35d14; stroke-width: 3; stroke-dasharray: 6 3; }
.boundary-hint { min-height: 2.5rem; color: #234b3f; }
.reference-editor-detail .muted { color: #53665f; font-size: .9rem; }
@media (max-width: 1000px) { .reference-editor-layout { grid-template-columns: minmax(0,1fr); } .reference-editor-list { max-height: 260px; } }
@media (max-width: 600px) { .reference-editor-fields { grid-template-columns: minmax(0,1fr); } .boundary-map { height: 350px; } .boundary-toolbar > button { flex: 1 1 130px; } .boundary-map-tools button { padding: .4rem .55rem; font-size: .85rem; } }

/* Short field record: location first, other details on demand. */
.record-location-step { min-width:0; margin:0 0 14px; padding:18px; border:1px solid #d5e2dc; border-radius:12px; background:#f2f8f5; }
.record-location-step legend { font-weight:800; padding:0 8px; }
.record-location-summary { margin:4px 0 14px; font-weight:750; line-height:1.5; overflow-wrap:anywhere; }
.record-location-actions { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.record-location-actions button { min-height:44px; }
.record-location-details,.record-type-details,.record-extra-details { margin:14px 0; padding:12px; border:1px solid #d5e2dc; border-radius:10px; }
.record-location-details summary,.record-type-details summary,.record-extra-details summary,details.official-form-group>summary { cursor:pointer; font-weight:750; padding:4px; }
.record-location-details>.form-grid,.record-extra-details>.form-grid { margin-top:14px; }
.record-type-details .record-type-selector { margin-top:14px; }
.record-entry-body>.prototype-warning { margin:12px 0; padding:10px; font-size:.85rem; }
.record-extra-details .surveillance-action-selector { margin:12px 0 0; }
.record-location-step #reportLocationStatus { display:block; line-height:1.5; }
.record-back { flex:0 0 auto; min-height:40px; }
.record-location-details .input-action-row { display:block; }
details.official-form-group>.official-form-grid { margin-top:14px; }
@media(max-width:640px){.record-location-step{padding:14px}.record-location-actions>.primary-action{flex:1}.record-type-details .record-type-options{grid-template-columns:repeat(2,minmax(0,1fr))}.record-type-details .record-type-option small{display:none}}
@media(max-width:640px){body.short-record-active .sidebar,body.short-record-active .topbar .status-actions,body.short-record-active .topbar .eyebrow{display:none}body.short-record-active .topbar{min-height:0;margin-bottom:12px}body.short-record-active .record-entry-body>.prototype-warning{font-size:.78rem}}

.official-signature-canvas { display:block; width:100%; height:140px; border:1px solid #74817c; border-radius:8px; touch-action:none; background:white; }
.document-field-signature { max-width:100%; height:80px; object-fit:contain; }
