/* Large size (120 dpi) metric set — Display Properties › Settings › Advanced › Font size: Large Fonts (PROMPT.md §2;
   SPEC.md §3.9). It overrides metric and font tokens only; bevels and lines stay 1px, icons 16/32px. All values are
   knowledge (no reference shows 120 dpi — QUESTIONS Q9): the WindowMetrics defaults in twips converted at 12 twips per
   pixel with MulDiv rounding (caption 270 → 23, scroll 240 → 20, small caption 225 → 19, icon spacing 1125 → 94), the
   8 pt fonts at 13 ppem (16px lines), dialog base units 8 × 16 (MS Sans Serif), and the control heights Windows derives
   from the font height (edit and combo +8, list items +0, report rows +1, tree rows +3, tabs +5, header +4, status
   bar +7, menu items +4). Selected by `settings.metricSet = '120dpi'` (`<html data-metrics="120dpi">`). */
@font-face { font-family: "W2K Tahoma 13"; font-weight: 400; src: url("../../assets/fonts/w2k-tahoma-13.woff2") format("woff2"); }
@font-face { font-family: "W2K Tahoma 13"; font-weight: 700; src: url("../../assets/fonts/w2k-tahoma-bold-13.woff2") format("woff2"); }
@font-face { font-family: "W2K MS Sans Serif 13"; font-weight: 400; src: url("../../assets/fonts/w2k-ms-sans-serif-13.woff2") format("woff2"); }
@font-face { font-family: "W2K Marlett 16"; src: url("../../assets/fonts/w2k-marlett-16.woff2") format("woff2"); }

:root[data-metrics="120dpi"] {
  /* Fonts: 8 pt at 120 dpi = 13 ppem; the line box is the font's height (ascent 13 + descent 3). */
  --font-size-ui: 13px;
  --line-height-ui: 16px;
  --font-family-ui: "W2K Tahoma 13";
  --font-family-dialog: "W2K MS Sans Serif 13";
  --font-glyph-caption: 13px/13px "W2K Marlett 13";     /* caption glyphs scaled with the 19px buttons (10 × 19/14) */
  --font-glyph-scroll: 16px/16px "W2K Marlett 16";      /* scroll arrows in 20px buttons (12 × 20/16 = 15 → 16) */
  --font-glyph-grip: 16px/16px "W2K Marlett 16";
  --font-glyph-menu-arrow: 13px/13px "W2K Marlett 13";

  /* Dialog base units (MS Sans Serif 13: average width 8, height 16). */
  --metric-dlu-x: 8;
  --metric-dlu-y: 16;

  /* Caption: iCaptionHeight 23; buttons 21 × 19 (height − 2, height − 4), glyphs centred alike. */
  --metric-caption-height: 23px;
  --metric-small-caption-height: 19px;
  --metric-caption-button-width: 21px;
  --metric-caption-button-height: 19px;
  --metric-caption-glyph-left: 4px;
  --metric-caption-glyph-top: 3px;
  --metric-caption-icon-top: 3px;           /* the 16×16 icon centred in the bar */
  --metric-caption-text-top: 3px;

  /* Menus: bar 24 (items 23, text 3 down); popup items 20 (text 2 down). */
  --metric-menubar-height: 24px;
  --metric-menubar-item-height: 23px;
  --metric-menubar-text-top: 3px;
  --metric-menu-item-height: 20px;
  --metric-menu-text-top: 2px;
  --metric-menu16-text-top: 2px;
  --metric-menu32-text-top: 8px;
  --metric-menu-separator-height: 9px;
  --metric-menu-arrow-size: 13px;

  /* Buttons: 50 × 14 du. */
  --metric-button-width: 100px;
  --metric-button-height: 28px;
  --metric-button-label-top: 5px;
  --metric-groupbox-frame-top: 8px;

  /* Edits, combos, lists. */
  --metric-edit-height: 24px;
  --metric-combo-height: 24px;
  --metric-comboex-height: 25px;
  --metric-comboex-item-height: 21px;
  --metric-list-item-height: 16px;
  --metric-list-row-height: 17px;
  --metric-list-row-height-icon: 17px;
  --metric-tree-row-height: 19px;
  --metric-tree-text-top: 1px;
  --metric-header-height: 20px;
  --metric-header-height-explorer: 19px;
  --metric-tab-height: 21px;
  --metric-dtp-time-height: 24px;

  /* Scroll bars and up-downs (SM_CXVSCROLL 20). */
  --metric-scrollbar-size: 20px;
  --metric-scrollbar-glyph-left: 2px;
  --metric-scrollbar-glyph-top: 2px;
  --metric-sizegrip-glyph-left: 4px;
  --metric-sizegrip-glyph-top: 4px;
  --metric-updown-width: 20px;

  /* Status bar: font + 7. */
  --metric-statusbar-height: 23px;
  --metric-statusbar-panel-height: 21px;

  /* Rebar bands hold a ComboBoxEx (25); the Start button grows with "Start" in Tahoma Bold 13 (+5px). */
  --metric-rebar-band-height: 25px;
  --metric-start-button-width: 60px;

  /* Desktop icons: spacing 94, the 32px icon centred, labels 4px narrower than the cell. */
  --metric-desktop-icon-spacing: 94px;
  --metric-desktop-icon-spacing-y: 94px;
  --metric-desktop-icon-left: round(down, (var(--metric-desktop-icon-spacing) - var(--metric-desktop-icon-size)) / 2, 1px);   /* 31 */
  --metric-desktop-label-top: calc(var(--metric-desktop-icon-top) + var(--metric-desktop-icon-size) + 4px);
  --metric-desktop-label-width: calc(var(--metric-desktop-icon-spacing) - 4px);   /* 90 */
}

