/* DA Notice — mobile-first stylesheet.
   Base styles target 375px (smallest modern phone).
   Scale up with min-width media queries only.
   Touch target floor: 44px (Apple HIG). Input font-size floor: 16px (prevents iOS zoom).
   Default skin: dark navy (blueprint). Light mode is the [data-theme="light"] override. */

/* ── Variables ──────────────────────────────────────────────────── */

:root {
  --fg:          #edf2f8;   /* primary text — light on navy */
  --bg:          #131c2b;   /* page background — deep navy */
  --white:       #1c2a3e;   /* card / surface — slightly lighter navy */
  --accent:      #d4692a;   /* copper-orange */
  --accent-dark: #b85520;
  --muted:       #8a9eb8;   /* secondary text — steel blue-grey */
  --border:      #2a3a52;   /* dividers — mid-navy */
  --radius:      6px;
  --touch:       44px;      /* minimum tap target height */
}

[data-theme="light"] {
  --fg:          #1a2230;
  --bg:          #ede8d8;   /* warm limestone page background */
  --white:       #f5f0e6;   /* warm sand card / surface */
  --accent:      #d4692a;   /* copper — unchanged */
  --accent-dark: #b85520;
  --muted:       #6b5e4a;   /* warm brown-grey — matches sand ground */
  --border:      #d4c8b0;   /* warm sandy border */
}

/* ── Reset ──────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────────────── */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;         /* never go below 16 — iOS will zoom inputs below this */
  line-height: 1.55;
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }

img { display: block; max-width: 100%; }

h1 { font-size: 1.65rem; line-height: 1.2; margin-bottom: 0.75rem; }
h2 { font-size: 1.2rem;  line-height: 1.3; margin-bottom: 0.6rem; }
h3 { font-size: 1rem;    line-height: 1.3; }

/* ── Layout ─────────────────────────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
}

.logo {
  height: 56px;
  width: auto;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  padding: 0 0.25rem;
}

main {
  padding: 1.25rem 1rem;
  max-width: 760px;
  margin: 0 auto;
}

/* Extra bottom padding on LGA pages for sticky CTA bar */
main.lga-page {
  padding-bottom: 5rem;
}

section {
  margin-bottom: 2.5rem;
}

footer {
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--white);
}

footer a { color: var(--muted); }

/* ── Utilities ──────────────────────────────────────────────────── */

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.note {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
}

.fine {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.5rem;
}

.meta {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

/* ── CTA button ─────────────────────────────────────────────────── */

.cta,
button[type=submit],
.signup button {
  display: block;            /* full-width on mobile */
  width: 100%;
  min-height: var(--touch);
  background: var(--accent);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  touch-action: manipulation;
  margin-top: 0.75rem;
}

.cta:hover,
button[type=submit]:hover,
.signup button:hover {
  background: var(--accent-dark);
}

/* ── Hero ───────────────────────────────────────────────────────── */

.hero {
  padding: 1.5rem 0 0.5rem;
}

.hero h1 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

/* ── DA list ────────────────────────────────────────────────────── */

.da-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.da-list li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.da-list strong {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.da-link {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.35rem;
  min-height: var(--touch);
  line-height: var(--touch);
}

/* ── Signup form ────────────────────────────────────────────────── */

.signup form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.signup label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.95rem;
  gap: 0.3rem;
}

/* 16px floor prevents iOS auto-zoom on focus */
.signup input,
.signup select,
input[type=text],
input[type=tel],
select {
  font-size: 16px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--fg);
  min-height: var(--touch);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

/* Arrow SVG colour matches --muted in dark mode (#8a9eb8) */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a9eb8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* ── Area selector ──────────────────────────────────────────────── */

.area-selector {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.area-selector legend {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  width: 100%;
  background: var(--bg);
}

.radio-label {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  min-height: 64px;      /* fatter than --touch */
  cursor: pointer;
  gap: 0.2rem;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.12s, border-color 0.12s;
}

.radio-label:last-of-type {
  border-bottom: 0;
}

/* Visually hidden — state shown by tile background */
.radio-label input[type=radio] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
  white-space: nowrap;
}

/* Selected scope tile */
.radio-label:has(input:checked),
.radio-label.is-selected {
  background: var(--accent);
}

.radio-label span:first-of-type {
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg);
}

.radio-label:has(input:checked) span,
.radio-label.is-selected span {
  color: #ffffff;
}

.radio-hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

