/*
 * pal.cagdas.io. The custom properties are pal's own design tokens, copied
 * from app/src/ui/tokens.css in the pal repo (the brief, app/design/brief.html,
 * explains each): the site is the same product as the panel, at a reading
 * size. Dark follows the OS.
 */

:root {
  --pal-font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Inter", "Noto Sans", system-ui, sans-serif;
  --pal-font-mono: ui-monospace, "SF Mono", Menlo, "JetBrains Mono", monospace;
  --pal-font-symbols: "Symbols Nerd Font Mono";
  --pal-font-emoji: "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", "Twemoji Mozilla", sans-serif;
  --pal-text-xs: 11px;
  --pal-text-sm: 12px;
  --pal-text-md: 13px;
  --pal-text-lg: 15px;
  --pal-text-xl: 18px;
  --pal-leading-ui: 1.25;
  --pal-leading-prose: 1.55;
  --pal-weight-regular: 400;
  --pal-weight-medium: 500;
  --pal-weight-semibold: 600;

  --pal-space-1: 4px;
  --pal-space-2: 8px;
  --pal-space-3: 12px;
  --pal-space-4: 16px;
  --pal-space-5: 20px;
  --pal-space-6: 24px;

  --pal-row-h: 40px;
  --pal-search-h: 52px;
  --pal-row-gap: 12px;
  --pal-icon-box: 24px;
  --pal-icon-glyph: 16px;
  --pal-icon-emoji: 17px;
  --pal-control-h: 32px;
  --pal-tag-h: 18px;

  --pal-radius-panel: 14px;
  --pal-radius-popover: 12px;
  --pal-radius-tile: 10px;
  --pal-radius-row: 8px;
  --pal-radius-icon: 6px;
  --pal-radius-control: 6px;
  --pal-radius-tag: 4px;

  --pal-dur-fast: 80ms;
  --pal-dur-base: 120ms;
  --pal-ease: cubic-bezier(0.2, 0, 0, 1);

  /* light */
  --pal-bg: #F4F4F6;
  --pal-bg-elevated: #FFFFFF;
  --pal-bg-sunken: #EAEAEE;
  --pal-fg: #1A1A1F;
  --pal-fg-muted: #5C5D66;
  --pal-fg-faint: #6B6C76;
  --pal-line: rgba(26, 26, 31, 0.08);
  --pal-line-strong: rgba(26, 26, 31, 0.16);
  --pal-selection: rgba(26, 26, 31, 0.07);
  --pal-accent: #4F46D6;
  --pal-accent-fg: #FFFFFF;
  --pal-accent-soft: rgba(79, 70, 214, 0.12);
  --pal-match: rgba(255, 176, 32, 0.38);
  --pal-tag-grey: #55565F;
  --pal-tag-grey-bg: #E1E1E4;
  --pal-tag-violet: #5B39C2;
  --pal-tag-violet-bg: #E2DEF0;
  --pal-tag-teal: #0B6664;
  --pal-tag-teal-bg: #D8E3E4;
  --pal-tag-blue: #2457B0;
  --pal-tag-blue-bg: #DBE1EE;
  --pal-tag-green: #1B6B40;
  --pal-tag-green-bg: #DAE4E0;
  --pal-tag-amber: #874C00;
  --pal-tag-amber-bg: #E7E0D8;
  --pal-tag-red: #B02925;
  --pal-tag-red-bg: #ECDCDD;
  --pal-tag-pink: #A0286A;
  --pal-tag-pink-bg: #EADCE5;
  /* icon tiles: twelve brand colours, a white mark on each (tokens.css in pal) */
  --pal-brand-red: #E5484D;
  --pal-brand-orange: #EC6A2C;
  --pal-brand-amber: #D98C0A;
  --pal-brand-green: #2E9E5F;
  --pal-brand-teal: #139C8F;
  --pal-brand-cyan: #0E8FBE;
  --pal-brand-blue: #2F74E0;
  --pal-brand-indigo: #5854D6;
  --pal-brand-violet: #8A4FD0;
  --pal-brand-pink: #D23F9C;
  --pal-brand-slate: #5F6B7C;
  --pal-brand-ink: #24292F;
  --pal-tile-fg: #FFFFFF;
  --pal-tile-ring: rgba(26, 26, 31, 0.10);
  --pal-success: #1B7443;
  --pal-success-soft: rgba(27, 116, 67, 0.10);
  --pal-shadow-panel: 0 0 0 1px rgba(26, 26, 31, 0.10), 0 2px 6px rgba(26, 26, 31, 0.06), 0 28px 64px -16px rgba(26, 26, 31, 0.30);
  --pal-dur-slow: 180ms;
  /* the brief's wallpaper behind a rendered panel */
  --site-desk: linear-gradient(135deg, #DCE4F5 0%, #E9DDF2 38%, #F6E3D6 72%, #DDEBE0 100%);
  --site-desk-grid: multiply;
  --site-desk-grid-alpha: 1;
  --pal-ring: 0 0 0 1px var(--pal-accent), 0 0 0 4px var(--pal-accent-soft);
  --pal-bevel: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --pal-shadow-popover: 0 0 0 1px rgba(26, 26, 31, 0.08), 0 8px 24px -8px rgba(26, 26, 31, 0.22);
  --pal-scheme: light;

  /* the site's own: reading sizes on the same scale */
  --site-text: 15px;
  --site-measure: 68ch;
  --site-w: 1040px;
  --site-gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pal-bg: #1C1C21;
    --pal-bg-elevated: #26262D;
    --pal-bg-sunken: #141417;
    --pal-fg: #ECECF0;
    --pal-fg-muted: #A3A4AE;
    --pal-fg-faint: #868794;
    --pal-line: rgba(255, 255, 255, 0.08);
    --pal-line-strong: rgba(255, 255, 255, 0.16);
    --pal-selection: rgba(255, 255, 255, 0.09);
    --pal-accent: #9F97FF;
    --pal-accent-fg: #14141A;
    --pal-accent-soft: rgba(159, 151, 255, 0.16);
    --pal-match: rgba(255, 176, 32, 0.30);
    --pal-tag-grey: #A3A4AE;
    --pal-tag-grey-bg: #323238;
    --pal-tag-violet: #B39DFF;
    --pal-tag-violet-bg: #343145;
    --pal-tag-teal: #5FCFCB;
    --pal-tag-teal-bg: #27393C;
    --pal-tag-blue: #7FB0FF;
    --pal-tag-blue-bg: #2C3445;
    --pal-tag-green: #5CCB8E;
    --pal-tag-green-bg: #263832;
    --pal-tag-amber: #F0B25A;
    --pal-tag-amber-bg: #3E342A;
    --pal-tag-red: #FF8A82;
    --pal-tag-red-bg: #402E31;
    --pal-tag-pink: #F08CC0;
    --pal-tag-pink-bg: #3E2E3A;
    --pal-brand-red: #F1575C;
    --pal-brand-orange: #F5793B;
    --pal-brand-amber: #E39A1B;
    --pal-brand-green: #3DB374;
    --pal-brand-teal: #1FB0A2;
    --pal-brand-cyan: #22A3D2;
    --pal-brand-blue: #4A8AF4;
    --pal-brand-indigo: #7370EA;
    --pal-brand-violet: #A26AE3;
    --pal-brand-pink: #E058B3;
    --pal-brand-slate: #6F7B8E;
    --pal-brand-ink: #30363D;
    --pal-tile-fg: #FFFFFF;
    --pal-tile-ring: rgba(255, 255, 255, 0.12);
    --pal-success: #4FC98A;
    --pal-success-soft: rgba(79, 201, 138, 0.12);
    --pal-shadow-panel: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.30), 0 28px 64px -16px rgba(0, 0, 0, 0.65);
    --site-desk: linear-gradient(135deg, #2A3352 0%, #3C2C4D 38%, #4A3330 72%, #223A34 100%);
    --site-desk-grid: screen;
    --site-desk-grid-alpha: 0.35;
    --pal-bevel: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --pal-shadow-popover: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    --pal-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --pal-bg: #1C1C21;
  --pal-bg-elevated: #26262D;
  --pal-bg-sunken: #141417;
  --pal-fg: #ECECF0;
  --pal-fg-muted: #A3A4AE;
  --pal-fg-faint: #868794;
  --pal-line: rgba(255, 255, 255, 0.08);
  --pal-line-strong: rgba(255, 255, 255, 0.16);
  --pal-selection: rgba(255, 255, 255, 0.09);
  --pal-accent: #9F97FF;
  --pal-accent-fg: #14141A;
  --pal-accent-soft: rgba(159, 151, 255, 0.16);
  --pal-match: rgba(255, 176, 32, 0.30);
  --pal-tag-grey: #A3A4AE;
  --pal-tag-grey-bg: #323238;
  --pal-tag-violet: #B39DFF;
  --pal-tag-violet-bg: #343145;
  --pal-tag-teal: #5FCFCB;
  --pal-tag-teal-bg: #27393C;
  --pal-tag-blue: #7FB0FF;
  --pal-tag-blue-bg: #2C3445;
  --pal-tag-green: #5CCB8E;
  --pal-tag-green-bg: #263832;
  --pal-tag-amber: #F0B25A;
  --pal-tag-amber-bg: #3E342A;
  --pal-tag-red: #FF8A82;
  --pal-tag-red-bg: #402E31;
  --pal-tag-pink: #F08CC0;
  --pal-tag-pink-bg: #3E2E3A;
  --pal-brand-red: #F1575C;
  --pal-brand-orange: #F5793B;
  --pal-brand-amber: #E39A1B;
  --pal-brand-green: #3DB374;
  --pal-brand-teal: #1FB0A2;
  --pal-brand-cyan: #22A3D2;
  --pal-brand-blue: #4A8AF4;
  --pal-brand-indigo: #7370EA;
  --pal-brand-violet: #A26AE3;
  --pal-brand-pink: #E058B3;
  --pal-brand-slate: #6F7B8E;
  --pal-brand-ink: #30363D;
  --pal-tile-fg: #FFFFFF;
  --pal-tile-ring: rgba(255, 255, 255, 0.12);
  --pal-success: #4FC98A;
  --pal-success-soft: rgba(79, 201, 138, 0.12);
  --pal-shadow-panel: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.30), 0 28px 64px -16px rgba(0, 0, 0, 0.65);
  --site-desk: linear-gradient(135deg, #2A3352 0%, #3C2C4D 38%, #4A3330 72%, #223A34 100%);
  --site-desk-grid: screen;
  --site-desk-grid-alpha: 0.35;
  --pal-bevel: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --pal-shadow-popover: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --pal-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root { --pal-dur-fast: 0ms; --pal-dur-base: 0ms; --pal-dur-slow: 0ms; }
}

/* The Nerd Font symbols, for an extension whose icon is a private-use
   codepoint (app/src/ui/fonts.css). Two faces of one family: the 7 KB
   subset of the glyphs the bundled manifests and the site draw
   (scripts/subset-font.py writes it and these two ranges), and the full
   1.2 MB font for any other private-use glyph, fetched only when one is
   on the page. */
@font-face {
  font-family: "Symbols Nerd Font Mono";
  src: url("/static/SymbolsNerdFontMono-Subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+E7F3, U+EA70, U+F001, U+F084, U+F09B, U+F179-F17A, U+F17C, U+F407-F408, U+F41B, U+F0010, U+F003B, U+F0079-F007B, U+F007F, U+F0083-F0084, U+F00AF, U+F00B1, U+F00C0, U+F00DE-F00E0, U+F00EC-F00ED, U+F0100, U+F011C, U+F0127, U+F0134, U+F0139, U+F014D, U+F0176, U+F018D, U+F0190, U+F01CE, U+F01DA, U+F01EE, U+F0200, U+F024B, U+F0297, U+F02AD, U+F02C1, U+F02CA, U+F02DC, U+F02E9, U+F02F9, U+F02FB, U+F030C, U+F0317, U+F0335-F0336, U+F0339, U+F035B-F035C, U+F0369, U+F036C-F036E, U+F0379, U+F03C9, U+F03D8, U+F03E4, U+F040A, U+F0425, U+F048B, U+F0493, U+F0499, U+F04B1, U+F04C5, U+F04C7, U+F04E2, U+F04E9, U+F04F9, U+F051B, U+F0565, U+F057E-F0580, U+F0590, U+F0595, U+F0597, U+F0599, U+F059D, U+F05A0, U+F05A3, U+F05A9-F05AA, U+F05C3, U+F05CA, U+F05DA, U+F05F5, U+F061A, U+F0638, U+F0674, U+F0691, U+F06A9, U+F06CA, U+F075A, U+F075F, U+F076E, U+F0780, U+F07B7, U+F07C7, U+F07D0, U+F0831, U+F0868, U+F08AA, U+F08C3, U+F08EA, U+F091F, U+F0925, U+F0928, U+F092D, U+F0954, U+F0997, U+F0A6A, U+F0B34, U+F0BC4, U+F0C71, U+F0D78, U+F0FCE, U+F10AA, U+F10AC, U+F1513, U+F18A1, U+F18AF; /* subset */
}
@font-face {
  font-family: "Symbols Nerd Font Mono";
  src: url("/static/SymbolsNerdFontMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+E000-E7F2, U+E7F4-EA6F, U+EA71-F000, U+F002-F083, U+F085-F09A, U+F09C-F178, U+F17B, U+F17D-F406, U+F409-F41A, U+F41C-F8FF, U+F0000-F000F, U+F0011-F003A, U+F003C-F0078, U+F007C-F007E, U+F0080-F0082, U+F0085-F00AE, U+F00B0, U+F00B2-F00BF, U+F00C1-F00DD, U+F00E1-F00EB, U+F00EE-F00FF, U+F0101-F011B, U+F011D-F0126, U+F0128-F0133, U+F0135-F0138, U+F013A-F014C, U+F014E-F0175, U+F0177-F018C, U+F018E-F018F, U+F0191-F01CD, U+F01CF-F01D9, U+F01DB-F01ED, U+F01EF-F01FF, U+F0201-F024A, U+F024C-F0296, U+F0298-F02AC, U+F02AE-F02C0, U+F02C2-F02C9, U+F02CB-F02DB, U+F02DD-F02E8, U+F02EA-F02F8, U+F02FA, U+F02FC-F030B, U+F030D-F0316, U+F0318-F0334, U+F0337-F0338, U+F033A-F035A, U+F035D-F0368, U+F036A-F036B, U+F036F-F0378, U+F037A-F03C8, U+F03CA-F03D7, U+F03D9-F03E3, U+F03E5-F0409, U+F040B-F0424, U+F0426-F048A, U+F048C-F0492, U+F0494-F0498, U+F049A-F04B0, U+F04B2-F04C4, U+F04C6, U+F04C8-F04E1, U+F04E3-F04E8, U+F04EA-F04F8, U+F04FA-F051A, U+F051C-F0564, U+F0566-F057D, U+F0581-F058F, U+F0591-F0594, U+F0596, U+F0598, U+F059A-F059C, U+F059E-F059F, U+F05A1-F05A2, U+F05A4-F05A8, U+F05AB-F05C2, U+F05C4-F05C9, U+F05CB-F05D9, U+F05DB-F05F4, U+F05F6-F0619, U+F061B-F0637, U+F0639-F0673, U+F0675-F0690, U+F0692-F06A8, U+F06AA-F06C9, U+F06CB-F0759, U+F075B-F075E, U+F0760-F076D, U+F076F-F077F, U+F0781-F07B6, U+F07B8-F07C6, U+F07C8-F07CF, U+F07D1-F0830, U+F0832-F0867, U+F0869-F08A9, U+F08AB-F08C2, U+F08C4-F08E9, U+F08EB-F091E, U+F0920-F0924, U+F0926-F0927, U+F0929-F092C, U+F092E-F0953, U+F0955-F0996, U+F0998-F0A69, U+F0A6B-F0B33, U+F0B35-F0BC3, U+F0BC5-F0C70, U+F0C72-F0D77, U+F0D79-F0FCD, U+F0FCF-F10A9, U+F10AB, U+F10AD-F1512, U+F1514-F18A0, U+F18A2-F18AE, U+F18B0-FFFFD; /* rest */
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: var(--pal-scheme); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pal-bg);
  color: var(--pal-fg);
  font: var(--pal-weight-regular) var(--site-text) / var(--pal-leading-prose) var(--pal-font-ui);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: var(--pal-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: none; box-shadow: var(--pal-ring); border-radius: var(--pal-radius-tag); }
code, kbd, pre { font-family: var(--pal-font-mono); font-size: 0.92em; }
code { background: var(--pal-bg-sunken); padding: 1px 5px; border-radius: var(--pal-radius-tag); }
pre { background: var(--pal-bg-sunken); padding: var(--pal-space-3) var(--pal-space-4); border-radius: var(--pal-radius-row); overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; font-size: var(--pal-text-md); }
h1, h2, h3, h4 { font-weight: var(--pal-weight-semibold); line-height: var(--pal-leading-ui); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
img { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: var(--site-w); margin: 0 auto; padding: 0 var(--site-gutter); }
.muted { color: var(--pal-fg-muted); }
.faint { color: var(--pal-fg-faint); }
.fine { color: var(--pal-fg-faint); font-size: var(--pal-text-sm); line-height: 1.5; }
.fine code { font-size: 0.95em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pal-bg-elevated); padding: 8px 12px; border-radius: var(--pal-radius-control); z-index: 10; }
.skip:focus { left: 8px; }

/* nav and footer */
.top { border-bottom: 1px solid var(--pal-line); background: var(--pal-bg); }
.top nav { display: flex; align-items: center; gap: var(--pal-space-5); height: var(--pal-search-h); font-size: var(--pal-text-md); }
.top nav a { color: var(--pal-fg-muted); font-weight: var(--pal-weight-medium); }
.top nav a:hover, .top nav a[aria-current] { color: var(--pal-fg); text-decoration: none; }
.top .brand { display: inline-flex; align-items: center; gap: var(--pal-space-2); color: var(--pal-fg); font-weight: var(--pal-weight-semibold); font-size: var(--pal-text-lg); margin-right: var(--pal-space-1); }
.top .ext-link { margin-left: auto; }
.foot { margin-top: auto; padding-top: var(--pal-space-6); padding-bottom: var(--pal-space-6); display: flex; justify-content: space-between; gap: var(--pal-space-4); flex-wrap: wrap; color: var(--pal-fg-faint); font-size: var(--pal-text-sm); border-top: 1px solid var(--pal-line); }
.foot a { color: var(--pal-fg-muted); }
.foot nav { display: flex; gap: var(--pal-space-4); }
main.wrap { padding-top: var(--pal-space-6); padding-bottom: 64px; flex: 1; }

/* controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--pal-space-2);
  height: var(--pal-control-h); padding: 0 var(--pal-space-4);
  font: var(--pal-weight-medium) var(--pal-text-md) / 1 var(--pal-font-ui);
  color: var(--pal-fg); background: var(--pal-bg-elevated);
  border: 0; border-radius: var(--pal-radius-control);
  box-shadow: 0 0 0 1px var(--pal-line-strong), var(--pal-bevel);
  cursor: pointer; white-space: nowrap;
  transition: background var(--pal-dur-fast) var(--pal-ease);
}
.btn:hover { background: var(--pal-bg-sunken); text-decoration: none; }
.btn:focus-visible { box-shadow: var(--pal-ring); }
.btn-primary { background: var(--pal-accent); color: var(--pal-accent-fg); box-shadow: none; }
.btn-primary:hover { background: color-mix(in srgb, var(--pal-accent) 88%, var(--pal-fg)); }
.btn-sm { height: 26px; padding: 0 var(--pal-space-3); font-size: var(--pal-text-sm); }
.tag {
  display: inline-flex; align-items: center; height: var(--pal-tag-h); padding: 0 6px;
  font: var(--pal-weight-medium) var(--pal-text-xs) / 1 var(--pal-font-ui); letter-spacing: 0.01em;
  color: var(--pal-tag-grey); background: var(--pal-tag-grey-bg); border-radius: var(--pal-radius-tag);
  font-variant-numeric: tabular-nums; vertical-align: middle; white-space: nowrap;
}
.tag-violet { color: var(--pal-tag-violet); background: var(--pal-tag-violet-bg); }
.tag-teal { color: var(--pal-tag-teal); background: var(--pal-tag-teal-bg); }
.tag-blue { color: var(--pal-tag-blue); background: var(--pal-tag-blue-bg); }
.tag-green { color: var(--pal-tag-green); background: var(--pal-tag-green-bg); }
.tag-amber { color: var(--pal-tag-amber); background: var(--pal-tag-amber-bg); }
.tag-pink { color: var(--pal-tag-pink); background: var(--pal-tag-pink-bg); }
kbd.key, .hints kbd, .action-keys kbd, .pp kbd {
  display: inline-flex; align-items: center; justify-content: center; height: var(--pal-tag-h); min-width: var(--pal-tag-h); padding: 0 5px;
  border-radius: var(--pal-radius-tag); background: var(--pal-bg-sunken); box-shadow: 0 0 0 1px var(--pal-line);
  font: var(--pal-weight-medium) var(--pal-text-xs) / 1 var(--pal-font-ui); color: var(--pal-fg-muted);
}
.kbd-or { font-size: var(--pal-text-xs); color: var(--pal-fg-faint); margin: 0 2px; }
.count { color: var(--pal-fg-faint); font-weight: var(--pal-weight-regular); font-variant-numeric: tabular-nums; }

/* icons: one 24px box, as in the panel */
.icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: var(--pal-icon-box); height: var(--pal-icon-box);
  font-size: var(--pal-icon-emoji); line-height: 1; color: var(--pal-fg-muted);
  font-family: var(--pal-font-emoji);
}
.icon[data-kind="glyph"] { font-family: var(--pal-font-symbols), var(--pal-font-ui); font-size: var(--pal-icon-glyph); }
.icon[data-kind="text"] { font-family: var(--pal-font-ui), var(--pal-font-emoji); font-weight: var(--pal-weight-medium); }
.icon[data-kind="color"]::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px var(--pal-line-strong); }
/* icon tiles and tinted glyphs, as pal draws them (app/src/ui/icons.css): a
   tile is a rounded square in a brand colour, the radius a quarter of its
   side, a hairline inset ring, the mark white: one Nerd Font glyph at 62%
   of the side (nudged up a hair, the font sits low) or an svg path in a 16
   by 16 box at 66%. The side follows the box: 24 in a row, 32 on a card,
   56 in the hero. A tinted glyph takes the brand colour; ink would vanish
   on the dark page, so it takes the text colour instead. */
[data-brand="red"] { --brand: var(--pal-brand-red); }
[data-brand="orange"] { --brand: var(--pal-brand-orange); }
[data-brand="amber"] { --brand: var(--pal-brand-amber); }
[data-brand="green"] { --brand: var(--pal-brand-green); }
[data-brand="teal"] { --brand: var(--pal-brand-teal); }
[data-brand="cyan"] { --brand: var(--pal-brand-cyan); }
[data-brand="blue"] { --brand: var(--pal-brand-blue); }
[data-brand="indigo"] { --brand: var(--pal-brand-indigo); }
[data-brand="violet"] { --brand: var(--pal-brand-violet); }
[data-brand="pink"] { --brand: var(--pal-brand-pink); }
[data-brand="slate"] { --brand: var(--pal-brand-slate); }
[data-brand="ink"] { --brand: var(--pal-brand-ink); }
.icon[data-kind="glyph"][data-brand] { color: var(--brand); }
.icon[data-kind="glyph"][data-brand="ink"] { --brand: var(--pal-fg); }
.tile {
  --tile: var(--pal-icon-box);
  display: inline-grid; place-items: center; flex: none;
  width: var(--tile); height: var(--tile); border-radius: calc(var(--tile) / 4);
  background: var(--brand, var(--pal-brand-slate)); color: var(--pal-tile-fg);
  box-shadow: inset 0 0 0 1px var(--pal-tile-ring);
  font-family: var(--pal-font-symbols), var(--pal-font-mono); font-size: calc(var(--tile) * 0.62); line-height: 1;
}
.tile-glyph { display: block; transform: translateY(-2%); }
.tile-mark { display: block; width: 66%; height: 66%; fill: currentColor; }
.icon .tile-mark { width: 16px; height: 16px; }
.icon-lg { width: 56px; height: 56px; font-size: 32px; border-radius: var(--pal-radius-tile); background: var(--pal-bg-elevated); box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel); color: var(--pal-fg); }
.icon-lg[data-kind="glyph"] { font-size: 30px; }
.icon-lg[data-kind="color"]::before { width: 28px; height: 28px; }