/* Windows whose layout is still measured in 96-dpi pixels keep the Small Fonts metric set inside the Large size one
   (`data-metrics="96dpi"`, the WindowManager's default until those layouts move to dialog units — TODO R36). The
   values mirror css/tokens.css (tests/unit/metrics.test.js keeps them in sync). */
:root[data-metrics="120dpi"] [data-metrics="96dpi"] {
  --font-size-ui: 11px;
  --line-height-ui: 13px;
  --font-family-ui: "W2K Tahoma";
  --font-family-dialog: "W2K MS Sans Serif";
  --font-glyph-caption: 10px/10px "W2K Marlett 10";
  --font-glyph-scroll: 12px/12px "W2K Marlett 12";
  --font-glyph-grip: 14px/14px "W2K Marlett 14";
  --font-glyph-menu-arrow: 12px/12px "W2K Marlett 12";
  --metric-dlu-x: 6;
  --metric-dlu-y: 13;
  --metric-caption-height: 18px;
  --metric-small-caption-height: 15px;
  --metric-caption-button-width: 16px;
  --metric-caption-button-height: 14px;
  --metric-caption-glyph-left: 3px;
  --metric-caption-glyph-top: 2px;
  --metric-caption-icon-top: 1px;
  --metric-caption-text-top: 2px;
  --metric-menubar-height: 19px;
  --metric-menubar-item-height: 18px;
  --metric-menubar-text-top: 2px;
  --metric-menu-item-height: 17px;
  --metric-menu-text-top: 1px;
  --metric-menu16-text-top: 4px;
  --metric-menu32-text-top: 10px;
  --metric-menu-separator-height: 9px;
  --metric-menu-arrow-size: 12px;
  --metric-button-width: 75px;
  --metric-button-height: 23px;
  --metric-button-label-top: 4px;
  --metric-groupbox-frame-top: 6px;
  --metric-edit-height: 21px;
  --metric-combo-height: 21px;
  --metric-comboex-height: 22px;
  --metric-comboex-item-height: 18px;
  --metric-list-item-height: 13px;
  --metric-list-row-height: 14px;
  --metric-list-row-height-icon: 17px;
  --metric-tree-row-height: 16px;
  --metric-tree-text-top: 1px;
  --metric-header-height: 17px;
  --metric-header-height-explorer: 16px;
  --metric-tab-height: 18px;
  --metric-dtp-time-height: 20px;
  --metric-scrollbar-size: 16px;
  --metric-scrollbar-glyph-left: 2px;
  --metric-scrollbar-glyph-top: 2px;
  --metric-sizegrip-glyph-left: 2px;
  --metric-sizegrip-glyph-top: 2px;
  --metric-updown-width: 16px;
  --metric-statusbar-height: 20px;
  --metric-statusbar-panel-height: 18px;
  --metric-rebar-band-height: 22px;
  --metric-start-button-width: 55px;
  --metric-desktop-icon-spacing: 75px;
  --metric-desktop-icon-spacing-y: 75px;
  --metric-desktop-icon-left: round(down, (var(--metric-desktop-icon-spacing) - var(--metric-desktop-icon-size)) / 2, 1px);
  --metric-desktop-label-top: calc(var(--metric-desktop-icon-top) + var(--metric-desktop-icon-size) + 4px);
  --metric-desktop-label-width: calc(var(--metric-desktop-icon-spacing) - 4px);
  /* Tokens built from the ones above resolve where they are declared: re-declare them here too. */
  --font-ui: 400 var(--font-size-ui) / var(--line-height-ui) var(--font-family-ui);
  --font-ui-bold: 700 var(--font-size-ui) / var(--line-height-ui) var(--font-family-ui);
  --font-dialog: 400 var(--font-size-ui) / var(--line-height-ui) var(--font-family-dialog);
  --font-caption: var(--font-ui-bold);
  --font-menu: var(--font-ui);
  --font-status: var(--font-ui);
  --font-tooltip: var(--font-ui);
  --font-icon: var(--font-ui);
  --font-message: var(--font-ui);
  --font-small-caption: var(--font-caption);
}
