:root {
  color-scheme: light;
  --bg: #f4f6f2;
  --surface: #ffffff;
  --surface-strong: #eef4ec;
  --ink: #172018;
  --muted: #5e6b5f;
  --line: #cad8c8;
  --line-strong: #8dad88;
  --brand: #116b3a;
  --brand-dark: #0c4c2a;
  --brand-soft: #d9ead8;
  --field: #c8db73;
  --warning: #c77b16;
  --danger: #b73838;
  --blue: #27699c;
  --shadow: 0 18px 45px rgba(25, 42, 25, 0.14);
  --radius: 8px;
  --font: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(17, 107, 58, 0.08), transparent 36%),
    linear-gradient(315deg, rgba(199, 123, 22, 0.1), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.public-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, var(--brand), var(--brand-dark)),
    var(--brand);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  flex: 0 0 auto;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 4px;
  background: rgba(255, 255, 255, 0.78);
}

.brand-mark::before {
  top: 11px;
}

.brand-mark::after {
  top: 21px;
  width: 15px;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.connection-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.connection-pill.online {
  border-color: rgba(17, 107, 58, 0.26);
  background: #e6f5e7;
  color: var(--brand-dark);
}

.connection-pill.offline {
  border-color: rgba(199, 123, 22, 0.38);
  background: #fff4d6;
  color: #6c4b00;
}

.button {
  min-height: 40px;
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.button.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.button.primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.button.ghost {
  background: transparent;
}

.button.danger {
  border-color: rgba(183, 56, 56, 0.45);
  color: var(--danger);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: clamp(26px, 6vw, 72px) clamp(18px, 5vw, 72px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--field);
  box-shadow: 0 0 0 4px rgba(200, 219, 115, 0.28);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hero-copy h1 {
  margin-top: 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.48;
  max-width: 700px;
}

.hero-metrics {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 690px;
}

.metric {
  padding: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric strong {
  display: block;
  font-size: 20px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  display: block;
  margin-top: 4px;
}

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

.login-visual {
  min-height: 190px;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-visual img {
  width: min(100%, 430px);
  display: block;
}

.login-visual.banner-visual {
  min-height: 220px;
  padding: 14px;
}

.login-visual.banner-visual img {
  width: min(100%, 620px);
  max-height: 250px;
  object-fit: contain;
}

.login-form {
  padding: 20px;
}

.form-title {
  font-size: 20px;
  font-weight: 850;
}

.login-help {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.login-demo-users {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.login-demo-users button {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--brand-dark);
  padding: 5px 9px;
  font-weight: 800;
  cursor: pointer;
}

.button.google-button {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
  justify-content: center;
}

.button.google-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.google-dot {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
}

.login-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(183, 56, 56, 0.28);
  background: rgba(183, 56, 56, 0.08);
  color: var(--danger);
  font-weight: 800;
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.form-grid-two {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.42fr);
  margin-top: 0;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(17, 107, 58, 0.13);
}

.security-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf4;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.footer-note {
  padding: 18px clamp(18px, 4vw, 52px);
  color: var(--muted);
  font-size: 13px;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  position: relative;
}

.portal-shell.nav-closed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  background: #102116;
  color: #f6fff6;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  z-index: 50;
  transition: transform 180ms ease, opacity 180ms ease;
}

.portal-shell.nav-closed .sidebar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.sidebar-brand-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sidebar .brand-lockup {
  align-items: flex-start;
  min-width: 0;
}

.sidebar .brand-mark {
  width: 38px;
  height: 38px;
}

.sidebar .brand-title {
  color: #fff;
  font-size: 17px;
  line-height: 1.1;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: 175px;
}

.sidebar .brand-subtitle {
  color: #aac6ad;
  font-size: 12px;
}

.brand-menu-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

.brand-menu-button span {
  display: block;
  width: 21px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.floating-menu-button {
  color: #0b2114;
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 10px 20px rgba(23, 34, 26, 0.1);
}

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

.nav-button {
  width: 100%;
  min-height: 42px;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #f6fff6;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-weight: 760;
}

.nav-button.active,
.nav-button:hover {
  background: #0fcf78;
  border-color: #0fcf78;
  color: #092014;
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.admin-view-switcher {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(19, 201, 118, 0.38);
  border-radius: var(--radius);
  background: rgba(15, 207, 120, 0.1);
}

.admin-view-switcher label {
  color: #d9ffe8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-view-switcher select {
  width: 100%;
  min-height: 38px;
  color: #08170d;
  background: #f7fff9;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  padding: 7px 9px;
  font-weight: 800;
}

.admin-view-switcher span {
  color: #aac6ad;
  font-size: 12px;
}

.user-chip {
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.user-chip strong {
  display: block;
}

.user-chip span {
  display: block;
  color: #aac6ad;
  font-size: 13px;
  margin-top: 3px;
}

.user-chip em {
  display: block;
  margin-top: 7px;
  color: #d7fbe3;
  font-size: 12px;
  font-style: normal;
}

.content {
  min-width: 0;
  padding: 22px clamp(16px, 3vw, 34px) 34px;
}

.portal-top-rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.portal-top-rail strong,
.portal-top-rail span {
  display: block;
}

.portal-top-rail span {
  color: var(--muted);
  font-size: 13px;
}

.panel-backdrop {
  display: none;
  cursor: pointer;
}

.user-settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  width: min(390px, 92vw);
  height: 100vh;
  overflow-y: auto;
  padding: 18px;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -22px 0 50px rgba(23, 34, 26, 0.2);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.portal-shell.settings-open .user-settings-panel {
  transform: translateX(0);
}

.settings-action-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.portal-shell.settings-open .panel-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 60;
  border: 0;
  background: rgba(9, 32, 20, 0.36);
}

.portal-shell.font-large {
  font-size: 18px;
}

.portal-shell.font-xlarge {
  font-size: 20px;
}

.portal-shell.theme-high_contrast {
  --ink: #000;
  --muted: #27332b;
  --surface: #fff;
  --line: #111;
  --brand: #006b2a;
}

.portal-shell.theme-soft_light {
  --ink: #223026;
  --muted: #687568;
  --surface: #fbfbf6;
  --line: #d8ddcf;
  --brand: #597f43;
  background: #f7f7ef;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.content-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.content-header p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
  gap: 16px;
}

.section-band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.project-progress-list,
.dashboard-completed-list,
.available-survey-list {
  display: grid;
  gap: 10px;
}

.project-progress-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: clip;
}

.project-progress-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 170px) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.project-progress-card > summary::-webkit-details-marker {
  display: none;
}

.project-progress-card > summary strong,
.completed-row strong,
.survey-site-card strong {
  display: block;
}

.project-progress-card > summary span,
.completed-row span,
.survey-site-card span {
  color: var(--muted);
  font-size: 13px;
}

.project-progress-meter {
  height: 10px;
  border-radius: 999px;
  background: #dce7de;
  overflow: hidden;
}

.project-progress-meter span {
  display: block;
  height: 100%;
  background: #0fcf78;
}

.project-progress-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.completed-row,
.survey-site-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf4;
  color: var(--ink);
  padding: 10px;
  cursor: pointer;
}

.completed-row:hover,
.survey-site-card:hover,
.survey-site-card.active {
  border-color: var(--brand);
  box-shadow: inset 0 -4px 0 rgba(19, 201, 118, 0.28);
}

.completed-row small,
.survey-site-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.compact-tabs {
  margin-bottom: 10px;
}

.compact-detail-table {
  margin-top: 14px;
}

details.section-band {
  padding: 0;
  overflow: clip;
}

.admin-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.admin-section > summary::-webkit-details-marker {
  display: none;
}

.admin-section > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--brand);
}

.admin-section[open] > summary {
  border-bottom: 1px solid var(--line);
}

.admin-section[open] > summary::after {
  content: "-";
}

.admin-section > summary small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-left: auto;
}

