@charset "UTF-8";
/* Tusch: a monochrome CSS UI kit for web apps and sites whose pages the server renders.

   One stylesheet holds the tokens, the reset and every component.
   Classes are prefixed t-, modifiers use --, elements use __, and state uses
   ARIA attributes or native pseudo-classes. Add data-theme="ink" to any
   container for the inverted theme, data-theme="paper" to bring paper back
   inside it, and data-theme="auto" to follow the reader's system.

   Every rule sits in one of four cascade layers, in this order: tusch.tokens,
   tusch.reset, tusch.prose and tusch.components. CSS of your own outside
   layers beats them all, whatever its specificity. A theme of your own goes
   in tusch.tokens, so that a component that re-themes itself still wins.

   @import has to precede every other rule, so the web fonts and the icon
   font come first, outside any layer: an imported layer would be declared
   ahead of these four. */
/* Phosphor Icons, Light weight — usage: <i class="ph-light ph-folder"></i> */
@import url("https://unpkg.com/@phosphor-icons/web@2.1.1/src/light/style.css");
@layer tusch.tokens, tusch.reset, tusch.prose, tusch.components;
@layer tusch.tokens {
  /* The width of the rule t.edge or t.frame draws as a box's border on each side, which t.mat on the box
     gives up from its padding there. None unless set, and not inherited, so a mat inside a ruled box
     gives up nothing. */
  @property --_rule-block-start {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
  }
  @property --_rule-block-end {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
  }
  @property --_rule-inline-start {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
  }
  @property --_rule-inline-end {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
  }
  /* ==========================================================================
     Tokens: colour
     ========================================================================== */
  /* Paper is the default theme; data-theme="paper" restores it inside an ink
     container, and data-theme="auto" starts from it. The elevation and pattern
     tokens are scoped the same way, because a var() resolves where its token
     is declared. */
  :root, [data-theme=paper], [data-theme=auto] {
    color-scheme: light;
    /* Stone — a single cool-neutral ramp. Hue 250–255, chroma ≤ 0.008. */
    --stone-0: oklch(0.993 0.002 250);
    --stone-50: oklch(0.970 0.003 250);
    --stone-100: oklch(0.940 0.004 250);
    --stone-200: oklch(0.900 0.005 250);
    --stone-300: oklch(0.835 0.006 250);
    --stone-400: oklch(0.720 0.007 250);
    --stone-500: oklch(0.600 0.008 252);
    --stone-600: oklch(0.490 0.008 252);
    --stone-700: oklch(0.380 0.008 254);
    --stone-800: oklch(0.280 0.008 255);
    --stone-900: oklch(0.200 0.008 255);
    --stone-950: oklch(0.140 0.007 255);
    /* Surfaces */
    --surface-page: var(--stone-50);
    --surface-raised: var(--stone-0);
    --surface-sunken: var(--stone-100);
    --surface-hover: var(--stone-100);
    --surface-inverse: var(--stone-900);
    --surface-inverse-hover: var(--stone-700);
    /* Text: full strength and muted. Each reaches 7:1, WCAG AAA, on every surface it sits on, a
       hovered row included; only disabled text, which WCAG exempts, is lighter. Hierarchy below muted
       comes from size, capitals and weight, never a lighter grey. */
    --text-1: var(--stone-900);
    --text-2: var(--stone-700);
    --text-disabled: var(--stone-400);
    --text-inverse: var(--stone-50);
    --text-inverse-2: var(--stone-400);
    /* Rules. A field's frame reaches 3:1 against the surfaces around it. */
    --rule-strong: var(--stone-900);
    --rule-field: var(--stone-500);
    --rule: var(--stone-300);
    --rule-faint: var(--stone-200);
    --rule-inverse: var(--stone-700);
    /* Selection is always inversion */
    --select-bg: var(--stone-900);
    --select-fg: var(--stone-50);
    /* The checkbox tick, in --select-fg. An SVG cannot read custom properties, so each theme sets its own. */
    --check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.2 7.3l2.5 2.5 5-5.4' fill='none' stroke='%23f5f6f7' stroke-width='1.6'/%3E%3C/svg%3E");
    --shadow-tone: var(--stone-300);
    --focus-ring: var(--stone-900);
  }
  /* ==========================================================================
     Tokens: typography
     ========================================================================== */
  :root {
    /* The browser's own faces, which the reader may change and which carry the scripts of every
       language their system does. Plain monospace shrinks text whose size comes down from the
       browser's default, to 13px of 16; none does here, as the body and every role set their own. */
    --font-sans: sans-serif;
    --font-mono: monospace;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    /* Each role's letter-spacing, a step of the scale in em of the text that takes it. */
    --track-display: calc(-1em * pow(var(--ratio), -23));
    --track-title-1: calc(-1em * pow(var(--ratio), -25));
    --track-title-2: calc(-1em * pow(var(--ratio), -28));
    --track-title-3: calc(-1em * pow(var(--ratio), -30));
    --track-lead: calc(-1em * pow(var(--ratio), -38));
    --track-label: calc(1em * pow(var(--ratio), -20));
    --track-ui: 0;
    /* A link's underline sits this far below its text's baseline, in em of the text. */
    --underline-offset: calc(1em * pow(var(--ratio), -12));
    --measure: 64ch;
  }
  /* ==========================================================================
     Tokens: the scale
     ========================================================================== */
  /* Every size comes from a few inputs: a ratio, a rhythm unit, a step of the ratio for each role,
     the screen widths over which the root grows, and the least height of the control and row sizes
     on a coarse pointer. Each token is worked out from them here, on :root, so an input changed on
     :root, in tusch.tokens or outside the layers, changes every size that reads it. Changed on an
     element inside the page, it leaves the tokens as they were worked out above it, while a
     component's own steps of the scale and the scale's functions, which read --ratio and --rhythm
     where they are used, follow it there; so an input belongs on :root alone. */
  :root {
    /* 2^(1/5): five steps to the doubling. */
    --ratio: 1.148698;
    /* The lattice: every vertical length is a whole number of these. */
    --rhythm: 0.25rem;
    /* The root holds at the reader's text size until the screen is --grow-from rem wide, grows
       evenly to --grow-steps steps larger at --grow-to rem, and holds there. */
    --grow-from: 80;
    --grow-to: 160;
    --grow-steps: 2;
    /* On a coarse pointer every control, row and choice row is at least this tall, WCAG 2.5.5's target
       size. What sits inside a row or a line of text is not: a check box in a list row or a table cell,
       a link in the text of a row, a cell or a card's title, and a tag and its remove button, which the
       tag, a piece of text, holds to its line. */
    --touch-floor: 44px;
    /* Each type role, named for its mixin: its step, and the least leading its line keeps. */
    --step-label: -3;
    --leading-label: 1.25;
    --step-caption: -2;
    --leading-caption: 1.25;
    --step-ui: -1;
    --leading-ui: 1.25;
    --step-body: 0;
    --leading-body: 1.4;
    --step-lead: 1;
    --leading-lead: 1.4;
    --step-title-3: 3;
    --leading-title-3: 1.1;
    --step-title-2: 5;
    --leading-title-2: 1.05;
    --step-title-1: 8;
    --leading-title-1: 1;
    --step-display: 12;
    --leading-display: 1;
    /* The steps of the spaces, of the controls and the row, and of the icon. */
    --step-space-3xs: -10;
    --step-space-2xs: -5;
    --step-space-xs: -2;
    --step-space-s: 0;
    --step-space-m: 3;
    --step-space-l: 5;
    --step-space-xl: 8;
    --step-space-2xl: 10;
    --step-space-3xl: 13;
    --step-control-s: 2;
    --step-control-m: 5;
    --step-control-l: 6;
    --step-row: 4;
    --step-icon: 0;
  }
  /* The sizes. A role's text is its step of the scale, and its line the fewest whole rhythm units
     that give it at least its leading. A space is its step to the nearest unit, and never less than
     one. A control, the row and the icon are their steps rounded up to whole units, so that each
     holds what it must. kit/_scale.scss works each out, as it does any size of a component's. */
  :root {
    --font-label: calc(1rem * pow(var(--ratio), var(--step-label)));
    --line-label: round(up, var(--leading-label) * var(--font-label) - var(--rhythm) / 1000, var(--rhythm));
    --font-caption: calc(1rem * pow(var(--ratio), var(--step-caption)));
    --line-caption: round(up, var(--leading-caption) * var(--font-caption) - var(--rhythm) / 1000, var(--rhythm));
    --font-ui: calc(1rem * pow(var(--ratio), var(--step-ui)));
    --line-ui: round(up, var(--leading-ui) * var(--font-ui) - var(--rhythm) / 1000, var(--rhythm));
    --font-body: calc(1rem * pow(var(--ratio), var(--step-body)));
    --line-body: round(up, var(--leading-body) * var(--font-body) - var(--rhythm) / 1000, var(--rhythm));
    --font-lead: calc(1rem * pow(var(--ratio), var(--step-lead)));
    --line-lead: round(up, var(--leading-lead) * var(--font-lead) - var(--rhythm) / 1000, var(--rhythm));
    --font-title-3: calc(1rem * pow(var(--ratio), var(--step-title-3)));
    --line-title-3: round(up, var(--leading-title-3) * var(--font-title-3) - var(--rhythm) / 1000, var(--rhythm));
    --font-title-2: calc(1rem * pow(var(--ratio), var(--step-title-2)));
    --line-title-2: round(up, var(--leading-title-2) * var(--font-title-2) - var(--rhythm) / 1000, var(--rhythm));
    --font-title-1: calc(1rem * pow(var(--ratio), var(--step-title-1)));
    --line-title-1: round(up, var(--leading-title-1) * var(--font-title-1) - var(--rhythm) / 1000, var(--rhythm));
    --font-display: calc(1rem * pow(var(--ratio), var(--step-display)));
    --line-display: round(up, var(--leading-display) * var(--font-display) - var(--rhythm) / 1000, var(--rhythm));
    --space-3xs: max(var(--rhythm) * sign(1rem * pow(var(--ratio), var(--step-space-3xs))), round(nearest, 1rem * pow(var(--ratio), var(--step-space-3xs)), var(--rhythm)));
    --space-2xs: max(var(--rhythm) * sign(1rem * pow(var(--ratio), var(--step-space-2xs))), round(nearest, 1rem * pow(var(--ratio), var(--step-space-2xs)), var(--rhythm)));
    --space-xs: max(var(--rhythm) * sign(1rem * pow(var(--ratio), var(--step-space-xs))), round(nearest, 1rem * pow(var(--ratio), var(--step-space-xs)), var(--rhythm)));
    --space-s: max(var(--rhythm) * sign(1rem * pow(var(--ratio), var(--step-space-s))), round(nearest, 1rem * pow(var(--ratio), var(--step-space-s)), var(--rhythm)));
    --space-m: max(var(--rhythm) * sign(1rem * pow(var(--ratio), var(--step-space-m))), round(nearest, 1rem * pow(var(--ratio), var(--step-space-m)), var(--rhythm)));
    --space-l: max(var(--rhythm) * sign(1rem * pow(var(--ratio), var(--step-space-l))), round(nearest, 1rem * pow(var(--ratio), var(--step-space-l)), var(--rhythm)));
    --space-xl: max(var(--rhythm) * sign(1rem * pow(var(--ratio), var(--step-space-xl))), round(nearest, 1rem * pow(var(--ratio), var(--step-space-xl)), var(--rhythm)));
    --space-2xl: max(var(--rhythm) * sign(1rem * pow(var(--ratio), var(--step-space-2xl))), round(nearest, 1rem * pow(var(--ratio), var(--step-space-2xl)), var(--rhythm)));
    --space-3xl: max(var(--rhythm) * sign(1rem * pow(var(--ratio), var(--step-space-3xl))), round(nearest, 1rem * pow(var(--ratio), var(--step-space-3xl)), var(--rhythm)));
    --control-s: round(up, 1rem * pow(var(--ratio), var(--step-control-s)) - var(--rhythm) / 1000, var(--rhythm));
    --control-m: round(up, 1rem * pow(var(--ratio), var(--step-control-m)) - var(--rhythm) / 1000, var(--rhythm));
    --control-l: round(up, 1rem * pow(var(--ratio), var(--step-control-l)) - var(--rhythm) / 1000, var(--rhythm));
    --row: round(up, 1rem * pow(var(--ratio), var(--step-row)) - var(--rhythm) / 1000, var(--rhythm));
    --icon: round(up, 1rem * pow(var(--ratio), var(--step-icon)) - var(--rhythm) / 1000, var(--rhythm));
  }
  /* The root grows with the screen, and every rem with it. In the root's own font size 1rem is the
     reader's setting, so the root never falls below it. The slope is worked out in numbers alone:
     Firefox drops a length divided by a length. */
  html {
    font-size: clamp(1rem, calc(1rem * (1 - (pow(var(--ratio), var(--grow-steps)) - 1) * var(--grow-from) / (var(--grow-to) - var(--grow-from))) + 100vi * (pow(var(--ratio), var(--grow-steps)) - 1) / (var(--grow-to) - var(--grow-from))), calc(1rem * pow(var(--ratio), var(--grow-steps))));
  }
  /* On a coarse pointer the root's least size is one step up, so interface text is the reader's own
     size. --control-s, -m and -l each take one step more, and --row two, as tall as a medium control,
     and each rounds up to whole units from its step or from the touch floor, whichever is taller. */
  @media (pointer: coarse) {
    html {
      font-size: clamp(1rem * var(--ratio), calc(1rem * (1 - (pow(var(--ratio), var(--grow-steps)) - 1) * var(--grow-from) / (var(--grow-to) - var(--grow-from))) + 100vi * (pow(var(--ratio), var(--grow-steps)) - 1) / (var(--grow-to) - var(--grow-from))), calc(1rem * pow(var(--ratio), var(--grow-steps))));
    }
    :root {
      --control-s: round(up, max(1rem * pow(var(--ratio), calc(var(--step-control-s) + 1)), var(--touch-floor)) - var(--rhythm) / 1000, var(--rhythm));
      --control-m: round(up, max(1rem * pow(var(--ratio), calc(var(--step-control-m) + 1)), var(--touch-floor)) - var(--rhythm) / 1000, var(--rhythm));
      --control-l: round(up, max(1rem * pow(var(--ratio), calc(var(--step-control-l) + 1)), var(--touch-floor)) - var(--rhythm) / 1000, var(--rhythm));
      --row: round(up, max(1rem * pow(var(--ratio), calc(var(--step-row) + 2)), var(--touch-floor)) - var(--rhythm) / 1000, var(--rhythm));
    }
  }
  /* ==========================================================================
     Tokens: shape and elevation
     ========================================================================== */
  :root {
    /* Fields, menus and boxes are square. Push buttons round their corners by a share of their
       height, 4px on a 20px button, so they read apart from fields. The share is a design choice,
       not a measurement of System 7.5.5. Radio buttons are fully round, their usual form. */
    --radius-0: 0;
    --radius-push: 0.2;
    --radius-round: 999px;
    --border-hair: 1px;
    --border-strong: 2px;
  }
  :root, [data-theme=paper], [data-theme=auto] {
    /* Solid offset shadows. No blur, ever. */
    --elev-0: none;
    --elev-1: 2px 2px 0 0 var(--shadow-tone);
    --elev-2: 4px 4px 0 0 var(--shadow-tone);
    --elev-3: 8px 8px 0 0 var(--shadow-tone);
  }
  /* ==========================================================================
     Tokens: motion
     ========================================================================== */
  :root {
    /* Motion confirms, it never performs. Short, linear-ish, no overshoot. */
    --dur-instant: 0ms;
    --dur-1: 90ms;
    --dur-3: 240ms;
    --ease-standard: cubic-bezier(0.2, 0, 0, 1);
    --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  }
  /* ==========================================================================
     Tokens: patterns
     ========================================================================== */
  :root, [data-theme=paper], [data-theme=auto] {
    /* 1-bit fills. Use with the background shorthand.
       Single-layer patterns: background: var(--surface-raised) var(--pattern-hatch);
       --pattern-grid has two layers, so put the colour last: background: var(--pattern-grid), var(--surface-raised); */
    --pattern-hatch: repeating-linear-gradient(-45deg, var(--rule-strong) 0 1px, transparent 1px 6px);
    --pattern-hatch-faint: repeating-linear-gradient(-45deg, var(--rule) 0 1px, transparent 1px 6px);
    --pattern-dots: radial-gradient(circle at 1px 1px, var(--rule-strong) 0.7px, transparent 1px) 0 0 / 4px 4px;
    --pattern-dots-faint: radial-gradient(circle at 1px 1px, var(--rule) 0.8px, transparent 1.1px) 0 0 / 8px 8px;
    --pattern-grid: linear-gradient(var(--rule-faint) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--rule-faint) 1px, transparent 1px) 0 0 / 24px 24px;
    --pattern-scrim: radial-gradient(circle at 1px 1px, var(--rule-strong) 0.6px, transparent 0.9px) 0 0 / 4px 4px;
  }
  /* ==========================================================================
     Theme: ink
     ========================================================================== */
  /* Ink theme — the same system, inverted. Apply data-theme="ink" to any container. */
  [data-theme=ink] {
    color-scheme: dark;
    --surface-page: var(--stone-950);
    --surface-raised: var(--stone-900);
    --surface-sunken: oklch(0.110 0.006 255);
    --surface-hover: var(--stone-800);
    --surface-inverse: var(--stone-50);
    --surface-inverse-hover: var(--stone-200);
    --text-1: var(--stone-50);
    --text-2: var(--stone-300);
    --text-disabled: var(--stone-600);
    --text-inverse: var(--stone-900);
    --text-inverse-2: var(--stone-700);
    --rule-strong: var(--stone-100);
    --rule-field: var(--stone-500);
    --rule: var(--stone-700);
    --rule-faint: var(--stone-800);
    --rule-inverse: var(--stone-300);
    --select-bg: var(--stone-50);
    --select-fg: var(--stone-900);
    --check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.2 7.3l2.5 2.5 5-5.4' fill='none' stroke='%2318191c' stroke-width='1.6'/%3E%3C/svg%3E");
    --shadow-tone: oklch(0.070 0.004 255);
    --focus-ring: var(--stone-50);
    --elev-1: 2px 2px 0 0 var(--shadow-tone);
    --elev-2: 4px 4px 0 0 var(--shadow-tone);
    --elev-3: 8px 8px 0 0 var(--shadow-tone);
    --pattern-hatch: repeating-linear-gradient(-45deg, var(--rule-strong) 0 1px, transparent 1px 6px);
    --pattern-hatch-faint: repeating-linear-gradient(-45deg, var(--rule) 0 1px, transparent 1px 6px);
    --pattern-dots: radial-gradient(circle at 1px 1px, var(--rule-strong) 0.7px, transparent 1px) 0 0 / 4px 4px;
    --pattern-dots-faint: radial-gradient(circle at 1px 1px, var(--rule) 0.8px, transparent 1.1px) 0 0 / 8px 8px;
    --pattern-grid: linear-gradient(var(--rule-faint) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--rule-faint) 1px, transparent 1px) 0 0 / 24px 24px;
    --pattern-scrim: radial-gradient(circle at 1px 1px, var(--rule-strong) 0.6px, transparent 0.9px) 0 0 / 4px 4px;
  }
  /* Auto follows the reader's system: paper when it is light, ink when it is dark. */
  @media (prefers-color-scheme: dark) {
    [data-theme=auto] {
      color-scheme: dark;
      --surface-page: var(--stone-950);
      --surface-raised: var(--stone-900);
      --surface-sunken: oklch(0.110 0.006 255);
      --surface-hover: var(--stone-800);
      --surface-inverse: var(--stone-50);
      --surface-inverse-hover: var(--stone-200);
      --text-1: var(--stone-50);
      --text-2: var(--stone-300);
      --text-disabled: var(--stone-600);
      --text-inverse: var(--stone-900);
      --text-inverse-2: var(--stone-700);
      --rule-strong: var(--stone-100);
      --rule-field: var(--stone-500);
      --rule: var(--stone-700);
      --rule-faint: var(--stone-800);
      --rule-inverse: var(--stone-300);
      --select-bg: var(--stone-50);
      --select-fg: var(--stone-900);
      --check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.2 7.3l2.5 2.5 5-5.4' fill='none' stroke='%2318191c' stroke-width='1.6'/%3E%3C/svg%3E");
      --shadow-tone: oklch(0.070 0.004 255);
      --focus-ring: var(--stone-50);
      --elev-1: 2px 2px 0 0 var(--shadow-tone);
      --elev-2: 4px 4px 0 0 var(--shadow-tone);
      --elev-3: 8px 8px 0 0 var(--shadow-tone);
      --pattern-hatch: repeating-linear-gradient(-45deg, var(--rule-strong) 0 1px, transparent 1px 6px);
      --pattern-hatch-faint: repeating-linear-gradient(-45deg, var(--rule) 0 1px, transparent 1px 6px);
      --pattern-dots: radial-gradient(circle at 1px 1px, var(--rule-strong) 0.7px, transparent 1px) 0 0 / 4px 4px;
      --pattern-dots-faint: radial-gradient(circle at 1px 1px, var(--rule) 0.8px, transparent 1.1px) 0 0 / 8px 8px;
      --pattern-grid: linear-gradient(var(--rule-faint) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--rule-faint) 1px, transparent 1px) 0 0 / 24px 24px;
      --pattern-scrim: radial-gradient(circle at 1px 1px, var(--rule-strong) 0.6px, transparent 0.9px) 0 0 / 4px 4px;
    }
  }
}
/* ==========================================================================
   Reset
   ========================================================================== */
