/*
 * CDS brand tokens.
 * Lime is the logo colour sampled from the wordmark raster; forest green, ink and
 * sage tints come from the cairnsdroneservices WordPress theme; the dark, soft,
 * muted and line values come from the boundary-base-reports report renderer.
 * Fonts stay system-local: the page CSP is default-src 'self' and no field
 * request may reach a third-party host.
 */
:root {
  color-scheme: light;
  --lime: #72cd58;
  --lime-deep: #5cb545;
  --green: #4a7c59;
  --green-strong: #3d6849;
  --green-deep: #176a45;
  --forest: #16251e;
  --forest-deep: #101a15;
  --sage: #9bc2a6;
  --sage-soft: #eef4eb;
  --mist: #eef2ef;
  --paper: #ffffff;
  --canvas: #edf0ee;
  --ink: #232332;
  --body: #465049;
  --muted: #667078;
  --line: #dce2df;
  --good: #176a45;
  --warn: #c17b2a;
  --warn-soft: #f7f2e8;
  --danger: #b95c2d;
  --danger-soft: #f7eee9;
  --shadow: 0 18px 55px rgba(22, 37, 30, .09);
  --radius: 4px;
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--body);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before { content: ""; display: block; height: 5px; background: var(--lime); }
button, input { font: inherit; }
button { touch-action: manipulation; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex;
  width: min(100% - 48px, 1120px);
  min-height: 88px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { width: 268px; max-width: 100%; height: auto; }
.product-name { display: grid; padding-left: 24px; border-left: 1px solid var(--line); text-align: right; }
.product-name span { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.product-name strong { color: var(--ink); font-size: 14px; }

main { width: min(100% - 40px, 920px); margin: 0 auto; padding: 68px 0 80px; }
section + section { margin-top: 38px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.035em; }
h1 { max-width: 720px; margin-bottom: 18px; font-size: clamp(38px, 7vw, 66px); line-height: 1.03; }
h2 { margin-bottom: 8px; font-size: clamp(25px, 4vw, 34px); line-height: 1.15; }
h3 { margin-bottom: 4px; font-size: 19px; }

.intro-copy { margin: 0 auto 42px; text-align: center; }
.intro-copy h1 { margin-right: auto; margin-left: auto; }
.eyebrow { margin-bottom: 8px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lede { max-width: 680px; margin: 0 auto 20px; color: var(--body); font-size: 18px; }
.service-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.service-note span { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--sage-soft); }

.location-card { padding: 36px; border: 1px solid var(--line); border-top: 4px solid var(--lime); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: center; gap: 16px; }
.card-heading .eyebrow { margin-bottom: 3px; }
.step-number { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 50%; background: var(--sage-soft); color: var(--green); font-size: 13px; font-weight: 850; }
.card-help { max-width: 720px; margin: 14px 0 22px 64px; color: var(--muted); font-size: 14px; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

button {
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 760;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
button:hover { transform: translateY(-1px); }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(114, 205, 88, .38); outline-offset: 2px; }
button:disabled { cursor: wait; opacity: .55; transform: none; }
.primary { background: var(--green); color: #fff; }
.primary:hover { background: var(--green-strong); }
.secondary { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; background: var(--forest); color: #fff; }
.secondary:hover { background: var(--forest-deep); }
.locate-button { display: flex; width: 100%; min-height: 56px; align-items: center; justify-content: center; gap: 10px; }
.target-icon { position: relative; width: 17px; height: 17px; border: 2px solid currentColor; border-radius: 50%; }
.target-icon::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: currentColor; }
.divider { display: flex; margin: 22px 0 16px; align-items: center; gap: 14px; color: #8a8f94; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }

form { margin-top: 0; }
.coordinate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
label { display: grid; gap: 6px; color: var(--body); font-size: 12px; font-weight: 750; }
input { width: 100%; min-height: 50px; padding: 10px 13px; border: 1px solid #ccd4cd; border-radius: 2px; background: #fbfcfb; color: var(--ink); }
input:hover { border-color: var(--sage); }
.status { min-height: 24px; margin: 13px 0 -8px; color: var(--muted); font-size: 13px; text-align: center; }
.status.error { color: var(--danger); }

.results { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.result-heading { display: flex; justify-content: space-between; gap: 16px; padding: 30px 32px; border-top: 4px solid var(--lime); border-bottom: 1px solid var(--line); }
.result-heading h2 { margin: 0; font-size: clamp(34px, 7vw, 50px); letter-spacing: .01em; }
.station-name, .alternatives > p, .private-note { color: var(--muted); }
.station-name { margin: 2px 0 0; }
.band { align-self: flex-start; padding: 6px 11px; border-radius: 999px; background: var(--sage-soft); color: var(--good); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.band.caution, .band.warning { background: var(--warn-soft); color: var(--warn); }
.band.beyond { background: var(--danger-soft); color: var(--danger); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: var(--mist); }
.metrics > div { padding: 17px 22px; }
.metrics > div + div { border-left: 1px solid var(--line); }
.metrics span, .copy-row > span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.metrics strong { display: block; margin-top: 3px; color: var(--ink); font-size: 15px; }
.settings { padding: 30px 32px; background: var(--paper); }
.settings-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.settings-title > span { color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy-grid { margin: 19px 0; border-top: 1px solid var(--line); }
.copy-row { display: grid; min-height: 62px; grid-template-columns: 1fr minmax(120px, auto) 64px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.copy-row code { overflow: hidden; color: var(--ink); font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; text-overflow: ellipsis; }
.copy-row button { min-height: 34px; padding: 5px 9px; border-color: #cbd5ce; background: transparent; color: var(--green); font-size: 11px; }
.copy-row button:hover { border-color: var(--green); background: var(--sage-soft); }
.settings > .primary { width: 100%; }
.private-note { margin: 12px 0 0; font-size: 12px; }
.alternatives { padding: 28px 32px 32px; border-top: 1px solid var(--line); background: var(--mist); }
.alternative-list { display: grid; gap: 8px; margin-top: 14px; }
.alternative { display: grid; width: 100%; min-height: 60px; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 13px; border-color: var(--line); background: var(--paper); color: var(--ink); text-align: left; }
.alternative:hover { border-color: var(--lime); }
.alternative strong { font-size: 15px; }
.alternative span { grid-row: span 2; align-self: center; color: var(--green); font-size: 13px; }
.alternative small { color: var(--muted); font-weight: 500; }

.privacy { display: flex; padding: 30px 32px; align-items: flex-start; gap: 18px; border-left: 3px solid var(--lime); background: var(--sage-soft); }
.privacy-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-weight: 850; }
.privacy h2 { margin-bottom: 7px; font-size: 23px; }
.privacy p:last-child { margin: 0; color: #5f6d63; font-size: 14px; }

footer { padding: 36px max(24px, env(safe-area-inset-right)) max(38px, env(safe-area-inset-bottom)); background: var(--forest); color: rgba(255, 255, 255, .7); }
.footer-inner { display: flex; width: min(100%, 1120px); margin: 0 auto; align-items: center; justify-content: space-between; gap: 36px; }
.footer-brand { flex: 0 0 auto; }
.footer-brand img { width: 214px; max-width: 100%; height: auto; }
footer p { max-width: 660px; margin: 0; font-size: 11px; text-align: right; }
footer p strong { color: #fff; }
[hidden] { display: none !important; }

@media (max-width: 640px) {
  .header-inner { width: min(100% - 28px, 1120px); min-height: 74px; }
  .brand img { width: 176px; }
  .product-name span { display: none; }
  .product-name { padding-left: 14px; }
  .product-name strong { max-width: 80px; font-size: 11px; line-height: 1.25; }
  main { width: min(100% - 24px, 920px); padding: 44px 0 54px; }
  .intro-copy { margin-bottom: 30px; }
  .lede { font-size: 16px; }
  .location-card { padding: 24px 20px; }
  .card-heading { gap: 11px; }
  .step-number { width: 40px; height: 40px; flex-basis: 40px; }
  .card-help { margin-left: 0; }
  .coordinate-grid, .metrics { grid-template-columns: 1fr; }
  .metrics > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .result-heading, .settings, .alternatives { padding-right: 20px; padding-left: 20px; }
  .copy-row { grid-template-columns: 1fr 62px; gap: 4px 10px; padding: 8px 0; }
  .copy-row > span, .copy-row code { grid-column: 1; text-align: left; }
  .copy-row button { grid-column: 2; grid-row: 1 / span 2; }
  .privacy { padding: 24px 20px; }
  .footer-inner { display: grid; gap: 18px; }
  .footer-brand img { width: 190px; }
  footer p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button { transition: none; }
}
