/* Soma18 design tokens. Every colour, font, size and spacing value is defined here, once.
   Source: design/README.md. Pages must use these variables and never write a hex value. */
:root {
  /* Colour */
  --ink: #16211F;
  --ink-2: #49544F;
  --paper: #E8EAE5;
  --paper-2: #F2F3EF;
  --stone: #CDD5CC;
  --accent: #0E6569;
  --accent-light: #5FC2C6;
  --sun: #F0B33C;
  --sun-hi: #F7C462;
  --on-ink: #E8EAE5;
  --on-ink-2: #A7B2AC;

  /* Colour: additions used by the approved boards but not in the README list */
  --accent-dark: #0A4F52;   /* accent button hover */
  --white: #FFFFFF;         /* input backgrounds, text on accent */
  --error: #9E2F24;         /* form errors */

  /* Same colours as RGB triplets, for transparent overlays: rgba(var(--ink-rgb), .5) */
  --ink-rgb: 22, 33, 31;
  --accent-light-rgb: 95, 194, 198;
  --shadow-rgb: 0, 0, 0;

  /* Lines */
  --rule: rgba(var(--ink-rgb), .14);
  --rule-ink: rgba(232, 234, 229, .2);

  /* Fonts */
  --display: "Newsreader", Georgia, serif;
  --body: "Public Sans", system-ui, -apple-system, sans-serif;

  /* Spacing scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;

  /* Layout: same on every page */
  --maxw: 1240px;
  --maxw-narrow: 1168px;   /* Videos page only: the design deliberately uses a narrower column there */
  --pad: clamp(20px, 5vw, 64px);
  --pad-compact: clamp(20px, 5vw, 56px);   /* Videos, Checkout, Payment-Success, legal pages: the design uses 56px there */
  --sec-y: clamp(56px, 7vw, 112px);
  --radius: 12px;

  /* Smallest text allowed anywhere (older readers): 18px */
  --text-min: 1.125rem;
}

/* The hidden attribute must always win over any display rule. */
[hidden] { display: none !important; }

/* Small shared helpers, so pages do not repeat the same inline style. */
.on-ink { color: var(--on-ink); }
.minw-0 { min-width: 0; }
.bg-paper { background-color: var(--paper); }
.mt-2 { margin-top: var(--s2); }
.mt-3 { margin-top: var(--s3); }
.mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: var(--s5); }
.mt-3-center { margin-top: var(--s3); text-align: center; }
.span-all { grid-column: 1 / -1; }
.sep { opacity: .5; }
.btn-block { width: 100%; margin-top: var(--s5); }
.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 40px; width: auto; display: block; }

/* Plain messages. .notice = a calm box inside a page; .preview-note = temporary strip shown on pages whose feature is not switched on yet (delete the strip when the feature is real). */
.notice { margin: var(--s4) 0 0; padding: var(--s4) var(--s5); background: var(--stone); border-radius: var(--radius); color: var(--ink); font-size: var(--text-min); line-height: 1.5; }
.notice a { color: var(--accent); }
.preview-note { margin: 0; padding: var(--s3) var(--pad-compact); background: var(--sun); color: var(--ink); font-size: var(--text-min); font-weight: 600; line-height: 1.4; text-align: center; }

/* Skip link for keyboard users: invisible until it gets focus. */
.skip { font-size: var(--text-min); position: absolute; left: var(--s4); top: -100px; z-index: 100; padding: var(--s3) var(--s5); background: var(--ink); color: var(--on-ink); border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s4); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
