/* Interim tokens. Today's palette under role names; the UI phase re-values them.
   Pages and components use roles (--ground, --act), never raw values.

   Contrast, measured against WCAG 2.2 relative luminance:
     --ink on --ground        14.06:1    --ink on --ground-deep   12.47:1
     --muted on --ground       5.91:1    --muted on --ground-deep  5.24:1
     --act on --ground         6.67:1    --act on --ground-deep    5.92:1
     --ground on --act         6.67:1    --ground on --ink        14.06:1
   All text pairs clear 4.5:1. tests/test_tokens.py keeps it that way.
   --rule and --hair are decorative hairlines, not text or controls. */
:root{
  color-scheme:light;

  /* colour: roles */
  --ground:#F0E8D2;        /* page */
  --ground-deep:#E6DBBE;   /* footer, quiet panels */
  --ink:#221A0E;           /* text */
  --muted:#5F5646;         /* secondary text; today's #746C5C was 4.25:1, this is 5.91:1 */
  --rule:rgba(34,26,14,.16);
  --hair:rgba(34,26,14,.09);
  --act:#8E2F1E;           /* the one action colour: the call button */
  --focus:var(--ink);

  /* brand marks (logo colours, not palette): a mark's own colour is part of the mark, so it is a token of its
     own and colours that mark only. It is never a colour for text, rules or a page's own fills. */
  --mark-signet-dot:#B06325;   /* the copper wax dot of the Signet seal */

  /* type: families. Self-hosted files arrive with the assets task; system fallbacks until then. */
  --font-serif:'Fraunces','Iowan Old Style','Palatino Linotype',Palatino,Georgia,serif;
  --font-sans:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  --font-mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --font-deva:'Tiro Devanagari Hindi','Noto Serif Devanagari','Kohinoor Devanagari','Devanagari Sangam MN',serif;

  /* type: scale, 11 to 52 px, in rem so a reader's own text size still applies. The two hero steps are the
     home wordmark's range (72 to 168 px) and sit above the reading scale. A page sheet takes every font
     size from here: var(--fs-*), clamp(var(--fs-*), length, var(--fs-*)) with the viewport deciding the pace, or
     min() and max() of steps. */
  --fs-micro:.6875rem;     /* 11px */
  --fs-small:.8125rem;     /* 13px */
  --fs-ui:.9375rem;        /* 15px */
  --fs-body:1.0625rem;     /* 17px */
  --fs-lead:1.25rem;       /* 20px */
  --fs-h3:1.5rem;          /* 24px */
  --fs-h2:1.875rem;        /* 30px */
  --fs-h1:2.375rem;        /* 38px */
  --fs-display:3.25rem;    /* 52px */
  --fs-hero-min:4.5rem;    /* 72px: the home wordmark on a phone */
  --fs-hero:10.5rem;       /* 168px: the home wordmark at its widest */
  --lh-tight:1.15;
  --lh-body:1.65;

  /* spacing: 4px steps up to 96px */
  --space-1:.25rem;
  --space-2:.5rem;
  --space-3:.75rem;
  --space-4:1rem;
  --space-5:1.5rem;
  --space-6:2rem;
  --space-7:3rem;
  --space-8:4rem;
  --space-9:6rem;

  /* layout */
  --wrap:66.25rem;         /* 1060px */
  --gutter:clamp(1rem,5vw,1.75rem);
  --measure:66ch;
  --tap:2.75rem;           /* 44px: smallest comfortable touch target */
  --radius:2px;

  /* motion */
  --dur-fast:180ms;
  --dur-base:320ms;
  --dur-slow:1200ms;
  --ease:cubic-bezier(.2,.8,.2,1);
  --travel:22px;           /* how far things move when they appear */
}

/* Reduced motion: fades only. Nothing travels, nothing scrolls on its own. */
@media (prefers-reduced-motion: reduce){
  :root{
    --travel:0px;
  }
}