.admin-section > :not(summary) {
  margin: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h3 {
  font-size: 18px;
}

.small-muted {
  color: var(--muted);
  font-size: 13px;
}

.work-list,
.map-list,
.survey-list,
.submission-list {
  display: grid;
  gap: 10px;
}

.quick-search .field,
.map-control-grid .field {
  position: relative;
}

.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(15, 42, 29, 0.18);
}

.search-suggestion {
  min-height: 58px;
  display: grid;
  gap: 3px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.search-suggestion:hover,
.search-suggestion.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(17, 107, 58, 0.12);
}

.search-suggestion span,
.search-suggestion small {
  color: var(--muted);
}

.compact-empty {
  min-height: 42px;
  padding: 10px;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-tab {
  min-height: 40px;
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.admin-tab.active,
.admin-tab:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.admin-project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.admin-full {
  grid-column: 1 / -1;
}

.admin-list,
.question-list {
  display: grid;
  gap: 10px;
}

.admin-card,
.question-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.admin-card[data-admin-user-id] {
  cursor: pointer;
}

.admin-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(17, 107, 58, 0.11);
}

.admin-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-sync-line {
  margin-top: 8px;
}

.setup-code-panel {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf4;
}

.setup-code-panel strong,
.setup-code-panel span,
.setup-code-panel small {
  display: block;
}

.setup-code-panel span {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.setup-code-panel small {
  color: var(--muted);
  margin-top: 3px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form h3 {
  font-size: 17px;
}

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

.basket-assignment-head,
.basket-assignment-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf4;
}

.basket-assignment-head span,
.basket-assignment-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.basket-assignment-row {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  align-items: end;
  background: #fff;
}

.basket-assignment-row label {
  display: grid;
  gap: 5px;
}

.project-overview-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #f7faf4;
}

.project-overview-card strong,
.project-overview-card span {
  display: block;
}

.project-overview-card > div:first-child span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.admin-form-wide {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.6fr) minmax(220px, 0.8fr) auto;
  align-items: end;
}