/* the landing: everything hangs off the wrap's left edge, the way the
   panel hangs its query, titles and headings off one 52px line. The hero
   and the lede are shared with the error page's small hero. */
.hero { padding: 48px 0 0; display: flex; flex-direction: column; gap: 40px; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--pal-space-4); max-width: 680px; }
.hero .mark { filter: drop-shadow(0 8px 16px rgba(26, 26, 31, 0.18)); }
.hero h1 { font-size: 44px; letter-spacing: -0.02em; text-wrap: balance; }
/* the headline's one brand gesture: the panel's match highlighter behind "extension" */
.hl { background: var(--pal-match); color: inherit; border-radius: 3px; padding: 0 0.08em; margin: 0 -0.08em; box-decoration-break: clone; }
.lede { font-size: 20px; line-height: 1.4; color: var(--pal-fg-muted); letter-spacing: -0.005em; }
.lede-sm { color: var(--pal-fg-muted); max-width: var(--site-measure); }
.dl { display: flex; gap: var(--pal-space-3); flex-wrap: wrap; margin-top: var(--pal-space-2); }
.dl .btn { height: 40px; padding: 0 var(--pal-space-5); font-size: var(--pal-text-lg); }
.dl.linux-first .dl-linux { order: -1; }
/* no release yet: the buttons open the releases page and read as such */
.dl-soon .btn-primary { background: var(--pal-bg-elevated); color: var(--pal-fg); box-shadow: 0 0 0 1px var(--pal-line-strong), var(--pal-bevel); }
.dl-soon .btn-primary:hover { background: var(--pal-bg-sunken); }
.hero-text .fine, .get .dl + .fine { margin-top: calc(-1 * var(--pal-space-2)); max-width: 60ch; }
.hero-sm { padding-top: 32px; gap: var(--pal-space-4); align-items: flex-start; }
.hero-sm h1 { font-size: 32px; }
.actions { display: flex; gap: var(--pal-space-3); flex-wrap: wrap; margin-top: var(--pal-space-2); }