@layer tusch.reset {
  /*! modern-normalize v3.0.1 | MIT License | https://github.com/sindresorhus/modern-normalize */
  /*
  Document
  ========
  */
  /**
  Use a better box model (opinionated).
  */
  *,
  ::before,
  ::after {
    box-sizing: border-box;
  }
  html {
    /* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.15; /* 1. Correct the line height in all browsers. */
    -webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */
    tab-size: 4; /* 3. Use a more readable tab size (opinionated). */
  }
  /*
  Sections
  ========
  */
  body {
    margin: 0; /* Remove the margin in all browsers. */
  }
  /*
  Text-level semantics
  ====================
  */
  /**
  Add the correct font weight in Chrome and Safari.
  */
  b,
  strong {
    font-weight: bolder;
  }
  /**
  1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
  2. Correct the odd 'em' font sizing in all browsers.
  */
  code,
  kbd,
  samp,
  pre {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; /* 1 */
    font-size: 1em; /* 2 */
  }
  /**
  Add the correct font size in all browsers.
  */
  small {
    font-size: 80%;
  }
  /**
  Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
  */
  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  /*
  Tabular data
  ============
  */
  /**
  Correct table border color inheritance in Chrome and Safari. (https://issues.chromium.org/issues/40615503, https://bugs.webkit.org/show_bug.cgi?id=195016)
  */
  table {
    border-color: currentcolor;
  }
  /*
  Forms
  =====
  */
  /**
  1. Change the font styles in all browsers.
  2. Remove the margin in Firefox and Safari.
  */
  button,
  input,
  optgroup,
  select,
  textarea {
    font-family: inherit; /* 1 */
    font-size: 100%; /* 1 */
    line-height: 1.15; /* 1 */
    margin: 0; /* 2 */
  }
  /**
  Correct the inability to style clickable types in iOS and Safari.
  */
  button,
  [type=button],
  [type=reset],
  [type=submit] {
    -webkit-appearance: button;
  }
  /**
  Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
  */
  legend {
    padding: 0;
  }
  /**
  Add the correct vertical alignment in Chrome and Firefox.
  */
  progress {
    vertical-align: baseline;
  }
  /**
  Correct the cursor style of increment and decrement buttons in Safari.
  */
  ::-webkit-inner-spin-button,
  ::-webkit-outer-spin-button {
    height: auto;
  }
  /**
  1. Correct the odd appearance in Chrome and Safari.
  2. Correct the outline style in Safari.
  */
  [type=search] {
    -webkit-appearance: textfield; /* 1 */
    outline-offset: -2px; /* 2 */
  }
  /**
  Remove the inner padding in Chrome and Safari on macOS.
  */
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  /**
  1. Correct the inability to style clickable types in iOS and Safari.
  2. Change font properties to 'inherit' in Safari.
  */
  ::-webkit-file-upload-button {
    -webkit-appearance: button; /* 1 */
    font: inherit; /* 2 */
  }
  /*
  Interactive
  ===========
  */
  /*
  Add the correct display in Chrome and Safari.
  */
  summary {
    display: list-item;
  }
  /* Tusch's own reset, modelled on Tailwind's Preflight. Bare HTML has no margins and no borders, so
     a border width alone draws a solid rule; headings and lists are plain; media are blocks no wider
     than their container; and controls take the font and colour of the text around them. An option
     group keeps the browser's bold label. Without their borders, browsers stop drawing buttons
     their own way and fill them with a grey that ink's text can't be read on, so buttons are
     unfilled; fields keep their fill, which is all that shows where they are. */
  *, ::before, ::after, ::backdrop, ::file-selector-button {
    margin: 0;
    border: 0 solid;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  ol, ul, menu {
    list-style: none;
    padding: 0;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
  }
  button, input:where([type=button], [type=reset], [type=submit]), ::file-selector-button {
    background-color: transparent;
  }
  /* Controls and links show their own feedback when tapped, so phone browsers' fading tap overlay is off. */
  html {
    -webkit-tap-highlight-color: transparent;
  }
  /* Hidden stays hidden whatever CSS outside the layers or an inline style says, except
     hidden="until-found", which the browser shows when find in page reaches it. */
  [hidden]:where(:not([hidden=until-found])) {
    display: none !important;
  }
  /* ==========================================================================
     The canvas
     ========================================================================== */
  body {
    background: var(--surface-page);
    color: var(--text-1);
    font: var(--fw-regular) var(--font-ui)/var(--line-ui) var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  [data-theme=ink], [data-theme=paper], [data-theme=auto] {
    background: var(--surface-page);
    color: var(--text-1);
  }
  /* ==========================================================================
     The global rules: the focus ring, the selection, the cursors, the link
     look and the icon helper
     ========================================================================== */
  :focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
  }
  ::selection {
    background: var(--select-bg);
    color: var(--select-fg);
  }
  /* The hand is the browser's, on links alone: only a link has an address to open in a new tab, so the
     kit never sets it. Browsers give every control the arrow but summary, which they leave on auto, the
     text cursor over its words. */
  :where(summary) {
    cursor: default;
  }
  /* A disabled control shows not-allowed, and stays under the pointer: pointer-events: none would let a
     press fall through to what lies beneath, such as a row that is a link. So every hover and press rule
     skips disabled controls, in :where to keep its specificity. A link with an href cannot be disabled;
     render a span. */
  :disabled:not(fieldset), [aria-disabled=true], label:has(:disabled) {
    cursor: not-allowed;
  }
  /* Links stay underlined everywhere, the line set off below the text in em of it. */
  a {
    color: var(--text-1);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: var(--underline-offset);
  }
  a:where(:not([aria-disabled=true])):hover {
    text-decoration-thickness: 2px;
  }
  /* An icon in a line of text is a step smaller than the text and sits on its baseline: so small, its
     box never grows the line, a title's or a display line's included, and its glyph, which Phosphor
     draws high in its square, comes to about the middle of the capitals in any face, with no nudge
     that would fit one face alone. An icon that a control or a row sizes keeps that size; as a flex or
     a grid item it is centred there. */
  i[class^=ph] {
    font-size: calc(1em * pow(var(--ratio), -1));
    line-height: 1;
  }
}
/* ==========================================================================
   Prose
   ========================================================================== */
@layer tusch.prose {
  @scope (.t-prose) to (:where([class^="t-"], [class*=" t-"]) > *) {
    :where(:scope) {
      font-size: var(--font-body);
      line-height: var(--line-body);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      overflow-wrap: break-word;
    }
    :where(body:scope) {
      padding: var(--space-l);
    }
    :where(.t-not-prose) {
      font-size: var(--font-ui);
      line-height: var(--line-ui);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      overflow-wrap: normal;
    }
    h1 {
      font-size: var(--font-title-1);
      line-height: var(--line-title-1);
      letter-spacing: var(--track-title-1);
      font-weight: var(--fw-medium);
      --_piece-height: 1lh;
      --_piece-margin: 0;
      --_piece-align: top;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    h2 {
      font-size: var(--font-title-2);
      line-height: var(--line-title-2);
      letter-spacing: var(--track-title-2);
      font-weight: var(--fw-medium);
      --_piece-height: 1lh;
      --_piece-margin: 0;
      --_piece-align: top;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    h3 {
      font-size: var(--font-title-3);
      line-height: var(--line-title-3);
      letter-spacing: var(--track-title-3);
      font-weight: var(--fw-semibold);
      --_piece-height: 1lh;
      --_piece-margin: 0;
      --_piece-align: top;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    h4 {
      font-size: var(--font-body);
      line-height: var(--line-body);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      font-weight: var(--fw-semibold);
      max-width: var(--measure);
      text-wrap: pretty;
    }
    h5 {
      font-family: var(--font-mono);
      font-size: var(--font-label);
      line-height: var(--line-label);
      text-transform: uppercase;
      letter-spacing: var(--track-label);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    h6 {
      font-family: var(--font-mono);
      font-size: var(--font-label);
      line-height: var(--line-label);
      text-transform: uppercase;
      letter-spacing: var(--track-label);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    p {
      font-size: var(--font-body);
      line-height: var(--line-body);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    ul {
      list-style-type: disc;
      padding-inline-start: var(--space-m);
    }
    ul > li {
      font-size: var(--font-body);
      line-height: var(--line-body);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    ul > li::marker {
      font-variant-numeric: normal;
      line-height: 0;
    }
    ul > li + li {
      margin-block-start: var(--space-2xs);
    }
    ol {
      list-style-type: decimal;
      padding-inline-start: var(--space-m);
    }
    ol > li {
      font-size: var(--font-body);
      line-height: var(--line-body);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    ol > li::marker {
      font-variant-numeric: normal;
      line-height: 0;
    }
    ol > li + li {
      margin-block-start: var(--space-2xs);
    }
    dl dt {
      font-size: var(--font-body);
      line-height: var(--line-body);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      font-weight: var(--fw-semibold);
      max-width: var(--measure);
      text-wrap: pretty;
    }
    dl dd {
      font-size: var(--font-body);
      line-height: var(--line-body);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      padding-inline-start: var(--space-m);
      max-width: var(--measure);
      text-wrap: pretty;
    }
    dl dd + dt, dl > div + div {
      margin-block-start: var(--line-body);
    }
    dl > div > * {
      margin-block-start: 0;
    }
    blockquote {
      padding-inline-start: var(--space-s);
      border-inline-start: 1px solid var(--rule-strong);
      --_rule-inline-start: 1px;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    code {
      font-family: var(--font-mono);
      line-height: 0;
    }
    samp {
      font-family: var(--font-mono);
      line-height: 0;
    }
    pre {
      display: block;
      overflow-x: auto;
      white-space: pre;
      padding-block: calc(var(--space-xs) - var(--_rule-block-start, 0px)) calc(var(--space-xs) - var(--_rule-block-end, 0px));
      padding-inline: calc(var(--space-s) - var(--_rule-inline-start, 0px)) calc(var(--space-s) - var(--_rule-inline-end, 0px));
      font-family: var(--font-mono);
      background: var(--surface-raised);
      border: 1px solid var(--rule);
      --_rule-block-start: 1px;
      --_rule-block-end: 1px;
      --_rule-inline-start: 1px;
      --_rule-inline-end: 1px;
    }
    pre code, pre samp {
      line-height: inherit;
    }
    kbd:where(:not(:has(kbd))) {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0 calc(1em * pow(var(--ratio), -5));
      font-family: var(--font-mono);
      font-weight: var(--fw-regular);
      font-size: calc(1em * pow(var(--ratio), -2));
      height: var(--_piece-height, min(1em * pow(var(--ratio), 4), 1lh));
      min-width: var(--_piece-height, min(1em * pow(var(--ratio), 4), 1lh));
      margin-block: var(--_piece-margin, calc(min(1em * pow(var(--ratio), 4), 1lh) / -2));
      vertical-align: var(--_piece-align, baseline);
      color: var(--text-1);
      background: var(--surface-raised);
      border: 1px solid var(--rule);
      --_rule-block-start: 1px;
      --_rule-block-end: 1px;
      --_rule-inline-start: 1px;
      --_rule-inline-end: 1px;
      border-bottom-width: 2px;
    }
    kbd:where(:has(kbd)) {
      font-family: inherit;
    }
    mark {
      background: var(--select-bg);
      color: var(--select-fg);
    }
    small {
      font-size: var(--font-caption);
      line-height: var(--line-caption);
      color: var(--text-2);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
    }
    figure > * + figcaption, figure > figcaption + * {
      margin-block-start: var(--space-2xs);
    }
    figcaption {
      font-size: var(--font-caption);
      line-height: var(--line-caption);
      color: var(--text-2);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      max-width: var(--measure);
      text-wrap: pretty;
    }
    hr {
      display: flow-root;
      position: relative;
      height: 0;
      border: 0;
      overflow: visible;
    }
    hr::before {
      content: "";
      position: absolute;
      inset-inline: 0;
      top: 0;
      border-block-start: 1px solid var(--rule);
      --_rule-block-start: 1px;
    }
    img {
      display: block;
      max-width: 100%;
      height: auto;
    }
    video {
      display: block;
      max-width: 100%;
      height: auto;
    }
    svg {
      display: block;
      max-width: 100%;
    }
    table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: var(--font-ui);
    }
    table caption {
      font-size: var(--font-caption);
      line-height: var(--line-caption);
      color: var(--text-2);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      text-align: start;
      padding-block-end: var(--space-2xs);
    }
    table th {
      height: var(--row);
      padding: 0 var(--space-xs);
      text-align: start;
      white-space: nowrap;
      vertical-align: middle;
      font: var(--fw-regular) var(--font-label)/1 var(--font-mono);
      text-transform: uppercase;
      letter-spacing: var(--track-label);
      color: var(--text-2);
      border-block-end: 1px solid var(--rule-strong);
      --_rule-block-end: 1px;
      user-select: none;
    }
    table td {
      height: var(--row);
      padding-block: calc(var(--space-3xs) - var(--_rule-block-start, 0px)) calc(var(--space-3xs) - var(--_rule-block-end, 0px));
      padding-inline: calc(var(--space-xs) - var(--_rule-inline-start, 0px)) calc(var(--space-xs) - var(--_rule-inline-end, 0px));
      border-block-end: 1px solid var(--rule-faint);
      --_rule-block-end: 1px;
      white-space: normal;
      font-size: var(--font-body);
      line-height: var(--line-body);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      vertical-align: top;
    }
    table .is-num {
      text-align: end;
      font-variant-numeric: tabular-nums;
    }
    table a {
      overflow-wrap: anywhere;
    }
    @media (width < 36.8rem) {
      table td {
        font-size: var(--font-caption);
        line-height: var(--line-caption);
        hyphens: auto;
      }
      table :is(td, th) {
        padding-inline: var(--space-2xs);
      }
      table th {
        white-space: normal;
      }
      table td code {
        overflow-wrap: anywhere;
      }
    }
    details > summary + * {
      margin-block-start: var(--space-2xs);
    }
    summary {
      font-size: var(--font-body);
      line-height: var(--line-body);
      --_piece-height: initial;
      --_piece-margin: initial;
      --_piece-align: initial;
      font-weight: var(--fw-semibold);
      max-width: var(--measure);
      text-wrap: pretty;
      list-style: none;
    }
    summary::-webkit-details-marker {
      display: none;
    }
    summary::before {
      content: "";
      width: 0;
      height: 0;
      border-inline-start: calc(1em * pow(var(--ratio), -7)) solid currentColor;
      border-top: calc(1em * pow(var(--ratio), -9)) solid transparent;
      border-bottom: calc(1em * pow(var(--ratio), -9)) solid transparent;
      transition: transform var(--dur-1) var(--ease-standard);
      display: inline-block;
      vertical-align: calc(1em * pow(var(--ratio), -17));
      margin-inline-end: var(--space-2xs);
    }
    summary:where(details[open] > *)::before {
      transform: rotate(90deg);
    }
    summary:where(details[open] > *):dir(rtl)::before {
      transform: rotate(-90deg);
    }
    :where(:scope) > :where(:not(dialog, [popover])) {
      margin-block: 0;
    }
    :where(:scope) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(:not(dialog, [popover])) {
      margin-block-start: var(--line-body);
    }
    :where(:scope) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h1, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h1):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h1):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-3xl);
    }
    :where(:scope) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h2, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h2):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h2):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-2xl);
    }
    :where(:scope) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h3, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h3):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h3):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-xl);
    }
    :where(:scope) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h4, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h4):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h4):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-l);
    }
    :where(:scope) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h5, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h5):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h5):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-l);
    }
    :where(:scope) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h6, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h6):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h6):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-l);
    }
    :where(:scope) > :where(h1, h2, h3, h4, h5, h6) + :where(:not(dialog, [popover])) {
      margin-block-start: var(--space-2xs);
    }
    :where(:scope) :where(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):where(:not(dialog, [popover], :where(dialog, [popover]) *)) > :where(:not(dialog, [popover], a, abbr, b, bdi, bdo, br, button, cite, code, data, del, dfn, em, i, input, ins, kbd, label, mark, meter, output, picture, progress, q, s, samp, select, small, span, strong, sub, sup, textarea, time, u, var, wbr)) {
      margin-block: 0;
    }
    :where(:scope) :where(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):where(:not(dialog, [popover], :where(dialog, [popover]) *)) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover], a, abbr, b, bdi, bdo, br, button, cite, code, data, del, dfn, em, i, input, ins, kbd, label, mark, meter, output, picture, progress, q, s, samp, select, small, span, strong, sub, sup, textarea, time, u, var, wbr)) ~ :where(:not(dialog, [popover])) {
      margin-block-start: var(--line-body);
    }
    :where(:scope) :where(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):where(:not(dialog, [popover], :where(dialog, [popover]) *)) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h1, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h1):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h1):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-3xl);
    }
    :where(:scope) :where(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):where(:not(dialog, [popover], :where(dialog, [popover]) *)) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h2, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h2):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h2):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-2xl);
    }
    :where(:scope) :where(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):where(:not(dialog, [popover], :where(dialog, [popover]) *)) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h3, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h3):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h3):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-xl);
    }
    :where(:scope) :where(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):where(:not(dialog, [popover], :where(dialog, [popover]) *)) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h4, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h4):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h4):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-l);
    }
    :where(:scope) :where(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):where(:not(dialog, [popover], :where(dialog, [popover]) *)) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h5, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h5):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h5):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-l);
    }
    :where(:scope) :where(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):where(:not(dialog, [popover], :where(dialog, [popover]) *)) > :not(:where(input[type=hidden], template, script, style, [hidden], dialog, [popover])) ~ :where(h6, :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):has(> :is(h6):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *), > :is(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *) > :is(h6):not(:not(input[type=hidden], template, script, style, [hidden], dialog, [popover]) ~ *))):where(:not(dialog, [popover])) {
      margin-block-start: var(--space-l);
    }
    :where(:scope) :where(main, article, section, header, footer, nav, aside, div, blockquote, li, dd, figure, details):where(:not(dialog, [popover], :where(dialog, [popover]) *)) > :where(h1, h2, h3, h4, h5, h6) + :where(:not(dialog, [popover])) {
      margin-block-start: var(--space-2xs);
    }
  }
}
/* ==========================================================================
   Key cap
   ========================================================================== */