.user-profile-form {
  margin-top: 14px;
}

.admin-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-review-grid h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.launch-checklist {
  grid-column: 1 / -1;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.launch-check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.launch-check-row.ok {
  border-color: #b7d8c0;
  background: #f7fbf7;
}

.launch-check-row.warn {
  border-color: #efc46d;
  background: #fffaf0;
}

.launch-check-row.blocker {
  border-color: #e3a1a1;
  background: #fff7f7;
}

.launch-check-row strong,
.launch-check-row small {
  display: block;
}

.launch-check-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

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

.admin-mini-row {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.admin-mini-row.check-row {
  grid-template-columns: auto minmax(150px, 1fr) minmax(130px, 0.6fr) minmax(160px, 1fr) auto;
}

.project-job-manager {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.compact-button {
  min-height: 32px;
  padding: 6px 9px;
}

.admin-mini-row span {
  color: var(--muted);
  font-size: 12px;
}

.question-add-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.question-options-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 0.35fr));
  gap: 12px;
}

.question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.assignment-grid {
  display: grid;
  gap: 10px;
}

.assignment-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.4fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: center;
}

.project-survey-row {
  grid-template-columns: minmax(160px, 0.65fr) minmax(170px, 0.55fr) minmax(220px, 0.9fr) minmax(105px, 0.3fr) minmax(105px, 0.3fr);
}

.assignment-row label,
.check-line {
  color: var(--muted);
  font-weight: 850;
}

.assignment-row select,
.assignment-row input {
  width: 100%;
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

.color-field,
.priority-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.color-field input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check-line input {
  width: 18px;
  height: 18px;
}

.job-card,
.map-card,
.survey-card,
.submission-card,
.site-result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.job-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.job-title {
  font-weight: 850;
  font-size: 16px;
}

.job-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.job-description {
  flex-basis: 100%;
  color: var(--text);
  line-height: 1.35;
}

.pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 750;
  padding: 4px 9px;
  font-size: 12px;
}