/* the loop: the poster is the page's, the video fades in over it once it
   plays; both are 1760 by 1160 (an 880 by 580 viewport at 2x) */
.loop { margin: 0; display: flex; flex-direction: column; gap: var(--pal-space-3); }
.loop-poster { position: relative; display: block; aspect-ratio: 1760 / 1160; overflow: hidden; border-radius: var(--pal-radius-popover); box-shadow: 0 0 0 1px var(--pal-line); background: var(--site-desk); }
.loop-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.loop { position: relative; }
.loop-video { position: absolute; inset: 0; width: 100%; aspect-ratio: 1760 / 1160; height: auto; border-radius: var(--pal-radius-popover); opacity: 0; transition: opacity 240ms var(--pal-ease); pointer-events: none; }
.loop.is-playing .loop-video { opacity: 1; }
.loop-play {
  position: absolute; left: 50%; top: calc(50% - 20px); transform: translate(-50%, -50%);
  height: 40px; padding: 0 var(--pal-space-5); border: 0; border-radius: 20px; cursor: pointer;
  background: var(--pal-fg); color: var(--pal-bg); font: var(--pal-weight-medium) var(--pal-text-md) / 1 var(--pal-font-ui);
  box-shadow: var(--pal-shadow-popover);
}
.loop figcaption { max-width: var(--site-measure); }

/* a panel render, cropped to the panel plus a band of wallpaper: the files
   are 1440 by 900 with the panel on 79% of the width, so a 1.2 zoom on a
   16/10 box leaves about 3% of wallpaper on every side */
.shot { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--pal-radius-popover); box-shadow: 0 0 0 1px var(--pal-line); background: var(--site-desk); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--shot-zoom, 1.2)); }
.shot-flat { --shot-zoom: 1; }

/* the numbers, set as the panel's footer bar */
.numbers {
  min-height: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--pal-space-2) var(--pal-space-4); padding: 6px var(--pal-space-4);
  background: var(--pal-bg-elevated); border-radius: var(--pal-radius-row); box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel);
  font-size: var(--pal-text-md); color: var(--pal-fg-muted); font-variant-numeric: tabular-nums;
}
.numbers b { font-weight: var(--pal-weight-medium); color: var(--pal-fg); }
.numbers .pp-ctx { color: var(--pal-fg-muted); }
.numbers .pp-sep { align-self: center; }
.numbers-src { color: var(--pal-fg-faint); font-size: var(--pal-text-sm); }

/* the sections: one idea each, a heading, a line, the evidence */
.land { margin-top: 80px; display: flex; flex-direction: column; gap: var(--pal-space-4); min-width: 0; }
.land h2 { font-size: 26px; letter-spacing: -0.015em; display: flex; align-items: baseline; gap: var(--pal-space-4); flex-wrap: wrap; }
.land h2 .more { font-size: var(--pal-text-md); font-weight: var(--pal-weight-medium); margin-left: auto; }
.land > .muted { line-height: var(--pal-leading-prose); max-width: var(--site-measure); }
.land > .actions { margin-top: 0; }
.land > .muted kbd.key { vertical-align: 1px; }
.then { font-size: var(--pal-text-md); color: var(--pal-fg-muted); line-height: 1.5; max-width: var(--site-measure); }