@layer tusch.components {
  .t-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 calc(1em * pow(var(--ratio), -5));
    font-family: var(--font-mono);
    font-weight: var(--fw-regular);
    font-size: calc(1em * pow(var(--ratio), -2));
    height: var(--_piece-height, min(1em * pow(var(--ratio), 4), 1lh));
    min-width: var(--_piece-height, min(1em * pow(var(--ratio), 4), 1lh));
    margin-block: var(--_piece-margin, calc(min(1em * pow(var(--ratio), 4), 1lh) / -2));
    vertical-align: var(--_piece-align, baseline);
    color: var(--text-1);
    background: var(--surface-raised);
    border: 1px solid var(--rule);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    border-bottom-width: 2px;
  }
}
/* ==========================================================================
   Button
   ========================================================================== */
@layer tusch.components {
  .t-btn {
    --_h: var(--control-m);
    --_px: calc(1rem * pow(var(--ratio), -1));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    height: var(--_h);
    min-width: calc(1rem * pow(var(--ratio), 11));
    padding: 0 var(--_px);
    font: var(--fw-medium) var(--font-ui)/var(--line-ui) var(--font-sans);
    color: var(--text-1);
    background: var(--surface-raised);
    border: 1px solid var(--rule-strong);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    border-radius: calc(var(--_h) * var(--radius-push));
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color var(--dur-1) var(--ease-standard), color var(--dur-1) var(--ease-standard);
  }
  .t-btn > i {
    font-size: var(--icon);
  }
  .t-btn:hover, .t-btn.is-hover {
    background: var(--surface-hover);
  }
  /* An open dropdown keeps its button pressed until the menu closes. */
  .t-btn:active, .t-btn.is-pressed, .t-dropdown[open] > .t-btn {
    background: var(--select-bg);
    color: var(--select-fg);
    transition: none;
  }
  .t-btn--primary {
    background: var(--surface-inverse);
    color: var(--text-inverse);
  }
  .t-btn--primary:hover, .t-btn--primary.is-hover {
    background: var(--surface-inverse-hover);
  }
  .t-btn--primary:active, .t-btn--primary.is-pressed, .t-dropdown[open] > .t-btn--primary {
    background: var(--surface-raised);
    color: var(--text-1);
  }
  /* Default button — the one Enter submits. A second rule, set 2px out. */
  .t-btn--default {
    box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 3px var(--rule-strong);
  }
  .t-btn--s {
    --_h: var(--control-s);
    --_px: calc(1rem * pow(var(--ratio), -3));
    min-width: 0;
    font-size: var(--font-caption);
  }
  .t-btn--l {
    --_h: var(--control-l);
    --_px: calc(1rem * pow(var(--ratio), 2));
    min-width: calc(1rem * pow(var(--ratio), 13));
    font-size: var(--font-body);
  }
  .t-btn--icon {
    width: var(--_h);
    min-width: 0;
    padding: 0;
  }
  .t-btn--block {
    display: flex;
    width: 100%;
  }
  .t-btn:disabled, .t-btn[aria-disabled=true] {
    color: var(--text-disabled);
    background: var(--surface-raised);
    border-color: var(--rule);
    box-shadow: none;
  }
  .t-btn-group {
    display: inline-flex;
  }
  .t-btn-group > .t-btn + .t-btn {
    margin-inline-start: -1px;
  }
  /* A group rounds only its outer corners. */
  .t-btn-group > .t-btn:not(:first-child) {
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .t-btn-group > .t-btn:not(:last-child) {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
  }
  /* A row of actions at the end, the default last; t-btn--alt sets a destructive alternative at the start. */
  .t-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-xs);
  }
  .t-actions > :where(:not(dialog, [popover])) {
    margin: 0;
  }
  .t-actions > .t-btn--alt {
    margin-inline-end: auto;
  }
}
/* ==========================================================================
   Text field
   ========================================================================== */