.pill.warn {
  color: #6b3d00;
  background: #fff1cd;
  border-color: #efc46d;
}

.pill.ok {
  color: #084723;
  background: #dff2e4;
  border-color: #9fcfae;
}

.pill.blue {
  color: #0c3e63;
  background: #e0eff8;
  border-color: #9bc3dc;
}

.pill.danger {
  color: #781f1f;
  background: #fde2e2;
  border-color: #e3a1a1;
}

.release-readiness-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.release-readiness-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.release-readiness-row.ok {
  border-color: #b7d8c0;
  background: #f7fbf7;
}

.release-readiness-row.warn {
  border-color: #efc46d;
  background: #fffaf0;
}

.release-readiness-row.blocker {
  border-color: #e3a1a1;
  background: #fff7f7;
}

.release-readiness-row p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-filter-band {
  margin-bottom: 16px;
}

.dashboard-filter-band .quick-search {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.35fr);
  margin-bottom: 0;
  align-items: end;
}

.lookup-job-hints {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.lookup-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.projects-layout,
.job-page-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  align-items: start;
}

.site-result {
  cursor: pointer;
}

.site-result:hover,
.site-result.active,
.map-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(17, 107, 58, 0.11);
}

.detail-table {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-row-stack {
  grid-template-columns: 1fr;
}

.detail-key {
  color: var(--muted);
  font-weight: 850;
}

.detail-value {
  min-width: 0;
}

.site-job-line {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbf7;
}

.site-job-line + .site-job-line {
  margin-top: 10px;
}

.site-job-line span {
  display: block;
  color: var(--muted);
}

.site-job-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.mini-map {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(201, 219, 115, 0.42), rgba(255, 255, 255, 0.12) 45%),
    #edf4e9;
  margin-bottom: 16px;
}

.mini-road {
  position: absolute;
  width: 130%;
  height: 40px;
  left: -12%;
  top: 44%;
  transform: rotate(-10deg);
  background: #fff;
  border-top: 4px dashed #bdcbb7;
  border-bottom: 4px dashed #bdcbb7;
}

.mini-line {
  position: absolute;
  width: 45%;
  height: 3px;
  left: 27%;
  top: 50%;
  transform: rotate(-22deg);
  background: var(--brand);
}

.mini-marker {
  position: absolute;
  display: grid;
  gap: 4px;
  justify-items: center;
  font-weight: 850;
  color: var(--ink);
}

.mini-marker span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  border: 7px solid var(--brand);
  box-shadow: 0 8px 18px rgba(17, 107, 58, 0.22);
}

.access-marker {
  left: 24%;
  top: 56%;
}

.tower-marker {
  right: 24%;
  top: 30%;
}

.tower-marker span {
  border-color: #c87914;
}

.mini-map-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.map-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
}

.map-card h3,
.survey-card h3 {
  font-size: 17px;
}

.project-map-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf4;
}

.project-map-art {
  min-height: 170px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(200, 219, 115, 0.5), rgba(255, 255, 255, 0.18) 55%),
    #eaf1e5;
}