/* out of the box: every extension as a tile, its icon on the category tint, in the store's shelf order */
.tiles { list-style: none; margin: var(--pal-space-2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--pal-space-2); }
.tiles a {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--pal-space-3); align-items: center; height: 100%;
  padding: 10px var(--pal-space-3) 10px 10px; color: inherit; border-radius: var(--pal-radius-tile); min-height: 60px;
  background: var(--pal-bg-elevated); box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel);
  transition: transform var(--pal-dur-base) var(--pal-ease), box-shadow var(--pal-dur-base) var(--pal-ease);
}
.tiles a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--pal-shadow-popover), var(--pal-bevel); }
.tiles a:focus-visible { box-shadow: var(--pal-ring), var(--pal-shadow-popover); transform: translateY(-2px); }
.tiles .well { width: 36px; height: 36px; border-radius: var(--pal-radius-row); }
.tiles .well .icon { font-size: 18px; }
.tiles .well .icon[data-kind="color"]::before { width: 16px; height: 16px; }
.tiles .well .tile { --tile: 28px; }
.tile-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tile-title { font-size: var(--pal-text-md); font-weight: var(--pal-weight-medium); line-height: var(--pal-leading-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-line { font-size: var(--pal-text-sm); color: var(--pal-fg-muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* on the menu bar: the strips as the extension page shows them (.bar-pair,
   below), then the popovers two to a row, each cut to the popover and the
   band above it: --cx the crop's left edge, --cw its width, --ch its depth,
   in the 1440-pixel picture's pixels (set by the server from the shot's box) */
.bars .bar-pair { margin-top: var(--pal-space-2); }
.bars .bar-pair .bar-strip { aspect-ratio: calc((1464 - var(--x0, 744)) / 76); }
.pops { list-style: none; margin: var(--pal-space-2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pal-space-5) var(--pal-space-4); }
.pops a { display: flex; flex-direction: column; gap: var(--pal-space-1); color: inherit; border-radius: var(--pal-radius-popover); }
.pops a:hover { text-decoration: none; }
.pops a:hover .pop { box-shadow: var(--pal-shadow-popover); }
.pops a:focus-visible { box-shadow: none; outline: none; }
.pops a:focus-visible .pop { box-shadow: var(--pal-ring), var(--pal-shadow-popover); }
.pop { display: block; position: relative; overflow: hidden; border-radius: var(--pal-radius-popover); box-shadow: 0 0 0 1px var(--pal-line); background: var(--pal-bg-sunken); margin-bottom: var(--pal-space-2); transition: box-shadow var(--pal-dur-base) var(--pal-ease); }
.pop { aspect-ratio: var(--cw, 720) / var(--ch, 1080); }
.pop img { display: block; width: calc(1440 / var(--cw, 720) * 100%); max-width: none; margin-left: calc(-1 * var(--cx, 360) / var(--cw, 720) * 100%); height: auto; }
.pop-title { font-size: var(--pal-text-lg); font-weight: var(--pal-weight-medium); line-height: var(--pal-leading-ui); }
.pop-line { font-size: var(--pal-text-md); color: var(--pal-fg-muted); line-height: 1.45; }

/* one API: the three renders stacked at two thirds, the caption beside
   each, then the docs' palette at full width */
.shots { list-style: none; margin: var(--pal-space-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--pal-space-5); }
.shots a { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--pal-space-2) var(--pal-space-5); align-items: center; color: inherit; border-radius: var(--pal-radius-popover); }
.shots a:hover { text-decoration: none; }
.shots a:hover .shot { box-shadow: var(--pal-shadow-popover); }
.shots a:focus-visible { box-shadow: none; outline: none; }
.shots a:focus-visible .shot { box-shadow: var(--pal-ring), var(--pal-shadow-popover); }
.shots .shot { grid-row: span 2; transition: box-shadow var(--pal-dur-base) var(--pal-ease); }
.shot-title { font-size: var(--pal-text-lg); font-weight: var(--pal-weight-medium); line-height: var(--pal-leading-ui); align-self: end; }
.shot-line { font-size: var(--pal-text-md); color: var(--pal-fg-muted); line-height: 1.45; align-self: start; }
.api .code { margin-top: var(--pal-space-4); }
.code { margin: var(--pal-space-2) 0 0; padding: var(--pal-space-4) var(--pal-space-5); font-size: var(--pal-text-md); line-height: 1.55; background: var(--pal-bg-elevated); box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel); border-radius: var(--pal-radius-popover); tab-size: 2; }
.code code { font-size: inherit; }
.code .k { color: var(--pal-tag-violet); }
.code .s { color: var(--pal-tag-teal); }
.code .c { color: var(--pal-fg-faint); }

/* the keyboard: the panel's kbd chips in a two-column table */
.keymap { border-collapse: collapse; margin-top: var(--pal-space-2); max-width: 720px; font-size: var(--pal-text-md); }
.keymap td { padding: var(--pal-space-2) 0; border-top: 1px solid var(--pal-line); vertical-align: top; line-height: 1.5; }
.keymap tr:last-child td { border-bottom: 1px solid var(--pal-line); }
.keymap td:first-child { width: 128px; padding-right: var(--pal-space-4); white-space: nowrap; }
.keymap kbd.key + kbd.key { margin-left: 3px; }
.keymap td:last-child kbd.key { vertical-align: 1px; }

/* linux: the real Hyprland shot next to the two facts */
.linux-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--pal-space-6); align-items: start; margin-top: var(--pal-space-2); }
.linux-fig { margin: 0; display: flex; flex-direction: column; gap: var(--pal-space-2); min-width: 0; }
.linux-fig kbd.key { vertical-align: 1px; }
.linux-text { display: flex; flex-direction: column; gap: var(--pal-space-3); }
.linux-text .muted { line-height: var(--pal-leading-prose); }

/* download: the buttons again, the files a release carries */
.files { border-collapse: collapse; margin-top: var(--pal-space-2); max-width: 640px; font-size: var(--pal-text-md); }
.files td { padding: var(--pal-space-2) var(--pal-space-4) var(--pal-space-2) 0; border-top: 1px solid var(--pal-line); line-height: 1.5; }
.files tr:last-child td { border-bottom: 1px solid var(--pal-line); }
.files td:first-child { color: var(--pal-fg-muted); white-space: nowrap; }
.get > .fine { max-width: var(--site-measure); }

/* category tint: a tag colour pair, carried by the icon well, the shelf
   dot and the chips, so the shelf an extension sits on reads at a glance */
[data-tint="grey"] { --tint: var(--pal-tag-grey); --tint-bg: var(--pal-tag-grey-bg); }
[data-tint="blue"] { --tint: var(--pal-tag-blue); --tint-bg: var(--pal-tag-blue-bg); }
[data-tint="green"] { --tint: var(--pal-tag-green); --tint-bg: var(--pal-tag-green-bg); }
[data-tint="amber"] { --tint: var(--pal-tag-amber); --tint-bg: var(--pal-tag-amber-bg); }
[data-tint="pink"] { --tint: var(--pal-tag-pink); --tint-bg: var(--pal-tag-pink-bg); }
[data-tint="violet"] { --tint: var(--pal-tag-violet); --tint-bg: var(--pal-tag-violet-bg); }
[data-tint="teal"] { --tint: var(--pal-tag-teal); --tint-bg: var(--pal-tag-teal-bg); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--tint, var(--pal-fg-faint)); flex: none; }

/* the icon well: the extension's icon on its category's tint */
.well {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: var(--pal-radius-tile);
  background: var(--tint-bg, var(--pal-bg-sunken)); color: var(--tint, var(--pal-fg));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint, var(--pal-fg)) 10%, transparent);
}
.well .icon { width: auto; height: auto; color: inherit; font-size: 22px; }
.well .icon[data-kind="glyph"] { font-size: 22px; }
.well .icon[data-kind="text"] { font-weight: var(--pal-weight-medium); }
.well .icon[data-kind="color"]::before { width: 20px; height: 20px; box-shadow: 0 0 0 2px var(--pal-bg-elevated); }
.icon-initial { font-family: var(--pal-font-ui); font-weight: var(--pal-weight-semibold); }
.well-sm { width: 32px; height: 32px; border-radius: var(--pal-radius-row); }
.well-sm .icon { font-size: 16px; }
.well-sm .icon[data-kind="color"]::before { width: 14px; height: 14px; }
.well-lg { width: 64px; height: 64px; border-radius: var(--pal-radius-panel); }
.well-lg .icon { font-size: 34px; }
.well-lg .icon[data-kind="color"]::before { width: 28px; height: 28px; }
/* a tile carries its own colour, so the well behind it goes plain */
.well-plain { background: none; box-shadow: none; }
.well .tile { --tile: 32px; }
.well-lg .tile { --tile: 56px; }
.well-sm .tile, .suggest-row .well .tile, .related-row .well .tile { --tile: 24px; }
.avatar {
  width: 18px; height: 18px; border-radius: 50%; flex: none; object-fit: cover;
  display: inline-grid; place-items: center; overflow: hidden;
  background: var(--pal-bg-sunken); color: var(--pal-fg-muted);
  font: var(--pal-weight-semibold) 10px / 1 var(--pal-font-ui); box-shadow: 0 0 0 1px var(--pal-line);
}
.glyph { font-family: var(--pal-font-symbols), var(--pal-font-ui); font-size: 13px; line-height: 1; }
.platforms { display: inline-flex; gap: var(--pal-space-2); align-items: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the browser: the search is the panel's own search row */
.store-head { display: flex; flex-direction: column; gap: var(--pal-space-4); margin-bottom: 36px; }
.store-title { display: flex; flex-direction: column; gap: var(--pal-space-2); }
.store-title h1 { font-size: 28px; letter-spacing: -0.02em; }
.store-title p { max-width: 60ch; }
.q {
  position: relative; display: flex; align-items: center; height: var(--pal-search-h);
  background: var(--pal-bg-elevated); border-radius: var(--pal-radius-panel);
  box-shadow: var(--pal-shadow-panel), var(--pal-bevel);
  transition: box-shadow var(--pal-dur-base) var(--pal-ease);
}
.q:focus-within { box-shadow: var(--pal-ring), var(--pal-shadow-panel); }
.q svg { position: absolute; left: var(--pal-space-4); width: 18px; height: 18px; fill: none; stroke: var(--pal-fg-muted); stroke-width: 1.6; stroke-linecap: round; pointer-events: none; }
.q input {
  flex: 1; height: 100%; min-width: 0; border: 0; background: none; color: var(--pal-fg); caret-color: var(--pal-accent);
  font: var(--pal-weight-regular) var(--pal-text-xl) / 1 var(--pal-font-ui);
  padding: 0 120px 0 var(--pal-text-x, 52px); border-radius: inherit; outline: none;
}
.q input::placeholder { color: var(--pal-fg-faint); }
.q input::-webkit-search-cancel-button { display: none; }
.q-count { position: absolute; right: 48px; font-size: var(--pal-text-sm); color: var(--pal-fg-faint); font-variant-numeric: tabular-nums; }
.q-key {
  position: absolute; right: var(--pal-space-4); height: var(--pal-tag-h); min-width: var(--pal-tag-h); padding: 0 5px;
  display: inline-grid; place-items: center; border-radius: var(--pal-radius-tag);
  background: var(--pal-bg-sunken); box-shadow: 0 0 0 1px var(--pal-line);
  font: var(--pal-weight-medium) var(--pal-text-xs) / 1 var(--pal-font-ui); color: var(--pal-fg-muted);
}
.q:focus-within .q-key { visibility: hidden; }
.chips { display: flex; flex-direction: column; gap: var(--pal-space-2); }
.chips-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pal-space-2) var(--pal-space-5); }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip > span {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: var(--pal-radius-control); background: var(--pal-bg-elevated); box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel);
  font: var(--pal-weight-medium) var(--pal-text-sm) / 1 var(--pal-font-ui); color: var(--pal-fg-muted); white-space: nowrap;
  transition: background var(--pal-dur-fast) var(--pal-ease), box-shadow var(--pal-dur-fast) var(--pal-ease);
}
.chip .glyph { font-family: var(--pal-font-symbols), var(--pal-font-ui); font-size: 12px; }
.chip:hover > span { background: var(--pal-bg-sunken); }
.chip input:checked + span { color: var(--pal-fg); background: var(--pal-selection); box-shadow: 0 0 0 1px var(--pal-line-strong); }
.chip input:checked + span .dot { box-shadow: 0 0 0 2px var(--tint-bg); }
.chip input:focus-visible + span { box-shadow: var(--pal-ring); }
.chip b { font-weight: var(--pal-weight-regular); color: var(--pal-fg-faint); font-variant-numeric: tabular-nums; }
.sort { display: inline-flex; align-items: center; gap: var(--pal-space-2); font-size: var(--pal-text-sm); color: var(--pal-fg-faint); margin-left: auto; }
.sort select {
  height: 26px; padding: 0 22px 0 var(--pal-space-2); border: 0; border-radius: var(--pal-radius-control); appearance: none; -webkit-appearance: none;
  background: var(--pal-bg-elevated) no-repeat right 7px center / 10px 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23868794' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel);
  font: var(--pal-weight-medium) var(--pal-text-sm) / 1 var(--pal-font-ui); color: var(--pal-fg); cursor: pointer;
}
.sort select:focus-visible { outline: none; box-shadow: var(--pal-ring); }

