/* Lxxvii standard style: tokens.
   Load this file first, then components.css. Plain CSS, no build step.
   Values marked "measured" come from the live site (lxxvll.com) or the app restyle;
   values marked "proposed" follow from the system where both sources were silent.
   The reasoning for each value is in tokens.md. */

/* ---------- fonts ----------
   Four woff2 files, SIL Open Font License 1.1 (fonts/OFL-Forum.txt, fonts/OFL-Inter.txt).
   They are the Google Fonts latin and cyrillic subsets of Forum (one weight, 400) and of
   Inter (variable, used at 300 to 500). Copy the fonts/ folder next to this file,
   or change the url() paths. Do not load them from a CDN in an app or an offline document. */
@font-face {
	font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("/assets/fonts/forum-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("/assets/fonts/forum-cyrillic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Inter"; font-style: normal; font-weight: 300 500; font-display: swap;
	src: url("/assets/fonts/inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter"; font-style: normal; font-weight: 300 500; font-display: swap;
	src: url("/assets/fonts/inter-cyrillic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
	color-scheme: dark;

	/* ---------- grounds: elevation is lightness, darkest to lightest ---------- */
	--cut: #060605;      /* measured. Below the ground: wells, fields, previews, carved letters */
	--basalt: #0b0a09;   /* measured. The ground of every page and window */
	--stone: #141311;    /* measured. A slab laid on the ground: panels, bars, the hero tablet */
	--raised: #1c1a17;   /* measured (app). One step above a slab: the current item, popovers, hover */

	/* ---------- ink ---------- */
	--lit: #fff8ec;      /* measured. Text that is lit: the current or hovered name. Never a fill */
	--marble: #ebe5da;   /* measured. Primary text, primary button fill, icons */
	--mute: #8a837a;     /* measured. Secondary text, labels, help, placeholders */
	--rest: #7d766c;     /* measured. A display name at rest before it is lit. Large text only (24px and up) */
	--faint: #4a4640;    /* measured. Decoration and disabled only. Fails contrast for reading */

	/* ---------- lines: marble at an alpha, so they sit on any ground ---------- */
	--line: rgba(235, 229, 218, .10);      /* measured. Rules between rows and sections */
	--line-hi: rgba(235, 229, 218, .22);   /* measured. The edge of a slab, tablet or popover */
	--line-ctl: rgba(235, 229, 218, .40);  /* proposed. The edge of a control at rest: 3:1 against every ground */

	/* ---------- the one accent: porphyry, hue 350, three steps of lightness ---------- */
	--porphyry: #9b2c3f;      /* measured. Fills only: destructive confirm, close-button hover, soft glows */
	--porphyry-hi: #c8435a;   /* measured. Marks: the 1px or 2px line of the current item, live dots, numerals */
	--porphyry-ink: #d16174;  /* proposed. Small text in the accent: 4.69:1 or better on every ground */

	/* ---------- bronze: the iron cramps and nothing else ---------- */
	--cramp-1: #6b5a40;
	--cramp-2: #3f3426;
	--cramp-3: #2c241a;
	--rivet: #a08a63;
	--rivet-lo: #3a2f22;

	/* ---------- the lit glow (text-shadow only) ---------- */
	--lit-glow: 0 0 3px rgba(255, 240, 215, .75), 0 0 18px rgba(250, 234, 206, .45), 0 0 46px rgba(244, 226, 196, .25);            /* measured (app). Text under 30px */
	--lit-glow-display: 0 0 3px rgba(255, 240, 215, .75), 0 0 18px rgba(250, 234, 206, .55), 0 0 46px rgba(244, 226, 196, .35), 0 0 110px rgba(244, 226, 196, .18);  /* measured (site). Display names 30px and up */

	/* ---------- type ---------- */
	--display: "Forum", "Times New Roman", serif;       /* weight 400 only */
	--text: "Inter", system-ui, sans-serif;             /* 300 body, 400 controls, 500 labels */
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;  /* code and formulas only */

	/* display sizes */
	--fs-hero: clamp(96px, 15.5vw, 236px);   /* measured. The carved name, once per site */
	--fs-title: clamp(64px, 7.5vw, 120px);   /* measured. Title of a document page */
	--fs-h1: clamp(48px, 5vw, 78px);         /* measured. A project or chapter name on a page */
	--fs-h2: clamp(36px, 3.4vw, 50px);       /* measured. A section heading on a page */
	--fs-stat: 40px;                         /* measured. A figure in a row of numbers */
	--fs-h1-app: 28px;                       /* measured (app). Title of a window or tab */
	--fs-h3: 21px;                           /* measured. Card heading on a page; 20px in the app */
	--fs-h4: 18px;                           /* measured (app) */
	--fs-label-display: 15px;                /* measured. Title-bar title, bar labels, numerals in section heads */
	--fs-numeral: 13px;                      /* measured (app). Roman numeral before a tab */

	/* text sizes */
	--fs-lead: 17px;      /* measured. Lead paragraph on a page */
	--fs-body: 16px;      /* measured. Body on a page */
	--fs-body-app: 14px;  /* measured. Body in an app window */
	--fs-ui: 13px;        /* measured. Controls and their labels */
	--fs-small: 12px;     /* measured. Help text, chips, status lines */
	--fs-caps: 11px;      /* measured. The spaced capitals label */
	--fs-caps-sm: 10px;   /* measured. Table heads, definition terms, section numbers */

	--track-caps: .28em;      /* measured. Letter-spacing of the caps label */
	--track-caps-sm: .26em;   /* measured */
	--track-hero: .06em;      /* measured */
	--track-numeral: .2em;    /* measured. Roman numerals standing alone; .1em before a tab label */

	/* ---------- shape: cut stone ---------- */
	--radius: 2px;      /* the one corner radius for every control and container */
	--radius-sm: 1px;   /* proposed. Parts under 20px on their short side: thumbs, swatches, key caps */
	--hair: 1px;        /* every border and rule */
	--mark: 2px;        /* the slider track and the progress bar. Never a bar down the side of a block */

	/* ---------- space (px). Measured anchors: 2 seam, 28 app gutter, 40 page gutter, 72 column gap ---------- */
	--seam: 2px;
	--s-1: 4px;
	--s-2: 8px;
	--s-3: 12px;
	--s-4: 16px;
	--s-5: 20px;
	--s-6: 24px;
	--s-7: 28px;
	--s-8: 40px;
	--s-9: 56px;
	--s-10: 72px;
	--s-11: 112px;   /* the site measures 110 after a document section */
	--s-12: 160px;

	/* ---------- the three heights of a one-line box, and the padding that goes with each (grid.md) ---------- */
	--h-sm: 24px;        /* measured (app chip). Chip, key cap, tooltip, a button inside a toast */
	--ctl-h: 34px;       /* measured (app). Buttons, fields, dropdowns, segmented controls, options, toasts, notices */
	--ctl-h-lg: 52px;    /* measured (site). The one call to action on a web page */
	--pad-sm: 8px;       /* side padding at 24px */
	--ctl-pad: 12px;     /* measured. Side padding at 34px of a well: field, dropdown, option, key field */
	--pad-slab: 16px;    /* measured. Side padding at 34px of a slab: button, segment, toast, notice */
	--pad-lg: 28px;      /* measured. Side padding at 52px */
	--bar-h: 40px;       /* measured (app). A bar that spans a window edge: the title bar */
	--lh-sm: 16px;       /* the line box of 12px text inside a box: 16 + 2 x 4 = 24 */
	--lh-ui: 18px;       /* the line box of 13px text inside a box: 18 + 2 x 8 = 34; two lines make 52 */

	/* ---------- shadows: only things that float cast one ---------- */
	--shadow-pop: 0 18px 40px rgba(0, 0, 0, .55);                              /* measured (app). Dropdown lists, popovers, tooltips */
	--shadow-slab: 0 30px 60px rgba(0, 0, 0, .75), 0 10px 22px rgba(0, 0, 0, .6);  /* measured (site). The hero tablet, dialogs */

	/* ---------- motion ---------- */
	--ease: cubic-bezier(.2, .7, .15, 1);       /* measured. The one curve for every state change */
	--ease-loop: cubic-bezier(.45, 0, .2, 1);   /* measured. The looping scroll cue only */
	--t-fast: .2s;     /* measured. Window-control hover, small fades */
	--t-color: .3s;    /* measured. Colour, border and background changes */
	--t-move: .4s;     /* measured. Transforms: thumbs, underlines, button scale */
	--t-lit: .5s;      /* measured. A name lighting up */
	--t-lit-display: .9s;   /* measured (site, home). The name of a landing block lighting as the block reaches the middle of the screen */
	--t-reveal: 1.1s;  /* measured. Content entering the viewport, once */

	/* ---------- z-order ---------- */
	--z-raised: 1;     /* measured range 1 to 5: content above a backdrop drawing */
	--z-bar: 10;       /* measured. Fixed bars */
	--z-drop: 20;      /* measured. Dropdown lists and menus */
	--z-pop: 40;       /* measured. Popovers: colour picker, tooltips */
	--z-dialog: 60;    /* proposed. Scrim and dialog */
	--z-toast: 80;     /* proposed. Status messages above everything */
}
