:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --ink: #182125;
  --muted: #68777f;
  --line: #dce4e7;
  --accent: #287c76;
  --accent-dark: #1d5f5a;
  --warn: #a95d1f;
  --danger: #b33b3b;
  --good: #1f7a4a;
  --shadow: 0 10px 24px rgba(24, 33, 37, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.secondary {
  background: #e7eeee;
  color: var(--ink);
}

button.secondary:hover {
  background: #d8e3e3;
}

button.sort-header {
  min-height: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: left;
  text-transform: inherit;
}

button.sort-header:hover {
  background: transparent;
  color: var(--ink);
}

button.sort-header[data-active="true"]::after {
  content: " " attr(data-direction);
  color: var(--accent);
  font-size: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

select[multiple] {
  min-width: 160px;
  min-height: 92px;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.landing {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(90deg, rgba(12, 27, 28, 0.78), rgba(12, 27, 28, 0.44) 58%, rgba(12, 27, 28, 0.18)),
    url("https://images.unsplash.com/photo-1710857679203-84773ff5e8c1?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: #fff;
}

.landing-nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(20px, 5vw, 64px);
}

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

.landing-brand small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.74);
}

.landing .mark {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.landing-nav button.secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.landing-nav button.secondary:hover {
  background: #fff;
}

.landing-main {
  display: grid;
  align-content: end;
  gap: 42px;
  padding: 40px clamp(20px, 5vw, 64px) clamp(24px, 5vw, 54px);
}

.landing-hero {
  width: min(760px, 100%);
  display: grid;
  gap: 18px;
  padding-bottom: 10vh;
}

.landing-hero .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.landing-hero h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing-copy {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.6;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 6px;
}

.landing-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.landing-legal a {
  color: #fff;
}

.landing-actions button {
  background: #fff;
  color: var(--ink);
}

.landing-actions button:hover {
  background: #e7eeee;
}

.secondary-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
}

.secondary-link:hover {
  background: rgba(255, 255, 255, 0.22);
}

.landing-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
}

.landing-capabilities article {
  min-height: 172px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 22px;
  background: rgba(8, 22, 23, 0.68);
}

.landing-capabilities span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 700;
}

.landing-capabilities h2 {
  margin: 0;
  font-size: 18px;
}

.landing-capabilities p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.5;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #fbfcfc;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 14px;
  border-bottom: 1px solid var(--line);
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: #e7eeee;
  color: var(--ink);
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar h2 {
  margin: 0;
  font-size: 30px;
}

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

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

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #e8c998;
  border-radius: 6px;
  background: #fff7e8;
  color: var(--warn);
}

.alert[data-kind="good"] {
  border-color: #a9d5bc;
  background: #eaf7ef;
  color: var(--good);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.compact-metrics {
  padding: 14px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.compact-metrics .metric {
  min-height: 72px;
  box-shadow: none;
}

.compact-metrics .metric strong {
  font-size: 22px;
}

.metric {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.metric-has-help { position: relative; }
#parkMetricsCards { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.metric-has-help > span { display: inline-block; padding-right: 24px; }
.metric-help {
  position: absolute;
  top: 12px;
  right: 10px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  min-width: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: help;
}
.metric-help:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.metric-tooltip {
  position: fixed;
  z-index: 100;
  width: min(330px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
}
.metric-tooltip[hidden] { display: none; }

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

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.guest-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.guest-panel-head .compact-actions {
  justify-content: flex-start;
}

.panel h3 {
  margin: 0;
  font-size: 16px;
}

.status-block,
.list,
.import-area,
.settings-panel {
  padding: 16px;
}

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

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, max-content));
  gap: 12px;
  align-items: end;
}

.metrics-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(138px, max-content));
}

.metrics-chart-head {
  align-items: flex-start;
}

.metrics-chart-head > div:first-child {
  display: grid;
  gap: 5px;
}

.metrics-series-picker {
  width: min(330px, 100%);
}

.metrics-series-picker select {
  min-width: 240px;
}

.metrics-performance-chart {
  min-height: 390px;
  padding: 14px 18px 18px;
  overflow-x: auto;
}

.metrics-performance-chart svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}

.metrics-grid-line {
  stroke: #e5ebed;
  stroke-width: 1;
}

.metrics-axis-line {
  stroke: #9caaaf;
  stroke-width: 1.25;
}

.metrics-chart-point {
  stroke: #fff;
  stroke-width: 2;
}

.metrics-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding: 4px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.metrics-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.metrics-chart-legend i {
  width: 22px;
  height: 3px;
  border-radius: 999px;
}

.metrics-methodology .status-block p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.metrics-basis-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.metrics-basis-summary span {
  color: var(--muted);
}

.metrics-basis-summary strong {
  color: var(--ink);
}