@layer tusch.components {
  /* align-content keeps label, control and help together when a parent grid or flex row stretches the field. */
  .t-field {
    display: grid;
    align-content: start;
    gap: var(--space-2xs);
    min-width: 0;
  }
  /* A field holding a control marked invalid draws a strong rule at its start, set off from what it holds
     by the field's own gap, both hanging into the gutter so that its label, control and message stay in
     line with valid fields. A border, so it follows the writing direction. The control itself draws as a
     valid one, so that its focus shows as any field's does. A choice group shows its error in a field,
     as its message sits there. A row that stretches its fields would run the rule on past the message,
     so the field takes its own height, which a row that aligns its fields to their ends keeps too. */
  .t-field:has([aria-invalid=true]) {
    border-inline-start: 4px solid var(--rule-strong);
    padding-inline-start: var(--space-2xs);
    margin-inline-start: calc(-4px - var(--space-2xs));
    block-size: max-content;
  }
  .t-field__label {
    font: var(--fw-medium) var(--font-caption)/var(--line-caption) var(--font-sans);
    color: var(--text-1);
  }
  /* The word in a label that says its field may be left empty: muted, at the regular weight. */
  .t-field__optional {
    color: var(--text-2);
    font-weight: var(--fw-regular);
  }
  .t-field__help {
    font-size: var(--font-caption);
    line-height: var(--line-caption);
    color: var(--text-2);
    --_piece-height: initial;
    --_piece-margin: initial;
    --_piece-align: initial;
  }
  .t-field__error {
    position: relative;
    display: flex;
    align-items: center;
    gap: calc(1rem * pow(var(--ratio), -7));
    font: var(--fw-medium) var(--font-caption)/var(--line-caption) var(--font-sans);
    color: var(--text-1);
  }
  /* Its mark sits in its text: the mark a step below it, the square a step above. */
  .t-field__error::before {
    content: "!";
    content: "!"/"";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-family: var(--font-mono);
    font-weight: var(--fw-regular);
    font-size: calc(1em * pow(var(--ratio), -1));
    height: var(--_piece-height, min(1em * pow(var(--ratio), 2), 1lh));
    min-width: var(--_piece-height, min(1em * pow(var(--ratio), 2), 1lh));
    margin-block: var(--_piece-margin, calc(min(1em * pow(var(--ratio), 2), 1lh) / -2));
    vertical-align: var(--_piece-align, baseline);
    background: var(--select-bg);
    color: var(--select-fg);
  }
  .t-input, .t-textarea, .t-select {
    display: block;
    width: 100%;
    height: var(--control-m);
    padding: 0 calc(1rem * pow(var(--ratio), -3));
    margin: 0;
    font: var(--fw-regular) var(--font-ui)/var(--line-ui) var(--font-sans);
    color: var(--text-1);
    background: var(--surface-raised);
    border: 1px solid var(--rule-field);
    border-radius: var(--radius-0);
    outline: none;
    appearance: none;
    transition: border-color var(--dur-1) var(--ease-standard);
  }
  .t-input::placeholder, .t-textarea::placeholder {
    color: var(--text-2);
    opacity: 1;
  }
  .t-input:hover, .t-textarea:hover, .t-select:hover {
    border-color: var(--text-2);
  }
  .t-input:focus, .t-textarea:focus, .t-select:focus, .t-input.is-focus {
    border-color: var(--rule-strong);
    box-shadow: inset 0 0 0 1px var(--rule-strong);
  }
  .t-input:disabled, .t-textarea:disabled, .t-select:disabled {
    background: var(--surface-sunken);
    color: var(--text-disabled);
    border-color: var(--rule);
  }
  .t-input--s {
    height: var(--control-s);
    padding: 0 var(--space-2xs);
    font-size: var(--font-caption);
  }
  /* A text area grows with its rows, so its padding above and below gives up its frame's width. */
  .t-textarea {
    height: auto;
    min-height: round(up, 1rem * pow(var(--ratio), 12) - var(--rhythm) / 1000, var(--rhythm));
    padding: calc(var(--space-2xs) - 1px) calc(1rem * pow(var(--ratio), -3));
    resize: vertical;
    line-height: var(--line-ui);
  }
  /* Select: a solid triangle, pointing down, drawn as two halves a step of the scale wide, each in
     whole pixels so that the two meet without a seam. */
  .t-select {
    --_arrow: round(nearest, calc(1rem * pow(var(--ratio), -8)), 1px);
    padding-inline-end: var(--space-l);
    background-image: linear-gradient(45deg, transparent 50%, var(--text-1) 50%), linear-gradient(135deg, var(--text-1) 50%, transparent 50%);
    background-position: calc(100% - var(--space-xs) - var(--_arrow)) 55%, calc(100% - var(--space-xs)) 55%;
    background-size: var(--_arrow) var(--_arrow), var(--_arrow) var(--_arrow);
    background-repeat: no-repeat;
  }
  /* background-position has no logical sides, so on a right-to-left page the halves are placed from the start. */
  .t-select:dir(rtl) {
    background-position: var(--space-xs) 55%, calc(var(--space-xs) + var(--_arrow)) 55%;
  }
  .t-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
  }
  .t-input-wrap > i {
    position: absolute;
    inset-inline-start: calc(1rem * pow(var(--ratio), -4));
    font-size: var(--icon);
    color: var(--text-2);
    pointer-events: none;
  }
  .t-input-wrap > .t-input {
    padding-inline-start: var(--space-l);
  }
  /* A key cap lies over the field's end, so the field keeps room for a cap of one or two glyphs,
     about the icon's gap clear of it, and typed text stops short of it. */
  .t-input-wrap > .t-input:has(~ .t-kbd) {
    padding-inline-end: calc(1rem * pow(var(--ratio), 6));
  }
  .t-input-wrap > .t-kbd {
    position: absolute;
    inset-inline-end: calc(1rem * pow(var(--ratio), -7));
  }
}
/* ==========================================================================
   Checkbox, radio
   ========================================================================== */
