/* V1 editorial system — design tokens. Ported from lab/diseno-home-v1/css/tokens.css
   with V1-B (the chosen variant) baked in directly — the lab's A/B switch is no
   longer needed once a variant is chosen (doc 25 §7 Gate 2). Only pages that opt
   in via <html class="v1"> load this file, so it never touches unmigrated pages. */
:root {
  --dp-ink:#171412;
  --dp-paper:#F4EFE7;
  --dp-white:#FFFFFF;
  --dp-sand:#E7DED2;
  --dp-sky:#E3F1F6;
  --dp-blush:#F3DCDA;
  --dp-petrol:#55798A;
  /* Petrol darkened to clear 4.5:1 on the light surface; the base tone only
     reaches 4.08:1, which fails WCAG AA for small text like badges. */
  --dp-petrol-ink:#4A6B7A;
  --dp-brass:#B99A63;
  --dp-copper:#A8664A;
  --dp-walnut:#4D372C;

  /* LRB reference: page surface is white, not the site's original sepia
     paper. --dp-paper stays defined (still used as text-on-inverse and by
     the intro overlay) but no longer drives the visible background. */
  --surface-page:#fff;
  --surface-quiet:#f7f8f9;
  --surface-inverse:var(--dp-ink);
  --surface-dialog:var(--surface-page);
  --color-text:var(--dp-ink);
  --color-muted:#50565b;
  --color-border:rgba(0,0,0,.18);
  --color-accent:#0075b8;
  --color-accent-strong:#0075b8;
  --color-accent-hover:#004f73;
  --color-on-inverse:var(--dp-paper);
  --focus-color:var(--dp-walnut);
  --home-image-blue:#f1f8fc;
  --home-image-blue-deep:#e5f3fa;

  /* Aliases for the assistant widget's own --color-* names (assets/assistant*.css),
     which never matched this file's token names and so always rendered on their
     hardcoded warm fallbacks (#f5f0e8 surface, #ddd4c8 border) regardless of the
     rest of the page. */
  --color-ink:var(--color-text);
  --color-paper:var(--surface-page);
  --color-surface:var(--surface-quiet);

  --font-display:"Instrument Serif","Instrument Serif Fallback","Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  --font-ui:"Manrope","Manrope Fallback","Avenir Next",Avenir,"Segoe UI",sans-serif;
  --font-reading:"Newsreader","Newsreader Fallback","Iowan Old Style",Charter,Georgia,serif;
  --font-script:"Allura","Allura Fallback","Segoe Script","Bradley Hand",cursive;

  --text-xs:clamp(.72rem,.7rem + .1vw,.78rem);
  --text-sm:clamp(.8rem,.77rem + .14vw,.89rem);
  --text-base:clamp(.93rem,.9rem + .14vw,1.02rem);
  --text-lg:clamp(1.03rem,.98rem + .25vw,1.18rem);
  --text-2xl:clamp(1.35rem,1.16rem + .84vw,1.85rem);
  --text-4xl:clamp(2.05rem,1.56rem + 2.3vw,3.5rem);
  --text-5xl:clamp(2.7rem,1.78rem + 3.7vw,4.95rem);
  --text-hero:clamp(3.3rem,1.8rem + 5.8vw,6.6rem);

  --space-1:.25rem;
  --space-2:.5rem;
  --space-3:.75rem;
  --space-4:1rem;
  --space-5:1.5rem;
  --space-6:2rem;
  --space-7:2.5rem;
  --space-8:3.25rem;
  --space-9:4.75rem;
  --space-10:6rem;

  --layout-max:90rem;
  --layout-wide:76rem;
  --reading-max:68ch;
  --page-gutter:clamp(1.25rem,4vw,4rem);
  --grid-gap:clamp(1rem,2vw,2rem);
  --section-gap:clamp(3rem,6vw,6rem);

  --radius-none:0;
  --radius-control:4px;
  --radius-input:6px;
  --radius-special:8px;
  --shadow-object:0 18px 48px rgba(23,20,18,.16);

  --line-base:1px;
  --line-emphasis:2px;
  --line-opacity-quiet:.22;
  --line-opacity-base:.45;
  --line-opacity-active:.85;

  --control-min-height:44px;
  --control-primary-height:clamp(44px,3vw,48px);
  --control-hit-area:44px;

  --motion-feedback:150ms;
  --motion-state:220ms;
  --motion-reveal:440ms;
  --motion-continuity:560ms;
  --motion-narrative-max:800ms;
  --ease-standard:cubic-bezier(.2,.8,.2,1);
  --ease-enter:cubic-bezier(.16,1,.3,1);
  --ease-exit:cubic-bezier(.7,0,.84,0);

  --z-base:0;
  --z-sticky:100;
  --z-header:200;
  --z-dialog:800;
}

@media (max-width:1023px){:root{--page-gutter:clamp(1.25rem,3.6vw,2rem);}}
@media (max-width:389px){:root{--page-gutter:1rem;--grid-gap:.875rem;}}

/* V1-B: shell stays light/paper; the editorial territory (home hero, book
   hero) goes dark/ink. This is NOT a global dark-mode switch — see
   v1-home.css/v1-book.css, which only apply --surface-inverse-territory to
   specific sections, matching lab/css/variants.css html[data-variant="b"]. */
html.v1 {
  --territory-bg:var(--dp-ink);
  --territory-text:var(--dp-paper);
  --territory-muted:color-mix(in srgb,var(--dp-paper) 70%,var(--dp-ink));
  --territory-border:color-mix(in srgb,var(--dp-paper) 22%,var(--dp-ink));
  --territory-focus:var(--dp-brass);
}