@font-face {
  font-family: 'Inter';
  src: url(/static/fonts/inter.271c39a3.woff2) format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2000-206F, U+20B9;
}
@font-face {
  font-family: 'Fraunces';
  src: url(/static/fonts/fraunces.ac3a7f01.woff2) format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2000-206F, U+20B9;
}
@font-face {
  font-family: 'Tiro Devanagari Hindi';
  src: url(/static/fonts/tiro-devanagari-hindi.9061c7ec.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020, U+0900-097F, U+200C-200D;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, p, figure, ol { margin: 0; }
img, video { display: block; max-width: 100%; height: auto; }
audio { display: block; width: 100%; max-width: 100%; }
input, button { font-family: inherit; font-size: inherit; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: break-word;
}
main { flex: 1 0 auto; }
:lang(hi) { font-family: var(--font-deva); letter-spacing: normal; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -.01em;
}
h1 { font-size: var(--fs-h2); }
h2 { font-size: var(--fs-h3); }
h3 { font-size: var(--fs-lead); }
h1 + p, h2 + p, h3 + p, p + p, p + h2, ol + h2 { margin-top: var(--space-3); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.page { padding-block: var(--space-6); }
.page > * + * { margin-top: var(--space-4); }
.page article > * + *, .page section > * + * { margin-top: var(--space-4); }
.page article > p, .page section > p, .page ol { max-width: var(--measure); }
.page h2 { margin-top: var(--space-6); }

a {
  color: var(--act);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.site-header { border-bottom: 1px solid var(--rule); }
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--space-4);
  padding-block: var(--space-2);
}
.site-header h1 { font-size: var(--fs-h3); }
.wordmark {
  display: inline-block;
  min-height: var(--tap);
  line-height: var(--tap);
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.site-header nav { display: flex; flex-wrap: wrap; column-gap: var(--space-4); }
.site-header nav a {
  display: inline-block;
  min-height: var(--tap);
  line-height: var(--tap);
  font-size: var(--fs-ui);
  color: var(--ink);
}
.site-header nav a:hover { color: var(--act); }

.site-footer {
  margin-top: var(--space-8);
  padding-block: var(--space-6);
  background: var(--ground-deep);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: var(--fs-small);
}
.site-footer p { margin: 0 0 var(--space-3); }
.link-row { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0; padding: 0; list-style: none; }
.link-row a { display: inline-block; padding-block: var(--space-2); color: var(--muted); }
.link-row a:hover { color: var(--ink); }

button, .btn {
  display: inline-block;
  text-align: center;
  min-height: var(--tap);
  padding: var(--space-3) var(--space-5);
  line-height: 1.25;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ground);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--ink); color: var(--ground); }
button#buy { background: var(--act); border-color: var(--act); color: var(--ground); }
button#buy:hover { background: var(--ink); border-color: var(--ink); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:disabled:hover { background: var(--act); color: var(--ground); }
#listen, #buy-signin {
  display: inline-block;
  min-height: var(--tap);
  padding: var(--space-3) var(--space-5);
  line-height: 1.25;
  border: 1px solid var(--act);
  border-radius: var(--radius);
  background: var(--act);
  color: var(--ground);
  font-weight: 500;
  text-decoration: none;
}
#listen:hover, #buy-signin:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }

input[type=checkbox] { width: 1.25rem; height: 1.25rem; margin-right: var(--space-2); vertical-align: middle; accent-color: var(--act); }
label { display: block; }

.box, .title-card {
  padding: var(--space-4);
  margin-top: var(--space-4);
  border: 1px solid var(--ink);
}
/* Covers are square. The width and height on each tag, with aspect-ratio here,
   hold the box before the image arrives, so nothing below it jumps. */
.cover { width: 15rem; max-width: 100%; height: auto; aspect-ratio: 1;
         border: 1px solid var(--rule); }
.by, .meta, .breakup, .disclosure, .grievance, .payments { color: var(--muted); font-size: var(--fs-ui); }
.price-line { font-weight: 600; }
.warning { font-size: var(--fs-ui); }
.msg { color: var(--act); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.row button { text-align: left; }
.episode { padding: var(--space-4); margin-top: var(--space-4); border: 1px solid var(--ink); }
.episode h3 { margin-bottom: var(--space-2); }
.audio-box { padding: var(--space-4); border: 1px solid var(--ink); }
ol { padding-left: var(--space-5); }

@media (min-width: 40em) {
  h1 { font-size: var(--fs-h1); }
  h2 { font-size: var(--fs-h2); }
}