/* Election Atlas operations: actual geography, meaningful coverage and a clear next action. */

.operations-panel h2,.operations-alerts h2 {
  margin-bottom: .65rem;
}

.operations-map {
  touch-action: pinch-zoom;
  cursor: grab;
  overflow: hidden;
  background: var(--map);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.operations-map:active {
  cursor: grabbing;
}

.operations-map:focus-visible,[data-ops-unit]:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.operations-map .presence-ring {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
}

.operations-map [role=button] {
  cursor: pointer;
}

.operations-map-controls {
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0;
}

.operations-map-counts {
  line-height: 1.8;
  font-size: 14px;
  color: var(--muted);
}

.operations-detail {
  border-top: 1px solid var(--line);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.operations-alert {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.operations-alert form,#ops-policy {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.operations-alert label,#ops-policy label {
  display: grid;
  gap: .4rem;
  flex: 1 1 180px;
  min-width: 0;
  max-width: 100%;
}

.operations-alert input,#ops-policy input {
  font: inherit;
  padding: .65rem .8rem;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  min-height: 48px;
  width: 100%;
  min-width: 0;
}

.operations-alert button,#ops-policy button {
  min-height: 48px;
}

#mobile-connect-workspace>section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 720px;
  width: 100%;
  margin-inline: auto;
}

.badge.missing {
  background: transparent;
  color: var(--red);
}

@media(max-width:640px) {
  .operations-map-controls .button {
    font-size: 14px;
    padding: 10px 12px;
    min-height: 48px;
  }
  .operations-map {
    min-height: 250px;
  }
  .operations-alert form,#ops-policy {
    align-items: stretch;
    flex-direction: column;
  }
}

.operations-detail, .operations-alert {
  min-width: 0;
  overflow-wrap: anywhere;
}

.operations-map-controls .button {
  min-height: 44px;
}

@media (any-pointer: coarse) {
  .operations-map {
    touch-action: pan-y pinch-zoom;
  }
}

@media (max-width: 640px) {
  .operations-alert label, #ops-policy label {
    flex: none;
    width: 100%;
  }
}