@layer tusch.components {
  /* Marks are drawn with backgrounds (no pseudo-elements) so they render on every engine. A box is
     1em of reading text, whatever the text beside it, and its tick and dot are in em of it. */
  .t-check, .t-radio {
    --_dot: calc(1em * pow(var(--ratio), -11));
    appearance: none;
    margin: 0;
    flex: none;
    vertical-align: middle;
    display: inline-block;
    font-size: var(--font-body);
    width: 1em;
    height: 1em;
    background-color: var(--surface-raised);
    border: 1px solid var(--rule-strong);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    background-repeat: no-repeat;
    background-position: center;
  }
  .t-check:where(:enabled):active, .t-radio:where(:enabled):active {
    box-shadow: inset 0 0 0 1px var(--rule-strong);
  }
  .t-check:checked {
    background-color: var(--select-bg);
    background-image: var(--check-mark);
    background-size: calc(1em * pow(var(--ratio), -1)) calc(1em * pow(var(--ratio), -1));
  }
  .t-radio {
    border-radius: var(--radius-round);
  }
  .t-radio:checked {
    background-image: radial-gradient(circle, var(--text-1) 0 var(--_dot), transparent calc(var(--_dot) + 0.5px));
  }
  .t-check:disabled, .t-radio:disabled {
    border-color: var(--rule);
    background-color: var(--surface-sunken);
  }
  .t-check:disabled:checked {
    background-color: var(--rule);
  }
  .t-radio:disabled:checked {
    background-image: radial-gradient(circle, var(--text-disabled) 0 var(--_dot), transparent calc(var(--_dot) + 0.5px));
  }
  /* A choice on a line of its own, as in a form's flow, sits at the line's top: on the baseline, its
     box's, which is the check box's foot, would push the line a few pixels taller than the choice. */
  .t-choice {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    font-size: var(--font-ui);
    line-height: var(--line-ui);
    --_piece-height: initial;
    --_piece-margin: initial;
    --_piece-align: initial;
    vertical-align: top;
    user-select: none;
  }
  /* On a touch screen a choice's row, its whole label, is a target, at least the touch floor tall. */
  @media (pointer: coarse) {
    .t-choice {
      min-height: round(up, max(var(--line-ui), var(--touch-floor)) - var(--rhythm) / 1000, var(--rhythm));
    }
  }
  .t-choice:has(:disabled) {
    color: var(--text-disabled);
  }
  /* align-content keeps the choices together when a parent grid or flex row stretches the group, as
     a field's parts are, so that each row keeps its own height. */
  .t-choice-group {
    display: grid;
    align-content: start;
    gap: var(--space-2xs);
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
  }
  .t-choice-group > legend {
    padding: 0;
    margin-bottom: var(--space-2xs);
    font: var(--fw-medium) var(--font-caption)/var(--line-caption) var(--font-sans);
  }
}
/* ==========================================================================
   Slider
   ========================================================================== */
@layer tusch.components {
  /* A bar thumb on a hairline, with no fill in any browser: the thumb shows the value. */
  .t-range {
    --_h: round(up, 1rem * pow(var(--ratio), 1) - var(--rhythm) / 1000, var(--rhythm));
    appearance: none;
    display: block;
    width: 100%;
    height: var(--_h);
    margin: 0;
    background: transparent;
  }
  /* On a touch screen the slider, which moves to wherever its track is tapped, is a target at least the
     touch floor tall, its thumb and track centred in it at their own height. */
  @media (pointer: coarse) {
    .t-range {
      height: round(up, max(var(--_h), var(--touch-floor)) - var(--rhythm) / 1000, var(--rhythm));
    }
  }
  .t-range::-webkit-slider-runnable-track {
    height: var(--_h);
    background: linear-gradient(var(--rule), var(--rule)) 0 50%/100% 1px no-repeat;
  }
  .t-range::-webkit-slider-thumb {
    appearance: none;
    width: calc(1rem * pow(var(--ratio), -5));
    height: var(--_h);
    background: var(--text-1);
    border: 0;
    border-radius: 0;
    box-shadow: 0 0 0 2px var(--surface-raised);
  }
  .t-range:where(:enabled):active::-webkit-slider-thumb {
    width: calc(1rem * pow(var(--ratio), -5));
    box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 3px var(--rule-strong);
  }
  .t-range::-moz-range-track {
    height: 1px;
    background: var(--rule);
  }
  .t-range::-moz-range-thumb {
    width: calc(1rem * pow(var(--ratio), -5));
    height: var(--_h);
    background: var(--text-1);
    border: 0;
    border-radius: 0;
    box-shadow: 0 0 0 2px var(--surface-raised);
  }
  .t-range:disabled::-webkit-slider-thumb {
    background: var(--rule);
  }
  .t-range:disabled::-moz-range-thumb {
    background: var(--rule);
  }
  /* The scale under it: a tick a rhythm unit long, then its label on a line of its own role, so that
     the scale is a whole number of units tall. It stands in by half the thumb at each end, so that
     its ticks span where the thumb's centre runs and each stands under the thumb at its value. */
  .t-range-scale {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-3xs);
    padding-inline: calc(1rem * pow(var(--ratio), -5) / 2);
    font: var(--font-label)/var(--line-label) var(--font-mono);
    color: var(--text-2);
  }
  /* Each value is a point, its tick and label centred on it: a grid no wider than nothing, whose one
     column, as wide as the label, is centred on it too, rather than starting at it and hanging to the
     right by half the label. */
  .t-range-scale > span {
    display: grid;
    justify-items: center;
    justify-content: center;
    gap: var(--space-3xs);
    width: 0;
  }
  .t-range-scale > span::before {
    content: "";
    width: 1px;
    height: round(up, 1rem * pow(var(--ratio), -10) - var(--rhythm) / 1000, var(--rhythm));
    background: var(--rule-strong);
  }
}
/* ==========================================================================
   Progress
   ========================================================================== */
