/* BeeKeeperUK: the shared style for every *.beekeeperuk.app site (about, privacy, terms,
   support, delete). Pages link it as /shared/site.css; see website/README.md.
   The app's field-notebook look: paper, ink and honey, with a serif for headings. No web
   fonts: the system's own serif and sans, so nothing is fetched from anywhere. */

/* ── Tokens: the apps' colours (Theme.kt, Theme.swift) ── */
:root {
  color-scheme: light dark;

  --paper: #FAF6EC;        /* the background */
  --card: #FFFDF7;
  --chip: #F1EADB;         /* panels */
  --line: #E6DDC9;         /* hairlines */
  --ink: #1D1A15;
  --ink-soft: #6A6152;     /* secondary text, 5.4:1 on paper */
  --honey: #E3A21A;        /* fills */
  --honey-deep: #8A5800;   /* honey as text and links */
  --on-honey: #1D1A15;
  --link: #8A5800;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, "New York", "Iowan Old Style", "Noto Serif", Georgia, "Times New Roman", serif;

  /* Type scale: 18px base, major third */
  --step--1: 0.889rem;
  --step-0: 1.125rem;
  --step-1: 1.406rem;
  --step-2: 1.758rem;
  --step-3: 2.197rem;
  --step-4: clamp(2.5rem, 5vw + 1rem, 4rem);

  --measure: 66ch;
  --wide: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17140F; --card: #201C16; --chip: #2A251D; --line: #3A3328;
    --ink: #F3EDE0; --ink-soft: #BDB3A1; --honey-deep: #F0B840; --link: #F0B840;
  }
}
:root[data-theme="dark"] {
  --paper: #17140F; --card: #201C16; --chip: #2A251D; --line: #3A3328;
  --ink: #F3EDE0; --ink-soft: #BDB3A1; --honey-deep: #F0B840; --link: #F0B840;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--font-body);
  font-kerning: normal;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--honey) 40%, transparent); }
.skip { position: absolute; left: -999px; top: 8px; padding: 8px 14px; background: var(--card); z-index: 10; }
.skip:focus { left: 8px; }

/* ── Layout ── */
.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.page { padding-top: 56px; }

/* ── Site header: the same on every subdomain ── */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 68px; flex-wrap: wrap; padding: 8px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.brand span { font: 700 1.4rem/1 var(--font-display); }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; padding: 6px 0; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--honey); }

/* ── Type ── */
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1 { font: 700 var(--step-4)/1.02 var(--font-display); letter-spacing: -0.01em; margin: 0 0 0.35em; }
h2 { font: 700 var(--step-3)/1.1 var(--font-display); margin: 2em 0 0.5em; }
h3 { font: 600 var(--step-1)/1.3 var(--font-body); margin: 1.6em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
li + li { margin-top: 0.35em; }
.lead { font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); max-width: 42ch; }
.small { font-size: var(--step--1); color: var(--ink-soft); }
strong { font-weight: 600; }

/* ── Long-form text (privacy, terms) ── */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }

/* Tables (who handles what) */
.table-scroll { overflow-x: auto; margin: 1.2em 0; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-soft); font-size: var(--step--1); }

/* A card, for notes and steps */
.note { padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.note > :last-child { margin-bottom: 0; }
.note.honey { border-color: color-mix(in srgb, var(--honey) 55%, var(--line)); background: color-mix(in srgb, var(--honey) 10%, var(--card)); }

/* A real sequence of steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1em 0 1.5em; max-width: var(--measure); }
.steps > li { counter-increment: step; position: relative; padding-left: 52px; margin-top: 1.1em; min-height: 36px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1em;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--honey); color: var(--on-honey);
  font: 700 1.1rem/1 var(--font-display);
}

/* ── Buttons, store links and footer ── */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 1em 0; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px;
  background: var(--honey); color: var(--on-honey); text-decoration: none; font-weight: 600;
}
.button:hover { background: color-mix(in srgb, var(--honey) 85%, #000); text-decoration: none; }
.button.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.button.secondary:hover { background: var(--chip); }

.site-footer { margin-top: 96px; padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: var(--step--1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── Questions and answers: native <details>, no script ── */
.qa { border-top: 1px solid var(--line); max-width: var(--measure); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 16px 0; font-weight: 600;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font: 700 1.5rem/1 var(--font-display); color: var(--honey-deep); flex: none; }
.qa details[open] summary::after { content: "–"; }
.qa details > :not(summary) { margin-top: 0; }
.qa details > :last-child { padding-bottom: 18px; }

/* ── Contents list at the top of a long page ── */
.toc { margin: 1.5em 0 2.5em; padding: 18px 22px; background: var(--chip); border-radius: var(--radius); max-width: var(--measure); }
.toc h2 { font: 600 var(--step-0)/1.3 var(--font-body); margin: 0 0 8px; color: var(--ink-soft); }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2 16em; column-gap: 32px; }
.toc li { break-inside: avoid; }
[id] { scroll-margin-top: 24px; }

/* ── A screenshot in a phone outline ── */
.phone {
  margin: 0; padding: 7px; border-radius: 34px;
  background: #1D1A15; box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 18px 40px rgba(60, 40, 0, 0.18);
  width: min(100%, 280px);
}
.phone img { width: 100%; height: auto; border-radius: 28px; }

/* ── An even grid of short items ── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 28px 32px; }
.grid h3 { margin-top: 0; }
.grid p { margin: 0; color: var(--ink-soft); }

/* A page's title area */
.page-head { padding: 48px 0 8px; }
.page-head .lead { max-width: 52ch; }
.updated { color: var(--ink-soft); font-size: var(--step--1); }