.radio-label:has(input:checked) .radio-hint,
.radio-label.is-selected .radio-hint {
  color: rgba(255,255,255,0.8);
}

/* ── Suburb accordion ───────────────────────────────────────────── */

.suburb-panel {
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.postcode-group {
  border-bottom: 1px solid var(--border);
}

.postcode-group:last-child { border-bottom: 0; }

.postcode-toggle {
  width: 100%;
  min-height: var(--touch);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);     /* copper — visible call-to-action */
  border: 0;
  padding: 0 1rem;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.postcode-toggle:active { background: var(--accent-dark); }

.postcode-code {
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
}

.toggle-icon {
  margin-left: auto;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  line-height: 1;
}

.postcode-suburbs {
  padding: 0.6rem 0.75rem 0.75rem;
  background: var(--white);
}

.postcode-suburbs[hidden] { display: none; }

/* ── Suburb tile buttons ────────────────────────────────────────── */

.check-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 56px;
  padding: 0.5rem 0.4rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

/* Visually hidden but accessible — state shown via tile style */
.check-label input[type=checkbox] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
  white-space: nowrap;
}

/* Selected state — CSS :has() + .is-checked JS fallback */
.check-label:has(input:checked),
.check-label.is-checked {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

/* Select-all tile — spans full width above the grid */
.select-all-label {
  justify-content: center;
  border-style: dashed;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  min-height: 44px;
}

.select-all-label:has(input:indeterminate),
.select-all-label.is-indeterminate {
  border-color: var(--accent);
  color: var(--accent);
}

/* Suburb grid — 2 columns, fat tap targets */
.suburb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* ── Trade picker pills ──────────────────────────────────────────── */

.trade-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.trade-picker > legend {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  width: 100%;
  background: var(--bg);
}

.trade-pills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.75rem;
}

.trade-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 56px;
  padding: 0.5rem 0.4rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.trade-pill input[type=radio] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
  white-space: nowrap;
}

.trade-pill:has(input:checked),
.trade-pill.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.trade-hint {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0 0.75rem 0.75rem;
  text-align: center;
  font-style: italic;
}

/* ── Live data badge (landing hero) ─────────────────────────────── */

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.75rem;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.6); }
}

/* ── Sticky CTA bar (mobile LGA page) ──────────────────────────── */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--white);
  border-top: 2px solid var(--accent);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
}

.sticky-cta-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.3;
}

.sticky-cta-text strong {
  display: block;
  color: var(--fg);
  font-size: 0.95rem;
}

.sticky-cta .cta {
  width: auto;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
}

/* ── Landing page: steps ────────────────────────────────────────── */