@layer tusch.components {
  .t-progress {
    appearance: none;
    display: block;
    width: 100%;
    height: round(up, 1rem * pow(var(--ratio), -5) - var(--rhythm) / 1000, var(--rhythm));
    border: 1px solid var(--rule-strong);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    border-radius: 0;
    background: var(--surface-raised);
    color: var(--text-1);
    overflow: hidden;
  }
  .t-progress::-webkit-progress-bar {
    background: var(--surface-raised);
  }
  .t-progress::-webkit-progress-value {
    background: var(--text-1);
    transition: width var(--dur-3) var(--ease-standard);
  }
  .t-progress::-moz-progress-bar {
    background: var(--text-1);
  }
  /* Indeterminate: drifting hatch */
  .t-progress:indeterminate, .t-progress.is-indeterminate {
    background: var(--surface-raised) linear-gradient(-45deg, var(--rule-strong) 12.5%, transparent 12.5% 50%, var(--rule-strong) 50% 62.5%, transparent 62.5%) 0 0/8px 8px;
    animation: t-hatch-drift 640ms linear infinite;
  }
  .t-progress:indeterminate::-webkit-progress-bar {
    background: transparent;
  }
  .t-progress:indeterminate::-moz-progress-bar {
    background: transparent;
  }
  @keyframes t-hatch-drift {
    to {
      background-position: 8px 0;
    }
  }
  .t-progress--thin {
    height: round(up, 1rem * pow(var(--ratio), -10) - var(--rhythm) / 1000, var(--rhythm));
  }
  /* The figure at the head's end takes its own role's line, so that, set on the label's baseline in
     its smaller mono face, it stays inside the head's line. */
  .t-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-xs);
    margin-bottom: var(--space-3xs);
    font-size: var(--font-caption);
    line-height: var(--line-ui);
  }
  .t-progress-head > :last-child {
    font-family: var(--font-mono);
    font-size: var(--font-label);
    line-height: var(--line-label);
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
  }
  .t-spinner {
    display: inline-block;
    width: var(--icon);
    height: var(--icon);
    flex: none;
    border: 1px solid var(--rule);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    border-top-color: var(--text-1);
    border-radius: var(--radius-round);
    animation: t-spin 720ms steps(8) infinite;
  }
  @keyframes t-spin {
    to {
      transform: rotate(360deg);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .t-progress:indeterminate, .t-progress.is-indeterminate, .t-spinner {
      animation-duration: 3s;
    }
  }
}
/* ==========================================================================
   Segmented control
   ========================================================================== */
@layer tusch.components {
  /* --_h is the control's height, which a small one, or an app fitting it to a line, sets. */
  .t-segmented {
    --_h: var(--control-m);
    --_r: calc(var(--_h) * var(--radius-push));
    display: inline-flex;
    border: 1px solid var(--rule-strong);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    border-radius: var(--_r);
    background: var(--surface-raised);
    max-inline-size: 100%;
    min-inline-size: 0;
  }
  /* Narrower than its segments, as on a phone, the control keeps to its container, or to its line
     when it is a flex item: each segment gives up its side padding first, its label centred in what
     is left. */
  .t-segmented > :is(button, a, label) {
    min-inline-size: 0;
  }
  /* A segment is a link to the view it shows, a labelled radio in a form, or a scripted button. It is
     as tall as the control, so that on a touch screen each segment is the whole height of the control
     to tap: it takes the frame's width back above and below, and its own borders there, transparent,
     keep its fill inside the frame. */
  .t-segmented > :is(button, a, label) {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(1rem * pow(var(--ratio), -7));
    height: var(--_h);
    padding: 0 calc(1rem * pow(var(--ratio), -1));
    margin: -1px 0;
    font: var(--fw-medium) var(--font-ui)/var(--line-ui) var(--font-sans);
    color: var(--text-1);
    white-space: nowrap;
    text-decoration: none;
    background: transparent;
    background-clip: padding-box;
    border: 0;
    border-block: 1px solid transparent;
    border-radius: 0;
  }
  .t-segmented > :is(button, a, label) > i {
    font-size: var(--icon);
  }
  .t-segmented > :is(button, a, label) + :is(button, a, label) {
    border-inline-start: 1px solid var(--rule-strong);
    --_rule-inline-start: 1px;
  }
  .t-segmented > :is(button, a, label):where(:not(:disabled, [aria-disabled=true], :has(:disabled))):hover {
    background-color: var(--surface-hover);
  }
  .t-segmented > button:is([aria-pressed=true], [aria-selected=true]),
  .t-segmented > a:is([aria-current=true], [aria-current=page]),
  .t-segmented > label:has(:checked) {
    background-color: var(--select-bg);
    color: var(--select-fg);
  }
  .t-segmented > :is(button:disabled, a[aria-disabled=true], label:has(:disabled)) {
    color: var(--text-disabled);
  }
  /* A radio segment keeps its input for the keyboard and screen readers, undrawn; the label shows its
     focus ring. The arrow keys move between radios natively. */
  .t-segmented > label {
    position: relative;
  }
  .t-segmented > label > input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .t-segmented > label:has(:focus-visible) {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
  }
  /* The end segments follow the rounded frame from inside, so a pressed one keeps its corners
     without clipping the focus ring: across, the frame's inner curve; up and down, its outer one,
     as a segment reaches the frame's outer edge there. */
  .t-segmented > :is(button, a, label):first-child {
    border-start-start-radius: max(0px, var(--_r) - 1px) var(--_r);
    border-end-start-radius: max(0px, var(--_r) - 1px) var(--_r);
  }
  .t-segmented > :is(button, a, label):last-child {
    border-start-end-radius: max(0px, var(--_r) - 1px) var(--_r);
    border-end-end-radius: max(0px, var(--_r) - 1px) var(--_r);
  }
  .t-segmented--s {
    --_h: var(--control-s);
  }
  .t-segmented--s > :is(button, a, label) {
    padding: 0 calc(1rem * pow(var(--ratio), -3));
    font-size: var(--font-caption);
  }
  /* An icon segment is square. */
  .t-segmented--icon > :is(button, a, label) {
    width: var(--_h);
    padding: 0;
  }
}
/* ==========================================================================
   Tabs
   ========================================================================== */
@layer tusch.components {
  /* Tabs are a large control. A tab's label takes the interface line, so that a count in it is held
     to that line. */
  /* Tabs that don't fit the strip's width, as on a phone, wrap like words onto lines of their own. */
  .t-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1px var(--space-m);
    border-block-end: 1px solid var(--rule);
    --_rule-block-end: 1px;
  }
  /* A tab takes the strip's rule back below it, so that it is the strip's whole height, and the
     current tab's mark lies over the rule; on a strip of several lines, the pixel between lines gives
     each line's tabs the same room, so the strip is as many tabs tall as it has lines. */
  .t-tab {
    appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    height: var(--control-l);
    padding: 0;
    margin: 0 0 -1px;
    background: none;
    border: 0;
    text-decoration: none;
    font: var(--fw-medium) var(--font-ui)/var(--line-ui) var(--font-sans);
    color: var(--text-2);
  }
  /* A tab is a link to its view, marked aria-current="page"; a scripted tab is marked aria-selected. */
  .t-tab:hover {
    color: var(--text-1);
  }
  .t-tab:is([aria-selected=true], [aria-current=page]) {
    color: var(--text-1);
  }
  .t-tab:is([aria-selected=true], [aria-current=page])::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: var(--text-1);
  }
  .t-tab__index {
    font: var(--font-label)/1 var(--font-mono);
    color: var(--text-2);
  }
  .t-tab:is([aria-selected=true], [aria-current=page]) .t-tab__index {
    color: var(--text-1);
  }
  .t-tab:is(:disabled, [aria-disabled=true]) {
    color: var(--text-disabled);
  }
}
/* ==========================================================================
   Menu
   ========================================================================== */
@layer tusch.components {
  /* A dropdown is a details whose summary, a push button, opens a t-menu under it, with no script.
     Choosing an item loads a page, which closes it. */
  .t-dropdown {
    position: relative;
    display: inline-flex;
  }
  .t-dropdown > summary {
    list-style: none;
  }
  .t-dropdown > summary::-webkit-details-marker {
    display: none;
  }
  .t-dropdown > .t-menu {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    z-index: 20;
  }
  /* The menu sits a fixed step of the scale, −15, below its button. */
  .t-dropdown > .t-btn + .t-menu {
    margin-top: calc(1rem * pow(var(--ratio), -15));
  }
  /* Its padding above and below gives up its frame's width. An item is a small control, and its text
     starts a step of the scale in, past the check that marks the current choice. */
  .t-menu {
    min-width: calc(1rem * pow(var(--ratio), 18));
    padding-block: calc(var(--space-3xs) - var(--_rule-block-start, 0px)) calc(var(--space-3xs) - var(--_rule-block-end, 0px));
    padding-inline: calc(0px - var(--_rule-inline-start, 0px)) calc(0px - var(--_rule-inline-end, 0px));
    margin: 0;
    list-style: none;
    background: var(--surface-raised);
    border: 1px solid var(--rule-strong);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    box-shadow: var(--elev-2);
    font-size: var(--font-ui);
    color: var(--text-1);
  }
  .t-menu__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    height: var(--control-s);
    padding-block: 0;
    padding-inline: calc(1rem * pow(var(--ratio), 3)) var(--space-xs);
    white-space: nowrap;
  }
  /* An icon's margin nudges it towards the item's start, in em of its glyph. */
  .t-menu__item > i {
    font-size: var(--icon);
    margin-inline-start: calc(-1em * pow(var(--ratio), -15));
  }
  /* Items are links, or buttons in a form. */
  :is(a, button).t-menu__item {
    width: 100%;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: start;
    text-decoration: none;
  }
  /* The focused item inverts, as the highlighted one does; the inversion is its focus mark. */
  .t-menu__item:where(:not(:disabled, [aria-disabled=true])):hover, .t-menu__item.is-active, .t-menu__item:focus-visible {
    background: var(--select-bg);
    color: var(--select-fg);
    outline: none;
  }
  .t-menu__item:is(:disabled, [aria-disabled=true]) {
    color: var(--text-disabled);
  }
  /* The current choice is checked: aria-current on a link, aria-checked in a scripted menu. */
  .t-menu__item[aria-checked=true]::before, .t-menu__item:is([aria-current=true], [aria-current=page])::before {
    content: "";
    position: absolute;
    inset-inline-start: calc(1rem * pow(var(--ratio), -3));
    top: 50%;
    width: calc(1rem * pow(var(--ratio), -5));
    height: calc(1rem * pow(var(--ratio), -10));
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-75%) rotate(-45deg);
  }
  /* A separator is a rule, its line in the space after it, so it adds no height. */
  .t-menu__sep {
    display: flow-root;
    position: relative;
    height: 0;
    margin: var(--space-3xs) 0;
    border: 0;
    overflow: visible;
  }
  .t-menu__sep::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    border-block-start: 1px solid var(--rule);
    --_rule-block-start: 1px;
  }
  .t-menu__label {
    padding-block: var(--space-2xs) var(--space-3xs);
    padding-inline: calc(1rem * pow(var(--ratio), 3)) var(--space-xs);
    font: var(--font-label)/var(--line-label) var(--font-mono);
    text-transform: uppercase;
    letter-spacing: var(--track-label);
    color: var(--text-2);
  }
}
/* ==========================================================================
   Trail
   ========================================================================== */
