/* CyntrolX Aurora — design tokens. The single source for colour, type, space and motion values.
   Shared file: page teams read it, never edit it. Documented in design/DESIGN-SYSTEM.md and BUILD-GUIDE.md ("Themes").

   COLOUR HAS TWO EDITIONS, and every colour token has a value in both:
     night  the dark edition as designed. The default.
     day    the light edition: a bright violet-tinted off-white page, deep ink type.
   <html data-theme="dark|light"> (set before first paint by the script in head.html) chooses the edition for the
   whole page. On the light page a picture is shown only where a true light render exists; every other picture slot
   shows the light plate drawn in components.css (section 22). So nothing dark is ever set into the light page,
   and type on a picture slot is ink there, like the rest of the page.
   data-tone="night" or "day" on an element forces one edition inside it. It is for the rare fixed-edition block
   and is not used by the system itself.
   No other stylesheet may write a colour. Use a token, or rgba(var(--…-rgb), a) for a transparent one. */
@font-face{font-family:"General Sans";src:url(../fonts/general-sans-400.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"General Sans";src:url(../fonts/general-sans-500.woff2) format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"General Sans";src:url(../fonts/general-sans-600.woff2) format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"General Sans";src:url(../fonts/general-sans-700.woff2) format("woff2");font-weight:700;font-display:swap}

/* ------------------------------------------------------------------ NIGHT (the dark page) */
:root,
[data-tone="night"]{
  color-scheme:dark;
  /* surface: near-black, violet-tinted. never pure grey */
  --ink:#0a0812;            /* page */
  --ink2:#110e1b;           /* raised: menus, fields */
  --ink3:#181428;           /* controls, hover */
  --ink4:#231d3a;           /* pressed, slider tracks */
  --ink-h:#1b1630;          /* hover of an ink pill */
  --panel-a:#151124; --panel-b:#100d1a;   /* the two stops of a panel or the glimpse */
  --ghost:#17132a;          /* the wordmark at the foot of the page */
  --plate-a:#17112e; --plate-b:#0d0a18;   /* the two stops of a picture slot's own ground */
  --lit:#17122e; --lit-top:#221a48; --lit-a:#1d1640; --lit-b:#141029; --lit-c:#110e1f;   /* a lit surface: the chosen plan, the chosen column */
  --scroll:#3a3358;         /* scrollbar thumb */
  /* text */
  --tx:#f4f1fb;             /* text */
  --on:#fff;                /* the strongest text: headlines on pictures, hover */
  --mu:#aba4c1;             /* secondary text  (8.3:1 on --ink) */
  --dim:#857e9f;            /* tertiary text   (5.2:1 on --ink), never below .8125rem */
  --prose:#ddd8ea;          /* long-form body text */
  --tx2:#cdc6e0;            /* between text and secondary: values in a table */
  --cut:#fff;               /* the colour that lets a picture through a blended sheet of ink */
  --blend:multiply;         /* …and the blend mode of that sheet */
  /* the same as r,g,b for transparent uses: rgba(var(--tx-rgb),.86) */
  --tx-rgb:244,241,251; --on-rgb:255,255,255; --ink-rgb:10,8,18;
  --scrim:10,8,18;          /* scrims over a picture, and veils over the page */
  --tint:233,226,255;       /* hairlines and soft fills */
  --front:206,190,255;      /* light fronts drawn over a picture */
  --lift:#b9a2ff;           /* the veil that lifts a picture's shadows */
  --line:rgba(233,226,255,.14);
  --line2:rgba(233,226,255,.08);
  --line3:rgba(233,226,255,.3);
  --shadow-menu:0 50px 90px -30px rgba(0,0,0,.85);
  --shadow-pic:0 30px 60px -20px rgba(0,0,0,.8);
  /* brand and meaning */
  --violet:#713dff;         /* signal: the one accent for actions (white on it: 5.5:1) */
  --violet-h:#8257ff;
  --violet-l:#a892ff;       /* violet as text or a small mark */
  --mint:#81dbc4;           /* proof: verified, focus ring, progress */
  --magenta:#ff47d1;        /* exposure: what is reachable */
  --crit:#b73441;
  --violet-rgb:113,61,255; --violet-l-rgb:168,146,255; --mint-rgb:129,219,196; --magenta-rgb:255,71,209;
  --sev-crit:#b73441; --sev-high:#c98447; --sev-med:#bfa052; --sev-low:#6079bd;
  --sv-a:#a892ff; --sv-b:#81dbc4; --sv-c:#c45cf2; --sv-d:#575077;   /* chart series that are not severities */
  --ok:#81dbc4; --warn:#d9a441; --err:#ef7b86;
  --em-blend:screen; --em-bg:#000;      /* how a product's image is laid over its scene, and the ground it is rendered on */
  /* small pictures drawn in CSS */
  --i-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.2 6 8l4-3.8' fill='none' stroke='%23aba4c1' stroke-width='1.5'/%3E%3C/svg%3E");
  --i-tick:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4 6.6 11.4 12.6 4.9' fill='none' stroke='%230a0812' stroke-width='2'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ DAY (the light page) */
:root[data-theme="light"],
:root [data-tone="day"]{
  color-scheme:light;
  --ink:#f3f0fb;            /* page: bright, violet-tinted. never pure white, never grey. The light renders fade to it */
  --ink2:#faf8fe;           /* raised: menus, fields */
  --ink3:#ebe6f7;           /* controls, hover */
  --ink4:#dbd3ee;           /* pressed, slider tracks */
  --ink-h:#ffffff;
  --panel-a:#fdfcff; --panel-b:#f8f5fe;
  --ghost:#e8e2f6;
  --plate-a:#e9e1fb; --plate-b:#f7f4fe;
  --lit:#efe8ff; --lit-top:#e2d8ff; --lit-a:#e9e0ff; --lit-b:#f1ecff; --lit-c:#f7f4ff;
  --scroll:#c3b9de;
  --tx:#16102e;             /* deep ink */
  --on:#0f0926;
  --mu:#585170;             /* 7.0:1 on --ink */
  --dim:#6d6687;            /* 4.9:1 */
  --prose:#2a2342;
  --tx2:#372e55;
  --cut:#5a2be0;            /* on the light page the sheet is opaque and the lit word is violet */
  --blend:normal;
  --tx-rgb:22,16,46; --on-rgb:15,9,38; --ink-rgb:243,240,251;
  --scrim:243,240,251;
  --tint:58,36,130;
  --front:113,61,255;
  --lift:#ffffff;
  --line:rgba(58,36,130,.17);
  --line2:rgba(58,36,130,.1);
  --line3:rgba(58,36,130,.36);
  --shadow-menu:0 40px 80px -30px rgba(52,30,110,.3);
  --shadow-pic:0 30px 60px -24px rgba(52,30,110,.4);
  --violet:#713dff;         /* still the one primary (5.0:1 on the page; white on it 5.5:1) */
  --violet-h:#5f2cf0;
  --violet-l:#5a2be0;       /* 6.5:1 */
  --mint:#0b7461;           /* deep mint, so a proof mark holds at text size */
  --magenta:#c21a8f;
  --crit:#b73441;
  --violet-rgb:113,61,255; --violet-l-rgb:90,43,224; --mint-rgb:11,116,97; --magenta-rgb:194,26,143;
  --sev-crit:#b73441; --sev-high:#b0621f; --sev-med:#8f7214; --sev-low:#4a63b0;
  --sv-a:#7a55f0; --sv-b:#0a8a70; --sv-c:#b23fe0; --sv-d:#a59cc4;
  --ok:#0b7461; --warn:#8a5d00; --err:#bf2c40;
  --em-blend:multiply; --em-bg:#f3f0fb;
  --i-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.2 6 8l4-3.8' fill='none' stroke='%23544b72' stroke-width='1.5'/%3E%3C/svg%3E");
  --i-tick:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4 6.6 11.4 12.6 4.9' fill='none' stroke='%23f5f2fc' stroke-width='2'/%3E%3C/svg%3E");
}
/* a forced edition passes its text colour down */
:where([data-tone]){color:var(--tx)}

/* product marks: --pm is the product's colour, --pm-l its optional colour for the day edition */
/* product marks are drawn in the ink of the surface they sit on. Their one proof stroke is mint (the markup says
   #81dbc4; the token makes it deep mint on the light page). --pm / --pm-l are the product's pillar tint, for
   surroundings only: --tint-pm resolves to the right one for the edition */
.pmark{color:var(--on);--tint-pm:var(--pm,var(--violet-l))}
:root[data-theme="light"] .pmark, :root [data-tone="day"] .pmark{--tint-pm:var(--pm-l,var(--pm,var(--violet-l)))}
.pmark path[stroke="#81dbc4"], .cx-mark path[stroke="#81dbc4"]{stroke:var(--mint)}

:root{
  /* ---- colours that are the same in both editions ---- */
  --on-accent:#fff;         /* text on a violet fill */
  /* the brand's own grounds, for showing the logo itself (press kit). They never change with the edition */
  --brand-ink:#0a0812; --brand-ink2:#110e1b; --brand-paper:#f4f1fb; --brand-white:#fff;

  /* ---- type ---- */
  --sans:"General Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; /* tiny numbering only */
  --t-mega:clamp(3.5rem,9.4vw,8.75rem);     /* home headline */
  --t-d1:clamp(3rem,7.6vw,7rem);            /* inner-page headline */
  --t-d2:clamp(2.6rem,6vw,5.6rem);          /* chapter names, statements */
  --t-h2:clamp(2.5rem,5.3vw,4.75rem);       /* section titles */
  --t-h3:clamp(1.75rem,3.1vw,2.75rem);
  --t-h4:clamp(1.375rem,2vw,1.75rem);
  --t-lead:clamp(1.125rem,1.45vw,1.3125rem);
  --t-body:1.125rem;
  --t-sm:.9375rem;
  --t-xs:.8125rem;
  --t-num:clamp(4rem,11vw,10rem);           /* keynote numerals */

  /* ---- space ---- */
  --g:14px;                                  /* gutter outside an inset frame */
  --in:42px;                                 /* padding inside a frame */
  --edge:calc(var(--g) + var(--in));         /* text edge: lines up with text inside frames */
  --r:20px; --r-s:16px; --r-l:24px;          /* frame radii */
  --col:24px;                                /* 12-column gap */
  --hdr:76px;
  --sec:clamp(96px,11.5vw,168px);            /* default section rhythm */
  --sec-s:clamp(64px,7vw,104px);             /* tight */
  --sec-l:clamp(128px,15vw,224px);           /* open */

  /* ---- motion ---- */
  --ease:cubic-bezier(.2,.7,.1,1);
  --ease-io:cubic-bezier(.7,0,.2,1);
  --fast:.25s; --med:.5s; --slow:.9s;
}
@media (max-width:1180px){:root{--in:30px}}
@media (max-width:640px){:root{--g:8px;--in:18px;--r:16px;--r-s:14px;--r-l:18px;--hdr:64px;--col:16px}}