.shelf { margin-top: 36px; }
.shelf:first-child { margin-top: 0; }
.shelf-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pal-space-2); font-size: var(--pal-text-lg); margin-bottom: var(--pal-space-3); }
.shelf-head .dot { width: 8px; height: 8px; }
.shelf-head .count { font-size: var(--pal-text-md); }
.shelf-blurb { font-weight: var(--pal-weight-regular); color: var(--pal-fg-faint); font-size: var(--pal-text-md); margin-left: var(--pal-space-1); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: var(--pal-space-3); }
.card a {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--pal-space-2) var(--pal-space-3); align-items: start;
  height: 100%; padding: var(--pal-space-4) var(--pal-space-4) var(--pal-space-3); color: inherit;
  background: var(--pal-bg-elevated); border-radius: var(--pal-radius-popover);
  box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel);
  transition: transform var(--pal-dur-base) var(--pal-ease), box-shadow var(--pal-dur-base) var(--pal-ease);
}
.card a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--pal-shadow-popover), var(--pal-bevel); }
.card a:focus-visible { box-shadow: var(--pal-ring), var(--pal-shadow-popover); transform: translateY(-2px); }
.card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 2px; }
.card-title { display: flex; align-items: center; gap: var(--pal-space-2); font-size: var(--pal-text-lg); font-weight: var(--pal-weight-medium); line-height: var(--pal-leading-ui); }
.card-tagline { font-size: var(--pal-text-md); color: var(--pal-fg-muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--pal-space-1) var(--pal-space-3); padding-top: var(--pal-space-3); margin-top: var(--pal-space-1); border-top: 1px solid var(--pal-line); font-size: var(--pal-text-sm); color: var(--pal-fg-faint); font-variant-numeric: tabular-nums; min-height: 30px; }
.card-palettes { display: inline-flex; flex-wrap: wrap; gap: var(--pal-space-1); align-items: center; }
.card-more { color: var(--pal-fg-faint); font-size: var(--pal-text-xs); margin-left: 2px; }
.card-cat { display: inline-flex; align-items: center; gap: 5px; color: var(--pal-fg-muted); }
.card-cat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tint); }
.card-needs { color: var(--pal-tag-amber); }
.card-facts .platforms { margin-left: auto; }
/* the menu bar mark: a glyph among the platform glyphs, the item titles in
   its tooltip; the browser's bar filter swaps the tagline for the item's
   title and unhides the strip banner (.bar-mode on the shelves) */
.card-marks { margin-left: auto; display: inline-flex; gap: var(--pal-space-2); }
.card-bar { color: var(--pal-fg-muted); display: inline-flex; }
.card-marks + .platforms { margin-left: 0; }
.card-barline { display: none; align-items: center; gap: 6px; font-size: var(--pal-text-md); color: var(--pal-fg-muted); line-height: 1.45; }
.card-barline .glyph { color: var(--pal-fg-faint); }
.card-banner { display: none; grid-column: 1 / -1; position: relative; height: 30px; overflow: hidden; border-radius: var(--pal-radius-control); box-shadow: 0 0 0 1px var(--pal-line); background: #2A2A2F; }
.card-banner img { position: absolute; right: 0; top: 0; height: 60px; width: auto; max-width: none; }
/* is-fit: the server found the item on the strip (--x0, its left edge in
   the strip's 2x pixels; --s, the scale that fits it): the strip starts
   at the item and the system's items trail off under a fade */
.card-banner.is-fit img { right: auto; left: calc((16 - var(--x0)) * var(--s) * 0.5px); height: calc(60px * var(--s)); }
.card-banner.is-fit::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 56px; background: linear-gradient(90deg, transparent, #2A2A2F); }
.card-banner .mb { position: absolute; right: 0; top: 0; min-width: 100%; transform: scale(1.25); transform-origin: right top; }
.card-banner .mb-clock { display: none; }
.bar-mode .card-tagline { display: none; }
.bar-mode .card-barline { display: inline-flex; }
.bar-mode .card-banner { display: block; }
.card-by { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--pal-space-2); font-size: var(--pal-text-sm); color: var(--pal-fg-faint); }
.card-version { margin-left: auto; font-family: var(--pal-font-mono); font-size: var(--pal-text-xs); }
.no-match { padding: var(--pal-space-5); background: var(--pal-bg-elevated); border-radius: var(--pal-radius-popover); box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel); max-width: 560px; }
.no-match-title { font-size: var(--pal-text-lg); font-weight: var(--pal-weight-medium); margin-bottom: var(--pal-space-1); }
.no-match .muted { font-size: var(--pal-text-md); }
.linkish { background: none; border: 0; padding: 0; color: var(--pal-accent); font: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.suggest, .related ul { list-style: none; margin: var(--pal-space-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.suggest-row, .related-row { display: flex; align-items: center; gap: var(--pal-space-3); padding: 6px var(--pal-space-2); margin: 0 calc(-1 * var(--pal-space-2)); border-radius: var(--pal-radius-row); color: inherit; min-width: 0; }
.suggest-row:hover, .related-row:hover { background: var(--pal-selection); text-decoration: none; }
.suggest-row .well, .related-row .well { width: 32px; height: 32px; border-radius: var(--pal-radius-row); }
.suggest-row .well .icon, .related-row .well .icon { font-size: 16px; }
.suggest-row > span, .related-row > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.suggest-title, .related-title { font-size: var(--pal-text-md); font-weight: var(--pal-weight-medium); }
.suggest-tagline, .related-tagline { font-size: var(--pal-text-sm); color: var(--pal-fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--pal-fg-faint); font-size: var(--pal-text-md); padding: var(--pal-space-4); background: var(--pal-bg-sunken); border-radius: var(--pal-radius-row); max-width: var(--site-measure); }
main > .fine { margin-top: var(--pal-space-6); }
main > .community-note { margin-top: 36px; }
main > .community-note + .fine { margin-top: var(--pal-space-2); }

/* one extension */
.crumbs { display: flex; gap: var(--pal-space-2); font-size: var(--pal-text-md); color: var(--pal-fg-faint); margin-bottom: var(--pal-space-5); }
.crumbs a { color: var(--pal-fg-muted); }
.ext-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--pal-space-4) var(--pal-space-5); align-items: start; margin-bottom: var(--pal-space-6); }
.ext-hero h1 { font-size: 32px; letter-spacing: -0.02em; }
.ext-tagline { font-size: 17px; color: var(--pal-fg-muted); margin-top: 6px; max-width: 52ch; line-height: 1.4; }
.ext-by { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pal-space-2) var(--pal-space-4); margin-top: var(--pal-space-3); font-size: var(--pal-text-md); color: var(--pal-fg-muted); }
.ext-by > span:first-of-type { display: inline-flex; align-items: center; gap: var(--pal-space-2); }
.ext-by .avatar { margin-right: -2px; }
.ext-cat { display: inline-flex; align-items: center; gap: 6px; color: var(--tint); }
.ext-install { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--pal-space-2) var(--pal-space-3); margin-top: var(--pal-space-1); }
.ext-install .fine { flex-basis: 100%; }
.install {
  height: 40px; justify-content: space-between; gap: var(--pal-space-4); padding: 0 6px 0 var(--pal-space-4); max-width: 100%;
  font-family: var(--pal-font-mono); font-size: var(--pal-text-md); text-align: left;
}
.install-cmd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-verb { opacity: 0.72; }
.install-state {
  flex: none; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px 0 7px; border-radius: var(--pal-radius-tag);
  background: rgba(255, 255, 255, 0.16); font: var(--pal-weight-medium) var(--pal-text-sm) / 1 var(--pal-font-ui);
  transition: background var(--pal-dur-fast) var(--pal-ease);
}
:root[data-theme="dark"] .install-state { background: rgba(0, 0, 0, 0.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .install-state { background: rgba(0, 0, 0, 0.12); } }
.install-state svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.install.copied .install-state { background: var(--pal-success); color: #fff; }
.ext-install .btn { height: 40px; }
.ext-install .fine { line-height: 1.45; }

.strip { margin-bottom: 40px; }
.frames { display: flex; gap: var(--pal-space-3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--pal-radius-popover); outline-offset: 4px; }
.frames::-webkit-scrollbar { display: none; }
.frames:focus-visible { box-shadow: none; outline: 2px solid var(--pal-accent); }
.frame { flex: 0 0 100%; scroll-snap-align: start; margin: 0; min-width: 0; }
.frame img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--pal-bg-sunken); border-radius: var(--pal-radius-popover); box-shadow: 0 0 0 1px var(--pal-line); }
.frame figcaption { font-size: var(--pal-text-sm); color: var(--pal-fg-faint); margin-top: var(--pal-space-2); line-height: 1.5; }
.strip-nav { display: flex; align-items: center; justify-content: center; gap: var(--pal-space-3); margin-top: var(--pal-space-3); font-size: var(--pal-text-sm); color: var(--pal-fg-faint); font-variant-numeric: tabular-nums; }
.strip-nav .btn { width: 28px; padding: 0; font-size: var(--pal-text-lg); }
.desk {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 6; padding: var(--pal-space-6);
  background: var(--site-desk); border-radius: var(--pal-radius-popover); box-shadow: 0 0 0 1px var(--pal-line); overflow: hidden;
}
.desk::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 20% 30%, rgba(255, 255, 255, 0.45), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 44px);
  mix-blend-mode: var(--site-desk-grid); opacity: var(--site-desk-grid-alpha);
}

