/* pagenine.ca: the app's look on the web. Colours from the app (src/theme/colors.ts), type from src/theme/type.ts:
   Karrik for structure (one weight: "bold" is set larger, never faked), Fraunces Regular and Italic for reading text
   only, never bold. Caps are never under 11px. Shared by the Astro pages and the Pages Functions' cards. */

@font-face { font-family: 'Karrik'; src: url('/fonts/karrik-regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Fraunces'; font-style: italic; src: url('/fonts/fraunces-italic.woff2') format('woff2'); font-display: swap; }

:root {
  color-scheme: light;
  --paper: #F4F1EA;
  --white: #FFFFFF;
  --blue: #1E2A6B;
  --blue80: rgba(30, 42, 107, 0.8);
  --muted: rgba(30, 42, 107, 0.7);
  --rule: rgba(30, 42, 107, 0.2);
  --karrik: 'Karrik', 'Helvetica Neue', Arial, sans-serif;
  --fraunces: 'Fraunces', Georgia, serif;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--blue);
  font-family: var(--karrik);
  font-size: 16px;
  line-height: 1.4;
  font-weight: normal;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, strong, b, th { font-weight: normal; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { opacity: 0.7; }
img { display: block; max-width: 100%; }

.page { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter) 56px; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* Header: the PAGE NINE wordmark over a hairline, as in the app. */
.header { padding: 22px 0 14px; border-bottom: 1px solid var(--rule); text-align: center; }
.wordmark { font-size: 21px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; line-height: 1.25; }
.tagline { margin: 6px 0 0; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.7; }

/* Small caps labels. */
.label { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.3; }
.muted { color: var(--muted); }

/* Titles: 40px Regular capitals, set tight (the app's pageTitle). */
.title { font-size: 40px; line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; margin: 34px 0 0; padding-top: 3px; }
.lede { font-family: var(--fraunces); font-size: 20px; line-height: 1.4; margin: 18px 0 0; }
.body { font-family: var(--fraunces); font-size: 17px; line-height: 1.55; color: var(--blue80); margin: 14px 0 0; }

/* Reading pages (the policies and listing pages): Karrik headings, Fraunces text. */
.prose { margin-top: 34px; }
.prose h1 { font-size: 34px; line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; margin: 0 0 18px; }
.prose h2 { font-size: 13.5px; letter-spacing: 0.05em; text-transform: uppercase; margin: 34px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.prose h3 { font-size: 13.5px; letter-spacing: 0.05em; text-transform: uppercase; margin: 26px 0 8px; }
.prose p, .prose li { font-family: var(--fraunces); font-size: 17px; line-height: 1.55; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
/* Bold in the text: picked out in Karrik, since Fraunces is never bold. */
.prose strong, .steps strong { font-family: var(--karrik); font-size: 0.94em; }
.prose em { font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 28px 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 14px; font-size: 15px; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 8px 6px 8px 0; text-align: left; vertical-align: top; }

/* Buttons: 46px, caps. Filled blue, or outlined. */
.button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 46px; padding: 0 22px; border: 1px solid var(--blue);
  font-size: 13.5px; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; line-height: 1.2;
}
.button.filled { background: var(--blue); color: var(--white); }
.button.centred { justify-content: center; }
.button.soon { border-color: var(--rule); color: var(--muted); justify-content: space-between; }
.button.soon:hover { opacity: 1; }
.stores { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 520px) { .stores { grid-template-columns: 1fr 1fr; } }

/* Ruled link rows, like the app's caps rows. */
.rows { margin-top: 34px; border-top: 1px solid var(--rule); }
.rows a, .rows .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: 16px; letter-spacing: 0.03em; text-transform: uppercase; }

.section { margin-top: 34px; font-size: 13.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.steps { margin: 12px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.steps li { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.steps .label { display: block; color: var(--muted); margin-bottom: 4px; }
.steps p { margin: 0; font-family: var(--fraunces); font-size: 17px; line-height: 1.5; }

/* The Letter box (home, from Part 26). */
.letter { margin-top: 34px; padding: 16px; background: var(--white); }
.letter input { width: 100%; min-height: 44px; margin: 10px 0; padding: 0 10px; border: 1px solid var(--rule); background: var(--paper); color: var(--blue); font: 16px var(--karrik); }

/* The share card (/p/<slug>) and the plain cards. */
.card { margin: 28px auto 0; max-width: 460px; background: var(--white); }
.card .photo { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: #E4E0D7; }
.card .inner { padding: 18px 16px 20px; }
.card .name { font-size: 30px; line-height: 0.98; letter-spacing: -0.02em; text-transform: uppercase; margin: 0; }
.card .meta { margin: 10px 0 0; }
.card .oneline { font-family: var(--fraunces); font-size: 17px; line-height: 1.45; color: var(--blue80); margin: 12px 0 0; }
.card .open { margin-top: 20px; }
.card .stores { margin-top: 10px; grid-template-columns: 1fr; }
.card.plain .inner { padding: 30px 18px 22px; }
.card.plain .name { font-size: 26px; }

.footer { margin-top: 56px; padding-top: 14px; border-top: 1px solid var(--rule); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer a { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; }
.footer p { margin: 14px 0 0; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }

/* Karrik draws ← → as small chevrons; the designs use long arrows, so arrows are set in the system font (as the app does). */
.arrow { font-family: -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif; }
