/*
 * Awaremate site, 2026-10 redesign.
 * Clyptis family voice (Martian Grotesk display, Commit Mono path labels,
 * Switzer text, rising headlines) on Awaremate's dark atlas palette. Each
 * topic owns one accent; the page glows in it.
 */

@font-face {
  font-family: 'Martian Grotesk';
  src: url('/assets/fonts/martian-grotesk-vf.woff2') format('woff2-variations');
  font-weight: 100 1000;
  font-stretch: 75% 200%;
  font-display: swap;
}

@font-face {
  font-family: 'Commit Mono';
  src: url('/assets/fonts/commit-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Switzer';
  src: url('/assets/fonts/switzer-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Switzer';
  src: url('/assets/fonts/switzer-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Switzer';
  src: url('/assets/fonts/switzer-semibold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #081719;
  --bg-2: #0c1e21;
  --bg-3: #12282c;
  --ink: #eef5f2;
  --ink-2: #b6c8c6;
  --ink-3: #8aa3a1;
  --line: #19302f;
  --line-strong: #2b4647;

  --flood: #b3a6ff;
  --lightning: #8fd0ff;
  --bushfire: #f59a6b;
  --radar: #5fc1e8;
  --transport: #a497ff;
  --fuel: #e7b25b;
  --river: #7fd6c7;
  --caution: #f2c46b;
  --danger: #ff8f9f;
  --ok: #8fe0b8;
  --accent: var(--lightning);

  --font-display: 'Martian Grotesk', 'Switzer', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Switzer', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Commit Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-display: clamp(2.75rem, 1.4rem + 5.6vw, 6.25rem);
  --text-h1: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem);
  --text-h2: clamp(1.75rem, 1.3rem + 1.9vw, 2.875rem);
  --text-lead: clamp(1.125rem, 1.04rem + 0.4vw, 1.375rem);
  --text-label: 0.8125rem;

  --gutter: clamp(1.25rem, 0.6rem + 2.8vw, 2.5rem);
  --section: clamp(3.5rem, 2.4rem + 5vw, 6.5rem);
  --wrap: 78rem;
  --radius-s: 0.625rem;
  --radius-m: 1rem;
  --radius-l: 1.75rem;
  --pill: 999px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 160ms;
  --slow: 650ms;
}

.accent-flood { --accent: var(--flood); }
.accent-lightning { --accent: var(--lightning); }
.accent-bushfire { --accent: var(--bushfire); }
.accent-radar { --accent: var(--radar); }
.accent-transport { --accent: var(--transport); }
.accent-fuel { --accent: var(--fuel); }
.accent-river { --accent: var(--river); }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
  line-height: 1.02;
}

h3 {
  font-size: 1.375rem;
  font-stretch: 104%;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.display {
  font-size: var(--text-display);
  line-height: 0.95;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

.lead {
  max-width: 38em;
  color: var(--ink-2);
  font-size: var(--text-lead);
  line-height: 1.45;
}

.muted {
  color: var(--ink-3);
}

.small {
  font-size: 0.9375rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  color: var(--bg);
  background: var(--ink);
  border-radius: var(--pill);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Path label: every eyebrow reads like a location. */
.path {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.path::before {
  color: var(--accent);
  content: '/';
}

/* Buttons and pills */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  min-height: 44px;
  padding: 0.65rem 1.2rem;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--pill);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button--ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.button svg,
.arrow {
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.text-link:hover {
  text-decoration-color: var(--accent);
}

.store-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.store-badge-link {
  display: block;
  border-radius: 12px;
}

.store-badge-link img {
  width: auto;
  height: 52px;
}

.store-actions--compact .store-badge-link img {
  height: 46px;
}

/* Store buttons follow the visitor's device (class set in <head>): phones see
   only their own store, other devices also get a QR code in the download band. */
.os-ios .store-badge-link[data-store="google"],
.os-android .store-badge-link[data-store="apple"] {
  display: none;
}

.store-qr {
  display: none;
}

.os-other .store-qr {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.store-qr img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
}

.store-qr p {
  max-width: 7.5rem;
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.35;
}

.note {
  margin-top: 1rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand img {
  width: 148px;
  height: auto;
}

.site-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
}

.site-nav a {
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--ink);
}

.header-cta {
  margin-left: auto;
  padding: 0.5rem 1rem;
  min-height: 40px;
  font-size: 0.9375rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

@media (max-width: 900px) {
  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .site-nav a {
    width: 100%;
    padding: 0.85rem 0;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--line);
  }

  .site-header[data-open] .site-nav {
    display: flex;
  }

  .nav-toggle {
    display: grid;
  }

  .header-cta {
    display: none;
  }
}

/* Breadcrumbs */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0;
  margin: 0;
  padding: 1.25rem 0 0;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  list-style: none;
}

.breadcrumbs li {
  white-space: nowrap;
}

.breadcrumbs li:last-child {
  white-space: normal;
}

.breadcrumbs li + li::before {
  margin-inline: 0.6em;
  color: var(--accent);
  content: '/';
}

.breadcrumbs a {
  color: var(--ink-2);
  text-decoration: none;
}

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 6rem) clamp(3rem, 6vw, 5.5rem);
  overflow: clip;
}

.hero::before {
  position: absolute;
  inset: -20% -10% auto 35%;
  z-index: -1;
  height: 110%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 26%, transparent), transparent);
  filter: blur(10px);
  content: '';
  transition: background 900ms var(--ease);
}

