/* GENERATED by scripts/build_tokens.py from telivu/web/frontdoor/design_tokens.json.
   Do not edit: change the JSON, then run uv run python scripts/build_tokens.py. */

:root {
  /* color */
  --paper: #f7f7f7; /* the page and the app background */
  --ink: #000000; /* text marks, borders, the send button; also the raw #000 of the frame */
  --text: #111111; /* body text of the chat app */
  --orange: #f26b1d; /* garnish only: never text, a fill, a button or a warning */
  --pencil-60: #00000099; /* ink at 60% */
  --pencil-40: #00000066; /* ink at 40%: lines and marks, not body text */
  --border: #00000026; /* ink at 15% */
  --divider: #0000001a; /* ink at 10% */
  --bg: var(--paper);
  --surface: var(--paper);
  --surface-2: #0000000a; /* ink at 4% */
  --ink-2: var(--pencil-60);
  --mut: var(--pencil-60);
  --faint: var(--pencil-40); /* lines and marks only: below 4.5:1 for text */
  --urgent: #8c1d18; /* the only strong colour */
  --urgent-ink: #ffffff;
  --urgent-soft: #fbefee;
  --pending: var(--paper); /* waiting for a doctor's check, never the same as released */
  --pending-line: var(--ink);
  --pending-ink: var(--ink);
  --white: #ffffff; /* the composer field and the attach cards (raw #fff now) */
  --scrim: #00000040; /* ink at 25%: the backdrop of the menu and the attach sheet */
  --paper-50: rgba(247, 247, 247, .5); /* paper at 50%: the spiral path on ink (app.css .pp) */
  --desk: #e8e8e6; /* the page around the frame (outside the app) */
  --metal: #1b1b1c; /* the frame bezel */
  --metal-edge: #3a3a3c; /* the edge line of the bezel */
  --shadow-near: #0000001f; /* ink at 12%: the near shadow of the frame */
  --shadow-far: #0000004d; /* ink at 30%: the far shadow of the frame */

  /* type */
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: Inter, "SF Pro Text", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SF Mono", Menlo, "IBM Plex Mono", "DM Mono", ui-monospace, Consolas, monospace;
  --font-system: -apple-system, "SF Pro Text", var(--sans); /* the drawn phone status bar clock */
  --fs-label: .6875rem; /* 11 px mono labels */
  --fs-xs: .75rem; /* 12 px mono kickers (app.css) */
  --fs-small: .8125rem; /* 13 px */
  --fs-note: .875rem; /* 14 px */
  --fs-ui: .9375rem; /* 15 px */
  --fs-body: 1rem; /* 16 px */
  --fs-lead: 1.0625rem; /* 17 px */
  --fs-lg: 1.125rem; /* 18 px */
  --fs-h2: 1.25rem; /* 20 px */
  --fs-title: 1.5rem; /* 24 px serif titles in the chat (prompt, card, snapshot, plan) */
  --fs-serif: 1.75rem; /* 28 px the assistant's main line */
  --fs-h1: 2rem; /* 32 px */
  --fs-num: 2.25rem; /* 36 px big numbers; urgent h1 on a phone */
  --fs-display: 2.5rem; /* 40 px result step name from 48rem; SVG big value */
  --fs-hero: 2.75rem; /* 44 px h1 from 48rem; the drawn word mark */
  --track-label: .06em; /* letter-spacing of the mono labels */
  --track-wide: .1em;
  --track-wider: .12em;

  /* space */
  --s-hair: 2px; /* the gap between two stacked text lines */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-field: 10px; /* block padding of the composer field: 44 px with 16 px text */
  --tap: 44px; /* the smallest tap target */
  --pad: clamp(20px, 3vw, 40px); /* page padding (app.css) */
  --col: 44rem; /* the content column (app.css); 50rem from 80rem wide */
  --gutter: max(var(--pad), calc((100% - var(--col)) / 2)); /* lines run edge to edge, text stays in the column */
  --chips-max: 22rem; /* the width of the chip and sheet columns */
  --sk-line: 12px; /* Skeleton (U3): the height of one text line bar */
  --sk-title: 20px; /* Skeleton (U3): the height of a title bar */
  --sk-row: 60px; /* Skeleton (U3): one records row, the rc-row least height */
  --sk-doc: 93px; /* Skeleton (U3): one doctor card, the mx-doc with its name, role and place lines (TSK-2539) */
  --sk-card-body: 116px; /* Skeleton (TSK-2539): the mx-card-body of a record card (tag, one-line name, three lines) */
  --sk-tr-head: 36px; /* Skeleton (TSK-2539): the mx-tr-head of a trend chart (name and newest value) */
  --sk-pic: var(--card-pic); /* Skeleton (U3): the picture column of a record card */
  --sk-chart-ratio: 320 / 150; /* Skeleton (U3): the trend chart box, the aspect ratio of mx-tr-svg */
  --icon: 22px; /* a line icon in the head and the menu (brand mark, header icons, menu rows) (TSK-2533) */
  --empty-mark: 200px; /* the ray circle of the empty thread (TSK-2533) */
  --empty-spiral: 104px; /* the spiral in the ray circle of the empty thread (TSK-2533) */
  --card-pic: min(7rem, 30vw); /* The picture column of a record card: 112 px (30% of a narrow phone), so the body detail of a cover can be seen (was 88 px, TSK-2544) */
  --pic-w: 18rem; /* Real assets (U6): the largest width of a picture or a picture deck in the chat */
  --pic-ratio-draw: 4 / 5; /* Real assets (U6): a drawing of _art.html (viewBox 320 x 400) */
  --pic-ratio-cover: 4 / 3; /* Real assets (U6): a generated cover picture (gen.learn.*, gen.find.*: 480 x 360 and 960 x 720) */
  --pic-ratio-tall: 4 / 5; /* Real assets (U6): a generated body or disease picture (gen.body.*, gen.disease.*: 400 x 500 and 800 x 1000) */
  --sk-w-long: 92%; /* Skeleton (U3): a long text line */
  --sk-w-mid: 70%; /* Skeleton (U3): a middle text line */
  --sk-w-short: 45%; /* Skeleton (U3): a short text line or a title */

  /* radius */
  --r: 0; /* square corners */
  --r-mark: 2px; /* the value cell outline (app.css) */
  --r-round: 50%; /* dots */

  /* line */
  --stroke-1: 1px; /* hairlines and borders */
  --stroke-2: 2px; /* focus outline and its offset */
  --stroke-3: 3px; /* the orange underline mark */
  --focus-gap: 2px; /* the offset of the focus ring (inside: calc(var(--focus-gap) * -1)) */
  --stroke-spiral: 2px; /* the spiral path */
  --stroke-spiral-mark: 1.4px; /* the spiral in the brand mark */

  /* layer */
  --z-skip: 10; /* the skip link */
  --z-overlay: 30; /* the menu drawer, the attach sheet, the full-size picture */

  /* frame */
  --screen-i: 393px; /* the logical screen width (iPhone 15/16 Pro) */
  --screen-b: 852px; /* the logical screen height (iPhone 15/16 Pro) */
  --bezel: 14px; /* black border + metal band on each side */
  --device-i: calc(var(--screen-i) + 2 * var(--bezel)); /* device width: screen + 2 bezels (421 px) */
  --device-b: calc(var(--screen-b) + 2 * var(--bezel)); /* device height: screen + 2 bezels (880 px); the zoom steps in media use 880 */
  --screen-corner: 55px; /* the corner radius of the screen */
  --device-corner: calc(var(--screen-corner) + var(--bezel)); /* the corner radius of the phone: concentric with the screen */
  --frame-corner-shape: superellipse(1.2); /* continuous (squircle-like) corners where corner-shape is supported; round elsewhere */
  --status-b: 59px; /* status bar height (top safe area); the island is centred in it */
  --island-i: 126px; /* dynamic island width */
  --island-b: 37px; /* dynamic island height */
  --island-corner: calc(var(--island-b) / 2); /* a capsule */
  --status-gap: 6px; /* gap between the status bar icons */
  --signal-i: 18px; /* status bar signal icon */
  --signal-b: 12px;
  --wifi-i: 16px; /* status bar wifi icon */
  --wifi-b: 12px;
  --battery-i: 27px; /* status bar battery icon */
  --battery-b: 13px;
  --home-b: 34px; /* home indicator area height (bottom safe area) */
  --home-bar-i: 134px; /* home indicator bar width */
  --home-bar-b: 5px; /* home indicator bar height */
  --home-bar-corner: 3px;
  --home-bar-end: 8px; /* gap below the home indicator bar */
  --side-btn-i: 3px; /* side button depth */
  --side-btn-corner: 2px;
  --side-btn-action-at: 176px; /* action button: offset from the device top */
  --side-btn-action-b: 32px; /* action button length */
  --side-btn-up-at: 240px; /* volume up: offset from the device top */
  --side-btn-down-at: 314px; /* volume down: offset from the device top */
  --side-btn-vol-b: 62px; /* volume button length */
  --side-btn-power-at: 262px; /* side (power) button: offset from the device top */
  --side-btn-power-b: 100px; /* side (power) button length */
  --shadow-device: inset 0 0 0 1px var(--metal-edge), inset 0 0 0 4px var(--metal), inset 0 0 0 5px var(--metal-edge), 0 2px 4px var(--shadow-near), 0 40px 80px -24px var(--shadow-far); /* metal band with two edges, black border, drop shadow of the drawn phone */
  --z-frame: 40; /* status bar and home indicator: over the drawer, sheet and picture (above --z-overlay) */
  --frame-gap: 16px; /* the least space around the phone on the page */
  --frame-zoom: 1; /* the phone scale; media steps lower it on a short window so the phone fits */
  --frame-fit: min(1, tan(atan2(100dvh - 2 * var(--frame-gap), var(--device-b)))); /* the continuous phone scale: (window height - 2 gaps) / device height, at most 1; chat.css uses it where the browser has tan() and atan2(), else the --frame-zoom steps (TSK-2535) */
  --head-b: 52px; /* the header slot */
  --bottom-b: 64px; /* the bottom (composer) slot */

  /* motion */
  --ease-standard: cubic-bezier(0.22, 0.7, 0.25, 1); /* the default easing */
  --ease-enter: cubic-bezier(0, 0, 0.2, 1); /* decelerate: a thing comes in */
  --ease-exit: cubic-bezier(0.4, 0, 1, 1); /* accelerate: a thing goes out */
  --ease-linear: linear; /* steady turns (the idle spiral, the spinner); the only use of linear */
  --dur-fast: 180ms; /* fades, backdrops */
  --dur-base: 240ms; /* a message or a drawer comes in */
  --dur-slow: 400ms; /* page change, full-size picture */
  --dur-spiral: 1.6s; /* one turn of the thinking spiral */
  --stagger: 40ms; /* delay between items of a list */
  --shift-enter: 0.5rem; /* Transitions (U4): how far a source body or a sent message moves as it comes in */
  --scale-from: 0.96; /* Transitions (U4): the full-size picture grows from this scale and goes back to it */
  --scale-press: 0.97; /* Transitions (U4): a chip under the finger */
  --dur-fade: 200ms; /* present .2s fades and button colour changes */
  --dur-spin: 1.8s; /* present message spinner turn */
  --dur-idle-turn: 14s; /* present slow turn of the idle spiral */
  --dur-draw: 900ms; /* SpiralLoader: the spiral draws itself from the centre outward */
  --dur-turn-slow: 4s; /* SpiralLoader: one slow turn of the full and media spiral after the draw */
  --dur-start-min: 1200ms; /* StartScreen: shortest time on screen (the draw is seen) */
  --dur-start-max: 2400ms; /* StartScreen: longest time; then it fades out by CSS alone */
  --dur-veil-wait: 120ms; /* transition screen: no spiral when the next page comes sooner */
  --dur-veil-max: 8s; /* transition screen: it goes away by CSS alone if the page stays */
  --spiral-full: 112px; /* SpiralLoader size full: start and transition screen */
  --spiral-inline: 28px; /* SpiralLoader size inline: the typing message */
  --spiral-media: 40px; /* SpiralLoader size media: a picture that is loading */
  --dur-shimmer: 1.4s; /* Skeleton (U3): one sweep of the shimmer over the placeholder shapes */
  --scale-pop: 0.6; /* Animation (U5): a scan mark, an out-of-range mark or a finding badge grows from this scale, one time */
  --cs-grow: 0px; /* the growth of the composer field in one input; chat.js sets it on the field for the grow move (TSK-2537) */
  --scale-rest: 0.86; /* Animation (U5): the send arrow while send is off; it grows to full size when send is on */
}
@media (min-width: 80rem) { :root { --col: 50rem; } }
@media (width > 30rem) and (height < 57rem) { :root { --frame-zoom: 0.95; } }
@media (width > 30rem) and (height < 54.25rem) { :root { --frame-zoom: 0.9; } }
@media (width > 30rem) and (height < 51.5rem) { :root { --frame-zoom: 0.85; } }
@media (width > 30rem) and (height < 48.75rem) { :root { --frame-zoom: 0.8; } }
@media (width > 30rem) and (height < 46rem) { :root { --frame-zoom: 0.75; } }
@media (width > 30rem) and (height < 43.25rem) { :root { --frame-zoom: 0.7; } }
@media (width > 30rem) and (height < 40.5rem) { :root { --frame-zoom: 0.65; } }
@media (width > 30rem) and (height < 37.75rem) { :root { --frame-zoom: 0.6; } }
@media (width > 30rem) and (height < 35rem) { :root { --frame-zoom: 0.55; } }
