/*
 * Design tokens for the CISF cabin TV (`/`), one set per breakpoint, taken from
 * "government_mui_responsive_system 0.1.md" (revision 0.2, section 6). The screen
 * is full-bleed: no container, no max-width. Below 900px the md (900px) values
 * apply. Sizes are the table values: no vw, vh or clamp() for type, icons,
 * spacing or radius.
 *
 * Profiles: the base set (the lg column, 1200px, which holds every block at
 * 1536 x 864 and up), xl (1920 x 1000 and up), qhd (2560 x 1300 and up: the xl
 * values x 1.5) and uhd (3840 x 2000 and up: the spacing table x 1.5, the type,
 * icon and radius tables x 2), on the 4px grid. The outer padding is a fixed 12px
 * at every size. Below
 * 1536 x 864 the screen is laid out at 1536 x 864 and scaled to fit
 * (public/js/tv-fit.js): seven blocks of text cannot be held at the standard
 * sizes in a window that small. Scoped to .cisf-tv-root, so the officer tablet,
 * login and manual-entry pages, which share tokens.css, are not affected.
 *
 * Which row of the md table each token comes from:
 *   --tv-outer          fixed 12px at every size (owner decision, 30 Nov 2026), not the table value
 *   --tv-gap            Content Blocks, Gap
 *   --tv-panel-pad      Data & Information, Inner (lower bound)
 *   --tv-row-gap        Data & Information, Gap
 *   --tv-nav-pad        Navigation Blocks, Inner (lower bound)
 *   --tv-nav-gap        Navigation Blocks, Gap
 *   --tv-pill-x / -y    Interactive Triggers, Inner X / Y (lower bound)
 *   --tv-fs-* / --tv-lh-*  typography table
 *   --tv-icon-*         iconography table
 *   --tv-radius-*       border radius blueprint
 * Row padding, logo height and bottom row height are derived (see the plan).
 */
/* Base: the lg (1200px) column of the standard. */
.cisf-tv-root {
  --tv-outer: 12px;
  --tv-gap: 24px;
  --tv-panel-pad: 20px;
  --tv-row-gap: 20px;
  --tv-row-pad: 16px;
  --tv-nav-pad: 20px;
  --tv-nav-gap: 24px;
  --tv-pill-x: 20px;
  --tv-pill-y: 12px;

  --tv-fs-h2: 36px;
  --tv-lh-h2: 44px;
  --tv-fs-h3: 26px;
  --tv-lh-h3: 34px;
  --tv-fs-body1: 16px;
  --tv-lh-body1: 26px;
  --tv-fs-body2: 14px;
  --tv-lh-body2: 22px;
  --tv-fs-caption: 12px;
  --tv-lh-caption: 18px;

  --tv-fs-title: var(--tv-fs-h3);
  --tv-lh-title: var(--tv-lh-h3);
  --tv-fs-pill: var(--tv-fs-body2);
  --tv-lh-pill: var(--tv-lh-body2);
  --tv-fs-value: var(--tv-fs-h3);
  --tv-lh-value: var(--tv-lh-h3);

  --tv-icon-inline: 18px;
  --tv-icon-standard: 24px;
  --tv-icon-medium: 28px;
  --tv-icon-large: 44px;

  --tv-radius-ctrl: 8px;
  --tv-radius-surface: 12px;
  --tv-border: 1px;

  --tv-logo-h: 48px;
  --tv-bottom-h: 188px;

  /* Text on the navy header: the white at 40% the header pills use for their outline. */
  --color-on-primary-muted: rgb(255 255 255 / 40%);
}

@media (min-width: 1920px) and (min-height: 1000px) {
  .cisf-tv-root {
    --tv-gap: 32px;
    --tv-panel-pad: 24px;
    --tv-row-gap: 24px;
    --tv-row-pad: 20px;
    --tv-nav-pad: 24px;
    --tv-nav-gap: 32px;
    --tv-pill-x: 24px;
    --tv-pill-y: 14px;

    --tv-fs-h2: 40px;
    --tv-lh-h2: 50px;
    --tv-fs-h3: 28px;
    --tv-lh-h3: 36px;
    --tv-fs-body1: 18px;
    --tv-lh-body1: 28px;
    --tv-fs-body2: 16px;
    --tv-lh-body2: 24px;
    --tv-fs-caption: 13px;
    --tv-lh-caption: 20px;

    --tv-icon-standard: 28px;
    --tv-icon-medium: 32px;
    --tv-icon-large: 48px;

    --tv-fs-title: var(--tv-fs-h2);
    --tv-lh-title: var(--tv-lh-h2);
    --tv-fs-pill: var(--tv-fs-body1);
    --tv-lh-pill: var(--tv-lh-body1);
    --tv-logo-h: 64px;
    --tv-bottom-h: 224px;
  }
}

/* qhd (2560 wide): the xl values x 1.5. */
@media (min-width: 2560px) and (min-height: 1300px) {
  .cisf-tv-root {
    --tv-gap: 48px;
    --tv-panel-pad: 36px;
    --tv-row-gap: 36px;
    --tv-row-pad: 28px;
    --tv-nav-pad: 36px;
    --tv-nav-gap: 48px;
    --tv-pill-x: 36px;
    --tv-pill-y: 20px;

    --tv-fs-h2: 60px;
    --tv-lh-h2: 76px;
    --tv-fs-h3: 42px;
    --tv-lh-h3: 52px;
    --tv-fs-body1: 28px;
    --tv-lh-body1: 44px;
    --tv-fs-body2: 24px;
    --tv-lh-body2: 36px;
    --tv-fs-caption: 20px;
    --tv-lh-caption: 30px;

    --tv-icon-inline: 28px;
    --tv-icon-standard: 40px;
    --tv-icon-medium: 48px;
    --tv-icon-large: 72px;

    --tv-radius-ctrl: 12px;
    --tv-radius-surface: 16px;
    --tv-border: 2px;

    --tv-logo-h: 96px;
    --tv-bottom-h: 288px;
  }
}

/* uhd (3840 wide, 4K UHD): spacing (table 1) x 1.5, type, icons and radius x 2. */
@media (min-width: 3840px) and (min-height: 2000px) {
  .cisf-tv-root {
    --tv-gap: 48px;
    --tv-panel-pad: 36px;
    --tv-row-gap: 36px;
    --tv-row-pad: 28px;
    --tv-nav-pad: 36px;
    --tv-nav-gap: 48px;
    --tv-pill-x: 36px;
    --tv-pill-y: 20px;

    --tv-fs-h2: 80px;
    --tv-lh-h2: 100px;
    --tv-fs-h3: 56px;
    --tv-lh-h3: 72px;
    --tv-fs-body1: 36px;
    --tv-lh-body1: 56px;
    --tv-fs-body2: 32px;
    --tv-lh-body2: 48px;
    --tv-fs-caption: 26px;
    --tv-lh-caption: 40px;

    --tv-icon-inline: 36px;
    --tv-icon-standard: 56px;
    --tv-icon-medium: 64px;
    --tv-icon-large: 96px;

    --tv-radius-ctrl: 16px;
    --tv-radius-surface: 24px;
    --tv-border: 3px;

    --tv-logo-h: 128px;
    --tv-bottom-h: 384px;
  }
}