@layer tusch.components {
  /* Where the page is, as an ordered list: each place above it a link, then the page itself in plain
     text, on one line that never wraps. Every place may shorten with an ellipsis, the page's own name
     first, as it shrinks a hundred times as fast. */
  .t-crumbs {
    min-width: 0;
    font-size: var(--font-ui);
    line-height: var(--line-ui);
    --_piece-height: initial;
    --_piece-margin: initial;
    --_piece-align: initial;
  }
  .t-crumbs > ol {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
  }
  .t-crumbs li {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 0 1 auto;
  }
  .t-crumbs li:last-child {
    flex-shrink: 100;
  }
  /* Before each place but the first, the separator: a chevron in the muted ink, in em of the trail's
     text, the list's and no link's, so that each link's target and focus ring take in its words alone,
     and drawn here so that the markup holds the places alone. It points toward the line's end, so
     on a right-to-left page it turns the other way. */
  .t-crumbs li + li::before {
    content: "";
    display: inline-block;
    flex: none;
    width: calc(1em * pow(var(--ratio), -7));
    height: calc(1em * pow(var(--ratio), -7));
    margin-inline-end: calc(var(--space-2xs) * 1.5);
    color: var(--text-2);
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
  }
  .t-crumbs li + li:dir(rtl)::before {
    transform: rotate(-135deg);
  }
  /* Each link is a medium control tall, which a coarse pointer raises to the touch floor, as the
     sortable table headings are: standing alone, outside a sentence, it gets no inline exception from
     WCAG 2.5.5. */
  .t-crumbs__link, .t-crumbs__here {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: var(--control-m);
  }
  .t-crumbs__here {
    font-weight: var(--fw-medium);
  }
}
/* ==========================================================================
   Dialog
   ========================================================================== */
@layer tusch.components {
  .t-scrim {
    position: fixed;
    inset: 0;
    background: var(--pattern-scrim);
    z-index: 50;
  }
  /* As wide as a step of the scale, and never wider than its container; its padding gives up its
     frame's width on every side. */
  .t-dialog {
    width: min(calc(1rem * pow(var(--ratio), 24)), 100%);
    padding-block: calc(var(--space-m) - var(--_rule-block-start, 0px)) calc(var(--space-m) - var(--_rule-block-end, 0px));
    padding-inline: calc(var(--space-m) - var(--_rule-inline-start, 0px)) calc(var(--space-m) - var(--_rule-inline-end, 0px));
    margin: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: calc(1rem * pow(var(--ratio), 2));
    row-gap: var(--space-2xs);
    color: var(--text-1);
    background: var(--surface-raised);
    border: 1px solid var(--rule-strong);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    border-radius: 0;
    box-shadow: var(--elev-3);
  }
  dialog.t-dialog {
    margin: auto;
  }
  dialog.t-dialog:not([open]) {
    display: none;
  }
  dialog.t-dialog::backdrop {
    background: var(--pattern-scrim);
  }
  .t-dialog__icon {
    grid-row: span 2;
    font-size: round(up, 1rem * pow(var(--ratio), 5) - var(--rhythm) / 1000, var(--rhythm));
    line-height: 1;
  }
  .t-dialog__title {
    margin: 0;
    font: var(--fw-semibold) var(--font-body)/var(--line-body) var(--font-sans);
    letter-spacing: calc(-1em * pow(var(--ratio), -38));
  }
  .t-dialog__body {
    margin: 0;
    font-size: var(--font-ui);
    line-height: var(--line-ui);
    --_piece-height: initial;
    --_piece-margin: initial;
    --_piece-align: initial;
    color: var(--text-2);
    text-wrap: pretty;
  }
  .t-dialog__content {
    grid-column: 1/-1;
    margin-top: var(--space-xs);
    display: grid;
    gap: var(--space-s);
  }
  .t-dialog__actions {
    grid-column: 1/-1;
    margin-top: max(var(--rhythm) * sign(1rem * pow(var(--ratio), 2)), round(nearest, 1rem * pow(var(--ratio), 2), var(--rhythm)));
  }
  .t-dialog--plain {
    grid-template-columns: minmax(0, 1fr);
  }
  .t-dialog--plain .t-dialog__icon {
    display: none;
  }
}
/* ==========================================================================
   List and outline
   ========================================================================== */
@layer tusch.components {
  .t-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: var(--font-ui);
  }
  /* A row's side padding is --space-xs, so a heading padded by it lines up with the rows' text. */
  .t-list__row {
    display: flex;
    align-items: center;
    gap: calc(1rem * pow(var(--ratio), -3));
    height: var(--row);
    padding-block: 0;
    padding-inline: calc(var(--space-xs) + var(--depth, 0) * calc(1rem * pow(var(--ratio), 1))) var(--space-xs);
    border-block-end: 1px solid var(--rule-faint);
    --_rule-block-end: 1px;
    user-select: none;
    white-space: nowrap;
  }
  .t-list__row > i {
    font-size: var(--icon);
    flex: none;
  }
  .t-list__row > .t-list__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .t-list__row:where(:not(:disabled, [aria-disabled=true])):hover {
    background: var(--surface-hover);
  }
  /* A row is a link to its item, or holds one, and the item on screen is marked aria-current; a
     scripted list marks its selection with aria-selected. */
  a.t-list__row, .t-list__row a {
    color: inherit;
    text-decoration: none;
  }
  .t-list__row:is([aria-selected=true], [aria-current=true], [aria-current=page]) {
    background: var(--select-bg);
    color: var(--select-fg);
  }
  .t-list__row:is([aria-selected=true], [aria-current=true], [aria-current=page]) .t-list__meta {
    color: inherit;
  }
  .t-list__row[aria-disabled=true] {
    color: var(--text-disabled);
  }
  .t-list__meta {
    margin-inline-start: auto;
    font: var(--font-label)/1 var(--font-mono);
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
  }
  /* Disclosure triangle */
  .t-disclosure {
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: calc(1em * pow(var(--ratio), -1));
    height: calc(1em * pow(var(--ratio), -1));
    padding: 0;
    margin-block: 0;
    margin-inline: calc(-1em * pow(var(--ratio), -14)) calc(-1em * pow(var(--ratio), -9));
    background: none;
    border: 0;
    color: inherit;
    flex: none;
  }
  .t-disclosure::before {
    content: "";
    width: 0;
    height: 0;
    border-inline-start: calc(1em * pow(var(--ratio), -7)) solid currentColor;
    border-top: calc(1em * pow(var(--ratio), -9)) solid transparent;
    border-bottom: calc(1em * pow(var(--ratio), -9)) solid transparent;
    transition: transform var(--dur-1) var(--ease-standard);
  }
  /* An outline row that opens is a details whose summary carries the triangle; it turns while the
     details is open, or, in a scripted outline, while aria-expanded is true. */
  summary.t-list__row {
    list-style: none;
  }
  summary.t-list__row::-webkit-details-marker {
    display: none;
  }
  .t-disclosure[aria-expanded=true]::before, details[open] > summary .t-disclosure::before {
    transform: rotate(90deg);
  }
  .t-disclosure:dir(rtl)[aria-expanded=true]::before, details[open] > summary .t-disclosure:dir(rtl)::before {
    transform: rotate(-90deg);
  }
  .t-disclosure--spacer::before {
    visibility: hidden;
  }
}
/* ==========================================================================
   Table
   ========================================================================== */
@layer tusch.components {
  .t-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--font-ui);
    font-variant-numeric: tabular-nums;
  }
  .t-table th {
    height: var(--row);
    padding: 0 var(--space-xs);
    text-align: start;
    white-space: nowrap;
    vertical-align: middle;
    font: var(--fw-regular) var(--font-label)/1 var(--font-mono);
    text-transform: uppercase;
    letter-spacing: var(--track-label);
    color: var(--text-2);
    border-block-end: 1px solid var(--rule-strong);
    --_rule-block-end: 1px;
    user-select: none;
  }
  .t-table th[aria-sort] {
    color: var(--text-1);
  }
  /* A header that sorts its column holds a link to the page sorted that way. The link is the header
     cell's whole height, taking the cell's rule back below it, so that on a touch screen it is a
     target the touch floor tall. */
  .t-table th a {
    display: inline-flex;
    align-items: center;
    height: var(--row);
    margin-block-end: -1px;
    color: inherit;
    text-decoration: none;
  }
  /* The arrow of a sorted column sits in its header's text, drawn in em of it, and its nudge up
     to the text's middle is in em too. */
  .t-table th[aria-sort]::after {
    content: "";
    display: inline-block;
    margin-inline-start: calc(1em * pow(var(--ratio), -4));
    vertical-align: calc(1em * pow(var(--ratio), -17));
    border-left: calc(1em * pow(var(--ratio), -8)) solid transparent;
    border-right: calc(1em * pow(var(--ratio), -8)) solid transparent;
  }
  .t-table th[aria-sort=ascending]::after {
    border-bottom: calc(1em * pow(var(--ratio), -7)) solid currentColor;
  }
  .t-table th[aria-sort=descending]::after {
    border-top: calc(1em * pow(var(--ratio), -7)) solid currentColor;
  }
  .t-table td {
    height: var(--row);
    padding: 0 var(--space-xs);
    border-block-end: 1px solid var(--rule-faint);
    --_rule-block-end: 1px;
    white-space: nowrap;
  }
  /* An icon in a cell keeps the icon size, which the row has room for, its middle set at the middle of
     its text's small letters, as the face that draws them puts it. */
  .t-table td > i {
    font-size: var(--icon);
    vertical-align: middle;
    margin-inline-end: var(--space-2xs);
  }
  .t-table .is-num {
    text-align: end;
  }
  .t-table .is-meta {
    font-family: var(--font-mono);
    font-size: var(--font-label);
    color: var(--text-2);
  }
  .t-table tbody tr:hover {
    background: var(--surface-hover);
  }
  /* A scripted table marks its selection with aria-selected; a web table acts on checked rows. */
  .t-table tbody tr[aria-selected=true] {
    background: var(--select-bg);
    color: var(--select-fg);
  }
  .t-table tbody tr[aria-selected=true] td {
    color: inherit;
    border-block-end-color: var(--select-bg);
  }
  .t-table--ruled td {
    border-block-end-color: var(--rule);
  }
}
/* ==========================================================================
   Badge, count, tag
   ========================================================================== */