.steps {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.steps li { line-height: 1.55; }
.steps li strong { display: block; }

/* ── Landing page: pricing ──────────────────────────────────────── */

.pricing {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
}

.price-card { display: flex; flex-direction: column; gap: 0.4rem; }

.price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.price-period { font-size: 0.95rem; color: var(--muted); }

.price-features {
  list-style: none;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.price-features li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.price-features li:last-child { border-bottom: 0; }

.price-features li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

/* ── Landing page: regions ──────────────────────────────────────── */

.region-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.region-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.region-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.badge-live, .badge-soon {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #ffffff;
}

.badge-live { background: #2d7d46; }
.badge-soon { background: var(--muted); }

.region-link {
  display: inline-block;
  min-height: var(--touch);
  line-height: var(--touch);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

/* ── Landing page: FAQ ──────────────────────────────────────────── */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-list dt {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.faq-list dd {
  color: var(--muted);
  line-height: 1.6;
}

/* ── Auth pages ─────────────────────────────────────────────────── */

.auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 2rem 0;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.auth-icon {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

/* Dark-first: dark red. Light override below. */
.auth-error {
  background: #2d1515;
  border: 1px solid #6b2020;
  border-radius: var(--radius);
  color: #f08080;
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.95rem;
  gap: 0.3rem;
}

/* ── Member pages (my-feed, my-pipeline) ───────────────────────── */

main.member-page {
  padding-bottom: 3rem;
}

.member-hero {
  padding: 1.25rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.member-hero h1 {
  margin-bottom: 0.3rem;
}

.member-nav {
  display: flex;
  gap: 0;
  margin-top: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.member-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.member-nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── DA cards (member feed) ─────────────────────────────────────── */

.da-cards {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.da-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.da-card--saved {
  border-left: 3px solid var(--accent);
}

/* Tappable block — address + desc + date */
.da-card-link {
  display: block;
  padding: 0.9rem 1rem 0.6rem;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.da-card-link:active {
  background: var(--bg);
}

.da-card-address {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fg);
  margin-bottom: 0.3rem;
}

/* 2-line description clamp */
.da-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 0.3rem;
}

.da-card-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Priority star — shown for SMS-prioritised DAs */
.da-priority-star {
  color: #c9a227;
  font-size: 0.82rem;
  margin-right: 0.2rem;
}

/* Footer row — badge + pipeline link, or save button */
.da-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem 0.65rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
}

/* "Pipeline →" text link in the foot */
.da-card-pipeline-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
}

.da-card-pipeline-link:hover {
  text-decoration: underline;
}

/* Save button in foot — compact, not full-width */
.da-card-foot .btn-save {
  min-height: 36px;
  padding: 0 1rem;
  font-size: 0.88rem;
}

/* Legacy — kept for pipeline cards and other pages */
.da-card-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

/* ── Stage badge ────────────────────────────────────────────────── */

.stage-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #ffffff;
}

.stage-badge--saved   { background: #2d7d46; }
.stage-badge--chasing { background: #e67e22; }
.stage-badge--quoted  { background: #2980b9; }
.stage-badge--done    { background: var(--muted); }

/* ── Stage control buttons ──────────────────────────────────────── */

.stage-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.inline-form {
  display: inline;
}

.btn-save,
.btn-stage,
.btn-skip,
.btn-remove {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--fg);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
}

.btn-save {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-save:hover    { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-stage:hover   { background: var(--bg); }

/* Dark-first: dark red hover. Light override below. */
.btn-skip:hover,
.btn-remove:hover  { background: #2d1515; border-color: #6b2020; color: #f08080; }

/* ── Empty state ────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.empty-state p { margin-bottom: 0.5rem; }

/* ── Pipeline stage sections ────────────────────────────────────── */

.pipeline-stage {
  margin-bottom: 2rem;
}

.pipeline-stage-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

.stage-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.pipeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pipeline-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.pipeline-card-body {
  margin-bottom: 0.75rem;
}

/* ── Contacts ───────────────────────────────────────────────────── */

.contact-list {
  list-style: none;
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.contact-call {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: none;
}

.contact-note {
  font-size: 0.8rem;
  color: var(--muted);
  padding-left: 1.4rem;
}

.add-contact {
  margin: 0.5rem 0;
}

.add-contact-toggle {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  min-height: var(--touch);
  display: flex;
  align-items: center;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.add-contact-toggle::-webkit-details-marker { display: none; }

.contact-form {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-form input {
  font-size: 16px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--fg);
  min-height: 40px;
  width: 100%;
  -webkit-appearance: none;
}

.contact-form button {
  background: var(--fg);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  min-height: var(--touch);
  width: 100%;
}

/* ── Subscriber banner (on public LGA pages) ────────────────────── */

/* Dark-first: dark green. Light override below. */
.subscriber-banner {
  background: #1a2e1a;
  border: 1px solid #2d5a2d;
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #7fc97f;
}

.subscriber-banner a {
  color: #7fc97f;
  font-weight: 600;
}

/* ── Thanks / confirmation pages ────────────────────────────────── */

.thanks-wrap {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 2rem 0;
  gap: 0.75rem;
}

/* ── Raw DA volume section (landing page below-fold pitch) ──────── */

.raw-volume {
  border-top: 2px solid var(--border);
  padding-top: 2rem;
}

.raw-volume-header {
  margin-bottom: 1.25rem;
}

.raw-volume-count {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--fg);
  margin-bottom: 0.4rem;
}

.raw-volume-number {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  display: inline;
}

.raw-volume-hook {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Dense raw DA list — intentionally data-dump in feel */
.raw-da-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.raw-da-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.4;
  background: var(--white);    /* card surface — creates readable rows on dark bg */
}

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

.raw-da-item:nth-child(even) {
  background: var(--bg);       /* alternating stripe — subtle contrast both modes */
}

.raw-da-address {
  color: var(--fg);
  flex: 1;
  min-width: 0;
  /* single-line truncate on small screens */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raw-da-date {
  color: var(--muted);
  font-size: 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.raw-volume-more {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  padding: 0.5rem 0 0.75rem;
}

.raw-volume-cta {
  text-align: center;
  padding: 1.25rem 0 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.raw-volume-cta p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0;
}

/* ── Back link ──────────────────────────────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  -webkit-tap-highlight-color: transparent;
}

.back-link:hover { color: var(--fg); }

/* ── DA detail page ─────────────────────────────────────────────── */

main.da-detail-page {
  padding-bottom: 3rem;
}

.da-hero {
  padding: 0.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.da-hero-address {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.da-hero-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.da-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
}

.da-meta-row .meta {
  display: inline;
  margin-top: 0;
}

/* ── Address action strip (Copy + Navigate) ─────────────────────── */

.da-addr-actions {
  display: flex;
  gap: 0.5rem;
  margin: 0.65rem 0 0.85rem;
  flex-wrap: wrap;
}

.addr-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--fg);
  transition: background 0.1s, color 0.1s;
}

.addr-btn-icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}

.addr-btn--copy:active {
  background: var(--bg);
}

.addr-btn--nav {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.addr-btn--nav:hover,
.addr-btn--nav:active {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #ffffff;
}

/* ── Section labels ─────────────────────────────────────────────── */

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

/* ── Pipeline state row (DA detail page) ────────────────────────── */

.da-pipeline {
  margin-bottom: 1.5rem;
}

.pipeline-state {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

/* Dark-first: bright gold. Light override below. */
.won-msg {
  font-size: 1rem;
  font-weight: 700;
  color: #ffd700;
}

/* ── Won stage — badge, card, button ────────────────────────────── */

.stage-badge--won {
  background: #c9a227;
}

/* Dark-first: dark gold bg. Light override below. */
.pipeline-card--won {
  border-left: 3px solid #c9a227;
  background: #1e1c00;
}

.btn-stage--won {
  background: #c9a227;
  color: #ffffff;
  border-color: #c9a227;
}

.btn-stage--won:hover {
  background: #a8861e;
  border-color: #a8861e;
}

/* ── Contacts on DA detail ──────────────────────────────────────── */

.da-contacts {
  margin-bottom: 1.5rem;
}

/* Full-width tap-to-call button on DA detail page */
.contact-call-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 52px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 0.35rem;
}

.contact-call-btn:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

.contact-call-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-call-name {
  flex: 1;
}

/* ── Add contact (DA detail) ────────────────────────────────────── */

.da-add-contact {
  margin-bottom: 1.5rem;
}

/* ── Non-member signup CTA (DA detail) ─────────────────────────── */

.da-signup-cta {
  margin-bottom: 1.5rem;
}

.signup-cta-card {
  background: var(--white);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.signup-cta-lead {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

/* ── Planning portal link ────────────────────────────────────────── */

.da-portal {
  margin-bottom: 1.25rem;
}

.portal-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.portal-link:hover { text-decoration: underline; }

.portal-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.portal-note strong {
  color: var(--fg);
}

/* ── Share button ────────────────────────────────────────────────── */

.da-share {
  margin-bottom: 1.5rem;
}

/* Inverted button — fg as background, bg as text. Works both modes. */
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 52px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.share-btn:hover {
  opacity: 0.88;
  color: var(--bg);
}

.share-icon {
  font-size: 1.1rem;
}

/* ── Dark mode toggle button ─────────────────────────────────────── */

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 0.5rem;
  min-height: 32px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--fg);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
}

/* ── Settings page ──────────────────────────────────────────────── */

.settings-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  margin-bottom: 1.25rem;
}

.settings-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

/* Read-only account info rows */
.settings-list {
  margin-bottom: 1rem;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

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

.settings-row dt {
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}

.settings-row dd {
  text-align: right;
  color: var(--fg);
}

/* Editable trade form */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.settings-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.btn-settings-save {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1.25rem;
  background: var(--fg);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  width: 100%;
  justify-content: center;
}

.btn-settings-save:hover {
  opacity: 0.85;
}

.settings-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
  line-height: 1.5;
}

/* Navigate with — app picker */
.nav-app-picker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-app-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.nav-app-btn--active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.nav-app-btn:hover:not(.nav-app-btn--active) {
  border-color: var(--accent);
  color: var(--accent);
}

/* Subscription status badge */
.sub-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #ffffff;
}

.sub-status--active    { background: #2d7d46; }
.sub-status--past_due  { background: #e67e22; }
.sub-status--cancelled { background: var(--muted); }
.sub-status--pending   { background: #2980b9; }

/* Manage billing link */
.btn-portal {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 0.75rem;
  touch-action: manipulation;
}

.btn-portal:hover {
  border-color: var(--accent);
}

/* Cancel note */
.settings-cancel-note {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.settings-cancel-note strong {
  color: var(--fg);
}

/* ── Light mode element overrides ───────────────────────────────── */
/* Elements with hard-coded colours that differ between modes.
   All other elements adapt automatically via CSS variables.       */

/* Select dropdown arrow — darker grey for light backgrounds */
[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a7090' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}

/* Postcode toggle active state — stays copper in light mode */
[data-theme="light"] .postcode-toggle:active { background: var(--accent-dark); }

/* Scope radio tiles in light mode */
[data-theme="light"] .radio-label:has(input:checked),
[data-theme="light"] .radio-label.is-selected {
  background: var(--accent);
}

/* Suburb tiles + trade pills — light bg instead of dark */
[data-theme="light"] .check-label,
[data-theme="light"] .trade-pill {
  background: var(--white);
}

[data-theme="light"] .check-label:has(input:checked),
[data-theme="light"] .check-label.is-checked,
[data-theme="light"] .trade-pill:has(input:checked),
[data-theme="light"] .trade-pill.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

[data-theme="light"] .select-all-label:has(input:indeterminate),
[data-theme="light"] .select-all-label.is-indeterminate {
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="light"] .postcode-suburbs {
  background: var(--white);
}

[data-theme="light"] .trade-picker > legend {
  background: var(--bg);
}

/* Auth error — red on white */
[data-theme="light"] .auth-error {
  background: #fff3f3;
  border-color: #f5c6c6;
  color: #c0392b;
}

/* Destructive button hover — red on white */
[data-theme="light"] .btn-skip:hover,
[data-theme="light"] .btn-remove:hover {
  background: #fff3f3;
  border-color: #f5c6c6;
  color: #c0392b;
}

/* Subscriber banner — green on white */
[data-theme="light"] .subscriber-banner {
  background: #eef7ee;
  border-color: #b2d8b2;
  color: #2d5a2d;
}

[data-theme="light"] .subscriber-banner a { color: #2d5a2d; }

/* Won stage — cream background in light */
[data-theme="light"] .pipeline-card--won { background: #fffdf0; }

/* Won message — dark gold in light */
[data-theme="light"] .won-msg { color: #b8860b; }

/* ═══════════════════════════════════════════════════════════════════
   TABLET AND UP  (min-width: 600px)
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 600px) {

  h1 { font-size: 2rem; }
  h2 { font-size: 1.35rem; }

  main { padding: 2rem 1.5rem; }

  .hero h1 { font-size: 2.1rem; }

  .cta,
  button[type=submit],
  .signup button {
    display: inline-block;
    width: auto;
  }

  /* Suburb grid goes 2-up at tablet */
  .suburb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.1rem 0.5rem;
  }

  /* Region list side-by-side */
  .region-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  /* Hide sticky CTA bar — form is visible on screen */
  .sticky-cta { display: none; }

  /* Pricing card natural width */
  .pricing { max-width: 380px; }
}

/* ═══════════════════════════════════════════════════════════════════
   BOTTOM TAB BAR  (mobile member nav — replaces .member-nav on mobile)
   ═══════════════════════════════════════════════════════════════════ */

/* Default: not visible (desktop falls through to normal .member-nav) */
.tab-bar { display: none; }

@media (max-width: 899px) {

  /* ─ Bar shell ─────────────────────────────────────────────────── */
  .tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--white);
    border-top: 1px solid var(--border);
    /* Extend into iPhone home indicator area */
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* ─ Each tab item ─────────────────────────────────────────────── */
  .tab-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: var(--touch);   /* 44px Apple HIG floor */
    padding: 0.4rem 0;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.1s;
  }

  .tab-bar-item.active  { color: var(--accent); }
  .tab-bar-item:active  { opacity: 0.65; }

  /* ─ SVG icon wrapper ──────────────────────────────────────────── */
  .tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
  }

  .tab-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* ─ Suppress top member-nav — tab bar replaces it on mobile ───── */
  .member-nav { display: none; }

  /* ─ Push page content above tab bar ──────────────────────────── */
  body:has(.tab-bar) main {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* ─ When tab bar is present, hide top-nav links (logo + toggle remain) ─ */
  body:has(.tab-bar) header nav a {
    display: none;
  }

  /* ─ Lift sticky CTA above tab bar on LGA pages for logged-in users ─ */
  body:has(.tab-bar) .sticky-cta {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP  (min-width: 900px)
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 900px) {

  /* Inter loaded via <link media="(min-width: 900px)"> in base.html */
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }

  h1 { font-size: 2.4rem; }

  .suburb-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h1 { font-size: 2.5rem; }
}