/* The approved Atlas composition: geography first, then status and one action. */
.atlas-monitor { min-width: 0; }
.atlas-contest-control { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 0; }
.atlas-contest-control .live-field { margin:0; min-width:0; max-width:440px; flex:1; }
.atlas-contest-control select { min-height:36px; width:100%; padding:6px 24px 6px 0; border:0; border-radius:0; background:transparent; font-size:12px; color:var(--muted); }
.atlas-contest-control .atlas-quiet { min-height:36px; padding:6px 0; border:0; background:transparent; font-size:12px; color:var(--muted); }
.atlas-mast { display:flex; align-items:flex-end; justify-content:space-between; gap:28px; padding:20px 0 24px; min-width:0; }
.atlas-mast > :first-child { min-width:0; }
.atlas-mast .eyebrow { margin-bottom:12px; font-size: 12px; line-height:1.6; }
.atlas-mast h1, .atlas-mast h2 { margin:0; font-family:var(--font-display); font-size:clamp(38px,4.4vw,58px); font-weight:400; letter-spacing:-.065em; line-height:1.1; overflow-wrap:anywhere; }
.atlas-mast h2:focus { outline:3px solid var(--green); outline-offset:5px; }
.atlas-received { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:flex-end; gap:3px 4px; flex:0 0 auto; max-width:42%; padding-bottom:3px; text-align:right; }
.atlas-received strong, .atlas-received > span { font-family:var(--font-display); font-size:32px; font-weight:400; letter-spacing:-.065em; line-height:1.1; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.atlas-received > span { color:var(--muted); }
.atlas-received > small { flex-basis:100%; margin-top:6px; color:var(--muted); font-size: 12px; font-weight:400; }
.atlas-scope-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:0 0 20px; }
.atlas-scope-select { min-width:0; }
.atlas-scope-select select { max-width:240px; min-height:44px; border:0; border-bottom:1px solid var(--control-line); border-radius:0; padding:5px 24px 6px 0; background:transparent; color:var(--ink); font:14px var(--font-body); }
.atlas-snapshot { display:flex; align-items:center; gap:6px; font-size: 12px; color:var(--muted); text-align:right; }
.atlas-snapshot::before { content:""; width:5px; height:5px; border-radius:50%; background:var(--verified); flex-shrink:0; }
.atlas-geography { min-width:0; }
.atlas-coordinator > .atlas-geography { margin-inline:-40px; }
.atlas-map-canvas { --atlas-map-height:clamp(330px,43vh,440px); position:relative; background:var(--map); border-block:1px solid var(--line); min-height:330px; overflow:hidden; }
.atlas-map-canvas .live-map { width:100%; height:var(--atlas-map-height); min-height:330px; max-height:none; border:0; border-radius:0; padding:32px 28px 25px; }
.atlas-map-canvas .boundary { fill:#f8faf3; stroke:#c6d2bc; stroke-width:.8; }
.atlas-map-canvas .boundary.monitored { fill:#c6d6b3; }
.atlas-map-canvas { display:flex; align-items:center; justify-content:center; height:var(--atlas-map-height); }
.atlas-map-stage { position:relative; width:min(100%,700px,calc((var(--atlas-map-height) - 55px) * 1.5909091)); flex-shrink:0; }
.atlas-map-canvas .atlas-map-stage .live-map { height:auto; min-height:0; padding:0; }
.atlas-region-cards { position:absolute; inset:0; pointer-events:none; }
.atlas-region-card { position:absolute; transform:translate(-50%,-50%); pointer-events:auto; min-width:96px; max-width:150px; padding:9px 11px; border:1px solid var(--control-line); border-radius:9px; background:var(--paper); color:var(--ink); box-shadow:0 3px 9px #30451d13; text-align:left; font-family:var(--font-body); }
.atlas-region-card > span { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; font-weight:600; line-height:1.3; }
.atlas-region-card i { font-style:normal; font-weight:400; }
.atlas-region-card small { display:block; margin-top:5px; color:var(--muted); font-size: 12px; font-variant-numeric:tabular-nums; }
.atlas-region-card:focus-visible { outline:2px solid var(--green); outline-offset:3px; z-index:3; }
.atlas-region-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:0 24px; margin:12px 0; }
.atlas-region-list button { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:12px 0; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--ink); font:13px var(--font-body); text-align:left; }
.atlas-region-list button > span:last-child { color:var(--muted); font-size:12px; text-align:right; }
.atlas-region-list i { font-style:normal; padding-left:10px; }
.atlas-map-caption { position:absolute; left:20px; top:17px; z-index:1; pointer-events:none; color:var(--muted); font:10px var(--font-mono); }
.atlas-map-tools { position:absolute; right:18px; top:13px; display:flex; gap:4px; }
.atlas-map-tools .button { width:34px; min-height:44px; padding:2px; border-color:var(--control-line); background:var(--paper); border-radius:7px; font-size:20px; font-weight:400; }
.atlas-map-attribution { position:absolute; left:13px; bottom:9px; color:var(--muted); font-size: 12px; }
.atlas-map-attribution a { color:inherit; }
.atlas-map-canvas > p, .atlas-map-canvas > .notice { position:relative; z-index:2; margin:54px 22px 30px; }
.atlas-map-canvas > p + .live-map { margin-top:-40px; }
.atlas-map-scope-note { font-size: 12px; padding:10px 16px; margin:0; color:var(--muted); background:var(--ground); }
.atlas-coverage { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:15px 0; border:0; border-bottom:1px solid var(--line); margin:0; }
.atlas-coverage-item { display:flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:2px 12px; border:0; border-radius:0; background:transparent; color:var(--muted); font-family:var(--font-body); line-height:1.3; }
.atlas-coverage-item + .atlas-coverage-item { border-left:1px solid var(--line); }
.atlas-coverage-item strong { font-size:18px; font-weight:500; font-variant-numeric:tabular-nums; }
.atlas-coverage-item > span { font-size:12px; }
.atlas-coverage-item > i { width:6px; height:6px; border-radius:50%; background:var(--verified); flex-shrink:0; }
.atlas-coverage-item.pending > i { background:var(--amber); }
.atlas-coverage-item.missing > i { background:var(--red); }
.atlas-coverage-item[aria-pressed="true"] { color:var(--ink); background:var(--ground); box-shadow:inset 0 -3px var(--green); }
.atlas-coverage-item:focus-visible { outline-offset:-3px; }
.atlas-action-strip { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px 24px; padding:24px 0; margin:0 0 16px; border-bottom:1px solid var(--line); background:transparent; border-radius:0; }
.atlas-action-strip > div { min-width:0; }
.atlas-action-strip h2, .atlas-action-strip h3 { margin:0 0 5px; font-family:var(--font-body); font-size:17px; font-weight:500; line-height:1.4; letter-spacing:-.025em; }
.atlas-action-strip p { font-size:12px; line-height:1.6; color:var(--muted); }
.atlas-action-strip .button { flex-shrink:0; min-height:45px; gap:22px; padding:11px 17px; font-size:13px; }
.atlas-secondary { margin:20px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); min-width:0; }
.atlas-secondary > summary { min-height:48px; padding:12px 2px; color:var(--muted); cursor:pointer; font-size:13px; font-weight:400; line-height:1.65; overflow-wrap:anywhere; }
.atlas-secondary > summary::marker { color:var(--green); }
.atlas-secondary > summary:focus-visible { outline-offset:-3px; }
.atlas-secondary[open] > summary { margin-bottom:6px; color:var(--ink); }
.atlas-secondary > .live-filter-panel { margin:0; padding:8px 0 20px; border:0; }
.atlas-secondary > .metric-grid { margin-bottom:16px; border-top:0; }
.atlas-secondary > .live-card { padding:8px 0 24px; border-top:0; }
.atlas-secondary > .live-hint, .atlas-secondary > p { margin:0 0 18px; }
.atlas-secondary > .live-actions { margin-top:4px; margin-bottom:20px; }
.atlas-secondary + .atlas-secondary { margin-top:-21px; }
.atlas-account, .atlas-context { border-top:0; }
.atlas-account .live-session { padding-block:12px 20px; }
.atlas-outbox .live-offline-panel { margin-top:0; }
.atlas-ledger .panel-header { padding-top:12px; }
.atlas-monitor .data-table thead th { white-space:normal; }
.operations-map [role="button"]:focus-visible circle { stroke:var(--ink); stroke-width:2.5px; }
.operations-map [role="img"] text { fill:var(--on-accent); font-size: 12px; font-family:var(--font-mono); font-weight:400; }
.operations-alert > p { font-size:14px; line-height:1.65; }
.operations-alert form { padding:16px; background:var(--ground); border-radius:8px; }
.atlas-offline-status { padding:10px 0; color:var(--muted); font-size:12px; }