.hero-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}

.hero-copy .path {
  margin-bottom: 1.5rem;
}

.hero-copy .lead {
  margin-top: 1.5rem;
}

.hero-copy .store-actions {
  margin-top: 2rem;
}

/* Phone and screenshot switcher */
.phone {
  position: relative;
  width: min(100%, 360px);
  margin-inline: auto;
  aspect-ratio: 720 / 1436;
  overflow: hidden;
  background: #050f11;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line-strong));
  border-radius: 2.6rem;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 7px #0d1a1c;
  transition: border-color 900ms var(--ease);
}

.phone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.switcher [data-slide] {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 700ms var(--ease), transform 900ms var(--ease);
}

.switcher [data-slide][data-active] {
  opacity: 1;
  transform: none;
}

.switcher-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.switcher-tabs button {
  position: relative;
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  overflow: hidden;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
}

.switcher-tabs button[aria-selected='true'] {
  color: var(--ink);
  border-color: var(--accent);
}

.switcher-tabs button[aria-selected='true']::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  content: '';
}

.switcher[data-playing] .switcher-tabs button[aria-selected='true']::after {
  animation: tab-progress 4.2s linear forwards;
}

@keyframes tab-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.phone-caption {
  max-width: 360px;
  margin: 1rem auto 0;
  color: var(--ink-3);
  font-size: 0.875rem;
  text-align: center;
}

/* Live "right now" strip */
.now-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.now-strip > div {
  padding: 1.25rem 1.25rem 1.35rem 0;
}

.now-strip > div + div {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.now-strip .path {
  display: flex;
  margin-bottom: 0.45rem;
}

.now-value {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem);
  font-stretch: 108%;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.now-value a {
  text-decoration: none;
}

@media (max-width: 760px) {
  .now-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .now-strip > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .now-strip > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

/* Marquee */
.marquee {
  display: flex;
  overflow: hidden;
  padding-block: clamp(1.25rem, 3vw, 2.25rem);
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  user-select: none;
}

.marquee ul {
  display: flex;
  flex: none;
  align-items: center;
  min-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.marquee li {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1rem + 3.2vw, 3.5rem);
  font-stretch: 112%;
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
}

.marquee li::after {
  margin-inline: clamp(1rem, 2.5vw, 2.25rem);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.55em;
  font-weight: 400;
  content: '/';
}

@media (prefers-reduced-motion: no-preference) {
  .marquee ul {
    animation: marquee 52s linear infinite;
  }

  .marquee:hover ul {
    animation-play-state: paused;
  }
}

@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* Section heads */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-head .path {
  grid-column: 1 / -1;
}

/* Town finder */
.finder {
  max-width: 44rem;
}

.finder-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 64px;
  padding: 0 0.5rem 0 1.4rem;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  transition: border-color var(--fast) var(--ease);
}

.finder-field:focus-within {
  border-color: var(--accent);
}

.finder-field svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.8;
}

