/* 1524: the one token set (DESIGN.md frontmatter, repo root). Colour, type scale, spacing, radius, sizes - nothing else.
   Names match public/app.css (the app has used them since 205), so a page that loads this sheet and app.css sees one set.
   Themes swap tokens only: <html data-theme="plain|large"> (src/theme.js, written by functions/_middleware.js); light/dark from
   the phone. Covers (covers.css, [data-cover]) override colour tokens after this sheet. Imported at the top of public/base.css (with the parts), style.css and pricing.css;
   every part at the 9 sizes: /design/parts/. */
:root, [data-theme="plain"] {
  color-scheme: light dark;
  /* colour */
  --bg:          light-dark(#f2f2f7, #000000);
  --surface:     light-dark(#ffffff, #1c1c1e);
  --surface-2:   light-dark(#e9e9ee, #2c2c2e);
  --ink:         light-dark(#1d1d1f, #f5f5f7);
  --muted:       light-dark(#6e6e73, #98989f);
  --line:        light-dark(#d8d8de, #38383a);
  --accent:      light-dark(#c8372d, #ff5a4a);
  --on-accent:   light-dark(#ffffff, #1a0604);
  --accent-ink:  var(--on-accent);
  --accent-soft: light-dark(#fbe9e7, #3a1714);
  --sel:         light-dark(#0a64d8, #4c9bff);
  --ok:          light-dark(#1f7a46, #30d158);
  --bad:         light-dark(#b3261e, #ff6961);
  --note:        light-dark(#fff6cc, #3b3522);
  --note-ink:    light-dark(#2a2414, #f3ecd2);
  --glass:       light-dark(rgba(242,242,247,.86), rgba(0,0,0,.86));
  --scrim:       rgba(0,0,0,.35);
  --float:       0 10px 40px rgba(0,0,0,.25);
  --card-edge:   light-dark(transparent, #38383a);
  /* type: one font set, no web fonts */
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --t-display: clamp(2.25rem, 8vw, 3.5rem);   /* 36-56 home and store hero */
  --t-title: clamp(1.875rem, 6vw, 2.5rem);    /* 30-40 one h1 per page */
  --t-heading: 1.5rem;                        /* 24 */
  --t-lead: 1.1875rem;                        /* 19 */
  --t-body: 1.0625rem;                        /* 17 */
  --t-small: 1rem;                            /* 16 (was 15) */
  --t-tiny: .8125rem;                         /* 13 badges only */
  --t-logo: 1.25rem;                          /* 20 */
  --lh: 1.45; --lh-title: 1.12;
  --w-body: 400; --w-label: 600; --w-bold: 700;
  /* spacing 4 8 12 16 24 32 48 64 */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem;
  --edge: 1rem;
  /* radius */
  --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-pill: 999px;
  /* sizes */
  --tap: 2.75rem;    /* 44 every target */
  --btn: 3.25rem;    /* 52 buttons, rows, fields */
  --hd: 56px;        /* the header */
  --line-w: 1px; --field-w: 1.5px;
  --icon: 1.375rem; --stroke: 1.8;
  --read: 720px; --page: 1200px;
}
/* Large & clear: bigger type, 7:1 contrast, 56 px targets. One red: #98241c / #ff8475 */
[data-theme="large"] {
  --ink:         light-dark(#000000, #ffffff);
  --muted:       light-dark(#3a3a3f, #d6d6dc);
  --line:        light-dark(#8e8e96, #7a7a80);
  --accent:      light-dark(#98241c, #ff8475);
  --on-accent:   light-dark(#ffffff, #000000);
  --bad:         light-dark(#8c1d17, #ff8a80);
  --card-edge:   light-dark(#8e8e96, #7a7a80);
  --t-display: clamp(2.5rem, 8vw, 3.75rem);   /* 40-60 */
  --t-title: clamp(2rem, 6vw, 2.75rem);       /* 32-44 */
  --t-heading: 1.625rem;                      /* 26 */
  --t-lead: 1.375rem;                         /* 22 */
  --t-body: 1.25rem;                          /* 20 */
  --t-small: 1.125rem;                        /* 18 */
  --t-tiny: 1rem;                             /* 16 */
  --t-logo: 1.4375rem;                        /* 23 */
  --lh: 1.35;
  --w-body: 500; --w-label: 700;
  --tap: 3.5rem; --btn: 3.75rem; --hd: 68px;
  --line-w: 1.5px;
  --icon: 1.625rem; --stroke: 2.1;
}
@media (min-width: 760px) { :root { --edge: 1.5rem; } }
@media (min-width: 1280px) { :root { --edge: 2rem; } }
@media (max-height: 500px) and (orientation: landscape) { :root, [data-theme="large"] { --hd: 48px; } }
/* CJK and Arabic: the system's own faces; the serif roles use them too (no CJK serif on phones) */
:lang(zh) { --ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif; --serif: var(--ui); }
:lang(ja) { --ui: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif; --serif: var(--ui); }
:lang(ar) { --ui: system-ui, "SF Arabic", "Geeza Pro", "Segoe UI", sans-serif; --serif: var(--ui); }
