/*
 * The one set of values for the account pages' new look and the API reference (tallyfy/work-queue#5229).
 *
 * Every color, radius, rule and type value these pages use is here, and nowhere else: account.css,
 * the views and the API reference read only these names. The account pages link this file; the API
 * reference puts it inline, because its host serves only /swagger/ and /docs/ to a browser.
 *
 * The foundation is the website's design system (tallyfy/work-queue#5229): an account page wears the
 * website's paper, ink, three spot inks, heading face and paper grain around the app's own form. The
 * form controls are the app's own tf- elements with the app's own corners, so the app's tokens still
 * draw them; only the message boxes, and the filled button's edge, are set from here.
 *
 * The scene's own inks are part of the scene, in its folder's stylesheet (public/account-new/scene/v6/).
 */
:root {
  /* type */
  --look-body: Inter, -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  --look-heading: 'Inter Tight', 'Inter Tight stand-in', Inter, -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  --look-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  --look-body-size: 16px;
  /* Three weights carry everything, as on the website (system.css --c1-w-*): 400 for reading, 500 for
     labels and controls, 600 for headings, emphasis and a primary button's label. Nothing is heavier. */
  --look-w-read: 400;
  --look-w-label: 500;
  --look-w-strong: 600;
  /* Headings at 600, at the face's own spacing, with line heights of at least 1.26 (owner decision 54). The
     split pages' headline is the quiet pages' title size, so a sign-in headline sits on two lines at 1440. */
  --look-heading-weight: var(--look-w-strong);
  --look-heading-tracking: 0em;
  --look-headline-size: 32px;
  --look-headline-line: 41px;
  --look-headline-size-phone: 28px;
  --look-headline-line-phone: 36px;
  --look-title-size: 32px;
  --look-title-line: 41px;
  --look-title-size-phone: 26px;
  --look-title-line-phone: 33px;
  --look-line-size: 16px;
  --look-line-line: 24px;
  --look-line-size-phone: 15px;
  --look-line-line-phone: 22px;
  --look-label-size: 12.5px;
  --look-label-line: 16px;
  --look-label-weight: var(--look-w-label);
  --look-label-tracking: 0.14em;
  --look-text-size: 14px;
  --look-text-line: 20px;
  /* a heading at the text size ("Didn't get it?"): 1.5, over the ruling's floor of 1.44 for an h2 */
  --look-lead-heading-line: 21px;
  --look-small-size: 12px;
  --look-small-line: 16.8px;
  --look-mono-size: 13px;
  --look-strong-weight: var(--look-w-strong);
  /* a link reads at the weight of the words round it, with its underline (owner decisions 54 and 55) */
  --look-link-weight: var(--look-w-read);
  --look-link-tracking: 0.14px;
  --look-underline-width: 1px;
  --look-underline-width-hover: 2px;
  --look-underline-offset: 0.24em;

  /* the foundation: paper and ink */
  --look-paper: #f3eee2;
  --look-sheet: #fbf8f1;
  --look-band: #e9e1cf;
  --look-night: #16342a; /* dark paper; no account page has a night section yet */
  --look-cream: #f6f0e2; /* words on night */
  --look-ink: #18241d;
  --look-ink-text: #2a362f; /* running text, as on the website: 10.9 to 1 on the paper, 11.9 to 1 on the sheet */
  --look-ink-soft: #4b5750;
  --look-hair: rgb(24 36 29 / 0.16);
  --look-edge: #857d6c; /* a control's quiet edge, as on the website: 3.5 to 1 on the paper */
  /* the paper grain: fine and still, drawn once into a 220px tile (the website's own) */
  --look-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .30 0 0 0 0 .2 0 0 0 1.1 -.52'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)' opacity='.34'/%3E%3C/svg%3E");

  /* the foundation: three spot inks, each a fill, a text step and a tint */
  --look-green: #3fb65b;
  --look-green-hover: #33a14d;
  --look-green-text: #1b7037;
  --look-green-tint: #e2efdc;
  --look-orange: #ee7616;
  --look-orange-text: #a8470b;
  --look-orange-tint: #f8e2cd;
  --look-blue: #2e5c9b;
  --look-blue-text: #2a5591;
  --look-blue-tint: #dfe6ee;
  /* the website's deep steps of two inks (system.css --c1-orange-deep, --c1-blue-deep) and its one
     highlight (--c1-mark). Only the API reference reads them, for the two method and code colors the three
     text steps do not cover: orange deep 7.71 to 1 on the paper, blue deep 9.11. */
  --look-orange-deep: #7c3409;
  --look-blue-deep: #1e3f6e;
  --look-mark: #f5c38e;

  /* the night paper, for the API reference's dark mode (tallyfy/api-v2#12274). The values are the docs' dark
     theme (support-docs src/styles/tfx/tokens.css), measured there: cream 11.86 to 1 on the night, 9.82 on
     its raised sheet; soft cream 6.89 and 5.71; green 6.83 and 5.66; orange 6.79 and 5.62; blue 7.89 and
     6.54. The error step is this file's own: the app's dark error red reads 3.99 on the night sheet, so this
     one is lighter, 6.63 on the night, 5.50 on the sheet and 4.82 on the band. No account page reads these. */
  --look-night-sheet: #1d4234;
  --look-night-band: #234b3c;
  --look-cream-soft: #b7bbae;
  --look-night-hair: rgb(246 240 226 / 0.26);
  --look-night-edge: #8a958b;
  --look-green-night: #6acd7f;
  --look-green-tint-night: #1f4a32;
  --look-orange-night: #f2a868;
  --look-orange-tint-night: #4b3820;
  --look-blue-night: #b4c8e2;
  --look-error-night: #ff9b8f;

  /* the app's own values, for the few native controls that stand in for app fields, and for a real error */
  --look-error-text: var(--tf-error-text, #c41e0f);
  --look-error-tint: var(--tf-error-badge-bg, #fef2f2);
  --look-control-edge: var(--tf-control-border, #767676);

  /* roles */
  --look-page: var(--look-paper);
  --look-surface: var(--look-sheet);
  --look-rule: var(--look-hair);
  /* an edge that only groups is the hairline; the full ink is kept for the primary button (owner decision 55) */
  --look-panel-edge: var(--look-hair);
  --look-ring: var(--look-ink);
  --look-link: var(--look-ink);
  --look-link-line: var(--look-ink);
  --look-link-line-hover: var(--look-orange);
  --look-label: var(--look-orange-text);
  --look-check: var(--look-green-text);

  /* the app's filled green button on paper (tallyfy/work-queue#5229): its fill reads 2.2 to 1
     against the paper, so wherever it sits on paper or a sheet outside the app it carries a 1px edge
     in green's text step (about 5.3 to 1), drawn inside its box so its size never changes, and kept
     on focus, where the one ring goes round it. Its own small shadows. */
  --look-button-edge: var(--look-green-text);
  --look-button-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  --look-button-shadow-hover: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

  /* the logo: its three marks are the three spot inks; its word keeps the logo's own dark grey */
  --look-wordmark: #202934;
  --look-logo-orange: var(--look-orange);
  --look-logo-blue: var(--look-blue);
  --look-logo-green: var(--look-green);

  /* the three-colour stripe along the top of every page, as on the website and the docs: the logo's
     green, orange and blue in thirds */
  --look-stripe: linear-gradient(90deg, var(--look-logo-green) 0 33.34%, var(--look-logo-orange) 33.34% 66.67%, var(--look-logo-blue) 66.67% 100%);
  --look-stripe-height: 3px;

  /* radius and rules */
  --look-radius: var(--tf-radius-lg, 12px);
  --look-radius-box: var(--tf-radius-md, 8px);
  --look-radius-small: 6px;
  --look-radius-inline: 3px;
  --look-radius-round: 50%;
  /* the app's checkbox (tf-checkbox: --tf-checkbox-radius and its edge width), drawn before its script runs */
  --look-check-radius: 4px;
  --look-check-edge-width: 2px;
  --look-rule-width: 1px;
  /* focus (CALM A9): a field's own edge turns 2px in the ink; any other control gets one 2px ink ring, 2px out */
  --look-ring-width: 2px;
  --look-ring-offset: 2px;

  /* the logo: one height on every page, smaller on a phone */
  --look-logo-height: 34px;
  --look-logo-height-phone: 28px;

  /* the API reference's header bar, which holds the same logo */
  --look-bar-height: 56px;
}

/*
 * The app's message boxes (tf-alert) read these four pairs. On these pages success, warning and
 * information take the system's tints with their text steps; the app's red stays for a real error.
 * The bundle sets its tokens on :root and [data-mode=light]; this selector is a step more specific.
 */
html[data-mode='light'] {
  --tf-success-badge-bg: var(--look-green-tint);
  --tf-success-text: var(--look-green-text);
  --tf-warning-badge-bg: var(--look-orange-tint);
  --tf-warning-text: var(--look-orange-text);
  --tf-info-badge-bg: var(--look-blue-tint);
  --tf-info-text: var(--look-blue-text);
}