.finder-field input {
  flex: 1;
  min-width: 0;
  padding: 0.9rem 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 1.125rem;
}

.finder-field input::placeholder {
  color: var(--ink-3);
}

.finder-results {
  display: grid;
  gap: 0;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.finder-results a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.finder-results a:hover,
.finder-results a:focus-visible {
  background: var(--bg-2);
}

.finder-results span {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--text-label);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.chips a {
  padding: 0.45rem 0.9rem;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  font-size: 0.9375rem;
  text-decoration: none;
}

.chips a:hover {
  color: var(--ink);
  border-color: var(--accent);
}

/* Layer grid */
.layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 3rem;
}

.layer-grid a {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  padding: 1.6rem 0;
  text-decoration: none;
  border-top: 1px solid var(--line);
}

.layer-grid a:hover h3 {
  color: var(--layer, var(--accent));
}

.layer-grid .icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.45rem;
  color: var(--layer, var(--accent));
  background: color-mix(in srgb, var(--layer, var(--accent)) 12%, transparent);
  border-radius: 0.7rem;
}

.layer-grid .icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layer-grid p {
  margin-top: 0.4rem;
  color: var(--ink-3);
  font-size: 0.9875rem;
}

.layer-grid .arrow {
  margin-top: 0.35rem;
  color: var(--ink-3);
  transition: transform var(--fast) var(--ease);
}

.layer-grid a:hover .arrow {
  color: var(--ink);
  transform: translateX(4px);
}

.tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.12rem 0.5rem;
  color: var(--flood);
  border: 1px solid color-mix(in srgb, var(--flood) 50%, transparent);
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0;
  vertical-align: 0.2em;
}

/* Panels */
.panel {
  position: relative;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.panel--plus {
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, color-mix(in srgb, var(--flood) 22%, transparent), transparent 70%),
    var(--bg-2);
  border-color: color-mix(in srgb, var(--flood) 30%, var(--line));
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.panel h2 + .lead,
.panel h2 + p {
  margin-top: 1.25rem;
}

.ledger {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ledger li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.ledger li span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  line-height: 1.9;
}

.ledger strong {
  display: block;
  font-weight: 600;
}

.ledger em {
  display: block;
  color: var(--ink-3);
  font-style: normal;
  font-size: 0.9375rem;
}

/* Two-column compare (free vs AwarePlus+) */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.compare .panel h3 {
  margin-bottom: 1rem;
}

.compare ul {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compare li {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.6rem;
  color: var(--ink-2);
}

.compare li::before {
  margin-top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  content: '';
}

/* Media gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 54rem;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.gallery figcaption {
  margin-top: 0.75rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}

/* Notice */
.notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2rem;
  padding: 1.5rem 0;
  color: var(--ink-2);
  border-block: 1px solid var(--line);
}

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

/* FAQ accordion */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  flex: none;
  color: var(--accent);
  font-family: var(--font-mono);
  content: '+';
  transition: transform var(--fast) var(--ease);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  max-width: 46rem;
  padding-bottom: 1.4rem;
  color: var(--ink-2);
}

/* CTA band */
.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
}

.cta .lead {
  margin-top: 1rem;
}

