/* Every design value on the site, named once (batch 2, X1). shell.css uses only these names.
   Where the study page has been measured (archive/type-and-spacing.json, catalog/catalog.md), its value is the one named
   here; the cross-page reviewer's standards (review r02, site.md U-01 to U-11) fill only what the study page doesn't measure.
   One look, day and night (D5): Story sections black, practical sections white.
   Desktop values first; the tablet (<= 1068 px) and phone (<= 734 px) blocks below change only what they must. */

:root {
  /* ---------- type: one ladder (the study page's measured sizes, line heights and tracking) ---------- */
  --k-font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --k-weight-body: 400;
  --k-weight-medium: 500;
  --k-weight-head: 600;
  --k-display: 80px;   --k-display-lh: 1.05;  --k-display-ls: -0.015em;  /* the study page's hero headline, 80/84 */
  --k-headline: 48px;  --k-headline-lh: 1.08; --k-headline-ls: -0.003em; /* its section headlines, 48/52 */
  --k-title: 28px;     --k-title-lh: 1.14;    --k-title-ls: 0.007em;     /* tile and card titles, 28/32 */
  --k-intro: 21px;     --k-intro-lh: 1.38;    --k-intro-ls: 0.011em;     /* intro lines and eyebrows, 21/29 */
  --k-body: 17px;      --k-body-lh: 1.47;     --k-body-ls: -0.022em;     /* body, 17/25 */
  --k-small: 14px;     --k-small-lh: 1.29;    --k-small-ls: -0.016em;    /* small print, 14/18 */
  --k-caption: 12px;   --k-caption-lh: 1.33;  --k-caption-ls: -0.01em;   /* captions and the nav, 12/16 */
  --k-micro: 10px;                                                       /* the smallest label in a drawn picture */
  --k-tight-lh: 1;                                                       /* one-line marks and glyphs */
  --k-read-lh: 1.6;                                                      /* long reading pages */
  --k-mono-ls: 0.02em;                                                   /* ticket numbers in drawn pictures */
  /* the Constraint mark: Constra\nt, which folds to C\ once the page scrolls, as on today's site */
  --k-mark-font: Inter, var(--k-font);
  --k-mark-size: 22px;  --k-mark-weight: 650;  --k-mark-ls: -0.035em;  --k-mark-slash-ls: -0.06em;
  --k-mark-a: 4.6em;  --k-mark-b: 1.4em;  --k-mark-slash-in: -0.01em;  --k-mark-slash-out: -0.015em;  --k-mark-gap: 0.2em;
  --k-mark-at: 8;              /* px scrolled before the mark folds (read by shell.js) */
  /* text drawn inside pictures (the SVG team map, the typed laptops): fixed, so a drawing reads the same at every size */
  --k-draw-text: 21px;  --k-draw-text-lg: 28px;  --k-draw-chip: 17px;

  /* ---------- colour: one look ---------- */
  --k-black: #000000;          /* Story sections (the study page's black) */
  --k-white: #ffffff;          /* practical sections, the cards that open */
  --k-grey: #f5f5f7;           /* the footer, quiet panels on white; also the ink on black */
  --k-ink-dark: #f5f5f7;       --k-ink-2-dark: #86868b;   --k-line-dark: #424245;   --k-raise-dark: #1d1d1f;  --k-well-dark: #2a2a2d;
  --k-ink-light: #1d1d1f;      --k-ink-2-light: #6e6e73;  --k-line-light: #d2d2d7;  --k-raise-light: #ffffff;  --k-well-light: #f5f5f7;
  --k-control-dark: #333336;   /* a close button on a dark card */
  /* the accent is Constraint's violet, the mark's own (ruled 6 Nov): buttons, links, focus */
  --k-accent: #5b4dcf;         --k-accent-ink: #ffffff;   --k-link-dark: #a79cf5;
  --k-accent-soft: color-mix(in srgb, var(--k-accent) 14%, transparent);
  --k-accent-wire: color-mix(in srgb, var(--k-accent) 75%, transparent);
  /* glass and scrims */
  --k-nav-bg: rgba(22, 22, 23, 0.8);  --k-nav-bg-solid: rgba(22, 22, 23, 0.96);  --k-nav-line: rgba(255, 255, 255, 0.08);
  --k-nav-line-phone: rgba(128, 128, 128, 0.25);
  --k-chip-bg: rgba(40, 40, 44, 0.86);          /* a floating prototype control */
  --k-button-scrim: rgba(29, 29, 31, 0.72);     /* play and close buttons over a picture */
  --k-backdrop: rgba(0, 0, 0, 0.55);            /* behind a card that opens */
  --k-spot-dim: rgba(12, 10, 30, 0.3);          /* what a spotlight does to everything outside the part that matters */
  --k-spot-ring: rgba(255, 255, 255, 0.55);
  --k-spot-reach: 2400px;     /* how far a spotlight's dim reaches when the camera hasn't measured its picture yet */
  --k-overlay-fade: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.62) 56%, rgba(0, 0, 0, 0.9) 100%);
  --k-veil: 8, 6, 26;                           /* the cover's veil, as r, g, b */
  /* the brand's night: the cover, the typed step, the illustrated cards and Steer's feature objects */
  --k-violet-bg: #0c0a1f;
  --k-violet-glow: radial-gradient(120% 90% at 70% 8%, #2c2373 0%, #130f37 46%, #07061a 100%);
  --k-violet-card: linear-gradient(150deg, #2a2160 0%, #4a3bb8 56%, #6d5df0 100%);
  --k-night-card: radial-gradient(120% 100% at 72% 0%, #251c5e 0%, #0e0b27 55%, #07061a 100%);
  --k-dusk-card: linear-gradient(160deg, #191340 0%, #33287f 58%, #5b4dcf 100%);
  --k-display-gradient: linear-gradient(90deg, #d4ccff 0%, #9d90f5 45%, #f7c46c 100%);  /* big story words on black only */
  --k-lite-glow: radial-gradient(42% 70% at 26% 34%, color-mix(in srgb, var(--k-accent) 13%, transparent), transparent 72%), radial-gradient(36% 60% at 80% 8%, color-mix(in srgb, var(--k-accent) 9%, transparent), transparent 72%);  /* the lighter openings' drift of light */
  --k-glow-accent: radial-gradient(50% 45% at 50% 55%, color-mix(in srgb, var(--k-accent) 36%, transparent), transparent 70%);
  --k-on-violet: #ffffff;  --k-on-violet-2: rgba(255, 255, 255, 0.78);
  --k-lavender: #e9e6ff;   --k-lavender-2: rgba(233, 230, 255, 0.8);  --k-lilac: #c9c1ff;  --k-lilac-2: #b9b0ff;
  --k-violet-ink-strong: #3b2f9a;  /* the action on a violet card */
  --k-glass-1: rgba(255, 255, 255, 0.06);  --k-glass-2: rgba(255, 255, 255, 0.14);  --k-glass-3: rgba(255, 255, 255, 0.28);
  --k-glass-line: rgba(255, 255, 255, 0.42);
  --k-lavender-line: rgba(167, 156, 245, 0.2);  --k-lilac-line: rgba(185, 176, 255, 0.5);
  --k-violet-fill: rgba(124, 108, 255, 0.28);
  /* status, inside drawn pictures only */
  --k-amber: #f7c46c;  --k-amber-ink: #1b1340;  --k-amber-bg: rgba(245, 177, 76, 0.13);  --k-amber-line: rgba(245, 177, 76, 0.6);
  --k-green: #74e7ad;  --k-green-ink: #0b2a1c;  --k-green-bg: rgba(116, 231, 173, 0.2);   --k-green-line: rgba(116, 231, 173, 0.6);
  --k-review: #bdb4ff;
  /* the drawn laptop, in our own code (never the app) */
  --k-device-shell: linear-gradient(180deg, #3b3c41, #1d1e22);
  --k-device-deck-fill: linear-gradient(180deg, #6a6b71 0%, #3c3d42 30%, #24252a 100%);
  --k-device-screen: #050506;
  --k-device-wall: radial-gradient(120% 95% at 22% 8%, #7a6ff0 0%, #3a2d8f 38%, #15103a 70%, #07061a 100%);
  --k-device-lip-fill: rgba(0, 0, 0, 0.35);
  --k-device-glow-fill: radial-gradient(closest-side, rgba(185, 176, 255, 0.5), transparent);
  /* the VP's orb and a sentry's radar */
  --k-orb-fill: radial-gradient(circle at 50% 115%, rgba(150, 132, 255, 0.4), transparent 58%), radial-gradient(circle at 50% 38%, #1b1932 0%, #08070f 72%);
  --k-orb-band-fill: linear-gradient(90deg, transparent 0%, #ffcf8a 20%, #ffffff 46%, #a8e9ff 70%, transparent 100%);
  --k-orb-rim-fill: conic-gradient(from 210deg, transparent 0 58%, rgba(255, 255, 255, 0.6) 68%, transparent 80%);
  --k-radar-fill: radial-gradient(circle, #15122d 0%, #08070f 74%);
  --k-radar-sweep-fill: conic-gradient(from 0deg, transparent 0 70%, rgba(185, 176, 255, 0.5) 100%);
  --k-hairline-v: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  --k-hairline-h: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  --k-trace-fill: linear-gradient(90deg, transparent, rgba(185, 176, 255, 0.65), transparent);
  --k-panel-fill: linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.07));

  /* ---------- space: one scale (the study page's section spacing; a 4 px step inside, 8 px rhythm) ---------- */
  --k-hair: 1px;      --k-rule: 2px;
  --k-space-0-5: 2px; --k-space-1: 4px;   --k-space-2: 8px;   --k-space-3: 12px;  --k-space-4: 16px;  --k-space-5: 20px;
  --k-space-6: 24px;  --k-space-7: 28px;  --k-space-8: 32px;  --k-space-9: 36px;  --k-space-10: 40px; --k-space-11: 44px;
  --k-space-12: 48px; --k-space-14: 56px; --k-space-16: 64px; --k-space-18: 72px;
  --k-section-pad: 144px;      /* the study page's: 144 px above and below a section */
  --k-section-pad-lg: 224px;   /* and 224 px below its big media sections */
  --k-section-pad-sm: 48px;    /* a page's opening, and its compact close: a third of the study page's section spacing */
  --k-sec-top: 48px;           /* D6 (U-07): every section's top, and */
  --k-sec-bottom: 96px;        /* its bottom: 144 px from one section's last content to the next one's first */
  --k-gap-head: 24px;          /* a heading to its line (U-05) */
  --k-gap-media: 48px;         /* words to their picture (U-05) */
  --k-gap-caption: 16px;       /* a picture to its caption (U-05) */
  --k-gap-more: 24px;          /* a line to its More (U-11) */
  --k-gutter: 24px;
  --k-nav-h: 52px;

  /* ---------- sizes ---------- */
  --k-text-width: 980px;       /* the study page's text column */
  --k-wide-width: 1260px;      /* the study page's content width */
  --k-stage-width: 1120px;     /* a picture's stage (U-09) */
  --k-line-width: 692px;       /* a line's measure */
  --k-measure: 760px;          /* long reading */
  --k-measure-sm: 440px;       /* a short note beside an action */
  --k-feat-band-h: 280px;      /* the blog's featured picture band (D7: 240 to 320) */
  --k-tools-col: 220px;        /* the tool finder's results column (B4) */
  --k-booking-gap: 24px;       /* between a closing booking's rows (D9: space.booking) */
  --k-onward-lh: 24px;         /* an onward link's line (D9: type.onward, 17 / 24) */
  --k-dialog-w: 816px;  --k-dialog-wide: 1040px;  --k-dialog-film: 1200px;  --k-dialog-max-h: 900px;
  --k-target: 44px;            /* the smallest thing you can press */
  --k-control: 36px;           /* round icon buttons */
  --k-control-lg: 56px;        /* the carousel's pause */
  --k-control-sm: 28px;        /* the nav's button */
  --k-icon: 16px;
  --k-bar: 14px;               /* the strokes of a plus or a close */
  --k-chevron: 10px;
  --k-dot: 8px;
  --k-dot-active: 48px;
  --k-badge: 24px;             /* a numbered or plus badge */
  --k-avatar: 20px;            /* initials on a drawn ticket */
  --k-tile-min: 260px;  --k-tile-max: 372px;  --k-tile-h: 230px;  --k-tile-vis-h: 150px;
  --k-rail-max: 330px;  --k-rail-h: 290px;
  --k-faq-h: 480px;            /* Request access's question box: about six and a half questions, so the cut one says "scroll" */
  --k-faq-out: min(var(--k-space-4), var(--k-gutter));   /* how far its scroll bar sits right of the plus signs' edge, in the gutter (batch 8, D5) */
  --k-person-w: 320px;
  --k-viewer-pills: 300px;
  --k-hl-text-min: 260px;
  --k-card-min-h: 228px;  --k-pair-min-h: 190px;
  --k-illo-min-h: 300px;
  --k-orb-size: 184px;  --k-orb-size-sm: 104px;
  --k-panel-w: 300px;
  --k-wire-h: 300px;
  --k-team-max-h: 420px;
  --k-zs-words-h: 210px;  --k-zs-words-h-tab: 150px;  --k-zs-chrome: 72px;  --k-zs-chrome-tab: 260px;  --k-zs-chrome-phone: 250px;
  /* the opening (X2): its words take one height on every story page, so its stage starts at one place, and the stage's
     width is what the window's height leaves under them (the laptop's drawing ends at 1 / 1.73 of its width) */
  --k-open-text-h: 292px;
  --k-hero-above: calc(var(--k-nav-h) + var(--k-section-pad-sm) + var(--k-open-text-h) + var(--k-gap-media));
  --k-hero-min: 520px;  --k-hero-max: 1040px;
  --k-cover-len: 140;          /* the cover's scroll length, in screens / 100 (X7: shorter) */
  --k-step-len: 70;            /* the worked example's scroll per step, in screens / 100 (X7: shorter) */
  --k-film-w: min(100% - 2 * var(--k-gutter), var(--k-hero-max));
  --k-descender: 0.14em;       /* room below the baseline for gradient words */
  /* the drawn laptop's parts (container units: one drawing serves every size) and the drawn cards' proportions */
  --k-device-lid-w: 78cqw;  --k-device-lid-h: 51.6cqw;  --k-device-bezel: 1.1cqw;  --k-device-chin: 1.5cqw;
  --k-device-notch-w: 6.4cqw;  --k-device-notch-h: 1.25cqw;  --k-device-deck-h: 3.2cqw;  --k-device-lip-w: 12cqw;  --k-device-lip-h: 0.9cqw;
  --k-blip: 5cqw;  --k-orb-band-h: 13%;  --k-trace-w: 55%;  --k-kin-w: 96%;  --k-kin-w-phone: 64%;  --k-node-glyph: 46%;
  --k-illo-gap: 4%;  --k-illo-gap-sm: 2%;  --k-illo-pad-pair: 2% 6% 6%;  --k-illo-pad-pair-tab: 4% 4% 8%;  --k-illo-pad-laptop: 6% 6% 2%;
  --k-illo-pad-team: 2% 4%;  --k-illo-divide-m: 8%;  --k-illo-divide-x: 18%;

  /* ---------- corners ---------- */
  --k-radius-pill: 980px;
  --k-radius-card: 28px;       /* cards and panels */
  --k-radius-tile: 24px;       /* tiles */
  --k-radius-media: 18px;      /* pictures */
  --k-radius-ui: 12px;         /* small panels inside a picture */
  --k-radius-sm: 6px;          /* focus rings, code */
  --k-radius-xs: 1px;          /* the ends of a 2 px bar */
  --k-radius-round: 50%;
  --k-radius-squircle: 24%;    /* connector tiles */
  /* the drawn laptop's corners, as shares of its own box, so every size of it has the same corners */
  --k-radius-lid: 2.4% 2.4% 1.2% 1.2% / 3.7% 3.7% 1.8% 1.8%;
  --k-radius-screen: 1% / 1.6%;
  --k-radius-notch: 0 0 9% 9% / 0 0 48% 48%;
  --k-radius-deck: 0.4% 0.4% 2% 2% / 12% 12% 56% 56%;
  --k-radius-lip: 0 0 6.6% 6.6% / 0 0 88% 88%;

  /* ---------- shadows (a picture's edge is its surface's line colour, 1 px, no drop shadow: U-09; shell.css writes it
     as 0 0 0 var(--k-hair) var(--k-line), since the line colour belongs to each section) ---------- */
  --k-shadow-float: 0 20px 50px rgba(0, 0, 0, 0.25);            /* something floating over a picture */
  --k-shadow-dialog: 0 30px 120px rgba(0, 0, 0, 0.45);
  --k-shadow-underline: 0 1px 0 currentColor;                   /* the nav's current page */
  --k-halo: 6px;                                                /* a timeline dot cut out of its line */
  --k-shadow-glass: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  --k-shadow-orb: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 32px 80px rgba(80, 60, 220, 0.25);
  --k-shadow-blip: 0 0 8px var(--k-amber);
  --k-shadow-panel-on: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 60px rgba(185, 176, 255, 0.55), 0 20px 50px rgba(0, 0, 0, 0.25);
  --k-shadow-device: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  --k-shadow-deck: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 20px 50px rgba(0, 0, 0, 0.25);

  /* ---------- motion (the study page's measured timings: 0.2 s controls, 0.5 s fades, 0.7 s moves, 0.9 s reveals, 1 s slides,
     0.15 s staggers; U-06's 2 s beat and 8 s story where the study page gives none) ---------- */
  --k-ease: cubic-bezier(0.4, 0, 0.25, 1);
  --k-ease-out: cubic-bezier(0, 0, 0.58, 1);
  --k-ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --k-ease-linear: linear;
  --k-dur-control: 200ms;
  --k-dur-fade: 500ms;
  --k-dur-move: 700ms;
  --k-dur-reveal: 900ms;
  --k-dur-slide: 1000ms;
  --k-dur-beat: 2000ms;
  --k-dur-story: 8000ms;
  --k-stagger: 150ms;
  --k-mark-fold: 500ms;  --k-mark-fade: 260ms;  --k-mark-ease: cubic-bezier(0.4, 0, 0.2, 1);   /* the live mark's own */
  --k-reveal-shift: 0px;       /* calm sections fade in where they stand (the motion budget) */
  --k-dur-instant: 0.01ms;     /* reduced motion */

  /* behaviour settings read by shell.js (numbers, in ms or fractions) */
  --k-card-still-ms: 6000;     /* how long a still card stays before the carousel moves on (the study page holds 6.15 s) */
  --k-card-hold-ms: 1500;      /* batch 5: how long a made clip holds its last frame before the carousel moves on */
  --k-band-ms: 5000;           /* an image band's drift, then it holds: within the 5 s cap on motion (13 Nov) */
  --k-theme-line: 0.5;         /* where on screen (0 top .. 1 bottom) a section takes over the page colour */
}

/* tablet */
@media (max-width: 1068px) {
  :root {
    --k-display: 64px; --k-headline: 40px; --k-title: 24px; --k-intro: 19px;
    --k-section-pad: 128px; --k-section-pad-lg: 184px; --k-section-pad-sm: 40px;
    --k-illo-min-h: 280px;
    --k-radius-card: 24px;
    --k-open-text-h: 260px;
  }
}
/* phone (the study page's measured phone ladder: 40/44, 32/36, 21/25, 19/27) */
@media (max-width: 734px) {
  :root {
    --k-display: 40px; --k-display-lh: 1.1; --k-headline: 32px; --k-headline-lh: 1.13; --k-title: 21px; --k-title-lh: 1.19;
    --k-intro: 19px; --k-intro-lh: 1.42;
    --k-section-pad: 112px; --k-section-pad-lg: 144px; --k-section-pad-sm: 32px;
    --k-sec-top: 32px; --k-sec-bottom: 64px;   /* 96 px between sections on a phone (D6) */
    --k-open-text-h: 312px;
    --k-illo-min-h: 260px;
    --k-gap-head: 16px; --k-gap-media: 32px; --k-gutter: 16px;
    --k-radius-card: 22px; --k-radius-media: 12px; --k-radius-tile: 20px;
    --k-control-lg: 48px;
    --k-orb-size: 116px;
    --k-nav-h: 48px;
  }
}

/* The Constraint draft set (decision 2): the app's own violet, warmer neutrals, softer corners. */
html[data-look="draft"] {
  --k-weight-head: 650;
  --k-display-ls: -0.03em; --k-headline-ls: -0.02em;
  --k-black: #0c0b12;  --k-ink-dark: #f4f2fb; --k-ink-2-dark: #9b97ad; --k-line-dark: #2c2a38; --k-raise-dark: #1b1926;
  --k-grey: #f3f2f8;   --k-well-light: #f3f2f8;
  --k-accent: #6a5ae0; --k-link-dark: #a99cff;
  --k-radius-card: 32px; --k-radius-media: 20px;
}