/* One assignment, one action. Device preparation and other units stay reachable below. */
.atlas-observer { display:flex; flex-direction:column; width:min(100%,480px); min-height:720px; margin:24px auto; padding:28px 26px 0; border:1px solid var(--line); border-radius:22px; background:var(--ground); overflow:visible; }
.atlas-observer-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.atlas-observer-meta .eyebrow { max-width:70%; font-size: 12px; line-height:1.7; margin:0; }
.atlas-device-state { font-size: 12px; color:var(--muted); white-space:nowrap; }
.atlas-assignment-tag { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:15px; padding-top:15px; border-top:1px solid #bcc9b6; }
.atlas-assignment-tag > span { font-family:var(--font-mono); font-size:14px; }
.atlas-assignment-tag small { color:var(--muted); font-size: 12px; text-align:right; }
.atlas-observer h2 { margin:28px 0 14px; font-family:var(--font-display); font-size:36px; line-height:1.18; letter-spacing:-.055em; font-weight:400; text-wrap:balance; }
.atlas-observer h2:focus { outline:3px solid var(--green); outline-offset:5px; }
.atlas-unit-location { display:flex; gap:7px; align-items:flex-start; color:var(--muted); font-size:12px; line-height:1.6; }
.atlas-observer svg { width:18px; height:18px; flex-shrink:0; }
.atlas-unit-location svg { width:14px; height:14px; margin-top:2px; }
.atlas-report-state { margin-top:28px; padding:18px 0; border-block:1px solid var(--line); }
.atlas-report-state strong { display:flex; align-items:center; gap:7px; font-size:14px; font-weight:500; }
.atlas-report-state strong i { width:6px; height:6px; border-radius:50%; background:var(--verified); }
.atlas-report-state p { margin-top:6px; color:var(--muted); font-size:12px; line-height:1.6; }
.atlas-field-checklist { padding-top:16px; }
.atlas-field-checklist > div { display:flex; align-items:center; gap:10px; min-height:45px; font-size:13px; }
.atlas-field-checklist small { margin-left:auto; text-align:right; color:var(--muted); font-size: 12px; }
.atlas-observer-action { margin-top:auto; padding-top:38px; padding-bottom:24px; }
.atlas-observer-action .button { display:flex; justify-content:space-between; width:100%; min-height:57px; border-radius:12px; padding:15px 18px; font-size:15px; font-weight:500; text-align:left; }
.atlas-observer-action p { margin-top:12px; color:var(--muted); font-size: 12px; line-height:1.5; text-align:center; }
.atlas-observer-nav { display:flex; gap:8px; margin-inline:-26px; padding:13px 15px 16px; background:var(--paper); border-top:1px solid var(--line); }
.atlas-observer-nav button { display:flex; align-items:center; justify-content:center; gap:8px; flex:1; min-height:48px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:14px var(--font-body); }
.atlas-observer-nav button[aria-current="page"] { background:var(--ground); color:var(--ink); box-shadow:inset 0 -3px var(--green); }
.atlas-field-home > .atlas-secondary { max-width:740px; margin-inline:auto; }
.atlas-field-home > .atlas-context { margin-top:20px; }

/* Capture keeps the source fields and lifecycle while using compact count rows. */
.atlas-field-record { max-width:760px; margin-inline:auto; }
.atlas-field-record > h2 { font-size:26px; line-height:1.25; }
.atlas-field-record .atlas-capture-steps { margin-top:24px; }
.atlas-field-record .atlas-capture-steps button { flex-direction:row; align-items:center; gap:8px; padding:12px 8px; font-size:14px; }
.atlas-field-record .atlas-step-number { width:23px; height:23px; font-size: 12px; }
.atlas-field-record .atlas-field-section { padding:22px 0; }
.atlas-field-record .atlas-field-section h3 { font-size:25px; letter-spacing:-.05em; margin-bottom:10px; }
.atlas-field-record .atlas-field-section .live-hint { font-size:12px; line-height:1.65; }
.atlas-field-record .atlas-count-fields { display:block; margin-top:17px; }
.atlas-field-record .atlas-count-fields .live-field { display:grid; grid-template-columns:minmax(0,1fr) 94px; align-items:center; gap:16px; margin:0; padding:9px 0; border-bottom:1px solid var(--line); }
.atlas-field-record .atlas-count-fields .live-field > span { font-size:14px; line-height:1.5; }
.atlas-field-record .atlas-count-fields input { min-height:44px; padding:7px 9px; text-align:right; font-size:16px; }
.atlas-field-record .atlas-field-actions { gap:10px; }
.atlas-field-record .atlas-field-actions .primary { background:var(--lime); border-color:var(--control-line); color:var(--ink); }
.atlas-field-record .atlas-capture-summary > div { padding:12px 0; }
.atlas-field-record .atlas-capture-summary dt { font-size:14px; }
.atlas-field-record .atlas-capture-summary dd { font-size:18px; }

@media (hover:hover) and (pointer:fine) {
  .atlas-coverage-item:hover, .atlas-observer-nav button:hover { background:var(--ground); }
  .atlas-map-tools .button:hover { background:var(--lime); }
  .atlas-region-card:hover { background:#f4f9e8; }
}
@media (prefers-reduced-motion:no-preference) {
  html[data-input-modality="pointer"] .atlas-coverage-item { transition:background-color 120ms var(--ease-out); }
}
@media (max-width:760px) {
  .atlas-coordinator > .atlas-geography { margin-inline:-22px; }
  .atlas-contest-control { padding-top:14px; }
  .atlas-mast { padding:22px 0; gap:14px; align-items:flex-end; }
  .atlas-mast .eyebrow { font-size: 12px; }
  .atlas-mast h1, .atlas-mast h2 { font-size:40px; }
  .atlas-received strong, .atlas-received > span { font-size:26px; }
  .atlas-received > small { font-size: 12px; }
  .atlas-scope-toolbar { align-items:flex-start; gap:12px; padding-bottom:16px; }
  .atlas-scope-select select { max-width:100%; font-size:16px; }
  .atlas-snapshot { max-width:48%; font-size: 12px; line-height:1.6; }
  .atlas-map-canvas .live-map { height:340px; min-height:340px; padding:37px 0 25px; }
  .atlas-map-canvas { --atlas-map-height:340px; }
  .atlas-map-canvas .atlas-map-stage .live-map { height:auto; min-height:0; padding:0; }
  .atlas-region-card { min-width:76px; max-width:112px; padding:7px 9px; }
  .atlas-region-card > span { font-size: 12px; gap:9px; }
  .atlas-region-card small { font-size: 12px; margin-top:4px; }
  .atlas-map-caption { left:15px; top:18px; font-size: 12px; max-width:50%; }
  .atlas-map-tools { right:12px; }
  .atlas-map-tools .button { width:44px; min-height:44px; }
  .atlas-coverage { padding:14px 0; }
  .atlas-coverage-item { padding:3px 6px; gap:5px; }
  .atlas-coverage-item strong { font-size:15px; }
  .atlas-coverage-item > span { font-size: 12px; }
  .atlas-action-strip { flex-direction:column; align-items:stretch; gap:18px; padding:22px 0; }
  .atlas-action-strip .button { justify-content:space-between; min-height:48px; }
  .atlas-observer { width:calc(100% + 44px); min-height:calc(100svh - 86px); margin:0 -22px 20px; padding:25px 24px 0; border:0; border-radius:0; }
  .atlas-observer h2 { font-size:34px; }
  .atlas-observer-nav { margin-inline:-24px; padding-bottom:calc(15px + env(safe-area-inset-bottom,0px)); }
  .atlas-observer-action { padding-top:28px; }
  .atlas-field-record .atlas-field-actions { position:static; margin-inline:-22px; padding:14px 22px calc(14px + env(safe-area-inset-bottom,0px)); background:var(--paper); z-index:5; box-shadow:0 -8px 16px #fffefbe6; }
  .atlas-field-record .atlas-field-actions .primary { grid-column:1/-1; min-height:52px; }
}
@media (max-width:360px) {
  .atlas-mast h1, .atlas-mast h2 { font-size:34px; }
  .atlas-received strong, .atlas-received > span { font-size:23px; }
  .atlas-coverage-item { gap:4px; padding-inline:3px; }
  .atlas-coverage-item > span { font-size: 12px; }
  .atlas-scope-select select { max-width:155px; }
  .atlas-observer h2 { font-size:30px; }
}
@media (any-pointer:coarse) {
  .atlas-map-tools .button { min-width:40px; min-height:44px; }
  .atlas-scope-select select, .atlas-contest-control select { font-size:16px; }
}

.live-field-error { display:block; color:var(--red); font-size:14px; line-height:1.6; margin:6px 0 0; }
.live-confirm-discard { margin-block:16px; padding:16px; border-left:3px solid var(--red); background:var(--red-bg); }
.atlas-count-fields .live-field > :is(.live-field-error, small) { grid-column:1 / -1; }
.atlas-count-fields .live-field > input[aria-invalid="true"] { border-color:var(--red); }
.atlas-mast, .atlas-scope-toolbar, .atlas-observer-meta, .atlas-assignment-tag { flex-wrap:wrap; }
.atlas-snapshot { white-space:normal; }
.atlas-observer-meta > *, .atlas-assignment-tag > * { min-width:0; overflow-wrap:anywhere; }
.atlas-device-state { white-space:normal; }
.atlas-coverage-item { flex-wrap:wrap; }
.atlas-field-checklist > div { flex-wrap:wrap; padding-block:8px; }
.atlas-observer-nav { border-radius:0 0 22px 22px; }
.atlas-observer-nav button { min-width:0; padding:10px 8px; white-space:normal; }

@media (max-width:400px) {
  .atlas-field-record .atlas-count-fields .live-field { grid-template-columns:minmax(0,1fr) minmax(104px,34%); gap:8px 12px; }
  .atlas-coverage { grid-template-columns:1fr; }
  .atlas-coverage-item { justify-content:flex-start; gap:8px; padding:12px; }
  .atlas-coverage-item + .atlas-coverage-item { border-left:0; border-top:1px solid var(--line); }
  .atlas-observer .atlas-device-state { margin-left:0; }
}

@media (max-width:760px) {
  .atlas-observer-nav { border-radius:0; }
  .atlas-field-record .atlas-capture-steps button { flex-direction:column; align-items:flex-start; font-size:14px; }
}