.checkbox-line {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.checkbox-line input {
  width: auto;
}

.picker-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.picker-field button {
  min-width: 150px;
  justify-content: flex-start;
}

.search {
  max-width: 240px;
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f6f6;
}

.segmented-control button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.segmented-control button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(28, 48, 53, 0.16);
}

.chart {
  position: relative;
  min-height: 360px;
  padding: 14px;
}

.chart svg {
  width: 100%;
  min-height: 360px;
  display: block;
  overflow: visible;
}

.chart-axis-label,
.chart-tick-label {
  fill: var(--muted);
  font-family: inherit;
}

.chart-axis-label {
  font-size: 12px;
  font-weight: 700;
}

.chart-tick-label {
  font-size: 11px;
}

.chart-point {
  cursor: crosshair;
  outline: none;
  stroke: #ffffff;
  stroke-width: 2px;
  transition: r 120ms ease, stroke-width 120ms ease;
}

.chart-point:hover,
.chart-point:focus,
.chart-point.active {
  r: 8px;
  stroke-width: 3px;
}

.chart-assignment {
  cursor: pointer;
  outline: none;
}

.chart-assignment rect {
  transition: stroke 120ms ease, stroke-width 120ms ease, filter 120ms ease;
}

.chart-assignment:hover rect,
.chart-assignment:focus rect,
.chart-assignment.active rect {
  stroke: #29494c;
  stroke-width: 2px;
  filter: brightness(0.98);
}

.chart-assignment-label {
  fill: #29494c;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 164px;
  padding: 10px 12px;
  border: 1px solid #29494c;
  border-radius: 6px;
  background: #173639;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(18, 39, 42, 0.2);
  pointer-events: none;
  transform: translate(-50%, -100%);
}