/* the panel, drawn in HTML from the brief's component styles: the search
   row, a section, rows, the footer */
.pp {
  position: relative; width: 100%; max-width: 680px; display: flex; flex-direction: column;
  background: var(--pal-bg); color: var(--pal-fg); border-radius: var(--pal-radius-panel);
  box-shadow: var(--pal-shadow-panel), var(--pal-bevel); overflow: hidden; text-align: left;
  font: var(--pal-weight-regular) var(--pal-text-md) / var(--pal-leading-ui) var(--pal-font-ui); font-variant-numeric: tabular-nums;
}
.pp-search { flex: none; height: var(--pal-search-h); display: flex; align-items: center; gap: var(--pal-row-gap); padding: 0 var(--pal-space-4); border-bottom: 1px solid var(--pal-line); }
.pp-search svg { width: 16px; height: 16px; fill: none; stroke: var(--pal-fg-muted); stroke-width: 1.5; stroke-linecap: round; flex: none; margin: 0 4px; }
.pp-q { flex: 1; min-width: 0; display: flex; align-items: center; font-size: var(--pal-text-xl); white-space: nowrap; overflow: hidden; }
.pp-ph { color: var(--pal-fg-faint); overflow: hidden; text-overflow: ellipsis; }
.pp-caret { display: inline-block; width: 1.5px; height: 20px; background: var(--pal-accent); margin-left: 1px; border-radius: 1px; }
.pp mark { background: var(--pal-match); color: inherit; border-radius: 2px; padding: 1px 0; margin: -1px 0; }
.pp-list { padding: var(--pal-space-2); }
.pp-section { height: 28px; display: flex; align-items: flex-end; padding: 0 8px 7px; font: var(--pal-weight-medium) var(--pal-text-xs) / 1 var(--pal-font-ui); color: var(--pal-fg-faint); letter-spacing: 0.01em; }
.pp-row { height: var(--pal-row-h); display: flex; align-items: center; gap: var(--pal-row-gap); padding: 0 8px; border-radius: var(--pal-radius-row); white-space: nowrap; min-width: 0; }
.pp-row.is-selected { background: var(--pal-selection); }
.pp-row .icon { color: var(--pal-fg-muted); }
.pp-row.is-selected .icon { color: var(--pal-fg); }
.pp-t { display: flex; align-items: baseline; gap: var(--pal-space-2); min-width: 0; flex: 1; }
.pp-title { color: var(--pal-fg); flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pp-sub { color: var(--pal-fg-muted); font-size: var(--pal-text-sm); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pp-acc { flex: none; margin-left: auto; color: var(--pal-fg-muted); font-size: var(--pal-text-sm); display: flex; align-items: center; }
.pp-footer { flex: none; height: 36px; display: flex; align-items: center; gap: var(--pal-space-4); padding: 0 var(--pal-space-3) 0 var(--pal-space-4); border-top: 1px solid var(--pal-line); font-size: var(--pal-text-xs); color: var(--pal-fg-muted); }
.pp-ctx { display: flex; align-items: center; gap: var(--pal-space-2); color: var(--pal-fg-faint); }
.pp-logo { width: 16px; height: 16px; border-radius: 5px; background: var(--pal-accent); position: relative; flex: none; }
.pp-logo::after { content: ""; position: absolute; left: 5px; top: 5px; width: 6px; height: 6px; border-radius: 1.5px 1.5px 1.5px 5px; background: var(--pal-accent-fg); }
.pp-acts { margin-left: auto; display: flex; align-items: center; gap: var(--pal-space-3); }
.pp-act { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--pal-weight-medium); }
.pp-act.primary { color: var(--pal-fg); }
.pp-sep { width: 1px; height: 16px; background: var(--pal-line-strong); }

.ext-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.ext-main { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.ext-main h2 { font-size: var(--pal-text-xl); margin-bottom: var(--pal-space-3); display: flex; gap: var(--pal-space-2); align-items: baseline; }
.ext-main h2 .count { font-size: var(--pal-text-md); }
.ext-main .lede-sm { line-height: var(--pal-leading-prose); }
.ext-main section > .fine { margin-top: var(--pal-space-3); }
.features { margin: var(--pal-space-3) 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.features li { position: relative; padding-left: 18px; line-height: 1.5; }
.features li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--tint, var(--pal-fg-faint)); }
.prows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.prow { display: flex; gap: var(--pal-row-gap); padding: var(--pal-space-3) 0; border-top: 1px solid var(--pal-line); }
.prow:last-child { border-bottom: 1px solid var(--pal-line); }
.prow > .icon, .prow > .tile { margin-top: -1px; }
.prow > .icon { color: var(--pal-fg); }
.prow-body { display: flex; flex-direction: column; gap: var(--pal-space-1); min-width: 0; flex: 1; }
.prow-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pal-space-2); font-size: var(--pal-text-sm); }
.prow-title { font-size: var(--pal-text-lg); font-weight: var(--pal-weight-medium); line-height: var(--pal-leading-ui); }
.prow-head code { font-size: var(--pal-text-xs); }
.prow-desc { color: var(--pal-fg-muted); font-size: var(--pal-text-md); line-height: 1.45; }
.hints { list-style: none; margin: var(--pal-space-1) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--pal-space-1) var(--pal-space-4); font-size: var(--pal-text-sm); color: var(--pal-fg-muted); }
.hints li { display: inline-flex; align-items: center; gap: 6px; }
.actions-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.actions-list li { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--pal-space-1) var(--pal-space-3); padding: var(--pal-space-2) 0; border-top: 1px solid var(--pal-line); font-size: var(--pal-text-md); }
.actions-list li:last-child { border-bottom: 1px solid var(--pal-line); }
.action-title { font-weight: var(--pal-weight-medium); }
.action-desc { color: var(--pal-fg-muted); }
.action-desc code { font-size: 0.92em; }
.action-keys { margin-left: auto; display: inline-flex; gap: 4px; align-self: center; }

/* the Links section: one row per route, the pal:// url as a copy button
   with its pal call twin under it, the params as chips */
.links { scroll-margin-top: var(--pal-space-4); }
.links h2 .glyph { font-size: 16px; color: var(--pal-fg-faint); align-self: center; }
.links-lede { color: var(--pal-fg-muted); font-size: var(--pal-text-md); line-height: 1.5; max-width: var(--site-measure); margin-bottom: var(--pal-space-3); }
.link-code { display: flex; flex-direction: column; align-items: flex-start; gap: var(--pal-space-1); margin-top: var(--pal-space-1); max-width: 100%; }
.link-code code { font-size: var(--pal-text-sm); overflow-wrap: anywhere; }
.link-copy {
  display: inline-flex; align-items: center; gap: var(--pal-space-3); max-width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.link-copy > code { background: var(--pal-bg-sunken); border-radius: var(--pal-radius-control); padding: 4px 8px; box-shadow: 0 0 0 1px var(--pal-line); }
.link-copy:hover > code { box-shadow: 0 0 0 1px var(--pal-line-strong); }
.link-copy:focus-visible { outline: none; }
.link-copy:focus-visible > code { box-shadow: var(--pal-ring); }
.link-copy-state { font-size: var(--pal-text-xs); color: var(--pal-fg-faint); white-space: nowrap; }
.link-copy.copied .link-copy-state { color: var(--pal-tag-green); }
.link-cli { color: var(--pal-fg-muted); padding: 0 8px; }
.link-params { list-style: none; margin: var(--pal-space-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--pal-space-1) var(--pal-space-2); }
.chip-param { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--pal-bg-sunken); box-shadow: 0 0 0 1px var(--pal-line); font-size: var(--pal-text-sm); color: var(--pal-fg-muted); max-width: 100%; min-width: 0; }
.chip-param code { font-size: var(--pal-text-xs); background: none; padding: 0; color: var(--pal-fg); }
.chip-param b { color: var(--pal-tag-amber); font-weight: var(--pal-weight-semibold); margin-left: -3px; }
.chip-param span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-param.is-required { box-shadow: 0 0 0 1px var(--pal-line-strong); }

/* the Menu bar section: the strips as they are shot (1440 by 120, the
   bar band on top of wallpaper), the light and dark ones side by side, the
   popover and the sketchybar strip under them */