@layer tusch.components {
  .t-badge {
    display: inline-flex;
    align-items: center;
    gap: calc(1em * pow(var(--ratio), -5));
    padding: 0 calc(1em * pow(var(--ratio), -4));
    font-family: var(--font-mono);
    font-weight: var(--fw-regular);
    font-size: calc(1em * pow(var(--ratio), -2));
    height: var(--_piece-height, min(1em * pow(var(--ratio), 4), 1lh));
    margin-block: var(--_piece-margin, calc(min(1em * pow(var(--ratio), 4), 1lh) / -2));
    vertical-align: var(--_piece-align, baseline);
    text-transform: uppercase;
    letter-spacing: calc(1em * pow(var(--ratio), -23));
    color: var(--text-1);
    background: transparent;
    border: 1px solid var(--rule-strong);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    white-space: nowrap;
  }
  .t-badge--solid {
    background: var(--select-bg);
    color: var(--select-fg);
    border-color: var(--select-bg);
  }
  .t-badge--quiet {
    border-color: var(--rule);
    color: var(--text-2);
  }
  .t-badge--dot::before {
    content: "";
    width: calc(1em * pow(var(--ratio), -4));
    height: calc(1em * pow(var(--ratio), -4));
    background: currentColor;
  }
  .t-badge--hatch {
    background: var(--surface-raised) var(--pattern-hatch-faint);
  }
  .t-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 calc(1em * pow(var(--ratio), -5));
    font-family: var(--font-mono);
    font-size: calc(1em * pow(var(--ratio), -2));
    height: var(--_piece-height, min(1em * pow(var(--ratio), 4), 1lh));
    min-width: var(--_piece-height, min(1em * pow(var(--ratio), 4), 1lh));
    margin-block: var(--_piece-margin, calc(min(1em * pow(var(--ratio), 4), 1lh) / -2));
    vertical-align: var(--_piece-align, baseline);
    font-variant-numeric: tabular-nums;
    background: var(--select-bg);
    color: var(--select-fg);
  }
  .t-tag {
    display: inline-flex;
    align-items: center;
    gap: calc(1em * pow(var(--ratio), -8));
    padding-block: 0;
    padding-inline: calc(1em * pow(var(--ratio), -3)) calc(1em * pow(var(--ratio), -8));
    font-family: var(--font-sans);
    font-weight: var(--fw-regular);
    font-size: calc(1em * pow(var(--ratio), -1));
    height: var(--_piece-height, min(1em * pow(var(--ratio), 4), 1lh));
    margin-block: var(--_piece-margin, calc(min(1em * pow(var(--ratio), 4), 1lh) / -2));
    vertical-align: var(--_piece-align, baseline);
    color: var(--text-1);
    background: var(--surface-raised);
    border: 1px solid var(--rule);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
  }
  /* Its x takes the tag's own size. */
  .t-tag__remove {
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: calc(1em * pow(var(--ratio), 2));
    height: calc(1em * pow(var(--ratio), 2));
    padding: 0;
    background: none;
    border: 0;
    color: var(--text-2);
  }
  /* The x is an item of the button, which centres it, so it keeps the tag's size. */
  .t-tag__remove > i {
    font-size: inherit;
  }
  .t-tag__remove:where(:not(:disabled, [aria-disabled=true])):hover {
    background: var(--select-bg);
    color: var(--select-fg);
  }
  .t-tag__remove:is(:disabled, [aria-disabled=true]) {
    color: var(--text-disabled);
  }
  .t-tag.is-selected {
    background: var(--select-bg);
    color: var(--select-fg);
    border-color: var(--select-bg);
  }
}
/* ==========================================================================
   Notice
   ========================================================================== */
@layer tusch.components {
  /* A pane at the top of a page's content that reports the outcome of the previous page, or a
     condition that is still true. It only arrives with a page load: an outcome once, after the
     redirect, and a condition on every page until it ends. It is never added to or taken off a page
     on screen, so it has no close box and nothing moves. Severity is carried by the frame, the glyph
     and the wording. Give it role="region" labelled by its title; an outcome also takes tabindex="-1"
     and autofocus, so focus lands on it after the redirect. */
  /* Its padding gives up its frame's width on every side. A warning's frame is twice as wide, and
     its padding gives that up above and below. */
  .t-notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon text" ". actions";
    column-gap: var(--space-xs);
    row-gap: var(--space-2xs);
    padding-block: calc(var(--space-xs) - var(--_rule-block-start, 0px)) calc(var(--space-xs) - var(--_rule-block-end, 0px));
    padding-inline: calc(var(--space-s) - var(--_rule-inline-start, 0px)) calc(var(--space-s) - var(--_rule-inline-end, 0px));
    background: var(--surface-raised);
    color: var(--text-1);
    border: 1px solid var(--rule-strong);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    font-size: var(--font-ui);
    line-height: var(--line-ui);
    --_piece-height: initial;
    --_piece-margin: initial;
    --_piece-align: initial;
  }
  .t-notice + .t-notice {
    margin-top: var(--space-xs);
  }
  .t-notice__icon {
    grid-area: icon;
    align-self: start;
    font-size: var(--line-ui);
    line-height: 1;
  }
  .t-notice__text {
    grid-area: text;
    display: grid;
    gap: var(--space-3xs);
    min-width: 0;
  }
  .t-notice__title {
    margin: 0;
    font-weight: var(--fw-semibold);
  }
  .t-notice__body {
    margin: 0;
    color: var(--text-2);
    text-wrap: pretty;
  }
  .t-notice__actions {
    grid-area: actions;
  }
  .t-notice--success {
    border-color: var(--rule);
  }
  .t-notice--warning {
    border-width: 2px;
    padding-block: calc(var(--space-xs) - 2px);
  }
  /* An alert is inverted within the active theme: the tokens its contents use point at the theme's
     inverse family, so every var() resolves from the nearest theme, however deeply themes nest. */
  .t-notice--alert {
    --surface-page: var(--surface-inverse);
    --surface-raised: var(--surface-inverse);
    --surface-sunken: var(--surface-inverse);
    --surface-hover: var(--surface-inverse-hover);
    --text-1: var(--text-inverse);
    --text-2: var(--text-inverse-2);
    --rule-strong: var(--text-inverse);
    --rule: var(--rule-inverse);
    --select-bg: var(--text-inverse);
    --select-fg: var(--surface-inverse);
    --focus-ring: var(--text-inverse);
  }
}
/* ==========================================================================
   Status line
   ========================================================================== */
@layer tusch.components {
  /* One line of status in a slot that is always there: the foot of an app, a list's header, or beside
     the control that started a slower job. It fills the space it is given and never wraps, so a new
     message moves nothing beside it; text that does not fit ends in an ellipsis. Give it
     role="status", so a change is read out without taking focus. */
  .t-status {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font: var(--font-label)/var(--line-label) var(--font-mono);
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
  }
}
/* ==========================================================================
   Card, rule, placeholder
   ========================================================================== */
@layer tusch.components {
  /* A card is as tall as what it holds: its padding gives up the frame's width on every side, and
     so do the paddings beside the rules under its head and above its foot. */
  .t-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-block: calc(max(var(--rhythm) * sign(1rem * pow(var(--ratio), 2)), round(nearest, 1rem * pow(var(--ratio), 2), var(--rhythm))) - var(--_rule-block-start, 0px)) calc(max(var(--rhythm) * sign(1rem * pow(var(--ratio), 2)), round(nearest, 1rem * pow(var(--ratio), 2), var(--rhythm))) - var(--_rule-block-end, 0px));
    padding-inline: calc(max(var(--rhythm) * sign(1rem * pow(var(--ratio), 2)), round(nearest, 1rem * pow(var(--ratio), 2), var(--rhythm))) - var(--_rule-inline-start, 0px)) calc(max(var(--rhythm) * sign(1rem * pow(var(--ratio), 2)), round(nearest, 1rem * pow(var(--ratio), 2), var(--rhythm))) - var(--_rule-inline-end, 0px));
    background: var(--surface-raised);
    border: 1px solid var(--rule);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
  }
  .t-card--strong {
    border-color: var(--rule-strong);
  }
  /* A flush card's frame has no padding beside it, so it is drawn over the edges of what the card
     holds, which then starts at the card's own edge, in the colour of the card's own frame. */
  .t-card--flush {
    position: relative;
  }
  .t-card--flush::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid var(--rule);
  }
  .t-card--flush {
    padding: 0;
    border-width: 0;
  }
  .t-card--flush::after {
    border-color: inherit;
  }
  .t-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-xs);
    padding-bottom: calc(var(--space-xs) - 1px);
    margin-bottom: var(--space-s);
    border-block-end: 1px solid var(--rule);
    --_rule-block-end: 1px;
  }
  .t-card__title {
    font: var(--fw-semibold) var(--font-ui)/var(--line-ui) var(--font-sans);
  }
  .t-card__meta {
    font: var(--font-label)/1 var(--font-mono);
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
  }
  .t-card__foot {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    padding-top: calc(var(--space-xs) - 1px);
    margin-top: auto;
    border-block-start: 1px solid var(--rule);
    --_rule-block-start: 1px;
  }
  .t-rule {
    display: flow-root;
    position: relative;
    height: 0;
    margin: 0;
    border: 0;
    overflow: visible;
  }
  .t-rule::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    border-block-start: 1px solid var(--rule);
    --_rule-block-start: 1px;
  }
  .t-rule--strong::before {
    border-block-start-color: var(--rule-strong);
  }
  /* A label rule is a line of its label's text, the line drawn after the label within it. */
  .t-rule--label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    height: auto;
    border: 0;
    font: var(--font-label)/var(--line-label) var(--font-mono);
    text-transform: uppercase;
    letter-spacing: var(--track-label);
    color: var(--text-2);
  }
  .t-rule--label::before {
    content: none;
  }
  .t-rule--label::after {
    content: "";
    flex: 1;
    border-block-start: 1px solid var(--rule);
    --_rule-block-start: 1px;
  }
  /* Image placeholder: hatch + mono caption, its padding giving up its frame's width on every side. */
  .t-placeholder {
    display: grid;
    place-items: center;
    min-height: round(up, 1rem * pow(var(--ratio), 15) - var(--rhythm) / 1000, var(--rhythm));
    padding-block: calc(var(--space-xs) - var(--_rule-block-start, 0px)) calc(var(--space-xs) - var(--_rule-block-end, 0px));
    padding-inline: calc(var(--space-xs) - var(--_rule-inline-start, 0px)) calc(var(--space-xs) - var(--_rule-inline-end, 0px));
    background: var(--surface-page) var(--pattern-hatch-faint);
    border: 1px solid var(--rule);
    --_rule-block-start: 1px;
    --_rule-block-end: 1px;
    --_rule-inline-start: 1px;
    --_rule-inline-end: 1px;
    font: var(--font-label)/var(--line-label) var(--font-mono);
    text-transform: uppercase;
    letter-spacing: var(--track-label);
    color: var(--text-2);
  }
  /* The label's padding above and below is a fixed step of the scale, −15. */
  .t-placeholder > span {
    background: var(--surface-page);
    padding: calc(1rem * pow(var(--ratio), -15)) calc(1rem * pow(var(--ratio), -7));
  }
}
/* ==========================================================================
   Skip link
   ========================================================================== */
@layer tusch.components {
  /* The first thing in body, never in a nav or the header, leading to the page's main. */
  .t-skip {
    display: flex;
    align-items: center;
    min-block-size: var(--control-l);
    padding-inline: var(--space-m);
    font-size: var(--font-ui);
    line-height: var(--line-ui);
    --_piece-height: initial;
    --_piece-margin: initial;
    --_piece-align: initial;
    font-weight: var(--fw-medium);
    background: var(--select-bg);
    color: var(--select-fg);
  }
  .t-skip:focus-visible {
    outline-color: var(--select-fg);
    outline-offset: -4px;
  }
  .t-skip:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    user-select: none;
    min-block-size: 0;
  }
}
/* ==========================================================================
   Text for screen readers only
   ========================================================================== */
@layer tusch.components {
  /* Such as the "Error:" that starts a field error. Last of the components, so it holds on an
     element that a component also styles. */
  .t-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    user-select: none;
  }
}
