:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f0ede5;
  --surface-3: #e9e4d9;
  --text: #14201c;
  --text-soft: #33443d;
  --muted: #5f6f68;
  --line: #e2ddd2;
  --brand: #1f6b58;
  --brand-strong: #175244;
  --brand-soft: #e3f0ea;
  --accent: #c25f86;
  --accent-soft: #f8e9ef;
  --warn-bg: #fff6e3;
  --warn-line: #ecd39c;
  --warn-text: #6b4d10;
  --danger: #a33a3a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(20 32 28 / 0.05), 0 8px 24px rgb(20 32 28 / 0.04);
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1714;
    --surface: #16211d;
    --surface-2: #1c2a25;
    --surface-3: #24352e;
    --text: #edf3f0;
    --text-soft: #d3e0da;
    --muted: #a3b4ad;
    --line: #2a3a34;
    --brand: #86cbb2;
    --brand-strong: #a9dfc9;
    --brand-soft: #1d332b;
    --accent: #e8a2bc;
    --accent-soft: #35222b;
    --warn-bg: #2c2418;
    --warn-line: #4a3a20;
    --warn-text: #e8cf9d;
    --danger: #f0a1a1;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.25);
  }
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-strong);
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

h3 {
  font-size: 1.0625rem;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

li + li {
  margin-top: 0.35em;
}

button {
  font: inherit;
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--text);
}

.brand-icon {
  border-radius: 10px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
  flex: none;
}

.brand-text {
  font-size: 1.0625rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 550;
}

.site-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.site-nav .nav-cta {
  margin-left: 4px;
  background: var(--brand);
  color: #fff;
}

.site-nav .nav-cta:hover {
  background: var(--brand-strong);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .site-nav .nav-cta {
    color: #0f1714;
  }
}

/* Hero */

.hero {
  padding: clamp(40px, 7vw, 80px) 0 clamp(24px, 4vw, 40px);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 54ch;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 10px;
  padding: 0 16px;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.search-box svg {
  color: var(--muted);
  flex: none;
}

.search-box input {
  width: 100%;
  padding: 15px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box input:focus {
  outline: none;
}

.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}

.hero-hint {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--muted);
}

.popular {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.popular a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.875rem;
  text-decoration: none;
}

.popular a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.hero-card {
  padding: 24px;
  background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-number {
  margin: 0;
  font-size: clamp(2.75rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--brand-strong);
}

.hero-label {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero-stats dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hero-stats dd {
  margin: 2px 0 0;
  font-size: 1.125rem;
  font-weight: 650;
}

.hero-updated {
  margin: 18px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.hero-updated strong {
  color: var(--text-soft);
  font-weight: 600;
}

/* Sections */

.section {
  padding: clamp(32px, 5vw, 52px) 0 0;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  margin-bottom: 4px;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.subhead {
  margin-top: 32px;
  font-size: 1.15rem;
}

.province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.province-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.province-link:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}

.province-count {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.empty-search {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-align: center;
}

/* App card */

.app-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 4vw, 36px);
  align-items: start;
  margin-top: clamp(40px, 6vw, 64px);
  padding: clamp(22px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}

.app-icon {
  border-radius: 22px;
  box-shadow: 0 6px 20px rgb(20 32 28 / 0.14);
}

.app-card h2 {
  margin-bottom: 8px;
}

.check-list {
  margin: 14px 0 20px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  margin-top: 6px;
  color: var(--text-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--brand);
  border-bottom: 2.5px solid var(--brand);
  transform: rotate(-45deg);
}

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

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.steps article {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps h3 {
  margin: 10px 0 4px;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 0.875rem;
}

/* Page */

.page {
  padding-top: 28px;
  padding-bottom: 56px;
}

.page-narrow {
  max-width: 820px;
}

.page-head {
  margin: 12px 0 28px;
}

.updated {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.breadcrumbs {
  font-size: 0.8125rem;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}

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

.breadcrumbs a:hover {
  color: var(--brand);
}

/* Chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--brand-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--brand-strong);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.chip span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  font-size: 0.75rem;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.chip-quiet {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text-soft);
  font-weight: 500;
}

.chip-muted {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
}

.chips-wrap {
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

/* Toolbar */

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.list-toolbar label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-soft);
}

.list-toolbar select {
  padding: 8px 34px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
}

.result-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Pharmacy cards */

.pharmacy-list {
  display: grid;
  gap: 12px;
}

.pharmacy {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pharmacy:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: var(--shadow);
}

.pharmacy-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.pharmacy-head h3 {
  margin: 0;
  font-size: 1.0625rem;
}

.badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-soft {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.875rem;
  font-weight: 600;
}

.pharmacy-address {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.pharmacy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: var(--text-soft);
}

.meta-label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.pharmacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-strong);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .btn-primary {
    color: #0f1714;
  }

  .btn-primary:hover {
    color: #0f1714;
  }
}

.btn-quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-quiet:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-small {
  padding: 8px 13px;
  font-size: 0.875rem;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Notices */

.notice {
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

.notice-warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn-text);
}

.notice-quiet {
  margin-top: 40px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.875rem;
}

.stale-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stale-notice strong {
  margin-right: 4px;
}

.stale-notice .btn {
  flex: none;
}

/* FAQ */

.faq {
  border-top: 1px solid var(--line);
}

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

.faq summary {
  position: relative;
  padding: 16px 34px 16px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq-answer {
  padding: 0 0 16px;
  color: var(--muted);
  max-width: 72ch;
}

.faq-answer p {
  margin: 0;
}

/* Contact */

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-card h2 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Empty state */

.empty-state {
  padding: clamp(32px, 6vw, 56px) 20px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state h1,
.empty-state h2 {
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--muted);
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

.back-link {
  margin-top: 32px;
  font-size: 0.9375rem;
}

/* Legal */

.legal {
  border-top: 1px solid var(--line);
}

.legal-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.legal-section h2 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.legal-section h3 {
  font-size: 1rem;
  margin: 18px 0 6px;
}

.legal-section p,
.legal-section li {
  color: var(--text-soft);
  font-size: 0.9688rem;
  line-height: 1.75;
}

.legal-section code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  font-size: 0.875em;
}

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

/* Ad slot */

.ad-slot {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 108px;
  margin: 20px 0;
  padding: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ad-label {
  color: var(--muted);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Consent */

.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.18);
}

.consent[hidden] {
  display: none;
}

.consent p {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text-soft);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Footer */

.site-footer {
  margin-top: clamp(48px, 8vw, 88px);
  padding: clamp(36px, 5vw, 56px) 0 20px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer-brand p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  max-width: 38ch;
}

.footer-note {
  font-size: 0.8125rem !important;
  color: var(--muted);
}

.site-footer h2 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-top: 6px;
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer-bottom p {
  margin: 0;
}

/* Responsive */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 420px;
  }

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

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

@media (max-width: 680px) {
  .header-inner {
    min-height: 60px;
  }

  .site-nav a {
    padding: 7px 9px;
    font-size: 0.875rem;
  }

  .site-nav .nav-cta {
    display: none;
  }

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

  .app-card {
    grid-template-columns: 1fr;
  }

  .app-icon {
    width: 76px;
    height: 76px;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-toolbar {
    flex-wrap: wrap;
  }

  .result-count {
    margin-left: 0;
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