.ext-bar { display: inline-flex; align-items: center; gap: 6px; color: var(--pal-fg-muted); }
.ext-bar .glyph { color: var(--pal-fg-faint); }
.ext-bar:hover { color: var(--pal-accent); text-decoration: none; }
.bar { margin-bottom: 48px; scroll-margin-top: var(--pal-space-4); }
.bar h2 { display: flex; align-items: center; gap: var(--pal-space-2); font-size: 20px; }
.bar h2 .glyph { font-size: 16px; color: var(--pal-fg-faint); }
.bar-lede { color: var(--pal-fg-muted); max-width: var(--site-measure); margin-top: var(--pal-space-2); }
.bar-shots { display: flex; flex-direction: column; gap: var(--pal-space-5); margin-top: var(--pal-space-5); }
.bar-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pal-space-4); }
.bar-fig { margin: 0; min-width: 0; }
.bar-fig img { display: block; width: 100%; border-radius: var(--pal-radius-row); box-shadow: 0 0 0 1px var(--pal-line); background: var(--pal-bg-sunken); }
/* a strip is 1440 by 120 with the band on its top 48 px: show the band
   and a band's height of desktop under it (its shadow), the pair also cut
   to the right half where the item is */
.bar-strip { aspect-ratio: 15 / 1; object-fit: cover; object-position: center top; }
/* --x0 (the item's left edge in the strip's pixels, from the server) widens
   the pair's crop to the whole item; without it, the right half */
.bar-pair .bar-strip { aspect-ratio: calc((1464 - var(--x0, 744)) / 96); object-position: right top; }
.bar-pop img { max-width: 720px; }
.bar-fig figcaption { font-size: var(--pal-text-sm); color: var(--pal-fg-faint); margin-top: var(--pal-space-2); line-height: 1.5; }
.bar-pop img { border-radius: var(--pal-radius-popover); }
.bar-eyebrow { font: var(--pal-weight-medium) var(--pal-text-xs) / 1 var(--pal-font-ui); letter-spacing: 0.04em; text-transform: uppercase; color: var(--pal-fg-faint); margin-bottom: var(--pal-space-2); }
.bar-items { margin-top: var(--pal-space-5); }
.bar-mock { position: relative; width: 100%; aspect-ratio: 7.5 / 1; overflow: hidden; border-radius: var(--pal-radius-row); box-shadow: 0 0 0 1px var(--pal-line); }
.bar-mock .mb { position: absolute; inset: 0 0 auto 0; }
.desk-dark { background: linear-gradient(135deg, #2A3352 0%, #3C2C4D 38%, #4A3330 72%, #223A34 100%); }
.desk-light { background: linear-gradient(135deg, #DCE4F5 0%, #E9DDF2 38%, #F6E3D6 72%, #DDEBE0 100%); }

/* the menu bar band drawn in HTML: 24pt, the item then the system's own
   items and the clock, right-aligned as the bar lays them out. Its colours
   are the bar's, not the page's, so the pair reads dark and light on
   either scheme. */
.mb {
  --mb-fg: #F2F2F5; --mb-bg: rgba(40, 40, 46, 0.92);
  height: 24px; display: flex; align-items: center; justify-content: flex-end; gap: 22px; padding: 0 14px;
  background: var(--mb-bg); color: var(--mb-fg); font: var(--pal-weight-regular) 13px / 1 var(--pal-font-ui); white-space: nowrap; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.mb-light { --mb-fg: #1B1B1F; --mb-bg: rgba(236, 236, 240, 0.92); }
.mb-item { display: inline-flex; align-items: center; gap: 7px; position: relative; }
.mb-item .icon { width: 18px; height: 18px; font-size: 14px; color: inherit; }
.mb-item .icon[data-kind="glyph"] { font-size: 15px; }
.mb-item .icon[data-kind="color"]::before { width: 12px; height: 12px; }
.mb-item .icon .tile-mark { width: 14px; height: 14px; }
.mb-badge { position: absolute; left: 12px; top: -1px; width: 8px; height: 8px; border-radius: 50%; background: #E5312B; box-shadow: 0 0 0 1.5px var(--mb-bg); }
.mb-title { font-variant-numeric: tabular-nums; }
.mb-sys { display: inline-flex; align-items: center; gap: 20px; }
.mb-sys svg { display: block; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mb-sys .fill { fill: currentColor; stroke: none; }
.mb-batt { width: 26px; }
.mb-wifi { width: 16px; }
.mb-cc { width: 18px; }
.mb-clock { font-variant-numeric: tabular-nums; }
.mb-clock b { font-weight: var(--pal-weight-regular); margin-left: 8px; }

/* settings, laid out as the settings window's form */
.sform { display: flex; flex-direction: column; margin-bottom: var(--pal-space-4); background: var(--pal-bg-elevated); border-radius: var(--pal-radius-popover); box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel); padding: var(--pal-space-2) var(--pal-space-5) var(--pal-space-3); }
.sform-head { font-size: var(--pal-text-sm); color: var(--pal-fg-faint); padding: var(--pal-space-2) 0 var(--pal-space-3); }
.srow { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 3px var(--pal-space-4); padding: var(--pal-space-3) 0; border-top: 1px solid var(--pal-line); align-items: start; }
.srow-label { text-align: right; display: flex; flex-direction: column; gap: 3px; padding-top: 6px; }
.srow-label label { font-size: var(--pal-text-md); color: var(--pal-fg); }
.srow-label code { font-size: var(--pal-text-xs); background: none; padding: 0; color: var(--pal-fg-faint); }
.srow-control { display: flex; align-items: center; gap: var(--pal-space-2); min-width: 0; }
.srow-value { font-size: var(--pal-text-md); color: var(--pal-fg-muted); }
.srow-kind { margin-left: auto; }
.srow-hint { grid-column: 2; font-size: var(--pal-text-sm); color: var(--pal-fg-faint); line-height: 1.5; max-width: 52ch; }
.field {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; min-width: 0; max-width: 100%;
  background: var(--pal-bg-sunken); border-radius: var(--pal-radius-control); box-shadow: 0 0 0 1px var(--pal-line);
  font: var(--pal-weight-regular) var(--pal-text-md) / 1 var(--pal-font-ui); color: var(--pal-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.field.popup { padding-right: 6px; }
.field svg { width: 12px; height: 12px; fill: none; stroke: var(--pal-fg-muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.field-ph { color: var(--pal-fg-faint); }
.field-unit { color: var(--pal-fg-faint); font-size: var(--pal-text-sm); }
.field.list { height: auto; min-height: 30px; padding: 5px 6px; flex-wrap: wrap; gap: 4px; white-space: normal; }
.switch { width: 26px; height: 16px; border-radius: 8px; background: var(--pal-line-strong); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 1px; left: 1px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.switch.on { background: var(--pal-accent); }
.switch.on::after { left: 11px; }

.ext-side { display: flex; flex-direction: column; gap: var(--pal-space-6); position: sticky; top: var(--pal-space-4); }
.facts { margin: 0; padding: var(--pal-space-2) var(--pal-space-4); background: var(--pal-bg-elevated); border-radius: var(--pal-radius-popover); box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel); font-size: var(--pal-text-md); }
.facts > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--pal-space-3); padding: var(--pal-space-2) 0; border-top: 1px solid var(--pal-line); line-height: 1.45; }
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--pal-fg-faint); font-size: var(--pal-text-sm); padding-top: 1px; }
.facts dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.facts dd.platforms { display: flex; flex-wrap: wrap; gap: var(--pal-space-1) var(--pal-space-3); }
.facts dd.platforms > span { display: inline-flex; align-items: center; gap: 5px; }
.facts .tag { vertical-align: baseline; }
.related h2 { font-size: var(--pal-text-md); font-weight: var(--pal-weight-medium); color: var(--pal-fg-faint); padding: 0 var(--pal-space-2); }

/* docs */
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: var(--pal-space-4); font-size: var(--pal-text-md); }
.docs-nav a { color: var(--pal-fg-muted); padding: 6px var(--pal-space-2); border-radius: var(--pal-radius-control); }
.docs-nav a:hover { color: var(--pal-fg); background: var(--pal-selection); text-decoration: none; }
.docs-nav a[aria-current] { color: var(--pal-fg); background: var(--pal-selection); font-weight: var(--pal-weight-medium); }
.docs-body { max-width: var(--site-measure); }
.changelog { max-width: var(--site-measure); margin: 0 auto; }
.changelog-since { color: var(--pal-fg-muted); }
.changelog-release h2 a { color: inherit; }
.changelog-date { color: var(--pal-fg-faint); font-size: var(--pal-text-md); font-weight: var(--pal-weight-regular, 400); margin-left: var(--pal-space-2); }
.docs-src { margin-top: 40px; padding-top: var(--pal-space-4); border-top: 1px solid var(--pal-line); }

/* markdown */
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: 28px; margin: 0 0 var(--pal-space-4); }
.prose h2 { font-size: var(--pal-text-xl); margin: 40px 0 var(--pal-space-3); padding-top: var(--pal-space-4); border-top: 1px solid var(--pal-line); }
.prose h3 { font-size: var(--pal-text-lg); margin: var(--pal-space-6) 0 var(--pal-space-2); }
.prose h4 { font-size: var(--site-text); margin: var(--pal-space-5) 0 var(--pal-space-2); }
.prose p, .prose ul, .prose ol, .prose pre, .prose table, .prose blockquote { margin: 0 0 var(--pal-space-4); }
.prose li { margin: var(--pal-space-1) 0; }
.prose li > p { margin-bottom: var(--pal-space-2); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose blockquote { border-left: 3px solid var(--pal-line-strong); padding-left: var(--pal-space-4); color: var(--pal-fg-muted); }
.prose table { border-collapse: collapse; font-size: var(--pal-text-md); width: 100%; }
.prose th, .prose td { text-align: left; padding: var(--pal-space-2) var(--pal-space-3) var(--pal-space-2) 0; border-bottom: 1px solid var(--pal-line); vertical-align: top; }
.prose th { font-weight: var(--pal-weight-medium); color: var(--pal-fg-muted); font-size: var(--pal-text-sm); }
.prose img { border-radius: var(--pal-radius-row); }
.prose hr { border: 0; border-top: 1px solid var(--pal-line); margin: var(--pal-space-6) 0; }
.prose kbd { display: inline-block; height: var(--pal-tag-h); line-height: var(--pal-tag-h); padding: 0 5px; font-size: var(--pal-text-xs); border-radius: var(--pal-radius-tag); background: var(--pal-bg-elevated); box-shadow: 0 0 0 1px var(--pal-line-strong); }
.prose mark { background: var(--pal-match); color: inherit; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ext-hero .ext-install { grid-column: 1 / -1; }
  .ext-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .bar-pair { grid-template-columns: minmax(0, 1fr); }
  .ext-side { position: static; }
  .docs { grid-template-columns: 1fr; gap: var(--pal-space-4); }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: var(--pal-space-1); padding-bottom: var(--pal-space-3); border-bottom: 1px solid var(--pal-line); }
}
@media (max-width: 520px) {
  /* a wide README table scrolls on its own rather than the page */
  .prose table { display: block; overflow-x: auto; }
  .top nav { gap: var(--pal-space-4); }
  .hero { padding-top: 32px; gap: 32px; }
  .hero h1 { font-size: 32px; }
  .lede { font-size: 17px; }
  .dl { flex-direction: column; align-self: stretch; }
  .dl .btn { width: 100%; }
  .land { margin-top: 56px; }
  .land h2 { font-size: 22px; }
  /* the renders full width, the caption under; the popovers as a scroll-snap strip */
  .shots a { grid-template-columns: 1fr; gap: var(--pal-space-1); }
  .shots .shot { grid-row: auto; margin-bottom: var(--pal-space-2); }
  .pops { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-left: calc(-1 * var(--site-gutter)); margin-right: calc(-1 * var(--site-gutter)); padding: 0 var(--site-gutter); scroll-padding: 0 var(--site-gutter); gap: var(--pal-space-3); }
  .pops::-webkit-scrollbar { display: none; }
  .pops li { flex: 0 0 100%; scroll-snap-align: start; }
  /* the grid as a two-column list of names; the tagline waits on the store page */
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tiles a { grid-template-columns: 28px minmax(0, 1fr); gap: var(--pal-space-2); padding: 8px; min-height: 0; }
  .tiles .well { width: 28px; height: 28px; border-radius: var(--pal-radius-control); }
  .tiles .well .icon { font-size: 15px; }
  .tiles .well .tile { --tile: 24px; }
  .tile-title { font-size: var(--pal-text-sm); }
  .tile-line { display: none; }
  .numbers .pp-sep { display: none; }
  .numbers { flex-direction: column; align-items: flex-start; padding: var(--pal-space-3) var(--pal-space-4); }
  .keymap td:first-child { width: 96px; white-space: normal; }
  .linux-grid { grid-template-columns: 1fr; }
  .files td:first-child { white-space: normal; }
  .foot { flex-direction: column; }
  .store-title h1 { font-size: 24px; }
  .q { height: 48px; }
  .q input { padding-right: 84px; font-size: 17px; }
  .q-count { right: 40px; }
  .q-key { display: none; }
  .sort { margin-left: 0; }
  .cards { grid-template-columns: 1fr; }
  .ext-hero { grid-template-columns: 48px minmax(0, 1fr); gap: var(--pal-space-3) var(--pal-space-3); }
  .well-lg { width: 48px; height: 48px; border-radius: var(--pal-radius-tile); }
  .well-lg .icon { font-size: 24px; }
  .well-lg .tile { --tile: 48px; }
  .ext-hero h1 { font-size: 26px; }
  .ext-tagline { font-size: var(--site-text); }
  .desk { padding: var(--pal-space-3); aspect-ratio: auto; }
  .srow { grid-template-columns: 1fr; gap: 6px; }
  .srow-label { text-align: left; flex-direction: row; align-items: baseline; gap: var(--pal-space-2); padding-top: 0; }
  .srow-hint { grid-column: 1; }
  .sform { padding-left: var(--pal-space-4); padding-right: var(--pal-space-4); }
  .facts > div { grid-template-columns: 64px minmax(0, 1fr); }
}

/* palplay.cagdas.io: the games in the browser. The grid of games, and a
   game's page: the frame on the desk at pal's panel size or as large as
   the window allows, its keys, pal under it. */
body.play main { flex: 1; padding-bottom: 64px; }
.brand-play { font-weight: var(--pal-weight-medium); color: var(--pal-accent); }
.play-eyebrow { margin: 0; font-size: var(--pal-text-sm); font-weight: var(--pal-weight-semibold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--pal-accent); }
.play-hero { gap: var(--pal-space-3); margin-bottom: var(--pal-space-6); }
.play-hero .lede { max-width: 60ch; }
.play-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--pal-space-4); }
.play-card a {
  display: flex; flex-direction: column; height: 100%; color: inherit; overflow: hidden;
  background: var(--pal-bg-elevated); border-radius: var(--pal-radius-popover);
  box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel);
  transition: transform var(--pal-dur-base) var(--pal-ease), box-shadow var(--pal-dur-base) var(--pal-ease);
}
.play-card a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--pal-shadow-popover), var(--pal-bevel); }
.play-card a:focus-visible { box-shadow: var(--pal-ring), var(--pal-shadow-popover); transform: translateY(-2px); }
.play-card-shot { display: block; aspect-ratio: 16 / 10; background: var(--site-desk); overflow: hidden; }
.play-card-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--pal-dur-slow) var(--pal-ease); }
.play-card a:hover .play-card-shot img { transform: scale(1.03); }
.play-card-body { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--pal-space-3); align-items: center; padding: var(--pal-space-3) var(--pal-space-4) var(--pal-space-4); }
.play-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.play-card-go { pointer-events: none; }