.project-route {
  position: absolute;
  width: 62%;
  height: 4px;
  left: 18%;
  top: 49%;
  transform: rotate(-14deg);
  background: var(--brand);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.project-dot {
  position: absolute;
  min-width: 30px;
  min-height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 4px 7px;
  background: #fff;
  border: 4px solid var(--brand);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(17, 107, 58, 0.18);
}

.dot-1 { left: 16%; top: 54%; }
.dot-2 { left: 36%; top: 34%; }
.dot-3 { left: 55%; top: 48%; }
.dot-4 { left: 70%; top: 30%; }
.dot-5 { left: 78%; top: 62%; }

.map-filter-band {
  margin-bottom: 16px;
}

.map-control-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(260px, 0.45fr) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.map-stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.map-stat {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf4;
}

.map-stat strong {
  font-size: 20px;
}

.map-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.offline-outbox {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.outbox-stat-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.outbox-actions {
  justify-content: flex-start;
}

.location-status {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.map-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.map-main-band {
  min-width: 0;
}

.leaflet-map {
  min-height: min(62vh, 620px);
  height: 560px;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eaf1e5;
  touch-action: none;
}

.map-loading,
.map-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.leaflet-popup-content {
  display: grid;
  gap: 6px;
  min-width: 190px;
  color: var(--ink);
}

.leaflet-popup-content span {
  color: var(--muted);
  font-size: 13px;
}

.leaflet-popup-button {
  min-height: 34px;
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.leaflet-popup-button.complete-ready {
  background: #0fcf78;
  color: #082214;
  box-shadow: 0 0 0 3px rgba(15, 207, 120, 0.22);
}

.map-job-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

.map-job-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.map-job-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(17, 107, 58, 0.13);
}

.map-site-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #f7faf4;
}

.map-job-marker {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--marker-color, var(--brand));
  box-shadow: 0 0 0 4px rgba(17, 107, 58, 0.12);
}

.map-job-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.map-job-actions .button {
  min-height: 36px;
  padding: 8px 10px;
}

.flag-control {
  min-height: 36px;
  display: inline-grid;
  grid-template-columns: auto minmax(118px, 1fr);
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 800;
  color: var(--muted);
}

.flag-control select {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.static-map-fallback {
  height: 100%;
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
}

.static-map-canvas {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background:
    linear-gradient(22deg, transparent 44%, rgba(255, 255, 255, 0.85) 45%, rgba(255, 255, 255, 0.85) 49%, transparent 50%),
    linear-gradient(150deg, rgba(200, 219, 115, 0.58), rgba(255, 255, 255, 0.12) 62%),
    #eaf1e5;
}

.static-map-point {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 4px 8px;
  background: #fff;
  border: 4px solid var(--marker-color, var(--brand));
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(17, 107, 58, 0.18);
  cursor: pointer;
}

.static-map-point.active {
  box-shadow: 0 0 0 5px rgba(17, 107, 58, 0.2), 0 8px 18px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%) scale(1.08);
}

.static-map-user-point {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 4px solid #1d4ed8;
  background: #bfdbfe;
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.18);
  z-index: 3;
}

.static-map-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.static-map-note span {
  color: var(--muted);
  font-size: 13px;
}

.compact-head {
  margin-top: 10px;
}

.project-job-list,
.update-list {
  display: grid;
  gap: 10px;
}

.project-job-card .header-actions {
  justify-content: flex-end;
}

.compact-card {
  margin-top: 10px;
}

.closeout-controls {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.closeout-mode-row,
.closeout-date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.closeout-date-row .field {
  min-width: min(280px, 100%);
}

.closeout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.closeout-day-list {
  display: grid;
  gap: 12px;
}

.closeout-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.closeout-day-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.closeout-day-card.active,
.closeout-day-card:hover {
  border-color: var(--brand);
  box-shadow: inset 0 -4px 0 rgba(19, 201, 118, 0.28);
}

.closeout-month-grid .closeout-day-card {
  min-height: 148px;
}

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

.closeout-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf4;
}

.closeout-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.closeout-item.invoiced {
  opacity: 0.78;
}

.day-note-preview {
  margin: 0;
}

.receipt-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.closeout-readiness {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.invoice-packet-history {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

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

.invoice-packet-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.packet-main,
.packet-meta-grid {
  min-width: 0;
}

.packet-main {
  display: grid;
  gap: 4px;
}

.packet-main span {
  color: var(--muted);
  font-size: 13px;
}

.packet-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.packet-meta-grid span {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf4;
  color: var(--muted);
  font-size: 12px;
}

.packet-meta-grid strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.packet-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 18, 11, 0.54);
}

.invoice-dialog {
  position: relative;
  width: min(1120px, 96vw);
  max-height: 92vh;
  display: grid;
  gap: 12px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #eef4eb;
  box-shadow: 0 24px 80px rgba(7, 23, 14, 0.34);
  padding: 18px;
}

