/* Local Business Survey — palette and type adopted from thewebmonsters.com.au */

:root {
  --brand: #72B000;
  --brand-lift: #8FD117;
  --mint: #6EFA9E;
  --deep: #064F05;
  --ink: #0B0F0A;
  --ink-2: #121810;
  --panel: #161D13;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #F2F5EF;
  --fg-dim: #A7B3A0;
  --fg-faint: #6F7C6B;
  --on-brand: #08110A;
  --warn-bg: rgba(255, 190, 70, 0.14);
  --warn-fg: #FFCF6B;
  --err-bg: rgba(255, 120, 90, 0.12);
  --err-line: rgba(255, 120, 90, 0.3);
  --err-fg: #FFB3A0;
  --display: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;
  --max: 1280px;
  --pad: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-lift); text-decoration: none; }
a:hover { color: var(--mint); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand); color: var(--on-brand); }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
hr.divider { border: 0; height: 1px; margin: 0; background: var(--line); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.fg { color: var(--fg); }
.muted { color: var(--fg-dim); }
.small { font-size: 14px; }
.italic { font-style: italic; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-md { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }

/* Header / footer ---------------------------------------------------------- */

.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-top: 20px; padding-bottom: 20px; }
.site-header__right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.admin .site-header { border-bottom: 1px solid var(--line); }

.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.wordmark:hover { color: var(--fg); }
.wordmark__dot { width: 12px; height: 12px; border-radius: 4px; background: var(--brand); }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; font-size: 14px; color: var(--fg-dim); }
.site-footer__inner a { color: var(--fg-dim); }
.site-footer__inner a:hover { color: var(--fg); }

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
  font-weight: 700; font-size: 17px; line-height: 1; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-lift); color: var(--on-brand); }
.btn--ghost { background: transparent; color: var(--fg); border: 1px solid var(--line-strong); font-weight: 500; font-size: 15px; min-height: 44px; padding: 0 18px; }
.btn--ghost:hover { color: var(--fg); background: rgba(255, 255, 255, 0.07); }
.btn--lg { min-height: 56px; padding: 0 30px; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn.is-disabled { opacity: .45; pointer-events: none; }

.link-muted { color: var(--fg-dim); font-size: 15px; }
.link-muted:hover { color: var(--fg); }
.link-strong { font-weight: 600; font-size: 14px; }
.link-button { padding: 0; border: 0; background: none; font-size: inherit; font-weight: 600; color: var(--brand-lift); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--mint); }
.inline-form { display: inline; margin: 0; }

/* Landing ------------------------------------------------------------------ */

.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; padding-top: clamp(40px, 7vw, 72px); padding-bottom: clamp(48px, 7vw, 72px); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--fg-dim); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.hero__title { max-width: 760px; font-size: clamp(42px, 6vw, 76px); line-height: 1; letter-spacing: -0.04em; }
.hero__lead { max-width: 620px; font-size: clamp(17px, 1.6vw, 20px); color: var(--fg-dim); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 8px; }
.hero__cta .muted { font-size: 15px; }

