/* FeatSuite's design tokens (GitHub issue 203, part 1a; docs/adr/0066-one-interface-foundation.md).
   Every page loads this file first. The rest of the stylesheets name these steps instead of writing sizes of their own:
   a font size is one of the --text steps, a padding, margin or gap one of the --space steps, a corner one of the
   --radius steps. This file is the only place they are written in pixels (test/design-tokens.test.js).
   Colors stay where they were (styles.css :root, light and dark); these are sizes, layers and control heights. */
:root {
  /* One type scale. The staff app and Admin settings read at 14 px (--text-md). */
  --text-2xs:11px;   /* uppercase eyebrows, counters and badges only */
  --text-xs:12px;    /* captions, table headings, help under a field */
  --text-sm:13px;    /* secondary text, dense table cells */
  --text-md:14px;    /* body text, field values, buttons */
  --text-lg:16px;    /* card and section headings */
  --text-xl:18px;    /* dialog titles, large figures */
  --text-2xl:20px;   /* section titles on a page */
  --text-3xl:24px;   /* page titles */
  --text-4xl:30px;   /* the largest numbers and the portal's greeting */
  --leading-tight:1.25;
  --leading-normal:1.5;
  --weight-regular:400;
  --weight-medium:500;
  --weight-semibold:600;
  --weight-bold:700;

  /* Spacing: padding, margins and gaps. Each step is its number in hundredths of 8 px. */
  --space-25:2px;
  --space-50:4px;
  --space-75:6px;
  --space-100:8px;
  --space-150:12px;
  --space-200:16px;
  --space-250:20px;
  --space-300:24px;
  --space-400:32px;
  --space-500:40px;
  --space-600:48px;
  --space-800:64px;
  --space-1000:80px;

  /* Corners. */
  --radius-xs:2px;
  --radius-sm:4px;
  --radius-md:6px;
  --radius-lg:8px;
  --radius-xl:12px;
  --radius-2xl:16px;
  --radius-pill:999px;
  --radius-round:50%;

  /* Controls: buttons, fields and dropdowns are one height. */
  --control-height-sm:30px;
  --control-height:38px;
  --control-height-lg:44px;
  --control-border-width:1px;
  --focus-ring-width:3px;

  /* A list's rows: the ticket list's Comfortable (the default) and Compact rows (GitHub issue 203, 1b). */
  --row-height:48px;
  --row-height-compact:36px;

  /* Layers, lowest first. A dialog's backdrop sits above the top bar and the outage banner; a toast above a dialog. */
  --z-sidebar:5;
  --z-page:15;
  --z-banner:19;
  --z-topbar:20;
  --z-menu:30;
  --z-drawer:35;
  --z-dialog:50;
  --z-dialog-over:55;
  --z-popover:60;
  --z-toast:70;
  --z-startup:200;
  --z-sync:300;

  /* How far a dialog or menu keeps from the edge of the screen. */
  --viewport-gap:16px;
  --dialog-width:520px;
  --dialog-width-wide:880px;
  /* The pages outside the app (sign in, invitation, Create an account, policy, public status page): one width for
     the card and its header, the same as the emailed approval and survey cards (GitHub issue 203, 1c; AG9). */
  --public-card-width:520px;
  /* The staff app's top bar: a bar that stays in view (the ticket's) sits under it and the outage banner. */
  --topbar-height:64px;
  /* Admin settings: the side menu's width, and the one width of every settings page (GitHub issue 203, 1d; AH10).
     The page's cap is wider than the content area ever leaves beside the menu (styles.css holds the area to 1,760 px),
     so the column reaches the area's right edge at every width (the owner, 2026-10-30: it stopped at 1,120 px and
     left a wide empty band when zoomed out). Lines of text and fields keep their own, narrower measures. */
  --settings-menu-width:232px;
  --settings-page-width:1440px;
  --settings-text-width:75ch;
  --settings-field-width:640px;
}

/* The Requester portal and the pages people reach from an email (sign in, invitation, survey, approval, status,
   policy) read at 16 px: the same steps, one size up. */
body.requester-portal-mode, .type-portal {
  --text-2xs:12px;
  --text-xs:13px;
  --text-sm:14px;
  --text-md:16px;
  --text-lg:18px;
  --text-xl:20px;
  --text-2xl:22px;
  --text-3xl:28px;
  --text-4xl:34px;
  --control-height:44px;
}

/* Admin settings, and a dialog opened from it, read nothing under 12 px (GitHub issue 203, 1d; AH10): its eyebrows,
   counters and badges take the captions' size. The rest of the staff app keeps its scale. */
#settingsView, body.settings-frame-open .modal-backdrop, body.settings-frame-open .app-confirm-backdrop {
  --text-2xs:12px;
}