.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.invoice-paper {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid #c8d8cc;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--brand);
}

.invoice-header h2 {
  margin: 4px 0;
  font-size: 28px;
}

.invoice-label {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-id-box {
  min-width: 220px;
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: end;
  color: var(--muted);
}

.invoice-id-box strong {
  color: var(--ink);
  font-size: 18px;
}

.invoice-party-grid,
.invoice-summary-grid,
.invoice-note-grid {
  display: grid;
  gap: 12px;
}

.invoice-party-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-party-grid > div,
.invoice-note-grid > div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf4;
}

.invoice-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.invoice-summary-grid > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef8ef;
}

.invoice-summary-grid strong {
  display: block;
  font-size: 24px;
}

.invoice-summary-grid span,
.invoice-note-grid span,
.invoice-party-grid span {
  color: var(--muted);
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.invoice-table th,
.invoice-table td {
  border: 1px solid #cbd8ce;
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.invoice-table th {
  background: #e8f3e9;
  color: var(--ink);
}

.invoice-note-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

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

.readiness-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(90px, auto) minmax(220px, 1.4fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.readiness-row.warn {
  box-shadow: inset 4px 0 0 #f6b73c;
}

.readiness-row.info {
  box-shadow: inset 4px 0 0 #6aa9ff;
}

.survey-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.survey-single-layout {
  grid-template-columns: 1fr;
}

.survey-card {
  cursor: pointer;
}

.survey-card.active,
.survey-card:hover {
  border-color: var(--brand);
}

.survey-form {
  display: grid;
  gap: 14px;
}

.question-block {
  display: grid;
  gap: 8px;
}

.question-label {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.question-block label {
  font-weight: 850;
}

.required-mark {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  background: #fff4d6;
  border: 1px solid #e6b852;
  color: #6c4b00;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 850;
}

.photo-input {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #f8fbf5;
  color: var(--brand-dark);
  cursor: pointer;
}

.photo-input input {
  max-width: min(100%, 420px);
}

.radio-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
}

.radio-pill input {
  width: auto;
}

.status-line {
  min-height: 22px;
  color: var(--brand-dark);
  font-weight: 800;
}

.empty {
  color: var(--muted);
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
}

.hide {
  display: none !important;
}

.type-option-hidden {
  display: none !important;
}

@media (max-width: 960px) {
  body {
    background: var(--bg);
  }

  .hero-band,
  .dashboard-grid,
  .dashboard-filter-band .quick-search,
  .lookup-layout,
  .projects-layout,
  .map-control-grid,
  .map-page-layout,
  .closeout-layout,
  .job-page-layout,
  .project-map-panel,
  .admin-project-grid,
  .admin-review-grid,
  .launch-check-grid,
  .invoice-packet-card,
  .invoice-party-grid,
  .invoice-note-grid,
  .survey-layout,
  .admin-layout,
  .form-grid-two,
  .project-survey-row,
  .question-options-grid {
    grid-template-columns: 1fr;
  }

  .invoice-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-header {
    flex-direction: column;
  }

  .invoice-id-box {
    justify-items: start;
  }

  .invoice-paper {
    padding: 18px;
    overflow-x: auto;
  }

  .invoice-dialog {
    padding: 12px;
  }

  .packet-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .packet-actions {
    justify-content: stretch;
  }

  .packet-actions .button {
    flex: 1;
  }

  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-shell.nav-open,
  .portal-shell.nav-closed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(315px, 88vw);
    height: 100vh;
    z-index: 50;
    padding: 14px;
    gap: 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 18px 0 46px rgba(7, 23, 14, 0.34);
  }

  .sidebar .brand-lockup {
    align-items: flex-start;
  }

  .sidebar .brand-mark {
    width: 34px;
    height: 34px;
  }

  .sidebar .brand-mark::before {
    top: 10px;
  }

  .sidebar .brand-mark::after {
    top: 19px;
  }

  .sidebar .brand-title {
    max-width: 190px;
    font-size: 16px;
  }

  .sidebar .brand-subtitle {
    display: block;
  }

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

  .nav-button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    text-align: left;
    padding: 10px 12px;
  }

  .sidebar-foot {
    display: grid;
    gap: 8px;
    margin-top: auto;
  }

  .user-chip {
    padding: 10px;
  }

  .user-chip span {
    display: block;
  }

  .sidebar-foot .button {
    min-height: 40px;
    padding: 10px 12px;
    white-space: nowrap;
  }

  .portal-shell.nav-open .panel-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    border: 0;
    background: rgba(9, 32, 20, 0.28);
  }

  .portal-shell.settings-open .panel-backdrop {
    z-index: 60;
    background: rgba(9, 32, 20, 0.36);
  }

  .content-header {
    flex-direction: column;
    margin-bottom: 14px;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .content {
    padding-top: 16px;
  }

  .section-band {
    padding: 14px;
  }

  .admin-full {
    grid-column: auto;
  }

  .admin-form-wide {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-mini-row.check-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-mini-row.check-row span,
  .admin-mini-row.check-row .button {
    grid-column: 2;
  }

  .flag-control {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .topbar,
  .hero-band,
  .content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-shell {
    min-height: auto;
  }

  .hero-band {
    gap: 18px;
    padding-top: 26px;
  }

  .hero-copy h1 {
    font-size: 42px;
    line-height: 1;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .hero-metrics,
  .quick-search,
  .map-stat-row,
  .outbox-stat-row,
  .basket-assignment-row,
  .closeout-month-grid,
  .closeout-item,
  .job-card,
  .map-card,
  .map-job-card,
  .site-job-line,
  .admin-card,
  .project-progress-card > summary,
  .readiness-row,
  .question-row,
  .assignment-row {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    gap: 9px;
  }

  .login-panel {
    box-shadow: 0 12px 28px rgba(25, 42, 25, 0.12);
  }

  .login-visual {
    min-height: 120px;
    padding: 12px;
  }

  .login-form {
    padding: 14px;
  }

  .leaflet-map {
    height: 420px;
    min-height: 420px;
  }

  .map-job-list {
    max-height: none;
  }

  .map-job-actions {
    grid-column: 1;
  }

  .portal-shell {
    min-height: 100vh;
  }

  .sidebar {
    padding: 9px;
  }

  .nav-list {
    margin-left: 0;
    margin-right: 0;
  }

  .nav-button {
    min-height: 40px;
    font-size: 15px;
  }

  .sidebar-foot {
    display: grid;
    grid-template-columns: 1fr;
  }

  .portal-top-rail {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .portal-top-rail > .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .content-header h2 {
    font-size: 34px;
  }

  .content-header p {
    font-size: 15px;
  }

  .header-actions,
  .job-card .header-actions {
    width: 100%;
  }

  .header-actions .button,
  .job-card .header-actions .button {
    flex: 1 1 0;
  }

  .job-card .header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .site-job-actions,
  .project-job-card .header-actions {
    justify-content: stretch;
  }

  .site-job-actions .button,
  .project-job-card .header-actions .button {
    flex: 1 1 auto;
  }

  .admin-card-actions {
    justify-content: stretch;
  }

  .setup-code-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-card-actions .button {
    flex: 1 1 auto;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head .button {
    width: 100%;
  }

  .job-meta {
    gap: 6px;
  }

  .survey-form .button.primary {
    width: 100%;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .mini-map-caption {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .brand-title {
    font-size: 15px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .metric {
    padding: 11px;
  }

  .content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .section-band,
  .job-card,
  .map-card,
  .survey-card,
  .submission-card,
  .site-result {
    padding: 12px;
  }

  .sidebar-foot {
    grid-template-columns: 1fr;
  }

  .sidebar-foot .button {
    width: 100%;
  }
}