.section { display: flex; flex-direction: column; gap: 28px; padding-bottom: clamp(40px, 6vw, 64px); }
.section--last { padding-bottom: clamp(48px, 7vw, 72px); }
.section__head { display: flex; align-items: baseline; gap: 16px; }
.h-section { font-size: 28px; letter-spacing: -0.03em; }
.rule { height: 1px; flex: 1; background: var(--line); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.card .muted { font-size: 15px; }
.card__num { font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1; color: var(--brand); }

.panel { padding: clamp(24px, 4vw, 40px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel--row { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.panel--row > div { flex: 1 1 340px; display: flex; flex-direction: column; gap: 12px; }
.h-panel { font-size: 22px; letter-spacing: -0.03em; }

/* Flow (survey steps, login) ------------------------------------------------ */

.flow { flex: 1 1 auto; display: flex; align-items: flex-start; justify-content: center; padding: 24px var(--pad) 64px; }
.flow--center { align-items: center; }
.card--form { width: 100%; max-width: 720px; gap: 28px; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg); }
.card--narrow { max-width: 440px; gap: 24px; }

.progress { display: flex; gap: 8px; }
.progress__seg { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
.progress__seg.is-on { background: var(--brand); }

.h-question, .h-page { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.035em; }
.card--form .muted { font-size: 16px; }
.card--form .muted.small { font-size: 14px; }

textarea, input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, .share-link {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 17px; line-height: 1.5; color: var(--fg);
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
textarea { resize: vertical; min-height: 180px; }
.field[hidden] { display: none; }
input[type="text"], input[type="email"], input[type="password"] { min-height: 52px; padding-top: 0; padding-bottom: 0; }
input::placeholder, textarea::placeholder { color: var(--fg-faint); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--mint); outline-offset: 0; border-color: transparent; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 600; font-size: 15px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--fg-dim); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--brand); flex-shrink: 0; }

.form-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }

.fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fieldset legend { padding: 0; margin-bottom: 12px; font-weight: 600; font-size: 15px; }
.code-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.code-input {
  width: 56px; height: 64px; padding: 0; text-align: center; font: inherit; font-size: 30px; font-weight: 600;
  color: var(--fg); background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
.code-input:focus { outline: 2px solid var(--mint); outline-offset: 0; border-color: transparent; }

.error { padding: 12px 14px; border-radius: var(--r-sm); background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err-fg); font-size: 14px; }
.notice { font-size: 14px; color: var(--mint); font-weight: 500; }

.success-mark { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-link { flex: 1 1 260px; min-height: 48px; padding-top: 0; padding-bottom: 0; font-size: 15px; }
.share-row .btn { min-height: 48px; padding: 0 20px; font-size: 15px; min-width: 140px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* Admin -------------------------------------------------------------------- */

.tag { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-dim); }
.admin-main { display: flex; flex-direction: column; gap: 28px; padding-top: 32px; padding-bottom: 48px; font-size: 16px; }
.admin-main--narrow { max-width: 880px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.admin-head .muted { font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.stat__label { font-size: 13px; font-weight: 600; color: var(--fg-dim); }
.stat__value { font-family: var(--display); font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat__note { font-size: 13px; color: var(--fg-dim); }
.stat__note--ok { color: var(--brand-lift); font-weight: 500; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.search { position: relative; flex: 1 1 280px; display: flex; align-items: center; }
.search__icon { position: absolute; left: 14px; color: var(--fg-dim); display: inline-flex; pointer-events: none; }
.search input { min-height: 44px; padding: 0 14px 0 42px; font-size: 15px; }
.select { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-dim); }
.select select { width: auto; min-height: 44px; padding: 0 36px 0 12px; font-size: 15px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A7B3A0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; }

.table-wrap { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }
.table { width: 100%; min-width: 880px; border-collapse: collapse; }
.table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--fg-dim); padding: 12px 16px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.answer-col { width: 44%; }
.table td:nth-child(2) { min-width: 160px; }
.table td:nth-child(3) { min-width: 200px; word-break: break-all; }
.answer-cell { color: var(--fg); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.08); color: var(--fg-dim); white-space: nowrap; }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: rgba(114, 176, 0, 0.16); color: var(--brand-lift); }
.badge--warn { background: var(--warn-bg); color: var(--warn-fg); }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pager__buttons { display: flex; gap: 8px; }

.detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.meta div { display: flex; flex-direction: column; gap: 4px; }
.meta dt { font-size: 13px; font-weight: 600; color: var(--fg-dim); }
.meta dd { margin: 0; font-size: 15px; }
.answer-full { white-space: pre-wrap; font-size: 17px; line-height: 1.7; }

/* Responsive --------------------------------------------------------------- */

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .btn--primary, .btn--lg { width: 100%; }
  .form-row { flex-direction: column-reverse; align-items: stretch; }
  .form-row .link-muted { text-align: center; }
  .code-input { width: 44px; height: 56px; font-size: 26px; }
  .code-grid { gap: 8px; }
  .share-row .btn { width: 100%; }
}