.game-head { display: grid; grid-template-columns: auto 44px minmax(0, 1fr) auto; gap: var(--pal-space-3); align-items: center; padding-top: var(--pal-space-5); padding-bottom: var(--pal-space-4); }
.game-back { display: grid; place-items: center; width: 28px; height: 28px; margin-left: -6px; font-size: 22px; line-height: 1; color: var(--pal-fg-muted); border-radius: var(--pal-radius-control); }
.game-back:hover { color: var(--pal-fg); background: var(--pal-bg-sunken); text-decoration: none; }
.game-title { min-width: 0; }
.game-title h1 { margin: 0; font-size: 24px; letter-spacing: -0.015em; line-height: 1.2; }
.game-title p { margin: 2px 0 0; font-size: var(--pal-text-md); color: var(--pal-fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-tools { display: flex; align-items: center; gap: var(--pal-space-2); }
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--pal-bg-sunken); border-radius: calc(var(--pal-radius-control) + 2px); box-shadow: inset 0 0 0 1px var(--pal-line); }
.seg button { height: 22px; padding: 0 var(--pal-space-3); border: 0; border-radius: var(--pal-radius-control); background: none; color: var(--pal-fg-muted); font: inherit; font-size: var(--pal-text-sm); font-weight: var(--pal-weight-medium); cursor: pointer; }
.seg button:hover { color: var(--pal-fg); }
.seg button[aria-pressed="true"] { background: var(--pal-bg-elevated); color: var(--pal-fg); box-shadow: 0 0 0 1px var(--pal-line), 0 1px 2px rgba(0, 0, 0, 0.08); }

.game-desk { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--pal-space-3); padding: 40px var(--site-gutter); background: var(--site-desk); overflow: hidden; }
.game-desk::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 20% 30%, rgba(255, 255, 255, 0.45), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 44px);
  mix-blend-mode: var(--site-desk-grid); opacity: var(--site-desk-grid-alpha);
}
.game-panel { position: relative; width: 720px; height: 390px; max-width: 100%; background: var(--pal-bg); border-radius: var(--pal-radius-panel); box-shadow: var(--pal-shadow-panel); overflow: hidden; }
.game-desk[data-size="large"] .game-panel { width: 1280px; height: clamp(390px, calc(100dvh - 220px), 820px); }
.game-panel iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--pal-bg); }
.game-cover { position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; background: rgba(20, 20, 26, 0.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); font: inherit; }
.game-cover span { padding: var(--pal-space-2) var(--pal-space-4); border-radius: 999px; background: var(--pal-bg-elevated); color: var(--pal-fg); font-size: var(--pal-text-md); font-weight: var(--pal-weight-medium); box-shadow: var(--pal-shadow-popover); }
.game-cover[hidden] { display: none; }
.game-touch { position: relative; margin: 0; font-size: var(--pal-text-sm); color: var(--pal-fg-muted); }

.game-info { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-top: var(--pal-space-6); }
.game-info h2, .game-more h2 { font-size: var(--pal-text-lg); margin: 0 0 var(--pal-space-3); }
.game-pal { padding: var(--pal-space-4); background: var(--pal-bg-elevated); border-radius: var(--pal-radius-popover); box-shadow: 0 0 0 1px var(--pal-line), var(--pal-bevel); }
.game-pal p { margin: 0 0 var(--pal-space-4); font-size: var(--pal-text-md); color: var(--pal-fg-muted); line-height: 1.5; }
.game-pal kbd { font-size: var(--pal-text-xs); }
.game-pal-actions { display: flex; flex-wrap: wrap; gap: var(--pal-space-2); }
.game-more { padding-top: 48px; }
.play-mini { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--pal-space-2); }
.play-mini a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--pal-space-3); align-items: center; padding: var(--pal-space-2) var(--pal-space-3); color: inherit; border-radius: var(--pal-radius-popover); }
.play-mini a:hover { background: var(--pal-bg-sunken); text-decoration: none; }
.play-mini .card-tagline { -webkit-line-clamp: 1; }

/* the Play button on a game's extension page */
.btn-play { background: var(--pal-accent-soft); color: var(--pal-accent); box-shadow: none; }
.btn-play:hover { background: color-mix(in srgb, var(--pal-accent) 22%, transparent); }
.btn-play svg { width: 12px; height: 12px; fill: currentColor; }

@media (max-width: 900px) {
  .game-info { grid-template-columns: minmax(0, 1fr); gap: var(--pal-space-6); }
}
@media (max-width: 640px) {
  .top .wide { display: none; }
  .game-head { grid-template-columns: auto 44px minmax(0, 1fr); }
  .game-tools { grid-column: 1 / -1; }
  .game-tools .seg { display: none; }
  .game-desk { padding: var(--pal-space-4) var(--site-gutter); }
  .game-panel, .game-desk[data-size="large"] .game-panel { width: 100%; height: min(70dvh, 520px); }
}