/* Footer */
.site-footer {
  padding-block: clamp(3.5rem, 7vw, 6rem) 2rem;
  background: #050f11;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}

.footer-top h2 {
  margin-bottom: 1rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.footer-top a {
  display: block;
  padding: 0.3rem 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-decoration: none;
}

.footer-top a:hover {
  color: var(--ink);
}

.footer-brand p {
  max-width: 22rem;
  margin-top: 1rem;
  color: var(--ink-3);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.5rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border-top: 1px solid var(--line);
}

.footer-bottom a {
  text-decoration: none;
}

/* Prose (independence page) */
.prose {
  max-width: 44rem;
}

.prose h2 {
  margin: 3rem 0 1rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

.prose p + p {
  margin-top: 1rem;
}

.prose p {
  color: var(--ink-2);
}

/* State coverage table */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.coverage-grid > div {
  padding: 1.25rem;
  background: var(--bg);
}

.coverage-grid h3 {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.coverage-grid ul {
  margin: 0;
  padding: 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
  list-style: none;
}

.coverage-grid li {
  padding: 0.2rem 0;
}

/* ── Live river and town pages ─────────────────────────────────────── */
.live-hero {
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4rem);
}

.live-hero-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(2rem, 6vw, 6rem);
}

.live-hero .path {
  margin-bottom: 1.25rem;
}

.live-hero .lead {
  margin-top: 1.25rem;
}

.live-hero .store-actions {
  margin-top: 1.75rem;
}

.live-reading {
  padding: 1.75rem;
  background: var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line-strong));
  border-radius: var(--radius-l);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.live-reading__value {
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 4vw, 4.75rem);
  font-stretch: 112%;
  font-weight: 640;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.live-reading__value--none {
  font-size: 1.9rem;
}

.live-reading__meta {
  margin: 0.75rem 0 1rem;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.live-reading__note {
  margin-top: 0.75rem;
  color: var(--caution);
  font-size: 0.9375rem;
}

.live-chip {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: var(--pill);
  font-size: 0.875rem;
  font-weight: 600;
}

.live-chip--below_minor { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.live-chip--minor { color: var(--caution); background: color-mix(in srgb, var(--caution) 16%, transparent); }
.live-chip--moderate { color: var(--bushfire); background: color-mix(in srgb, var(--bushfire) 18%, transparent); }
.live-chip--major { color: var(--danger); background: color-mix(in srgb, var(--danger) 18%, transparent); }

.live-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.live-levels dt {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.live-levels dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.live-section h2 {
  margin: clamp(2.5rem, 5vw, 4rem) 0 1.25rem;
}

.live-section h2:first-child {
  margin-top: 0;
}

.live-basin {
  font-size: 1.375rem !important;
}

.live-chart {
  margin: 0;
  padding: 1.25rem 1.25rem 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.live-chart svg {
  width: 100%;
  height: auto;
}

.live-chart__grid { stroke: var(--line); stroke-width: 1; }
.live-chart__label { fill: var(--ink-3); font-family: var(--font-mono); font-size: 11px; }
.live-chart__area { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.live-chart__line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; }
.live-chart__level { stroke-width: 1.3; stroke-dasharray: 6 5; }
.live-chart__level--minor { stroke: var(--caution); }
.live-chart__level--moderate { stroke: var(--bushfire); }
.live-chart__level--major { stroke: var(--danger); }
.live-chart__level-label { fill: var(--ink-2); font-family: var(--font-mono); font-size: 11px; }

.live-chart figcaption {
  margin-top: 0.4rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.live-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.live-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.live-table th,
.live-table td {
  padding: 0.8rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.live-table thead th {
  color: var(--ink-3);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
}

.live-table tbody tr:last-child th,
.live-table tbody tr:last-child td {
  border-bottom: 0;
}

.live-table tbody th {
  font-weight: 500;
}

.live-table tbody th a {
  text-decoration: none;
}

.live-table tbody th a:hover {
  text-decoration: underline;
}

.live-table tbody th span {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 400;
}

.live-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.live-muted {
  color: var(--ink-3);
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.5rem;
  border-radius: 50%;
  vertical-align: 1px;
}

.live-dot--below_minor { background: var(--ok); }
.live-dot--minor { background: var(--caution); }
.live-dot--moderate { background: var(--bushfire); }
.live-dot--major { background: var(--danger); }

.live-warnings {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.live-warnings li {
  padding: 1rem 1.1rem;
  background: color-mix(in srgb, var(--caution) 8%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--caution) 35%, var(--line));
  border-radius: var(--radius-m);
}

.live-warnings span {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.live-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

/* Layout fallbacks */
@media (max-width: 900px) {
  .hero-grid,
  .live-hero-grid,
  .panel-grid,
  .section-head,
  .cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    order: 2;
  }

  .layer-grid,
  .compare {
    grid-template-columns: 1fr;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

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

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

  .live-table thead th:nth-child(5),
  .live-table tbody td:nth-child(5) {
    display: none;
  }
}

@media (max-width: 520px) {
  .phone {
    width: min(100%, 300px);
  }

  .gallery {
    gap: 0.75rem;
  }

  .live-table th,
  .live-table td {
    padding: 0.65rem;
    font-size: 0.875rem;
  }
}

/* ── Motion (needs JS: the .js class), skipped for reduced motion ───── */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity var(--slow) var(--ease), transform 0.9s var(--ease);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  .js [data-stagger] > * {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity var(--slow) var(--ease), transform 0.8s var(--ease);
    transition-delay: calc(var(--i, 0) * 60ms);
  }

  .js [data-stagger].is-in > * {
    opacity: 1;
    transform: none;
  }

  .js [data-split] .word > span {
    transform: translateY(108%);
    transition: transform 1s var(--ease);
    transition-delay: calc(var(--i, 0) * 55ms);
  }

  .js [data-split].is-in .word > span {
    transform: none;
  }
}

.word {
  display: inline-block;
  overflow: clip;
  overflow-clip-margin: 0.04em;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  vertical-align: top;
}

.word > span {
  display: inline-block;
}

@media print {
  .site-header,
  .site-footer,
  .store-actions,
  .switcher-tabs {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }
}

/* Switcher slides carry their own caption (e.g. illustrative lightning). */
.phone figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

.phone figcaption {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  z-index: 2;
  max-width: calc(100% - 2rem);
  padding: 0.35rem 0.75rem;
  color: var(--ink-2);
  background: rgba(5, 15, 17, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
  transform: translateX(-50%);
}

/* Principle-style rows (heading left, text right) */
.rows > div {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.rows p {
  color: var(--ink-2);
}

.rows p + p {
  margin-top: 0.9rem;
}

@media (max-width: 900px) {
  .rows > div {
    grid-template-columns: 1fr;
  }
}

/* Hero sizing: three-line headline beside a phone that keeps its tabs in view. */
.hero .display {
  font-size: clamp(2.75rem, 1.6rem + 4.4vw, 5.25rem);
}

@media (min-width: 901px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  }
}

@media (max-width: 900px) {
  .hero .phone {
    width: min(78%, 300px);
  }

  .switcher-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }

  .switcher-tabs button {
    flex: none;
  }
}

.hero .phone {
  width: min(100%, 318px);
}

/* Adjacent sections share one gap, not two. */
.section + .section,
.now-strip + .section {
  padding-top: calc(var(--section) * 0.55);
}

.live-chart {
  max-width: 980px;
}

.live-chart__label,
.live-chart__level-label {
  font-size: 9.5px;
}

.compare--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 44rem;
}

/* Hand-written legal and support pages */
main > .container {
  width: min(100% - 2 * var(--gutter), 46rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 5rem) var(--section);
}

article.prose h1 {
  margin-bottom: 1rem;
  font-size: var(--text-h1);
}

article.prose h2 {
  margin: 2.75rem 0 0.9rem;
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.875rem);
}

article.prose h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.15rem;
}

article.prose p,
article.prose li {
  color: var(--ink-2);
}

article.prose p + p {
  margin-top: 0.9rem;
}

article.prose ul {
  display: grid;
  gap: 0.45rem;
  margin: 0.9rem 0;
  padding-left: 1.2rem;
}

article.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

article.prose strong {
  color: var(--ink);
  font-weight: 600;
}

article.prose code {
  padding: 0.1em 0.35em;
  background: var(--bg-3);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.875em;
}

article.prose .updated {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--text-label);
}

article.prose .callout {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-m);
}