.chart-tooltip.below {
  transform: translate(-50%, 0);
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip strong {
  margin-bottom: 3px;
  font-size: 15px;
}

.chart-tooltip span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.billing-site-run {
  grid-column: span 2;
  width: max-content;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.billing-site-run > button,
.billing-site-run .picker-field {
  flex: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7eeee;
  color: var(--muted);
  font-size: 12px;
}

.pill.good {
  background: #e5f4ec;
  color: var(--good);
}

.pill.warn {
  background: #fff0df;
  color: var(--warn);
}

.pill.manual {
  background: #e7edf7;
  color: #365b88;
}

.pill.danger {
  background: #ffe9e9;
  color: var(--danger);
}

.section-stack {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.ledger-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.ledger-section h4 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
  font-size: 14px;
}

.ledger-section table {
  min-width: 860px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.meter-segment-stack {
  display: grid;
  gap: 8px;
}

.meter-segment {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.meter-segment:first-child {
  padding-top: 0;
  border-top: 0;
}

.meter-segment-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 12px;
}

.meter-segment-head span {
  color: var(--muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -1px;
}

.legend-dot.actual {
  background: var(--accent);
}

.legend-dot.manual {
  background: #466c9b;
}

.legend-dot.estimated {
  background: var(--warn);
}

.legend-band {
  width: 18px;
  height: 9px;
  display: inline-block;
  margin-right: 6px;
  border: 1px solid #aebdc0;
  border-radius: 2px;
  background: #d8ebe7;
  vertical-align: 0;
}

.evidence {
  display: grid;
  gap: 4px;
}

.evidence small,
.stacked small {
  display: block;
  color: var(--muted);
}

.stacked {
  display: grid;
  gap: 3px;
}

.billing-review-table {
  min-width: 1120px;
}

.billing-guest-row td {
  background: #fbfdfc;
  border-top: 1px solid var(--line);
}

.billing-total-row td {
  background: var(--soft);
  border-top: 2px solid var(--line);
  color: var(--ink);
  font-size: 0.95rem;
}

.billing-total-row span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  margin-top: 3px;
}

.billing-stay-stack {
  display: grid;
  gap: 10px;
  min-width: 280px;
}

.billing-stay-block {
  display: grid;
  gap: 4px;
}

.stay-block-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}

.stay-block-head span,
.reading-line {
  color: var(--muted);
  font-size: 13px;
}

.reading-line {
  display: flex;
  gap: 6px;
  line-height: 1.35;
}

.reading-line strong {
  color: var(--ink);
}

.stay-divider {
  height: 1px;
  margin-top: 6px;
  background: var(--line);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(24, 33, 37, 0.42);
}

.modal-panel {
  width: min(720px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-history-modal {
  width: min(820px, 100%);
}

.usage-email-modal {
  width: min(520px, 100%);
}

.manual-reading-modal {
  overflow-y: auto;
}

.manual-reading-modal .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: var(--surface);
}

.usage-email-modal-body {
  display: grid;
  gap: 12px;
  padding: 18px 16px;
}

.usage-email-modal-body label,
.usage-email-modal-body input {
  width: 100%;
}

.one-time-email-notice {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #c9ded9;
  border-radius: 6px;
  background: #eff8f5;
  color: var(--ink);
}

.one-time-email-notice span {
  color: var(--muted);
  line-height: 1.45;
}

.manual-reading-assignment {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #bfd6d2;
  border-radius: 6px;
  background: #f4f9f8;
}

.manual-reading-assignment.invalid {
  border-color: #dfb4aa;
  background: #fff5f1;
}

.manual-reading-assignment-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.manual-reading-assignment-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.manual-reading-assignment-values div {
  display: grid;
  gap: 2px;
}

.manual-reading-assignment-values span {
  color: var(--muted);
  font-size: 12px;
}

.manual-reading-assignment-values strong {
  font-size: 18px;
}

.manual-reading-check {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #bad8c5;
  border-radius: 6px;
  background: #f0f8f3;
  line-height: 1.4;
}

.manual-reading-check.warning {
  border-color: #e3c277;
  background: #fff8e8;
}

.manual-reading-check.error {
  border-color: #dfb4aa;
  background: #fff5f1;
}

.manual-reading-check ul {
  margin: 0;
  padding-left: 20px;
}

.manual-reading-check .manual-reading-context {
  color: var(--muted);
  font-size: 13px;
}

.one-time-email-success-body {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 34px 20px 30px;
  text-align: center;
}

.one-time-email-success-body strong {
  color: #17643c;
  font-size: 22px;
}

.one-time-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.usage-email-control {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 120px;
}

.usage-email-toggle.subscribed {
  background: #dff3e8;
  border-color: #acd9bf;
  color: #17643c;
}

.usage-email-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.mapping-history-modal-table {
  min-width: 640px;
}

.site-picker-actions,
.modal-actions {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-actions-split {
  justify-content: space-between;
}

.modal-action-group {
  display: flex;
  gap: 10px;
}

.site-choice-grid {
  max-height: 420px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
  padding: 16px;
}

.site-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
}

.site-choice input {
  width: auto;
}

.import-area {
  display: grid;
  gap: 14px;
}

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

.compact-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compact-actions .search {
  min-width: 220px;
}

.settings-panel {
  max-width: 420px;
  display: grid;
  gap: 14px;
}

@media (max-width: 900px) {
  .landing {
    background:
      linear-gradient(rgba(12, 27, 28, 0.74), rgba(12, 27, 28, 0.62)),
      url("https://images.unsplash.com/photo-1710857679203-84773ff5e8c1?auto=format&fit=crop&w=1200&q=80") center/cover;
  }

  .landing-main {
    align-content: start;
    padding-top: 48px;
  }

  .landing-hero {
    padding-bottom: 24px;
  }

  .landing-capabilities {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .topbar,
  .grid-2 {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .landing-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-nav button {
    width: 100%;
  }

  .landing-hero h1 {
    font-size: 42px;
  }

  .landing-actions,
  .landing-actions button,
  .secondary-link {
    width: 100%;
  }

  .secondary-link {
    justify-content: center;
  }

  .main {
    padding: 16px;
  }

  .metrics,
  .toolbar,
  .nav {
    grid-template-columns: 1fr;
  }

  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-site-run .picker-field {
    flex: 1;
  }

  .billing-site-run {
    grid-column: span 1;
    width: 100%;
  }

  .billing-site-run .picker-field button {
    width: 100%;
  }
}
/* Owner financial audit */
.audit-upload { padding: 20px 24px; }
#auditView summary.panel-head { cursor: pointer; }
.audit-upload > label { display: flex; flex-direction: column; gap: 10px; }
.audit-upload input[type="file"] { padding: 12px; border: 1px dashed var(--line, #c9d5d8); border-radius: 8px; width: 100%; }
.audit-upload > button { margin: 14px 12px 0 0; }
.audit-findings { padding: 0 26px 0 44px; margin: 0; }
.audit-finding { padding: 22px 0; border-bottom: 1px solid #dce3e6; }
.audit-finding-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.audit-finding p { line-height: 1.55; margin: 10px 0; }
.audit-finding details { margin-top: 12px; }
.audit-finding summary, .audit-upload summary { cursor: pointer; color: #287c76; font-weight: 600; }
.audit-evidence { margin: 12px 0; max-height: 360px; overflow: auto; border: 1px solid #dce3e6; border-radius: 8px; }
.audit-evidence-row { padding: 12px; border-bottom: 1px solid #dce3e6; font-size: 13px; overflow-wrap: anywhere; }
.audit-evidence-row span { display: inline-block; margin: 2px 12px 2px 0; }
.audit-review { display: grid; grid-template-columns: 180px 1fr; gap: 12px; background: #f2f6f6; padding: 16px; border-radius: 8px; }
.audit-review label { display: flex; flex-direction: column; gap: 6px; }
.audit-review textarea { width: 100%; }
#auditCoverage li { margin-bottom: 8px; line-height: 1.5; }
#auditView .table-wrap { overflow-x: auto; }
@media(max-width: 720px) { .audit-review { grid-template-columns: 1fr; } .audit-finding-heading { flex-direction: column; } }
