/* The kit's stylesheet: fonts, tokens of both themes, the page frame,
   controls, header, footer, the theme switch, the page sheets (Templates A–E:
   DetailSheet, RoleSheet, CatalogSheet, ContactSheet, HeroSheet/SectionSheet),
   the brand field with its band, and the Studio 3D/configurator shell (.v2-*).
   object-website imports it first in its own global.css; object-ci,
   object-projects and object-md2pdf import it the same way. Every rule sits in
   @layer kit, so an app's own CSS and product sheets win whatever the load
   order (README: Cascade layers). Later files in this list still refine earlier
   ones. themes.css is the theme part alone, for
   apps with CSS of their own. */
@layer tokens, product, kit, app;

/* ibm-plex-sans-cyrillic-ext-300-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(fonts/ibm-plex-sans-cyrillic-ext-300-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-cyrillic-ext-300-normal.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-sans-cyrillic-300-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(fonts/ibm-plex-sans-cyrillic-300-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-cyrillic-300-normal.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-sans-greek-300-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(fonts/ibm-plex-sans-greek-300-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-greek-300-normal.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* ibm-plex-sans-vietnamese-300-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(fonts/ibm-plex-sans-vietnamese-300-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-vietnamese-300-normal.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-sans-latin-ext-300-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(fonts/ibm-plex-sans-latin-ext-300-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-latin-ext-300-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-latin-300-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(fonts/ibm-plex-sans-latin-300-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-latin-300-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* ibm-plex-sans-cyrillic-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-sans-cyrillic-ext-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-cyrillic-ext-400-normal.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-sans-cyrillic-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-cyrillic-400-normal.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-sans-greek-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-sans-greek-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-greek-400-normal.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* ibm-plex-sans-vietnamese-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-sans-vietnamese-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-vietnamese-400-normal.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-sans-latin-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-latin-ext-400-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-latin-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-latin-400-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* ibm-plex-sans-cyrillic-ext-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-sans-cyrillic-ext-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-cyrillic-ext-500-normal.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-sans-cyrillic-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-sans-cyrillic-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-cyrillic-500-normal.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-sans-greek-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-sans-greek-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-greek-500-normal.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* ibm-plex-sans-vietnamese-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-sans-vietnamese-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-vietnamese-500-normal.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-sans-latin-ext-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-latin-ext-500-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-latin-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-sans-latin-500-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* ibm-plex-mono-cyrillic-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-cyrillic-ext-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-cyrillic-ext-400-normal.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-mono-cyrillic-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-cyrillic-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-cyrillic-400-normal.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-mono-vietnamese-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-vietnamese-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-vietnamese-400-normal.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-mono-latin-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-latin-ext-400-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-mono-latin-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-latin-400-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* ibm-plex-mono-cyrillic-ext-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-cyrillic-ext-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-cyrillic-ext-500-normal.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-mono-cyrillic-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-cyrillic-500-normal.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-mono-vietnamese-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-vietnamese-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-vietnamese-500-normal.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-mono-latin-ext-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-latin-ext-500-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-mono-latin-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-latin-500-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* ibm-plex-mono-cyrillic-ext-600-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-mono-cyrillic-ext-600-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-cyrillic-ext-600-normal.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-mono-cyrillic-600-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-mono-cyrillic-600-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-cyrillic-600-normal.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-mono-vietnamese-600-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-mono-vietnamese-600-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-vietnamese-600-normal.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-mono-latin-ext-600-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-mono-latin-ext-600-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-latin-ext-600-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-mono-latin-600-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/ibm-plex-mono-latin-600-normal.woff2) format('woff2'), url(fonts/ibm-plex-mono-latin-600-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Canonical tokens are owned by @object/themes. */
/* Generated from themes/src/tokens/tokens.json by themes/scripts/build-tokens.mjs in
   object-themes. Do not edit: change tokens.json and run `npm run tokens`.
   Layout and motion values (gutter, container, transitions) are hand-written
   in layout.css. The light theme is the default; the dark one applies under
   data-theme="dark" (theme.css). Everything sits in the tokens layer; every Object
   sheet declares the same layer order, so the cascade does not depend on load order. */
@layer tokens, product, kit, app;

@layer tokens {
:root,
[data-theme="light"] {
    /* Shadows. One shadow for everything that floats over a view: studio panels, toolbars and rails, and the controls of the configurator kit (owner, 2026-11-13). Sheets keep their own deeper shadow in the kit. */
    --shadow-float: 0 1px 3px rgb(0 0 0 / 22%); /* A floating panel or control: 1px down, 3px blur, black at 22% */

    --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Icons: three sizes and one stroke width. Components size icons through these and never with a px of their own; the stroke applies to SVG icons (the Phosphor font glyphs carry their weight in the font). */
    --icon-size-sm: 12px;              /* Tree carets, panel titles, close buttons */
    --icon-size-md: 14px;              /* Rails, toolbars, header buttons */
    --icon-size-lg: 20px;              /* Theme switch, standalone icons */
    --icon-stroke: 1.5;                /* Stroke width of SVG icons */

    /* Teal scale: one hue (OKLCH 180.9, the same in CIELAB LCh), lightness from 50 to 975. Step 500 is Object Teal and does not change. Every teal role below takes its value from a step; a teal that is not a step does not belong in an app. */
    --teal-50: #f1f9f7;
    --teal-100: #daf1ec;
    --teal-200: #b4e3d9;
    --teal-300: #8cd5c7;
    --teal-400: #68c4b4;
    --teal-500: #4ab3a2;               /* Object Teal, the brand colour */
    --teal-600: #359586;
    --teal-700: #2c7a6e;
    --teal-800: #215b52;
    --teal-900: #174039;
    --teal-950: #0f2d28;
    --teal-975: #0c211d;

    /* Orange scale: the hue of Object Orange (OKLCH 64), every step at 95% of the chroma sRGB allows at its lightness, so the whole scale is equally vivid. Step 500 is Object Orange. */
    --orange-50: #f9f6f4;
    --orange-100: #f6eae0;
    --orange-200: #f9d7b9;
    --orange-300: #fdc28b;
    --orange-400: #fcb064;
    --orange-500: #fc9a22;             /* Object Orange, the accent colour */
    --orange-600: #e28a1d;
    --orange-700: #c57718;
    --orange-800: #9c5e11;
    --orange-900: #76450a;
    --orange-950: #522e04;

    /* Dark navy scale, a colour of the product family (2026-10-21): the hue of Phenome navy, lightness on the profile of the teal scale. Step 950 is the lead, white text on it 14.4:1; its action colour is saffron 300. */
    --navy-50: #f3f7ff;
    --navy-100: #e2ebff;
    --navy-200: #c4d8ff;
    --navy-300: #a7c4ff;
    --navy-400: #89afff;
    --navy-500: #6c9bff;
    --navy-600: #527edf;
    --navy-700: #4367b7;
    --navy-800: #324d89;
    --navy-900: #223661;
    --navy-950: #1a2949;               /* Dark navy, the lead of the scale */

    /* Terracotta scale, a colour of the product family (2026-10-21). Step 700 is the lead, white text on it 5.0:1; its action colour is cream, saffron 100. Steps 400 and 500 are turned 2 and 1 degrees of hue away from the error colour to keep CIEDE2000 10 from it. */
    --terracotta-50: #fff4f2;
    --terracotta-100: #ffe4de;
    --terracotta-200: #ffc9bc;
    --terracotta-300: #ffad98;
    --terracotta-400: #ff8b74;
    --terracotta-500: #f66f53;
    --terracotta-600: #d0583d;
    --terracotta-700: #b5523b;         /* Terracotta, the lead of the scale */
    --terracotta-800: #803625;
    --terracotta-900: #5b2519;
    --terracotta-950: #411a10;

    /* Petrol scale, a colour of the product family (2026-10-21). Step 800 is the lead, white text on it 6.6:1; its action colour is saffron 300. */
    --petrol-50: #eff9fc;
    --petrol-100: #d4f1fa;
    --petrol-200: #a7e2f6;
    --petrol-300: #75d4f0;
    --petrol-400: #43c2e5;
    --petrol-500: #04b0d5;
    --petrol-600: #0092b1;
    --petrol-700: #017892;
    --petrol-800: #12657a;             /* Petrol, the lead of the scale */
    --petrol-900: #013f4e;
    --petrol-950: #022c37;

    /* Saffron scale, a colour of the product family (2026-10-21). Step 300 is the lead, ink text on it 10.3:1; its action colour is navy 950. Step 100 is cream, the sixth colour of the family: ink on it 14.2:1, its action colour terracotta 700. */
    --saffron-50: #faf7eb;
    --saffron-100: #f5ecc9;            /* Cream, the light companion of saffron: the lead of the cream product and the action colour of terracotta */
    --saffron-200: #ebd790;
    --saffron-300: #e7c952;            /* Saffron, the lead of the scale */
    --saffron-400: #d0ae03;
    --saffron-500: #bb9c02;
    --saffron-600: #9b8102;            /* Saffron as an underline or another graphic on white paper, 3.8:1 (WCAG 3:1 for graphics); not for text, under 4.5:1 */
    --saffron-700: #7f6a01;
    --saffron-800: #5f4f01;
    --saffron-900: #433701;
    --saffron-950: #302600;

    /* Olive scale, the colour of Fraxin (product family round 4, 2026-10-22: the tritanopia view of a classic olive, chosen so it does not merge with terracotta for red-green colour blindness). Generated by phenome-brand palettes/family/curated.mjs scaleOf() on the teal scale's lightness profile, not hand-picked. Step 700 is the lead #71746a; the action colour is cream, saffron 100. Steps 50 to 200 are bent away from cream to keep CIEDE2000 10 from it. */
    --olive-50: #f6f8f0;
    --olive-100: #eaece5;
    --olive-200: #d5d9ce;
    --olive-300: #c3c6bb;
    --olive-400: #afb2a8;
    --olive-500: #9da096;
    --olive-600: #82857a;
    --olive-700: #71746a;              /* Fraxin olive, the lead */
    --olive-800: #4f5148;
    --olive-900: #373930;
    --olive-950: #262820;

    /* Neutral scale: pure grey (chroma 0), lightness from 50 to 975 on the teal scale's OKLab profile, from the light paper (50) to the dark paper (975). Every paper role takes its value from a step; a grey that is not a step does not belong on paper. */
    --neutral-50: #f0f0f0;             /* The light paper */
    --neutral-100: #e5e5e5;
    --neutral-200: #d2d2d2;
    --neutral-300: #bfbfbf;
    --neutral-400: #adadad;
    --neutral-500: #9b9b9b;
    --neutral-600: #818181;
    --neutral-700: #6a6a6a;
    --neutral-800: #505050;
    --neutral-900: #383838;
    --neutral-950: #282828;
    --neutral-975: #1e1e1e;            /* The dark paper */

    --bg-base: #0f2d28;                /* The page canvas, the top of its gradient: step 950 of the product scale in both themes (owner, 2026-10-30), teal 950 for Object */
    --bg-top: #358275;                 /* Bottom of the page gradient (Variant E, OKLab log 9-stop, AA-clamped 4.6:1): #358275 in light, #2e8275 in dark */
    --bg-gradient: linear-gradient(0deg, #358275 0%, #28655a 10%, #21554c 20%, #1c4a42 29%, #18423b 39%, #153b35 49%, #133630 59%, #11312c 68%, #0f2d28 78%); /* 9-stop OKLab logarithmic page gradient (Variant E, 0% to 78%) */
    --bg-surface: #0f2d28;             /* Fill of inputs and controls on the teal page: teal 950, solid (no surface is see-through, owner 2026-10-29) */
    --bg-surface-hover: #0c211d;       /* Fill of a control on the teal page, on hover: teal 975 */
    --bg-panel: #0c211d;               /* Panel on the teal page and the studio surfaces (header, rails, dock, inspector, menus): teal 975, solid */
    --bg-grid-opacity: 0.2;            /* Triangle field (GridBlobBackground, Variant E opacity 0.2) */

    --color-primary: #4ab3a2;          /* Object Teal */
    --color-primary-hover: #68c4b4;    /* Teal fill on hover: teal 400 */
    --color-primary-light: #174039;    /* Teal tint behind a highlighted item, such as a chat message: teal 900 on a teal 975 panel */
    --color-on-primary: #1e1e1e;       /* Label on an Object Teal fill (the open section, the active view): neutral 975, 6.6 : 1 on teal 500 */

    /* State fills as solid steps of a product scale, never a colour over transparent (owner, 2026-10-29). The color-* tints sit on --bg-panel (studio chrome) and on the teal page; the paper-* tints sit on the sheet, and .paper re-points the color-* names to them. A product re-points these to steps of its own scale; hover is one step from the surface, active one step further. */
    --color-primary-tint: #174039;     /* Active or selected item on a panel (rail item, tool, tree row): teal 900 on the teal 975 panel; white on it 11.5:1, Object Teal 4.5:1 */
    --color-primary-tint-hover: #0f2d28; /* Hovered item on a panel: teal 950, one step from the teal 975 panel */
    --color-accent-tint: #522e04;      /* Hovered orange outline control on the page (the header CTA): orange 950; Object Orange on it 5.6:1 */
    --paper-primary-tint: #daf1ec;     /* Active or selected item on the sheet: teal 100 in light, teal 900 in dark */
    --paper-primary-tint-hover: #f1f9f7; /* Hovered item on the sheet: teal 50 in light, teal 950 in dark */
    --paper-accent-tint: #f6eae0;      /* Orange badge or highlight on the sheet: orange 100 in light (orange 900 text on it 6.8:1), orange 950 in dark (Object Orange 5.6:1) */

    /* Paleta pomarańczy: baza / 90% / 80% */
    --color-accent: #fc9a22;           /* Object Orange (orange 500): buttons, download links, the marker of the active tab */
    --color-accent-hover: #e28a1d;     /* Orange fill on hover: orange 600 */
    --color-accent-light: #fcb064;     /* Hover fill of an outlined accent control (the header CTA): a lighter accent under a #1e1e1e label, orange 400 (9.2 : 1); a product binds its own lighter accent step */
    --color-accent-active: #e28a1d;    /* A pressed action: one step darker than the action, orange 600 (owner, 2026-10-30) */
    --color-accent-highlight: #fdc28b; /* Highlight behind ink text and the fill of an orange badge: orange 300, ink on it 10.6:1 */
    --color-on-accent: #1e1e1e;        /* Label on an orange fill: neutral 975 (owner, 2026-10-30: a label is always a neutral step, never a product or action colour); 7.8 : 1 on Object Orange, 9.2 : 1 on orange 400 */
    --color-warn: #e08a5c;             /* Wyłącznie stany błędu */

    --border-light: rgba(255, 255, 255, 0.5); /* Lines and outlines on the teal page */
    --border-focus: #ffffff;           /* Outline of a hovered or focused control on the teal page */

    --glass-fill: #174039;             /* Fill of header buttons and the theme switch on the teal page: teal 900 in light, 950 in dark, solid (white on it 11.5:1) */
    --glass-fill-hover: #0f2d28;       /* Header button fill on hover: teal 950 in light, 975 in dark */
    --glass-blur: 4px;                 /* No longer used in the kit: nothing blurs what is behind it (owner, 2026-10-29). Kept so that a consumer still reading it resolves */

    --text-main: #ffffff;              /* Text on the teal page */
    --text-muted: rgba(255, 255, 255, 0.82); /* Secondary text on the teal page */
    --text-dark: #1e1e1e;              /* Ink on the sheet, the same in every product: neutral 975 on the light sheet, neutral 50 on the dark one (14.6:1 both ways) */
    --text-on-teal: #ffffff;           /* White on teal, also inside paper: paper does not re-point it */

    /* Papier arkusza i karty wewnątrz niego. */
    --paper: #f0f0f0;                  /* The sheet, one neutral paper for every product (owner, 2026-10-29): neutral 50 in light, neutral 975 in dark. The product colour stays the page, the action and the accents */
    --paper-text-muted: #505050;       /* Secondary text on paper: neutral 800 in light (7.1:1 on paper, 5.3:1 on a hovered card; 700 fell to 3.6:1 there), neutral 400 in dark (7.4:1, 5.2:1) */
    --paper-line: #bfbfbf;             /* Lines and outlines on paper: neutral 300 in light, 800 in dark */
    --paper-line-focus: #818181;       /* Outline of a hovered or focused control on paper: neutral 600 in both themes (3.4:1 on the light sheet, 4.3:1 on the dark one) */
    --paper-card: #e5e5e5;             /* Card fill inside paper: neutral 100 in light, 950 in dark */
    --paper-card-hover: #d2d2d2;       /* Card fill inside paper, on hover: neutral 200 in light, 900 in dark */
    --surface-section: #e5e5e5;        /* A framed, foldable section inside a panel (inspector sections, PropertyGrid, kit-editor framed sections): one neutral step off the panel paper, so the frame has its own fill as in the rail demo inspector (owner, 2026-11-16): neutral 100 in light, 950 in dark, every product */
    --surface-section-hover: #d2d2d2;  /* A section header on hover or focus: one step further from the paper than --surface-section, neutral 200 in light, 900 in dark */
    --paper-teal: #215b52;             /* Teal text on the sheet (links, headings in an editor): teal 800 in light (6.9:1 on paper, 5.2:1 on a hovered card), Object Teal in dark (6.6:1, 4.6:1) */
    --paper-orange: #76450a;           /* Orange text on the sheet: orange 900 in light (7.0:1 on paper, 5.3:1 on a hovered card), Object Orange in dark (7.8:1, 5.5:1) */
    --paper-tabs: #e5e5e5;             /* Tab strip at the top of a sheet, a step off the sheet: neutral 100 in light, 950 in dark */
    --paper-tab-active: #f0f0f0;       /* The open tab in the strip: the sheet colour in both themes, neutral 50 and 975 */

    /* Controls by state (owner, 2026-10-30, the control tuner's rules). On the canvas a control climbs the product scale from the page: rest is the canvas, hover and focus one step lighter, selected two, the selected one's hover three, pressed is rest; label, line and focus ring are one neutral ink in every state. On paper it climbs the neutral scale from the paper the same way; a selected tool takes the product's tint with a product line and icon and keeps the ink. Disabled keeps the surface and greys label and line. A product binds the steps of its own scale. */
    --nav-fill: #0f2d28;               /* A control on the canvas at rest (nav link, menu toggle, theme and language switch, the CTA): the canvas, teal 950 */
    --nav-fill-hover: #174039;         /* Its hover and focus: one step lighter, teal 900 */
    --nav-fill-selected: #215b52;      /* The current section: two steps lighter, teal 800 */
    --nav-fill-selected-hover: #2c7a6e; /* The current section on hover and focus: three steps lighter, teal 700 */
    --nav-ink: #f0f0f0;                /* Label, line and focus ring of a control on the canvas in every state: neutral 50 */
    --canvas-disabled-ink: #adadad;    /* Label and line of a disabled control on the canvas: neutral 400 (WCAG exempts disabled controls from 4.5:1) */
    --paper-fill-hover: #e5e5e5;       /* A control on paper on hover and focus: one neutral step off the paper, neutral 100 in light, 950 in dark */
    --paper-fill-selected: #d2d2d2;    /* A selected item of a menu on paper: two neutral steps off the paper, neutral 200 in light, 900 in dark */
    --paper-cue: #215b52;              /* Line and icon of a selected tool on paper: the product's step 800 in light, 300 in dark; teal for Object */
    --paper-disabled-ink: #6a6a6a;     /* Label and line of a disabled control on paper: neutral 700 in light (4.8:1, owner 2026-11-12), 400 in dark (7.4:1) */
}

[data-theme="dark"] {
    --bg-top: #2e8275;
    --bg-gradient: linear-gradient(0deg, #2e8275 0%, #24655a 10%, #1e554c 20%, #1a4a42 29%, #17423b 39%, #143b35 49%, #123630 59%, #11312c 68%, #0f2d28 78%);
    --bg-grid-opacity: 0.2;
    --paper-primary-tint: #174039;
    --paper-primary-tint-hover: #0f2d28;
    --paper-accent-tint: #522e04;
    --glass-fill: #0f2d28;
    --glass-fill-hover: #0c211d;
    --text-dark: #f0f0f0;
    --paper: #1e1e1e;
    --paper-text-muted: #adadad;
    --paper-line: #505050;
    --paper-line-focus: #818181;
    --paper-card: #282828;
    --paper-card-hover: #383838;
    --surface-section: #282828;
    --surface-section-hover: #383838;
    --paper-teal: #4ab3a2;
    --paper-orange: #fc9a22;
    --paper-tabs: #282828;
    --paper-tab-active: #1e1e1e;
    --paper-fill-hover: #282828;
    --paper-fill-selected: #383838;
    --paper-cue: #8cd5c7;
    --paper-disabled-ink: #adadad;
}
}


@layer tokens, product, kit, app;

/* Layout and motion values of the kit, hand-written: they change at breakpoints
   or are built with calc(), which tokens.json does not describe. Brand colours
   and fonts are in tokens.css, generated from tokens.json. */

@layer kit {
:root {
    --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-medium: 0.3s cubic-bezier(0.16, 1, 0.3, 1);

    /* Spacing scale (owner decision 2026-11-12): padding, margin and gap take one of these steps and
       nothing in between; 48 and 64 are for large empty space. A value that is not a step is rounded
       down to the nearest one. Offsets under 4px (1 to 3px) are line nudges, not spacing, and stay
       literal. */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* Siatka strony. Jeden kontener dla nagłówka, treści i stopki:
         S  < 640       gutter 16
         M  640–1023    gutter 24
         L  ≥ 1024      gutter 32, kontener zatrzymany na 1200px (XL od 1440)
       Progi stoją literalnie w @media, bo var() nie działa w warunku. */
    --gutter: var(--space-4);
    --container: min(100% - 2 * var(--gutter), 1200px);
}

@media (width >= 640px) {
    :root { --gutter: var(--space-5); }
}

@media (width >= 1024px) {
    :root { --gutter: var(--space-6); }
}
}

/* Canonical selectors are owned by @object/themes. */
/* Light and dark theme. tokens.css declares the light values on :root and the
   dark ones under [data-theme="dark"], re-pointing the same names, so no
   component carries code per theme. theme/themeInit.js puts the attribute on
   <html> before the first paint; without it a page stays light, which is how
   object.pl, the print templates and the PDF service see it.

   data-theme="light" on any other element keeps the light theme inside a
   dark page: print and PDF previews, the brand field, e-mail signatures. Such
   an element starts from the theme's canvas, white text on teal; a light
   sheet inside it is a .paper of its own or sets its colours from the paper
   tokens (--paper, --text-dark, --paper-line), as the letterhead does. */

@layer tokens, product, kit, app;

@layer tokens {
:root,
[data-theme="light"] {
    color-scheme: light;
}

[data-theme="dark"] {
    color-scheme: dark;
}

/* An element with its own theme does not inherit the page's text colour.
   Zero specificity: any class that sets a colour wins, wherever it loads. */
:where([data-theme]) {
    color: var(--text-main);
}
}


@layer tokens, product, kit, app;

/* Reset, the page frame and the background layers. The window scrolls; there
   is no viewport-high frame and no scroll region inside a card. */

@layer kit {
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
}

body {
    font-family: var(--font-sans);
    background-color: transparent;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

#root {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    width: 100%;
}

.container {
    width: var(--container);
    margin-inline: auto;
}

/* The page background, the same in every app on the kit
   (https://ci.apps.object.pl/imagery/page-background/):
     1. the gradient below, from --bg-top at the bottom to --bg-base at 78% of
        the height, with --bg-base on html as the solid colour under it;
     2. the triangle field, GridBlobBackground's SVG in React or the canvas of
        mountGridBlob() (components/layout/gridBlobCanvas.ts) without it.
   The gradient sits on a fixed pseudo-element of html, not on
   background-attachment: fixed, which iOS Safari ignores and which would
   stretch the gradient over the whole length of a long page. Its height is
   100lvh, the window with Safari's toolbars retracted, so no strip of the
   solid colour shows at the bottom while they slide away. There is no dot
   grid: the 24 px dots of the earlier layer beat against the 20 px triangles. */
html::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 100vh;
    height: 100lvh;
    z-index: -5;
    pointer-events: none;
    background: var(--bg-gradient, linear-gradient(
      0deg,
      var(--bg-top) 0%,
      color-mix(in oklab, var(--bg-top), var(--bg-base) 32.74%) 10%,
      color-mix(in oklab, var(--bg-top), var(--bg-base) 51.19%) 20%,
      color-mix(in oklab, var(--bg-top), var(--bg-base) 64.10%) 29%,
      color-mix(in oklab, var(--bg-top), var(--bg-base) 74.04%) 39%,
      color-mix(in oklab, var(--bg-top), var(--bg-base) 82.12%) 49%,
      color-mix(in oklab, var(--bg-top), var(--bg-base) 88.93%) 59%,
      color-mix(in oklab, var(--bg-top), var(--bg-base) 94.82%) 68%,
      var(--bg-base) 78%
    )), var(--bg-base);
}

html::after {
    opacity: var(--bg-grid-opacity, 0.2);
}

/* A fixed element repeats on every printed sheet; print gets no page background. */
@media print {
    html::before {
        content: none;
    }
}

.grid-blob-svg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -3;
    opacity: var(--bg-grid-opacity, 0.2);
}

/* Content always starts 32px under the header; nothing is centred vertically. */
.site-main {
    flex: 1;
    padding-block: var(--space-6) var(--space-8);
}

/* One section is shown at a time. Inactive ones leave the flow so lazy images
   inside them do not load until the section is opened. */
.slide {
    display: none;
}

.slide.active {
    display: block;
    animation: slide-in 0.24s ease-in;
}

/* Visible by default: the animation only adds the fade, the resting state is
   opacity 1 whether or not it runs. */
@keyframes slide-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .slide.active { animation: none; }
}

/* Utilities */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
}

@layer tokens, product, kit, app;

/* Shared controls: the orange button, the glass panel and the paper token set. */

/* The action button (ActionLink on the canvas, .btn-secondary on paper). Also used as a plain link
   (<a class="btn-secondary">). The action colour at rest, one step lighter on hover and focus
   (--color-accent-light), one step darker pressed (--color-accent-active), under --color-on-accent. On the
   canvas its line is its fill; on paper a 1px line in the paper's ink, so its shape shows on either paper
   whatever the action colour (owner, 2026-10-30). */

@layer kit {
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background-color: var(--color-accent);
    color: var(--color-on-accent);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 44px;
    padding: 0 var(--space-5);
    border: 1px solid var(--color-accent);
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    border-color: var(--color-accent-light);
    background-color: var(--color-accent-light);
    color: var(--color-on-accent);
}

/* The focus ring sits outside the button, so it takes the ink of the surface around it (owner, 2026-11-12): the
   canvas ink here, the paper's ink on a sheet and in the studio. */
.btn-secondary:focus-visible {
    outline-color: var(--nav-ink);
}

:is(.paper, .v2-studio-app) .btn-secondary:focus-visible {
    outline-color: var(--text-dark);
}

.btn-secondary:active {
    border-color: var(--color-accent-active);
    background-color: var(--color-accent-active);
    color: var(--color-on-accent);
}

/* The animated action (owner, 2026-11-12): an action button whose fill is a linear gradient between the action
   colour and its darker pressed step, moving steadily from left to right. Both stops are solid steps of the palette
   under the same --color-on-accent label, so the label keeps its contrast at every frame. The gradient repeats
   every 200% of the width and moves by exactly that much, so the loop has no jump. Hover and focus stop it on the
   plain action colour; pressed is the darker step. Still for anyone who asks the system for less motion. One per
   view: it marks the single most important action. */
.btn-secondary.btn-animated:not(:is(:disabled, [aria-disabled="true"])) {
    background-image: linear-gradient(90deg,
        var(--color-accent) 0%,
        var(--color-accent-active) 50%,
        var(--color-accent) 100%);
    background-size: 200% 100%;
    animation: btn-animated-drift 4s linear infinite;
}

/* Hover, focus and press take the plain state fills, as every action button does. */
.btn-secondary.btn-animated:is(:hover, :focus-visible, :active) {
    background-image: none;
    animation: none;
}

@keyframes btn-animated-drift {
    from { background-position: 0% 50%; }
    to { background-position: 200% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .btn-secondary.btn-animated:not(:is(:disabled, [aria-disabled="true"])) {
        background-image: none;
        animation: none;
    }
}

.paper .btn-secondary,
.paper .btn-secondary:hover,
.paper .btn-secondary:focus-visible,
.paper .btn-secondary:active {
    border-color: var(--text-dark);
}

/* Disabled on the canvas: the canvas with a grey label and line; on paper the paper with its grey. */
.btn-secondary:is(:disabled, [aria-disabled="true"]) {
    border-color: var(--canvas-disabled-ink);
    background-color: var(--nav-fill);
    color: var(--canvas-disabled-ink);
    cursor: default;
}

.paper .btn-secondary:is(:disabled, [aria-disabled="true"]) {
    border-color: var(--paper-disabled-ink);
    background-color: var(--paper);
    color: var(--paper-disabled-ink);
}

/* The outline link (OutlineLink): a link in the action colour on the canvas, with a 1px line in the same colour
   and no fill. Its text is the action colour, not a neutral step: it is a link, not a button (owner,
   2026-10-30). Hover and focus one step lighter, pressed the action colour, disabled grey. */
.ph-button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-accent);
    border-radius: 0;
    background: transparent;
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.3;
    text-decoration: none;
    text-transform: uppercase;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.ph-button-outline:hover,
.ph-button-outline:focus-visible {
    border-color: var(--color-accent-light);
    color: var(--color-accent-light);
}

.ph-button-outline:active {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.ph-button-outline[aria-disabled="true"] {
    border-color: var(--canvas-disabled-ink);
    color: var(--canvas-disabled-ink);
    cursor: default;
}

/* On paper the action colour itself is too light in the light theme (cream on light paper is 1.0:1), so the
   outline link takes the action as text on paper, --paper-orange, which every palette sets to 4.5:1 or more on
   the sheet. Hover and focus take the paper's hover fill. */
.paper .ph-button-outline:not([aria-disabled="true"]) {
    border-color: var(--paper-orange);
    color: var(--paper-orange);
}

.paper .ph-button-outline:not([aria-disabled="true"]):is(:hover, :focus-visible) {
    background: var(--paper-fill-hover);
}

.paper .ph-button-outline[aria-disabled="true"] {
    border-color: var(--paper-disabled-ink);
    color: var(--paper-disabled-ink);
}

.btn-secondary i {
    font-size: 15px;
}

/* Focus ring of every interactive element the kit does not style itself: a 1px line in the element's own text
   colour, 2px off its edge, as the checkbox draws it (owner, 2026-10-30), instead of the browser's blue ring.
   :where keeps it at zero specificity, so a control's own :focus-visible rule wins. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 2px;
}

/* Checkbox: a square box drawn by the kit in every engine (owner, 2026-10-30), not the browser's rounded, blue
   native one. The line and the checked fill are the ink of the surface it sits on (--text-dark on the paper),
   the tick is that surface's own colour; a product overrides the variables, never the shape. */
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-content: center;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid var(--checkbox-line, var(--text-dark));
    border-radius: 0;
    background-color: var(--checkbox-fill, var(--paper));
    vertical-align: middle;
    cursor: pointer;
}

/* The tick is a shape filled with the surface colour, not a border: no line in the kit is over 1px. */
input[type="checkbox"]::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--checkbox-tick, var(--paper));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 5.2 3.8 8 9 2' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 5.2 3.8 8 9 2' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
    visibility: hidden;
}

input[type="checkbox"]:hover,
input[type="checkbox"]:focus-visible {
    background-color: var(--checkbox-fill-hover, var(--paper-fill-hover));
}

input[type="checkbox"]:active {
    background-color: var(--checkbox-fill, var(--paper));
}

input[type="checkbox"]:checked {
    background-color: var(--checkbox-checked, var(--text-dark));
}

input[type="checkbox"]:checked::before {
    visibility: visible;
}

input[type="checkbox"]:focus-visible {
    outline: 1px solid var(--checkbox-line, var(--text-dark));
    outline-offset: 2px;
}

input[type="checkbox"]:disabled {
    border-color: var(--paper-disabled-ink);
    background-color: var(--checkbox-fill, var(--paper));
    cursor: default;
}

input[type="checkbox"]:disabled:checked {
    background-color: var(--paper-disabled-ink);
}

.glass-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 0;
    box-shadow: none;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.glass-panel:hover {
    border-color: var(--border-focus);
    background: var(--bg-surface-hover);
}

/* Paper: every sheet on the site. Text and line tokens inside it are re-pointed
   to the dark palette, so components read the same variable names on paper and
   on teal. The sheet is solid and blurs nothing: the page canvas never shows
   through it (test/paper-solid.test.mjs in object-ci). */
.paper {
    --text-main: var(--text-dark);
    --text-muted: var(--paper-text-muted);
    --border-light: var(--paper-line);
    --border-focus: var(--paper-line-focus);
    --bg-surface: var(--paper-card);
    --bg-surface-hover: var(--paper-card-hover);
    --color-primary-tint: var(--paper-primary-tint);
    --color-primary-tint-hover: var(--paper-primary-tint-hover);
    --color-accent-tint: var(--paper-accent-tint);
    background: var(--paper);
    color: var(--text-dark);
}

/* Cards on paper carry no outline: the solid card fill is enough to read them. */
.paper .glass-panel {
    border: none;
}

/* Desaturated so photos sit quietly next to the teal and white UI. */
.paper img.frame-photo {
    filter: saturate(0.5);
}

/* The open list of a plain select (owner, 2026-11-14: the apps index list had round corners). The browser draws
   the list itself, round and shadowed, unless the page opts into customizable selects. Where it does (appearance:
   base-select, Chromium 135 and later) the list is a kit surface: square, a 1px line in the control's ink, no
   shadow, the surface's solid fill, the highlighted option one step off it without a radius. A select that is a
   list box (multiple, size) and a browser without base-select keep the native control. The selectors sit in
   :where, so an app's own select CSS and StudioSelect's rules (studio.css) win over them. On the canvas the list
   takes the navigation fill and ink; on paper and in the studio the paper and the dark ink. */
@supports (appearance: base-select) {
    :where(select:not([multiple], [size])) {
        --kit-select-fill: var(--nav-fill);
        --kit-select-fill-hover: var(--nav-fill-hover);
        --kit-select-fill-selected: var(--nav-fill-selected);
        --kit-select-ink: var(--nav-ink);
    }

    :where(.paper, .v2-studio-app) :where(select:not([multiple], [size])) {
        --kit-select-fill: var(--paper);
        --kit-select-fill-hover: var(--paper-fill-hover);
        --kit-select-fill-selected: var(--paper-fill-selected);
        --kit-select-ink: var(--text-dark);
    }

    :where(select:not([multiple], [size])),
    :where(select:not([multiple], [size]))::picker(select) {
        appearance: base-select;
    }

    :where(select:not([multiple], [size]))::picker(select) {
        margin: 0;
        padding: 0;
        border: 1px solid var(--kit-select-ink);
        border-radius: 0;
        box-shadow: none;
        background: var(--kit-select-fill);
        color: var(--kit-select-ink);
    }

    :where(select:not([multiple], [size])) option {
        padding: var(--space-2) var(--space-3);
        border-radius: 0;
        background: var(--kit-select-fill);
        color: var(--kit-select-ink);
        font: inherit;
    }

    :where(select:not([multiple], [size])) option::checkmark {
        display: none;
    }

    :where(select:not([multiple], [size])) option:is(:hover, :focus-visible) {
        background: var(--kit-select-fill-hover);
        outline: none;
    }

    :where(select:not([multiple], [size])) option:checked {
        background: var(--kit-select-fill-selected);
    }

    :where(select:not([multiple], [size])) option:disabled {
        opacity: 0.5;
    }
}
/* Select (components/ui/Select.tsx) and StudioSelect: the kit draws the open list itself (owner, 2026-11-15: the
   apps index list was still round in Firefox, which ignores ::picker(select)). The control is a button with the
   value and the kit's caret; the list is a role="listbox" in the top layer, square, a 1px line in the control's
   ink, the surface's solid fill and the float shadow, since it lies over the content. The active option (pointer
   or arrow keys) is one fill step off the list; the chosen option is the selected fill with a bolder label, and
   when it is also active it adds the kit's focus cue, a 1px line in its label colour inset 3px. On the canvas
   the control takes the navigation fill and ink; on paper and in the studio the paper and the dark ink. */
.kit-select {
    --kit-select-fill: var(--nav-fill);
    --kit-select-fill-hover: var(--nav-fill-hover);
    --kit-select-fill-selected: var(--nav-fill-selected);
    --kit-select-ink: var(--nav-ink);
    --kit-select-disabled-ink: var(--canvas-disabled-ink);
    position: relative;
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    vertical-align: middle;
}

:is(.paper, .v2-studio-app) .kit-select {
    --kit-select-fill: var(--paper);
    --kit-select-fill-hover: var(--paper-fill-hover);
    --kit-select-fill-selected: var(--paper-fill-selected);
    --kit-select-ink: var(--text-dark);
    --kit-select-disabled-ink: var(--paper-disabled-ink);
}

.kit-select__button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 36px;
    margin: 0;
    padding: 0 var(--space-3);
    border: 1px solid var(--kit-select-ink);
    border-radius: 0;
    background: var(--kit-select-fill);
    color: var(--kit-select-ink);
    font: var(--kit-select-font, 14px var(--font-sans));
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.kit-select__button:is(:hover, :focus-visible, [aria-expanded="true"]):not(:disabled) {
    background: var(--kit-select-fill-hover);
}

.kit-select__button:disabled {
    border-color: var(--kit-select-disabled-ink);
    color: var(--kit-select-disabled-ink);
    cursor: default;
}

.kit-select__value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kit-select__caret {
    flex: none;
}

/* The value's native select: in the form, out of sight, out of the tab order and the accessibility tree. */
.kit-select__native {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    opacity: 0;
    pointer-events: none;
    appearance: none;
}

/* The script places the list (position: fixed, top and left in px) and sets --listbox-room to the space between
   the control and the edge of the viewport. The rules override the browser's popover defaults (inset 0, margin
   auto, a 2px frame). */
.kit-listbox {
    position: fixed;
    inset: auto;
    z-index: 1000;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    max-height: min(var(--listbox-room, 20rem), 20rem);
    max-width: min(32rem, calc(100vw - 16px));
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--kit-select-ink);
    border-radius: 0;
    background: var(--kit-select-fill);
    color: var(--kit-select-ink);
    box-shadow: var(--shadow-float);
    font: var(--kit-select-font, 14px var(--font-sans));
    letter-spacing: normal;
    text-transform: none;
}

.kit-listbox__option {
    display: block;
    padding: var(--space-2) var(--space-3);
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.kit-listbox__option.is-active {
    background: var(--kit-select-fill-hover);
}

.kit-listbox__option[aria-selected="true"] {
    background: var(--kit-select-fill-selected);
    font-weight: 600;
}

.kit-listbox__option[aria-selected="true"].is-active {
    outline: 1px solid currentColor;
    outline-offset: -3px;
}

.kit-listbox__option[aria-disabled="true"] {
    color: var(--kit-select-disabled-ink);
    cursor: default;
}

}

@layer tokens, product, kit, app;

/* Site header: one component for every page, the landing pages included
   (scripts/prerender.mjs inlines this file there).

     < 880       row 1: logo + tagline | AI      row 2: menu button + actions
     880–1279    row 1: logo + tagline | AI      row 2: sections | actions
     ≥ 1280      one row: logo | sections | actions | AI

   Row 2 needs ≈ 796px (sections ≈ 513 + 16 + actions ≈ 267 with the theme
   switch), which fits the 816px container at 880. Below that the sections fold
   into the menu button instead of wrapping to a second line. Until 2026-10-14
   the step was at 820, before the switch made the actions 46px wider.

   Compact (site-header-inner--compact), for a site with two or three short
   sections, such as the project wiki:

     < 640       as above: menu button + actions under the logo
     ≥ 640       one row: logo | sections | actions | AI

   One row needs ≈ 560px with two sections and three actions, which fits the
   592px container at 640. */

@layer kit {
.site-header {
    position: relative;
    z-index: 30;
    padding-top: var(--gutter);
    /* No band of its own (owner, 2026-10-30): the header is page canvas, the triangle field runs behind it as
       behind the rest of the page. Its buttons and links keep their own solid fills. */
}

.site-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "brand brand ai"
        "toggle actions actions";
    align-items: center;
    column-gap: var(--space-2);
    row-gap: var(--space-4);
}

.brand {
    --logo-w: 128px;
    grid-area: brand;
    justify-self: start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
}

.logo-link {
    display: block;
    text-decoration: none;
}

.logo-image {
    width: var(--logo-w);
    height: auto;
    display: block;
}

/* A product site's name beside the logo (SiteHeader's brandName): Plex Sans
   300 at the logo's height, after a rule, the tagline still under the logo
   alone. object.pl passes no name and keeps the column above. */
.brand--named {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
        "logo name"
        "tagline .";
    align-items: center;
    column-gap: var(--space-4);
    row-gap: var(--space-2);
}

.brand--named .logo-link { grid-area: logo; }
.brand--named .logo-tagline { grid-area: tagline; }

.brand-name {
    grid-area: name;
    align-self: stretch;
    display: flex;
    align-items: center;
    padding-left: var(--space-4);
    border-left: 1px solid var(--border-light);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
}

.brand-name:hover {
    border-left-color: var(--border-focus);
}

@media (width < 360px) {
    .brand--named { column-gap: var(--space-3); }
    .brand-name { padding-left: var(--space-3); font-size: 24px; }
}

/* The triad under the logo, spread over exactly the logo's width so both end on
   the same vertical. Plex Mono capitals, as the tagline is set on every
   document and in the e-mail signature; at 9 px with 1 px tracking the three
   words measure the logo's 128 px. Each word fades out and back in on its own
   phase; one 13.6 s cycle for all three, no script. */
.logo-tagline {
    display: flex;
    width: var(--logo-w);
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--text-muted);
    white-space: nowrap;
    pointer-events: none;
}

.logo-tagline-word {
    animation: logo-tagline-cycle 13.6s ease-in-out infinite;
}

.logo-tagline-word:nth-child(2) { animation-delay: 0.4s; }
.logo-tagline-word:nth-child(3) { animation-delay: 0.8s; }

@keyframes logo-tagline-cycle {
    0%, 73.53% { opacity: 1; }
    77.21%, 90.44% { opacity: 0; }
    94.12%, 100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .logo-tagline-word { animation: none; }
}

/* Sections */
.site-nav {
    grid-area: nav;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: var(--space-2);
}

/* The menu's copies of the actions exist for the phone only. */
.site-nav .nav-menu-action {
    display: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 36px;
    padding: 0 var(--space-1);
    /* The ladder of a control on the canvas (owner, 2026-10-30, state tokens in @object/themes): at rest the
       canvas itself, hover and focus one step lighter, the open section two, pressed back to rest; label and
       line one neutral ink in every state. A product binds the steps of its own scale. */
    border: 1px solid var(--nav-ink);
    background: var(--nav-fill);
    color: var(--nav-ink);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
    background: var(--nav-fill-hover);
}

.nav-link:active {
    background: var(--nav-fill);
}

/* The open section: two steps lighter than the canvas, three on hover and focus; pressed it returns to two. */
.nav-link.active {
    background: var(--nav-fill-selected);
}

.nav-link.active:hover,
.nav-link.active:focus-visible {
    background: var(--nav-fill-selected-hover);
}

.nav-link.active:active {
    background: var(--nav-fill-selected);
}

/* Disabled: the canvas with a grey label and line. */
.nav-link[aria-disabled="true"],
.nav-link[aria-disabled="true"]:hover {
    border-color: var(--canvas-disabled-ink);
    background: var(--nav-fill);
    color: var(--canvas-disabled-ink);
    cursor: default;
}

/* Actions: demos, software, the audit. One group, the only orange in the header. */
.nav-actions {
    grid-area: actions;
    justify-self: start;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    height: 36px;
    padding: 0 var(--space-2);
    border: 1px solid var(--color-accent);
    background: var(--nav-fill);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* At rest the canvas with the action colour as its 1px line and the canvas ink as label; hover and focus fill
       with the action colour one step lighter (--color-accent-light), pressed with the action colour, both under
       --color-on-accent. */
    color: var(--nav-ink);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.nav-cta:hover,
.nav-cta:focus-visible {
    background: var(--color-accent-light);
    border-color: var(--color-accent-light);
    color: var(--color-on-accent);
}

/* The focus ring sits outside the button, on the canvas: the canvas ink, not the label ink of the fill (owner,
   2026-11-12). */
.nav-cta:focus-visible {
    outline-color: var(--nav-ink);
}

.nav-cta:active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-on-accent);
}

.nav-cta[aria-disabled="true"],
.nav-cta[aria-disabled="true"]:hover {
    border-color: var(--canvas-disabled-ink);
    background: var(--nav-fill);
    color: var(--canvas-disabled-ink);
    cursor: default;
}

.nav-toggle,
.ai-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid var(--nav-ink);
    background: var(--nav-fill);
    color: var(--nav-ink);
    line-height: 1;
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.nav-toggle:hover,
.nav-toggle:focus-visible,
.ai-toggle:hover,
.ai-toggle:focus-visible {
    background: var(--nav-fill-hover);
}

.nav-toggle:active,
.ai-toggle:active {
    background: var(--nav-fill);
}

/* The open menu is the toggle's selected state: two steps lighter, as the open section. */
.nav-toggle[aria-expanded="true"] {
    background: var(--nav-fill-selected);
}

.nav-toggle:disabled,
.ai-toggle:disabled {
    border-color: var(--canvas-disabled-ink);
    background: var(--nav-fill);
    color: var(--canvas-disabled-ink);
    cursor: default;
}

.nav-toggle {
    grid-area: toggle;
    font-size: 20px;
}

/* The AI assistant's entry, on the right edge of the container. */
.ai-toggle {
    grid-area: ai;
    justify-self: end;
    align-self: start;
    font-size: 18px;
}

.ai-toggle.is-open {
    background: var(--nav-fill-selected);
}

/* Below 880 the sections live in a list under the menu button. Positioned
   against the header, under it and in line with the container. The list is a
   small sheet, so it takes the paper colours: light in the light theme, dark
   teal in the dark one. */
@media (width < 880px) {
    .site-nav {
        grid-area: toggle;
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: var(--gutter);
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-1);
        min-width: 200px;
        padding: var(--space-2);
        border: 1px solid var(--paper-line);
        background: var(--paper);
        box-shadow: 0 8px 24px rgba(12, 33, 29, 0.25);
    }

    .site-nav.is-open {
        display: flex;
    }

    /* On the menu's paper the items climb the neutral scale from the paper, as on the canvas they climb the
       product's: the paper at rest, one step on hover and focus, two for the open section; the paper's ink as
       label. No line round an item: the menu's items are rows, not framed buttons (owner, 2026-11-12). */
    .nav-link {
        height: auto;
        padding: var(--space-2) var(--space-4);
        justify-content: flex-start;
        border-color: transparent;
        background: var(--paper);
        color: var(--text-dark);
    }

    .nav-link:hover,
    .nav-link:focus-visible,
    .nav-link.active:hover,
    .nav-link.active:focus-visible {
        background: var(--paper-fill-hover);
    }

    .nav-link:active { background: var(--paper); }

    .nav-link.active,
    .nav-link.active:active {
        background: var(--paper-fill-selected);
    }

    .nav-link[aria-disabled="true"],
    .nav-link[aria-disabled="true"]:hover {
        border-color: transparent;
        background: var(--paper);
        color: var(--paper-disabled-ink);
    }
}

@media (880px <= width < 1280px) {
    .site-header-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand ai"
            "nav actions";
    }

    .nav-toggle { display: none; }
}

@media (width >= 1280px) {
    .site-header-inner {
        grid-template-columns: auto 1fr auto auto;
        grid-template-areas: "brand nav actions ai";
        align-items: start;
        column-gap: var(--space-6);
    }

    .nav-toggle { display: none; }

    .nav-link {
        font-size: 13px;
        padding: 0 var(--space-3);
    }

    .nav-actions { gap: var(--space-2); }

    .nav-cta {
        font-size: 12px;
        padding: 0 var(--space-3);
    }

    .ai-toggle { margin-left: calc(-1 * var(--space-4)); }

    /* No assistant on the site: the actions close the row at the right edge. */
    .site-header-inner--no-ai {
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "brand nav actions";
    }
}

/* Compact header from 640: one row at every width, the sections stay inline. */
@media (width >= 640px) {
    .site-header-inner.site-header-inner--compact {
        grid-template-columns: auto 1fr auto auto;
        grid-template-areas: "brand nav actions ai";
        align-items: start;
        column-gap: var(--space-5);
    }

    .site-header-inner--compact.site-header-inner--no-ai {
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "brand nav actions";
    }

    .site-header-inner--compact .nav-toggle { display: none; }
}

/* Between 640 and 880 the compact header undoes the menu list above. */
@media (640px <= width < 880px) {
    .site-header-inner--compact .site-nav {
        grid-area: nav;
        display: flex;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: var(--space-2);
        min-width: 0;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
    }

    .site-header-inner--compact .nav-link {
        height: 36px;
        padding: 0 var(--space-1);
        justify-content: center;
        border-color: var(--nav-ink);
        background: var(--nav-fill);
        color: var(--nav-ink);
    }

    .site-header-inner--compact .nav-link:hover,
    .site-header-inner--compact .nav-link:focus-visible { background: var(--nav-fill-hover); }
    .site-header-inner--compact .nav-link:active { background: var(--nav-fill); }
    .site-header-inner--compact .nav-link.active,
    .site-header-inner--compact .nav-link.active:active { background: var(--nav-fill-selected); }
    .site-header-inner--compact .nav-link.active:hover,
    .site-header-inner--compact .nav-link.active:focus-visible { background: var(--nav-fill-selected-hover); }
}

@media (width >= 1280px) {
    .site-header-inner.site-header-inner--compact { column-gap: var(--space-6); }
}

/* The narrowest phones: menu button, three actions and the theme switch need
   about 293px, 5px more than a 320px screen leaves. Tighter gaps and padding. */
@media (width < 360px) {
    .nav-actions { gap: var(--space-1); }
    .nav-cta { padding: 0 var(--space-2); }
}

/* A product site's header (SiteHeader's logoAtEnd: phenome, fraxin, tila .object.pl). Object's logo is in
   the footer of these sites, not here (owner, 2026-11-26).
   object.pl and the tools keep everything above; these rules only apply under
   .site-header-inner--product (owner, 2026-10-23).

   Geometry: one 36 px border-box height for controls and visible wordmark
   artwork. Phenome's viewBox includes its round-letter overshoot. Object's
   actual 220 x 100 SVG has an O bbox of (-0.000001, 0.000001, 39.996629,
   69.999375): compensate both its height and its tiny top inset. The link
   remains one button tall; the j's tail hangs below without enlarging the row.

   Colour: the navigation (sections, language, theme, menu) follows object.pl's
   ladder in the product's steps, and the action (.nav-cta) the same rules as
   on object.pl (the state tokens of @object/themes). */
.site-header-inner--product {
    --product-button-height: 36px;
    row-gap: var(--space-4);
}

.site-header-inner--product .nav-link,
.site-header-inner--product .nav-cta,
.site-header-inner--product .nav-toggle,
.site-header-inner--product .theme-toggle,
.site-header-inner--product .lang-switch {
    height: var(--product-button-height);
}

.site-header-inner--product .brand--own .brand-name {
    align-self: start;
    height: var(--product-button-height);
    padding-left: 0;
    border-left: 0;
}

.site-header-inner--product .brand--own .brand-name svg {
    display: block;
    width: auto;
    height: var(--product-button-height);
    overflow: visible;
}


.site-header-inner--product .nav-link,
.site-header-inner--product .nav-toggle,
.site-header-inner--product .theme-toggle,
.site-header-inner--product .lang-switch {
    /* The same ladder as object.pl's header, in the product's steps (its stylesheet binds --nav-fill*). */
    border: 1px solid var(--nav-ink);
    background: var(--nav-fill);
    color: var(--nav-ink);
}

.site-header-inner--product .nav-link:hover,
.site-header-inner--product .nav-link:focus-visible,
.site-header-inner--product .nav-toggle:hover,
.site-header-inner--product .nav-toggle:focus-visible,
.site-header-inner--product .theme-toggle:hover,
.site-header-inner--product .theme-toggle:focus-visible,
.site-header-inner--product .lang-switch:hover,
.site-header-inner--product .lang-switch:focus-visible {
    background: var(--nav-fill-hover);
}

.site-header-inner--product .nav-link:active,
.site-header-inner--product .nav-toggle:active,
.site-header-inner--product .theme-toggle:active,
.site-header-inner--product .lang-switch:active {
    background: var(--nav-fill);
}

.site-header-inner--product .nav-link.active,
.site-header-inner--product .nav-link.active:active,
.site-header-inner--product .nav-toggle[aria-expanded="true"] {
    background: var(--nav-fill-selected);
}

.site-header-inner--product .nav-link.active:hover,
.site-header-inner--product .nav-link.active:focus-visible {
    background: var(--nav-fill-selected-hover);
}

.site-header-inner--product .nav-link.active:active {
    background: var(--nav-fill-selected);
}

.site-header-inner--product :is(.nav-link, .nav-cta)[aria-disabled="true"],
.site-header-inner--product :is(.nav-link, .nav-cta)[aria-disabled="true"]:hover,
.site-header-inner--product :is(.nav-toggle, .theme-toggle, .lang-switch):disabled {
    border-color: var(--canvas-disabled-ink);
    background: var(--nav-fill);
    color: var(--canvas-disabled-ink);
    cursor: default;
}

/* A full header (Phenome: four sections, the action, language, theme) needs
   about 1290 px in one row with the wordmark and the logo at 36 px, more than
   the container has below 1440. Up to there it keeps the kit's two rows from
   880 to 1279: wordmark and logo above, sections and actions below. From 1440
   one row, with 16 px between its parts and 12 px type in the buttons. */
@media (1280px <= width < 1440px) {
    .site-header-inner--product:not(.site-header-inner--compact) {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand ai"
            "nav actions";
        align-items: start;
        column-gap: var(--space-2);
    }
}

@media (width >= 1440px) {
    .site-header-inner--product:not(.site-header-inner--compact) { column-gap: var(--space-4); }

    .site-header-inner--product:not(.site-header-inner--compact) .nav-link {
        padding: 0 var(--space-2);
        font-size: 12px;
    }

    .site-header-inner--product:not(.site-header-inner--compact) .nav-cta { padding: 0 var(--space-2); }
}

/* Compact products fit one row from 1024px; below that the real marks
   leave too little room for all section labels and actions. */
@media (880px <= width < 1024px) {
    .site-header-inner.site-header-inner--product.site-header-inner--compact {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand ai"
            "nav actions";
        column-gap: var(--space-2);
    }
}

/* From 640 to 879 every product has two rows: the wordmark alone in the
   first row; the menu button, the action, language, theme and Object's logo in
   the second, so the logo's O stands beside 36 px buttons there too. Below 640
   the phone block further down makes it one row. The menu opens on paper: the
   same rules in the paper's colours. */
@media (width < 880px) {
    .site-header-inner--product .nav-toggle { display: inline-flex; }

    .site-header-inner--product .site-nav {
        grid-area: toggle;
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: var(--gutter);
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-1);
        min-width: 200px;
        padding: var(--space-2);
        border: 1px solid var(--paper-line);
        background: var(--paper);
        box-shadow: 0 8px 24px rgba(12, 33, 29, 0.25);
    }

    .site-header-inner--product .site-nav.is-open { display: flex; }

    .site-header-inner--product .nav-link {
        padding: 0 var(--space-4);
        justify-content: flex-start;
    }

    .site-header-inner.site-header-inner--product {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "brand brand brand"
            "toggle actions ai";
    }

    /* Items in the open menu are rows, not framed buttons (owner, 2026-11-12): no line round each; hover and the
       current section keep their fills. */
    .site-header-inner.site-header-inner--product .nav-link {
        border-color: transparent;
        background: var(--paper);
        color: var(--text-dark);
    }

    .site-header-inner.site-header-inner--product .nav-link:hover,
    .site-header-inner.site-header-inner--product .nav-link:focus-visible,
    .site-header-inner.site-header-inner--product .nav-link.active:hover,
    .site-header-inner.site-header-inner--product .nav-link.active:focus-visible {
        background: var(--paper-fill-hover);
    }

    .site-header-inner.site-header-inner--product .nav-link:active { background: var(--paper); }

    .site-header-inner.site-header-inner--product .nav-link.active,
    .site-header-inner.site-header-inner--product .nav-link.active:active {
        background: var(--paper-fill-selected);
    }

    .site-header-inner.site-header-inner--product .nav-link[aria-disabled="true"],
    .site-header-inner.site-header-inner--product .nav-link[aria-disabled="true"]:hover {
        border-color: transparent;
        background: var(--paper);
        color: var(--paper-disabled-ink);
    }
}

/* Narrow screens: the second row (menu, action, language, theme, logo) needs
   about 345 px with 8 px gaps; under 400 the gaps close to 4 px. */
@media (width < 400px) {
    .site-header-inner--product { column-gap: var(--space-1); }
    .site-header-inner--product .nav-actions { gap: var(--space-1); }
}

/* On a phone (owner, 2026-11-12): the product's wordmark smaller, 24px, and no Object logo at the end; one row, the
   wordmark and the menu button. */
@media (width < 640px) {
    /* The height of the mark on a phone: a product's wordmark, and the O of the Object logo in object.pl's header. */
    .site-header-inner { --phone-mark-h: 24px; }

    .site-header-inner--product .brand--own .brand-name,
    .site-header-inner--product .brand--own .brand-name svg {
        height: var(--phone-mark-h);
    }

    /* One row: the wordmark at the left, the menu button in the top right corner. The actions are the menu's last
       entries (SiteHeader renders them there as .nav-menu-action); a host's extra controls stay beside the button. */
    .site-header-inner.site-header-inner--product {
        grid-template-columns: 1fr auto auto;
        grid-template-areas: "brand actions toggle";
        align-items: center;
        row-gap: 0;
        /* The actions column is empty (the actions are in the menu), so a column gap would only be a stray space;
           controls a host puts there take their own margin. */
        column-gap: 0;
    }

    .site-header-inner--product .nav-actions:has(> :not(.nav-cta)) {
        margin-right: var(--space-2);
    }

    .site-header-inner--product .nav-actions .nav-cta {
        display: none;
    }

    .site-header-inner--product .site-nav {
        left: auto;
        right: var(--gutter);
    }

    .site-header-inner--product .site-nav .nav-menu-action {
        display: flex;
    }
}

/* Every other site's header on a phone, object.pl's and a compact one's (owner, 2026-11-12; a product has its own block above): the brand
   at the left, the menu button in the top right corner, the actions as the menu's last entries. The assistant's
   button, where a site has one, stays beside the menu button. */
@media (width < 640px) {
    .site-header-inner:not(.site-header-inner--product) {
        grid-template-columns: 1fr auto auto auto;
        grid-template-areas: "brand actions ai toggle";
        align-items: start;
        column-gap: 0;
    }

    /* The empty columns take no gap; the controls that are there keep 8px between them. */
    .site-header-inner:not(.site-header-inner--product) .ai-toggle {
        margin-right: var(--space-2);
    }

    /* Apart from the rule above, so a browser without :has() still keeps the assistant's margin. */
    .site-header-inner:not(.site-header-inner--product) .nav-actions:has(> :not(.nav-cta)) {
        margin-right: var(--space-2);
    }

    /* The logo is sized so its O is as tall as a product's wordmark (the O is 69.999375 of the 100 high viewBox, as in
       the footer logo of a product site) and sits level with the 36px menu button as the wordmark does. */
    .site-header-inner:not(.site-header-inner--product) .logo-image {
        width: auto;
        height: calc(var(--phone-mark-h) * 100 / 69.999375);
    }

    .site-header-inner:not(.site-header-inner--product) .brand {
        margin-top: calc((36px - var(--phone-mark-h)) / 2);
    }

    /* No tagline on a phone (owner, 2026-11-12): the logo at the left and the menu button at the top right. */
    .site-header-inner:not(.site-header-inner--product) .logo-tagline {
        display: none;
    }

    .site-header-inner:not(.site-header-inner--product) .brand--named {
        row-gap: 0;
    }

    .site-header-inner:not(.site-header-inner--product) .nav-actions .nav-cta {
        display: none;
    }

    .site-header-inner:not(.site-header-inner--product) .site-nav {
        left: auto;
        right: var(--gutter);
    }

    .site-header-inner:not(.site-header-inner--product) .site-nav .nav-menu-action {
        display: flex;
    }
}

/* A product header has no Object logo (it is in the footer) and no assistant: no "ai" column, so the last
   control stands at the container's right edge, in line with the sheets below (owner, 2026-11-26). These
   replace the product layouts above that still name an "ai" cell. */
@media (640px <= width < 1024px) {
    .site-header-inner.site-header-inner--product.site-header-inner--no-ai {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand brand"
            "nav actions";
    }
}

@media (width < 880px) {
    .site-header-inner.site-header-inner--product.site-header-inner--no-ai {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "brand brand"
            "toggle actions";
    }

    .site-header-inner--product.site-header-inner--no-ai .nav-actions { justify-self: end; }
}

@media (1280px <= width < 1440px) {
    .site-header-inner.site-header-inner--product.site-header-inner--no-ai:not(.site-header-inner--compact) {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand brand"
            "nav actions";
    }
}

@media (width >= 1024px) {
    .site-header-inner.site-header-inner--product.site-header-inner--compact.site-header-inner--no-ai {
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "brand nav actions";
    }
}

@media (width < 640px) {
    .site-header-inner.site-header-inner--product.site-header-inner--no-ai {
        grid-template-columns: 1fr auto auto;
        grid-template-areas: "brand actions toggle";
    }

    /* A product page without sections has no menu (the button hides when #site-nav has no link): its
       action stays in the header instead of moving into the menu, on a row of its own under the wordmark,
       ending at the container's edge. */
    .site-header:not(:has(#site-nav a)) .site-header-inner.site-header-inner--product.site-header-inner--no-ai {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "actions";
        row-gap: var(--space-3);
    }

    .site-header:not(:has(#site-nav a)) .site-header-inner--product .nav-actions {
        justify-self: end;
        margin-right: 0;
    }

    .site-header:not(:has(#site-nav a)) .site-header-inner--product .nav-actions .nav-cta { display: inline-flex; }
}
}

@layer tokens, product, kit, app;

/* Site footer. No band of its own (owner, 2026-10-30): it is page canvas, the
   triangle field runs behind it as behind the rest of the page; the rule on top
   spans exactly the container.

   Links left, icons right, in one row at every width while they fit (owner, 2026-11-12: a phone has room for
   it); a footer with more links than the row holds wraps them, the icons after them. */

@layer kit {
.site-footer {
    position: relative;
    z-index: 1;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3) var(--space-5);
    min-height: 44px;
    padding-block: var(--space-2);
    border-top: 1px solid var(--border-light);
}

.footer-links,
.footer-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-4);
}

.footer-icons {
    gap: var(--space-4);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-family: var(--font-mono);
    font-size: 10px;
    /* The canvas ink, opaque, at rest and on hover (owner, 2026-11-12); hover shows the underline. */
    color: var(--nav-ink);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.social-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.social-link i {
    font-size: 20px;
}

/* Object's logo on a product site (SiteFooter's logo): above the footer rule at the right end on a
   narrower window (owner, 2026-11-26), its O as tall as the wordmark in the product header (36px, the O
   is 69.999375 of the 100 high viewBox). */
.footer-logo {
    position: absolute;
    right: 0;
    bottom: calc(100% + var(--space-4));
    display: block;
    transition: opacity var(--transition-fast);
}

.site-footer-inner:has(.footer-logo) {
    position: relative;
    /* Room above the rule for the logo, so it never touches the last sheet. */
    margin-top: calc(36px * 100 / 69.999375 + var(--space-5));
}

.footer-logo:hover { opacity: 0.8; }

.footer-logo img {
    display: block;
    width: auto;
    height: calc(36px * 100 / 69.999375);
}

@media (width < 640px) {
    .footer-logo img { height: calc(24px * 100 / 69.999375); }
    .site-footer-inner:has(.footer-logo) { margin-top: calc(24px * 100 / 69.999375 + var(--space-5)); }
}

/* Where the window leaves room beside the container, the logo floats: fixed at the bottom right of the
   window, outside the sheets, above the footer rule, on screen all the time (owner, 2026-11-26). */
@media (width >= 1540px) {
    .footer-logo {
        position: fixed;
        right: var(--space-5);
        bottom: var(--space-5);
        z-index: 2;
    }

    .site-footer-inner:has(.footer-logo) { margin-top: 0; }
}

@media (width >= 1024px) {
    .footer-links {
        flex-wrap: nowrap;
        gap: var(--space-5);
    }
}
}

@layer tokens, product, kit, app;

/* The theme switch: a 36 px square like the header's menu and AI buttons,
   with the sun in the light theme and the moon in the dark one. The icon
   follows the attribute on <html>, so it is right before any script runs.
   Kept apart from header.css: pages without the kit's header use it too. */

@layer kit {
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    flex-shrink: 0;
    /* A control on the canvas: the ladder of the header's items (state tokens), focus the kit's 1px ring. */
    border: 1px solid var(--nav-ink);
    background: var(--nav-fill);
    color: var(--nav-ink);
    cursor: pointer;
    transition: border-color var(--transition-fast, 0.15s), background-color var(--transition-fast, 0.15s);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    background: var(--nav-fill-hover);
}

.theme-toggle:active {
    background: var(--nav-fill);
}

.theme-toggle-icon {
    width: var(--icon-size-lg, 20px);
    height: var(--icon-size-lg, 20px);
    fill: currentColor;
}

.theme-toggle-moon,
:root[data-theme="dark"] .theme-toggle-sun {
    display: none;
}

:root[data-theme="dark"] .theme-toggle-moon {
    display: block;
}
}

@layer tokens, product, kit, app;

/* The sheet: the paper card every section page sits on. Always the full width
   of the container (Contact is the one exception, see pages/contact.css), as
   tall as its content, never a scroll region of its own. */

@layer kit {
.sheet {
    position: relative;
    width: 100%;
    --sheet-pad: var(--space-4);
}

@media (width >= 640px) {
    .sheet { --sheet-pad: var(--space-5); }
}

/* In the dark theme the sheet (#1e1e1e) and the dark green page behind it have almost the same lightness, so the
   edge showed only as a change of hue. A soft shadow darkens the page round the sheet and a 1px line in the text
   colour draws the edge, in both themes (owner, 2026-11-11). This is the one shadow on a page surface; cards and
   controls inside stay flat. */
.sheet {
    box-shadow: 0 12px 32px rgb(0 0 0 / 55%), 0 2px 6px rgb(0 0 0 / 40%);
    outline: 1px solid color-mix(in srgb, var(--text-main) 22%, transparent);
    outline-offset: 0;
}

/* Header band: title and lead.
     < 1024   stacked: title, lead, action
     ≥ 1024   fixed 4fr / 8fr columns with a rule between them — the split no
              longer depends on how long the title happens to be. */
.sheet-head {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--sheet-pad);
    border-bottom: 1px solid var(--border-light);
}

.sheet-title {
    font-family: var(--font-sans);
    font-size: 35px;
    font-weight: 300;
    line-height: 1.15;
    text-wrap: balance;
    color: var(--text-main);
}

.sheet-lead-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    min-width: 0;
}

/* Short headline beside the title. */
.frame-tagline {
    font-size: 20px;
    line-height: 1.35;
    color: var(--text-muted);
}

/* Multi-sentence lead (Stories, Demos) and the intro paragraph above cards. */
.slide-lead {
    overflow-wrap: break-word;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
}

.slide-lead strong {
    font-weight: 500;
}

/* The action under the lead (DEMO, GET IT ON FOOD4RHINO). A plain button in the
   flow, never a badge pinned to a corner. Full width on a phone. */
.sheet-cta {
    align-self: stretch;
}

@media (width >= 640px) {
    .sheet-title { font-size: 36px; }
    .sheet-cta { align-self: flex-start; }
}

@media (width >= 1024px) {
    .sheet-head {
        display: grid;
        grid-template-columns: 4fr 8fr;
        gap: 0;
        padding: 0;
    }

    .sheet-head > .sheet-title {
        padding: var(--sheet-pad);
        border-right: 1px solid var(--border-light);
    }

    .sheet-head > .sheet-lead-col {
        justify-content: center;
        padding: var(--sheet-pad);
    }
}
}

@layer tokens, product, kit, app;

/* Second level: the tab strip at the top of a sheet. One row at every width, equal tabs, never scrolls sideways:
     < 640    3 tabs
     < 1024   5 tabs
     ≥ 1024   7 tabs
   The rest sit in a "More (n)" menu at the end of the row (CardTabs.tsx). A label too long for its tab ends in an
   ellipsis and shows whole in the tab's title. */

@layer kit {
.card-tabs {
    position: relative;
    display: flex;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
}

/* On a sheet the strip has its own token, a solid step off the sheet (neutral
   100 in light, 950 in dark), so the active tab, which shows the sheet itself,
   reads as the open one. The menu button carries the same fill: nothing on
   paper is see-through. */
.paper .card-tabs,
.paper .card-tabs-more {
    background: var(--paper-tabs);
}

.card-tabs-list {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.card-tab,
.card-tabs-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-width: 0;
    min-height: 48px;
    padding: 0 var(--space-3);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    /* Each tab carries the strip's solid fill (on paper --bg-surface is the paper card, the same step as
       --paper-tabs), so no tab is see-through. */
    background: var(--bg-surface);
    border: none;
    border-top: 1px solid transparent;
    border-right: 1px solid var(--paper-line-focus, var(--border-light));
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.card-tab {
    flex: 1 1 0;
    display: block;
    position: relative;
    line-height: 46px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-tabs-more {
    flex: 0 0 auto;
    border-right: none;
    color: var(--text-main);
}

/* The button sits outside the tablist (CardTabs.tsx), so no tab's right border reaches it and the last tab has none:
   the button draws the 1px divider itself, the same line as between tabs. The phone's picker is alone in the row. */
.card-tabs-more:not(.card-tabs-picker) {
    border-left: 1px solid var(--paper-line-focus, var(--border-light));
}

/* The phone's picker (CardTabs below 640px): one button across the strip with the open tab's name at the left, the
   sheet colour and the 2px accent line of an active tab, and the caret at the right; its menu lists every tab, the
   open one marked by its fill and a bolder label. */
.card-tabs-more.card-tabs-picker {
    flex: 1 1 auto;
    justify-content: space-between;
    position: relative;
    padding: 0 var(--space-4);
    background: var(--paper-tab-active, var(--paper));
    border-top: 1px solid var(--color-accent);
}

.card-tabs-more.card-tabs-picker::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-accent);
    pointer-events: none;
}

.card-tabs-current {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-tabs:has(.card-tabs-picker) .card-tabs-menu {
    left: 0;
    right: 0;
    min-width: 0;
}

.card-tabs-menu a.is-current {
    background: var(--paper-fill-selected);
    color: var(--text-main);
    font-weight: 600;
}

.card-tab:last-child {
    border-right: none;
}

.card-tab:hover,
.card-tabs-more:hover {
    color: var(--text-main);
}

.card-tab:focus-visible,
.card-tabs-more:focus-visible,
.card-tabs-menu a:focus-visible {
    /* The ink of the sheet: the action colour as a line on paper is 1.7:1 in the light theme. */
    outline: 1px solid var(--text-main);
    outline-offset: -1px;
}

/* The active tab shows the sheet colour and a 2px accent line on top (owner, 2026-11-11). The line is the tab's
   1px top border in the accent plus a 1px bar right under it, so no border in the kit is thicker than 1px. */
.card-tab.active {
    background: var(--paper-tab-active, var(--paper));
    color: var(--text-main);
    border-top-color: var(--color-accent);
}

.card-tab.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-accent);
    pointer-events: none;
}

.card-tabs-caret {
    font-size: 9px;
    transition: transform var(--transition-fast);
}

.card-tabs-more[aria-expanded="true"] .card-tabs-caret {
    transform: rotate(180deg);
}

/* The menu opens under the button, over the content, and is as solid as the strip. */
.card-tabs-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 20;
    min-width: 220px;
    max-width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--paper-line-focus, var(--border-light));
}

.paper .card-tabs-menu {
    background: var(--paper-tabs);
}

.card-tabs-menu a {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: inherit;
    border-bottom: 1px solid var(--paper-line-focus, var(--border-light));
}

.card-tabs-menu a:last-child {
    border-bottom: none;
}

.card-tabs-menu a:hover {
    color: var(--text-main);
}

/* A strip with a single tab has nothing to choose between: no orange marker. */
.card-tab.active:only-child {
    border-top-color: transparent;
}

.card-tab.active:only-child::before {
    display: none;
}

/* The More button has no label colour to change on hover, so its fill steps instead: two neutral steps off the paper. */
.card-tabs-more:hover {
    background: var(--paper-fill-selected);
}
}

@layer tokens, product, kit, app;

/* Photo or video in a sheet (FramePhoto, the product video). The box decides
   the shape; the image fills it with object-fit: cover.
     < 640    full width, square
     640–1023 full width, 16:9, at most 480px tall; a video stays square
     ≥ 1024   the 5/12 column, square (see pages/detail.css) */

@layer kit {
.frame-figure {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin: 0;
    width: 100%;
}

.frame-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 0;
}

/* Videos are square too (the Fraxin teaser is 1:1). The 480px cap only bites
   below 1024, where a full-width square would fill the screen. */
iframe.frame-photo {
    max-width: 480px;
}

@media (640px <= width < 1024px) {
    img.frame-photo {
        aspect-ratio: 16 / 9;
        max-height: 480px;
    }
}

/* AI disclosure under a photorealistic generated image: there to be checked,
   not read. Mono, like every technical annotation on the site. */
.frame-figure-note {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dark);
    opacity: 0.55;
}

/* Unsplash credit: a small corner mark on the photo that reveals a tooltip on
   hover. Fixed colours, since it sits on the photo, not on the sheet. */
.photo-credit-tooltip-wrap {
    position: absolute;
    bottom: 8px;
    right: 8px;
    cursor: default;
}

.photo-credit-tooltip-wrap .corner-triangle {
    display: block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid var(--border-light);
    transform: rotate(135deg);
}

.photo-credit-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: max-content;
    max-width: 220px;
    padding: var(--space-2) var(--space-2);
    background: rgb(16, 16, 17);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 11px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    pointer-events: none;
}

.photo-credit-tooltip-wrap:hover .photo-credit-tooltip {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.photo-credit-tooltip a {
    color: #ffffff;
    text-decoration: underline;
}

.photo-credit-tooltip a:hover {
    color: var(--color-primary);
}
}

@layer tokens, product, kit, app;

/* Feature cards: title and icon over a rule, then the description. The same
   card carries industries, services, products, solutions and story sections. */

@layer kit {
.challenge-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-5);
}

.feature-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.feature-card-head i {
    flex-shrink: 0;
    font-size: 30px;
    color: var(--text-dark);
}

.challenge-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-main);
}

.challenge-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}

.feature-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
}

/* Phones read the cards at a larger size, level with the lead above them. */
@media (width < 640px) {
    .challenge-card { padding: var(--space-4); }
    .challenge-title { font-size: 19px; }
    .challenge-desc { font-size: 18px; line-height: 1.35; }
    .slide-lead { font-size: 18px; line-height: 1.5; }
    .feature-list { gap: var(--space-3); }
}
}

@layer tokens, product, kit, app;

/* Template A, "tabbed detail": industries, stories, services, products and
   solutions. One skeleton, different content.
     < 1024   media full width, then the intro, then the cards in one column
     ≥ 1024   media 5fr | text 7fr, the media sticky while the text scrolls by.
              The same from 1024 to 2560; only the width changes. */

@layer kit {
.detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
    padding: var(--sheet-pad);
}

.detail-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
}

@media (width >= 1024px) {
    .detail-body {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: var(--space-5);
        align-items: start;
    }

    .detail-media {
        position: sticky;
        top: 24px;
    }
}
}

@layer tokens, product, kit, app;

/* Template B, "your role" (home). One sheet the width of the container, two
   cells: the picker (.role-aside) and the content for the role (.role-main),
   which is the headline and lead, three problem/solution rows and the contact
   line. From 1024 the picker is the left 4/12 with a rule on its right; below
   that it sits above the content with a rule under it.
   Sizes per width, from the 2026-10-05 design ("Roles as the headline"):
                   < 640    640–1023    ≥ 1024
     headline        32        40         48
     lead            17        18         19
     answer          18        20         21
     question        20        22         24
     row icon        28        32         36  (in a 32 / 44 / 48 column) */

@layer kit {
.role-sheet {
    --role-aside-pad: var(--space-5) var(--space-4);
    --role-main-pad: var(--space-5) var(--space-4) var(--space-6);
    --role-gap: var(--space-5);
    --role-headline: 32px;
    --role-lead: 17px;
    --role-answer: 18px;
    --role-question: 20px;
    --role-icon: 28px;
    --role-icon-col: 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

@media (width >= 640px) {
    .role-sheet {
        --role-aside-pad: var(--space-6);
        --role-main-pad: var(--space-6);
        --role-gap: var(--space-6);
        --role-headline: 40px;
        --role-lead: 18px;
        --role-answer: 20px;
        --role-question: 22px;
        --role-icon: 32px;
        --role-icon-col: 44px;
    }
}

@media (width >= 1024px) {
    .role-sheet {
        --role-aside-pad: var(--space-7) var(--space-6) var(--space-7) var(--space-7);
        --role-main-pad: var(--space-7) var(--space-7);
        --role-gap: var(--space-6);
        --role-headline: 48px;
        --role-lead: 19px;
        --role-answer: 21px;
        --role-question: 24px;
        --role-icon: 36px;
        --role-icon-col: 48px;
        grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    }
}

.role-aside {
    padding: var(--role-aside-pad);
    border-bottom: 1px solid var(--border-light);
}

@media (width >= 1024px) {
    .role-aside {
        border-bottom: 0;
        border-right: 1px solid var(--border-light);
    }
}

.role-main {
    display: flex;
    flex-direction: column;
    gap: var(--role-gap);
    padding: var(--role-main-pad);
}

/* The headline scrambles its glyphs on every role switch, spaces included, so
   for a few frames it is one long word. Without this it pushes a phone sideways. */
.role-head {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    overflow-wrap: anywhere;
}

.hero-title {
    font-family: var(--font-sans);
    font-size: var(--role-headline);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: var(--text-main);
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: var(--role-lead);
    font-weight: 300;
    line-height: 1.5;
    text-wrap: pretty;
    color: var(--text-muted);
}

/* Problem/solution rows: an icon column, the problem small and muted, the
   solution as the line that carries weight. Each row opens with a rule. */
.role-problems {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.role-problem {
    display: grid;
    grid-template-columns: var(--role-icon-col) minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--border-light);
}

.role-problem > i {
    font-size: var(--role-icon);
    line-height: 1;
    color: var(--text-main);
}

/* A row without an icon shows its number instead. */
.role-problem-num {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    line-height: var(--role-icon);
    color: var(--paper-orange);
}

.role-problem-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.role-problem-pain {
    font-size: 15px;
    line-height: 1.5;
    text-wrap: pretty;
    color: var(--text-muted);
}

.role-problem-fix {
    font-size: var(--role-answer);
    font-weight: 500;
    line-height: 1.3;
    text-wrap: pretty;
    color: var(--text-main);
}

/* Contact line, pushed to the bottom of the cell: the question, then the
   orange button; full width on a phone, hugging its label from 640. */
.role-contact {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border-focus);
}

.role-contact-question {
    font-size: var(--role-question);
    font-weight: 300;
    line-height: 1.3;
    text-wrap: balance;
    color: var(--text-main);
}

.role-contact .btn-secondary {
    align-self: stretch;
    height: auto;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    font-size: 14px;
    letter-spacing: 0.1em;
}

@media (width >= 640px) {
    .role-contact .btn-secondary { align-self: flex-start; }
}
}

@layer tokens, product, kit, app;

/* The role picker: "I WORK AS" in mono, then every role as a line of large
   light text. The active role is in text colour, the others muted; no
   underline (owner, 2026-11-12). Where the list goes depends on the width:
     < 640       a bordered field naming the role; tap opens the list as a column
     640–1023    a wrapped line of words above the content
     ≥ 1024      a column, the left 4/12 of the sheet (sheet/role.css) */

@layer kit {
.role-picker {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.role-picker-label {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* The phone field. A button, so the keyboard opens it as well. */
.role-dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-focus);
    border-radius: 0;
    background: none;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 300;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.role-dropdown i {
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
}

.role-list {
    display: none;
    flex-direction: column;
    column-gap: var(--space-5);
    row-gap: var(--space-1);
}

.role-picker.open .role-list {
    display: flex;
}

.role-option {
    display: flex;
    align-items: center;
    padding: var(--space-1) 0;
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 300;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.role-option:hover,
.role-option.active {
    color: var(--text-main);
}

.role-option:focus-visible,
.role-dropdown:focus-visible,
.role-chip:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (width >= 640px) {
    .role-dropdown { display: none; }

    .role-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .role-option { font-size: 24px; }
}

@media (width >= 1024px) {
    .role-list { flex-direction: column; }
    .role-option { font-size: 26px; }
}

/* A bordered chip. The picker no longer uses it; scripts/static-snapshot.mjs
   still draws the industry switcher with it. 32px drawn, 44px to the finger. */
.role-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 var(--space-2);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.role-chip::after {
    content: '';
    position: absolute;
    inset: -6px 0;
}

.role-chip:hover {
    border-color: var(--border-focus);
    color: var(--text-main);
    background: var(--bg-surface);
}
}

@layer tokens, product, kit, app;

/* Template C, the demo & resource catalog lobby. Five cards, no orphan at any width:
     < 640       one column
     640–1023    two columns, the fifth card across both
     1024–1279   six-column grid: three cards spanning 2, two spanning 3
     ≥ 1280      five columns
   Cards are equal height with the link pinned to the bottom, so every
   "Open the demo" sits on one line. */

@layer kit {
.demos-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--sheet-pad);
}

.demo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
}

@media (640px <= width < 1024px) {
    .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .demo-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (1024px <= width < 1280px) {
    .demo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .demo-card { grid-column: span 2; }
    .demo-card:nth-child(n + 4):nth-last-child(-n + 2) { grid-column: span 3; }
}

@media (width >= 1280px) {
    .demo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.demo-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-5);
    text-decoration: none;
    color: inherit;
}

.demo-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.demo-card-head i {
    font-size: 28px;
    color: var(--text-dark);
}

.demo-card .challenge-title {
    margin-bottom: var(--space-2);
}

/* Which word of the triad this demo proves. */
.demo-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--paper-orange);
    border: 1px solid var(--paper-orange);
    border-radius: 0;
    padding: 2px var(--space-1);
}

.demo-card-foot {
    margin-top: auto;
    padding-top: var(--space-4);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--paper-orange);
}

/* Not clickable, so it does not pretend to be. */
.demo-card.is-wip {
    opacity: 0.65;
}

.demo-card.is-wip .demo-tag,
.demo-card.is-wip .demo-card-foot {
    color: var(--text-dark);
    border-color: var(--border-light);
}

.demo-cta {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-dark);
}

.demo-cta a {
    color: var(--paper-orange);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.demo-cta a:hover {
    border-bottom-color: var(--paper-orange);
}
}

@layer tokens, product, kit, app;

/* Template D, contact: the one sheet narrower than the container — 640px at
   most, centred, from the top like every other page. The two buttons close the
   sheet in two columns at every width, with nothing under them. */

@layer kit {
.contact-sheet {
    max-width: 640px;
    margin-inline: auto;
}

/* The head has only a title, so it stays one cell across the sheet at every
   width: on a 640px sheet the 4fr column from 1024 (sheet/sheet.css) would
   wrap "Get In Touch" next to an empty lead column. */
.contact-sheet .sheet-head {
    display: flex;
    padding: var(--sheet-pad);
}

.contact-sheet .sheet-head > .sheet-title {
    padding: 0;
    border-right: 0;
}

.contact-body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6) var(--sheet-pad);
    text-align: center;
}

.contact-subtitle {
    max-width: 500px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
}

.contact-subtitle a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.contact-subtitle a:hover {
    border-bottom-color: var(--color-accent);
}

.email-text {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--color-accent);
    text-decoration: none;
    user-select: all;
}

/* The address on the sheet: the action as text on paper (see .paper .ph-button-outline). */
.paper .email-text {
    color: var(--paper-orange);
}

/* Out of the flow, under the address, so nothing moves when it appears. */
.toast-message {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.toast-message.show {
    opacity: 1;
}

.contact-buttons-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--border-light);
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 60px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.contact-btn + .contact-btn {
    border-left: 1px solid var(--border-light);
}

.contact-btn:hover {
    background: var(--bg-surface);
    color: var(--text-main);
}

.contact-btn i {
    font-size: 18px;
}

/* On a phone (owner, 2026-11-12: the text was too large and touched the sheet's edges): the lead at the body
   size, the address at 18px, and a long address breaks inside the sheet's padding instead of running past it. */
@media (width < 640px) {
    .contact-body { padding: var(--space-5) var(--sheet-pad); gap: var(--space-4); }
    .contact-subtitle { font-size: 15px; line-height: 1.5; }
    .email-text { font-size: 18px; letter-spacing: 0.5px; max-width: 100%; overflow-wrap: anywhere; }
}
}

@layer tokens, product, kit, app;

/* Section & landing page sheets (HeroSheet, SectionSheet, SheetCard, DocPanel).
   Derived from object.pl's landing pages (scripts/landing.css) and shared across
   phenome.object.pl, fraxin.object.pl, tila.object.pl and standalone document pages. */

@layer kit {
:root {
    --ph-pad: var(--space-4);
    --ph-ink-82: color-mix(in srgb, var(--text-dark) 82%, transparent);
    --ph-action-line: var(--paper-orange);
}

@media (width >= 640px) {
    :root { --ph-pad: var(--space-5); }
}

@media (width >= 1024px) {
    :root { --ph-pad: var(--space-6); }
}

.ph-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.ph-stack > .sheet { scroll-margin-top: 16px; }

/* Every sheet part keeps the same space to its edges at the bottom as at the sides, --ph-pad (owner,
   2026-11-12); only the gap between a band's title and its text is smaller. */

/* ---- HeroSheet: kicker and title on top, the lead under a rule ---- */
.ph-hero-top {
    padding: var(--ph-pad);
}

/* A photo beside the title (HeroSheet's aside): whole, never cropped, with the sheet's padding round it, and
   tinted in the product's canvas colour (--bg-base: navy on Phenome) by a colour-blend layer that keeps the
   photo's light and shade (owner, 2026-11-26). On a phone it sits above the title. */
.ph-hero-top--aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 0;
}

/* The kicker and title sit at the bottom of their column, level with the bottom of the photo. */
.ph-hero-top--aside .ph-hero-heading {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--ph-pad);
}

.ph-hero-aside { padding: var(--ph-pad); }

.ph-hero-photo {
    position: relative;
    isolation: isolate;
}

.ph-hero-photo :is(img, picture) {
    display: block;
    width: 100%;
    height: auto;
}

.ph-hero-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-base);
    mix-blend-mode: color;
    pointer-events: none;
}

@media (width < 640px) {
    .ph-hero-top--aside { grid-template-columns: 1fr; }
    .ph-hero-aside { order: -1; padding-bottom: 0; }
}

.ph-kicker,
.ph-eyebrow {
    margin-bottom: var(--space-3);
    color: var(--paper-teal);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
}

.ph-title {
    max-width: 22em;
    color: var(--text-dark);
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.ph-hero-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--ph-pad);
    border-top: 1px solid var(--paper-line);
}

/* The hero's links: in a row with a gap, wrapping on a narrow sheet with the same gap between the lines, so two
   links never touch (owner, 2026-11-12). */
.ph-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

.ph-lead p {
    max-width: 44em;
    color: var(--paper-text-muted);
    font-size: 19px;
    line-height: 1.55;
    text-wrap: pretty;
}

/* ---- SectionSheet: title | text, 4fr / 8fr with a rule from 1024 ---- */
/* An optional thin icon above the title (SectionSheet's icon, and the contact sheet's). */
.ph-band-icon {
    display: block;
    margin-bottom: var(--space-3);
    color: var(--paper-teal);
    font-size: 32px;
    line-height: 1;
}

.ph-band-title { padding: var(--ph-pad) var(--ph-pad) var(--space-3); }
.ph-band-text { padding: 0 var(--ph-pad) var(--ph-pad); }
.ph-band--title .ph-band-title { padding-bottom: var(--ph-pad); }

.ph-h2 {
    color: var(--text-dark);
    font-size: 27px;
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

@media (width >= 1024px) {
    .ph-band {
        display: grid;
        grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    }

    .ph-band--title { display: block; }

    .ph-band-title,
    .ph-band-text,
    .ph-band--title .ph-band-title {
        padding: var(--ph-pad);
    }

    .ph-band-text { border-left: 1px solid var(--paper-line); }

    .ph-h2 { font-size: 30px; }
}

.ph-wide {
    padding: var(--ph-pad);
    border-top: 1px solid var(--paper-line);
}

.ph-prose {
    color: var(--ph-ink-82);
    font-size: 16px;
    line-height: 1.65;
}

.ph-prose p,
.ph-prose ul,
.ph-prose ol {
    max-width: 46em;
    margin-bottom: var(--space-3);
    text-wrap: pretty;
}

.ph-prose > :last-child { margin-bottom: 0; }
.ph-prose ul,
.ph-prose ol { padding-left: var(--space-4); }
.ph-prose li { margin-bottom: var(--space-1); }
.ph-prose li::marker { color: var(--paper-text-muted); }

/* ---- Standalone Document Sheet (.doc-panel, privacy policy / code of conduct) ---- */
body.doc {
    display: block;
}

.doc-panel {
    max-width: 820px;
    margin: var(--space-7) auto var(--space-8);
    padding: var(--space-7);
    background: var(--paper);
    color: var(--text-dark);
}

.doc-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--paper-teal);
    transition: color var(--transition-fast);
}

.doc-back:hover {
    color: var(--text-dark);
}

.doc-panel h1 {
    font-family: var(--font-sans);
    font-size: 36px;
    font-weight: 300;
    letter-spacing: -1px;
    line-height: 1.15;
    color: var(--text-dark);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--paper-line);
}

.doc-panel h2 {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-dark);
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
}

.doc-panel p,
.doc-panel li {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--paper-text-muted);
}

.doc-panel p { margin-bottom: var(--space-3); }
.doc-panel ul { padding-left: var(--space-4); margin-bottom: var(--space-3); }
.doc-panel li { margin-bottom: var(--space-1); }

.doc-panel a:not(.doc-back) {
    color: var(--paper-teal);
    text-underline-offset: 2px;
}

@media (max-width: 768px) {
    .doc-panel {
        margin: var(--space-5) auto var(--space-6);
        padding: var(--space-5);
    }
    .doc-panel h1 { font-size: 28px; }
}
}

@layer tokens, product, kit, app;

/* Generic content blocks. Cards and tables move here from @object/pages;
     stats, steps, pledge, definitions, FAQ and contact layout originate in
     Phenome/phenome-deck src/styles/blocks.css (qwen/copy-pl-en).
     Keep the kit's ph-* sheet vocabulary and use theme role tokens only. */

/* Phosphor also uses ph-cards; icon elements must never acquire grid layout. */

@layer kit {
.ph-cards:where(:not(i, .ph, .ph-thin, .ph-light, .ph-bold, .ph-fill, .ph-duotone)) {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-4);
}

@media (width >= 834px) {
        .ph-cards--2:where(:not(i, .ph, .ph-thin, .ph-light, .ph-bold, .ph-fill, .ph-duotone)),
        .ph-cards--3:where(:not(i, .ph, .ph-thin, .ph-light, .ph-bold, .ph-fill, .ph-duotone)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (width >= 1180px) {
        .ph-cards--3:where(:not(i, .ph, .ph-thin, .ph-light, .ph-bold, .ph-fill, .ph-duotone)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ph-card { scroll-margin-top: 16px; }
.ph-card-link { margin-top: var(--space-4); }

.ph-card-body {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: flex-start;
        font-size: 15px;
        line-height: 1.6;
}

.ph-card-body p,
.ph-card-body ol { margin-bottom: var(--space-3); }

.paper .ph-card--planned {
        background: var(--paper);
        outline: 1px dashed var(--paper-line-focus);
        outline-offset: -1px;
}

.ph-table-scroll {
        max-width: 100%;
        overflow-x: auto;
}

/* Cards and tables in running text keep 24px from what comes before and after them (owner, 2026-11-12: a table
   right under a card row sat too close). */
.ph-prose > :is(.ph-cards, .ph-table-scroll) + *,
.ph-prose > * + :is(.ph-cards, .ph-table-scroll) {
        margin-top: var(--space-5);
}

table.ph-table {
        width: 100%;
        border-collapse: collapse;
        color: var(--text-dark);
        font-size: 14.5px;
        line-height: 1.5;
        font-variant-numeric: tabular-nums;
}

table.ph-table thead th {
        padding: 0 var(--space-4) var(--space-2) 0;
        border-bottom: 1px solid var(--text-dark);
        color: var(--paper-text-muted);
        font-family: var(--font-mono);
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: 0.1em;
        text-align: left;
        text-transform: uppercase;
        vertical-align: bottom;
}

table.ph-table tbody th,
table.ph-table tbody td {
        padding: var(--space-3) var(--space-4) var(--space-3) 0;
        border-bottom: 1px solid var(--paper-line);
        vertical-align: top;
}

table.ph-table tbody td { color: var(--ph-ink-82); }
table.ph-table tbody th { font-weight: 500; white-space: nowrap; }

table.ph-table td i.ph {
        color: var(--paper-teal);
        margin-right: var(--space-2);
}

@media (width < 600px) {
        table.ph-table { font-size: 13px; }
        table.ph-table thead th,
        table.ph-table tbody th,
        table.ph-table tbody td {
          padding: var(--space-2) var(--space-1);
          overflow-wrap: anywhere;
          white-space: normal;
        }
        table.ph-table thead th { letter-spacing: 0.04em; }
}

/* Stats: value, claim and a source line. */
.ph-stats {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.ph-stat {
    border-left: 1px solid var(--ph-action-line);
    padding-left: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.ph-stat-number {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
}

.ph-stat-claim {
    font-size: 14px;
    color: var(--text-dark);
}

.ph-stat-source {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--paper-text-muted);
}

/* Items / steps. */
.ph-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}

.ph-item {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-5) 0;
    border-top: 1px solid var(--paper-line);
}

.ph-items--flush > .ph-item:first-child { border-top: 0; padding-top: 0; }

@media (min-width: 768px) {
    .ph-item {
        grid-template-columns: 64px minmax(0, 1fr);
        align-items: start;
    }
}

.ph-item-side {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-start;
}

.ph-item-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ph-item-body > h3 { margin: 0; font-size: 18px; font-weight: 500; color: var(--text-dark); }

.ph-item-num {
    font-family: var(--font-mono);
    font-size: 20px;
    color: var(--paper-orange);
}

.ph-item-icon {
    font-size: 24px;
    color: var(--paper-teal);
}

/* Pledge. */
.ph-pledge {
    border: 1px solid var(--paper-line);
    background: var(--paper-card);
    padding: var(--space-5);
}

.ph-pledge h3 {
    margin: 0 0 var(--space-3);
    font-size: 18px;
    color: var(--text-dark);
}

.ph-pledge p {
    margin: 0 0 var(--space-2);
    font-size: 15px;
    color: var(--text-dark);
}

/* Definition list. */
.ph-dl:where(:not(.ph-dl--cards)) > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-1);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--paper-line);
}

.ph-dl:where(:not(.ph-dl--cards)) > div:last-child {
    border-bottom: none;
}

@media (min-width: 640px) {
    .ph-dl:where(:not(.ph-dl--cards)) > div {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: var(--space-4);
    }
}

.ph-dl:where(:not(.ph-dl--cards)) dt {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--paper-text-muted);
    margin-top: 0;
    line-height: 1.4;
}

.ph-dl:where(:not(.ph-dl--cards)) dd {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-dark);
}

.ph-dl:where(:not(.ph-dl--cards)) dt i.ph {
    color: var(--paper-teal);
    margin-right: var(--space-1);
}

/* Definition cards: the page engine can arrange pairs side by side. */
.ph-dl--cards { display: grid; gap: var(--space-4) var(--ph-pad); margin: 0; }
@media (min-width: 640px) {
    .ph-dl--cards.ph-dl--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ph-dl--cards > div { padding-top: var(--space-3); border-top: 1px solid var(--paper-line-focus); }
.ph-dl--cards dt {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-2);
    color: var(--paper-teal);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.ph-dl--cards dt i { font-size: 18px; letter-spacing: 0; }
.ph-dl--cards dd { margin: 0; color: var(--ph-ink-82); font-size: 15px; line-height: 1.6; }
.ph-dl--cards dd > :last-child { margin-bottom: 0; }

/* FAQ: native details and summary. */
.ph-faq-item {
    border-top: 1px solid var(--paper-line);
}

.ph-faq-item:last-child { border-bottom: 1px solid var(--paper-line); }

.ph-faq-item summary {
    display: flex;
    gap: var(--space-3);
    align-items: baseline;
    padding: var(--space-4) 0;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    color: var(--text-dark);
}

.ph-faq-item summary::-webkit-details-marker {
    display: none;
}

.ph-faq-item summary:focus-visible {
    outline: 2px solid var(--paper-line-focus);
    outline-offset: 2px;
}

.ph-faq-item summary:hover {
    color: var(--paper-teal);
}

.ph-faq-item summary::after {
    content: '+';
    font: 400 18px/1 var(--font-mono);
    color: var(--paper-teal);
    margin-left: auto;
}

.ph-faq-item[open] summary::after {
    content: '\2212';
}

.ph-faq-num {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--paper-orange);
}

/* Body colour comes from .ph-prose or the containing sheet. */
.ph-faq-body {
    padding: 0 0 var(--space-4) var(--space-6);
    overflow-wrap: anywhere;
}

/* Contact CTA. */
.ph-contact-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
}

.ph-contact-cta--compact { gap: var(--space-3); }

@media print {
    .ph-item, .ph-faq-item { break-inside: avoid; }
    .ph-faq-item .ph-faq-body { display: block; }
}
}

@layer tokens, product, kit, app;

/* Folded text: the rest of a section text or of a step, under a "More" line (native details and summary,
   no script). The summary is set like the other mono labels of a sheet, with the FAQ's + and − marker;
   the opened text unrolls to its height and fades in.

   The whole frame that holds the fold opens it: the sheet for a fold in a section text, the row for a
   fold in a step. The summary's ::before covers that frame, so a click anywhere on it is a click on the
   summary, and the keyboard still reaches the one summary. The opened text sits above the cover, so it
   can be selected and its links work. On hover the frame grows a little in width (the scale property,
   which does not fight the transform of the motion sheet). */

@layer kit {
.ph-more {
    margin-top: var(--space-3);
}

.ph-more summary {
    display: inline-flex;
    gap: var(--space-2);
    align-items: baseline;
    padding: var(--space-1) 0;
    cursor: pointer;
    list-style: none;
    font: 500 12px/1.4 var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--paper-teal);
}

.ph-more summary::-webkit-details-marker {
    display: none;
}

.ph-more summary::after {
    content: '+';
    font: 400 16px/1 var(--font-mono);
}

.ph-more[open] summary::after {
    content: '\2212';
}

.ph-more summary:hover {
    color: var(--text-dark);
}

.ph-more summary:focus-visible {
    outline: 2px solid var(--paper-line-focus);
    outline-offset: 2px;
}

.ph-more-body {
    position: relative;
    z-index: 1;
    padding-top: var(--space-2);
}

.ph-item:has(.ph-more) { position: relative; }

.sheet:has(.ph-band-text > .ph-more) .ph-more summary::before,
.ph-item:has(.ph-more) .ph-more summary::before {
    content: '';
    position: absolute;
    inset: 0;
}

.sheet:has(.ph-band-text > .ph-more),
.ph-item:has(.ph-more) {
    cursor: pointer;
}

.sheet:has(.ph-band-text > .ph-more):hover .ph-more summary,
.ph-item:has(.ph-more):hover .ph-more summary {
    color: var(--text-dark);
}

.ph-more-body > :last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: no-preference) {
    .ph-more[open] .ph-more-body { animation: kit-more-open 320ms ease-out both; }

    /* The fold opens and closes by height: the details content grows from 0 to its own height
       (interpolate-size lets a transition reach auto). A browser without ::details-content opens at once
       and keeps the fade above. */
    @supports selector(::details-content) {
        .ph-more { interpolate-size: allow-keywords; }

        .ph-more::details-content {
            block-size: 0;
            overflow: hidden;
            transition: block-size 360ms cubic-bezier(.2, .7, .2, 1), content-visibility 360ms allow-discrete;
        }

        .ph-more[open]::details-content { block-size: auto; }
    }

    .sheet:has(.ph-band-text > .ph-more),
    .ph-item:has(.ph-more) {
        transition: scale 220ms ease-out;
    }

    .sheet:has(.ph-band-text > .ph-more):hover { scale: 1.01 1; }
    .ph-item:has(.ph-more):hover { scale: 1.02 1; }
}

@keyframes kit-more-open {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}
}

@layer tokens, product, kit, app;

/* Motion of page sheets. Off unless the page asks for it with data-motion="scroll" on <html> (or on any
   ancestor of the sheets); @object/pages sets it from `motion: true` in _site/site.yaml. Apps and pages
   without the attribute do not move.

   The hero runs once on load: the frame, then the kicker, the title and the lead, 150 ms apart. Every
   other sheet is driven by the scroll position (scroll-driven animations, view() timelines, no script):
   the frame fades in from below and out at the top, its title comes from the left, its text fades in
   a little later, and its rows (steps, questions, definitions, table rows) arrive one by one.
   A browser without scroll-driven animations shows the sheets still; the hero still fades in. A reader
   who asks for reduced motion sees nothing move. */

@layer kit {
@media (prefers-reduced-motion: no-preference) {
    [data-motion="scroll"] .ph-hero { animation: kit-motion-rise-16 600ms ease-out both; }
    [data-motion="scroll"] .ph-hero .ph-kicker { animation: kit-motion-from-left 600ms 150ms ease-out both; }
    [data-motion="scroll"] .ph-hero .ph-title { animation: kit-motion-from-left 700ms 300ms cubic-bezier(.2, .7, .2, 1) both; }
    [data-motion="scroll"] .ph-hero .ph-lead { animation: kit-motion-rise-16 700ms 500ms ease-out both; }

    @supports (animation-timeline: view()) {
        [data-motion="scroll"] .sheet:not(.ph-hero) {
            animation: kit-motion-pass linear both;
            animation-timeline: view();
            animation-range: entry 0% exit 100%;
            view-timeline-name: --kit-sheet;
        }

        [data-motion="scroll"] .sheet .ph-band-title,
        [data-motion="scroll"] .sheet .sheet-head > :first-child {
            animation: kit-motion-from-left linear both;
            animation-timeline: view();
            animation-range: entry 10% entry 70%;
        }

        /* The text fades without moving: a transform on it would make it the containing block of the
           cover that lets a click anywhere on the sheet open a fold (more.css). */
        [data-motion="scroll"] .sheet .ph-band-text {
            animation: kit-motion-fade linear both;
            animation-timeline: view();
            animation-range: entry 30% entry 100%;
        }

        [data-motion="scroll"] .sheet .ph-item,
        [data-motion="scroll"] .sheet .ph-faq-item,
        [data-motion="scroll"] .sheet dl > div {
            animation: kit-motion-rise-24 linear both;
            animation-timeline: view();
            animation-range: entry 20% entry 100%;
        }

        [data-motion="scroll"] .sheet .ph-item-side {
            animation: kit-motion-pop linear both;
            animation-timeline: view();
            animation-range: entry 60% cover 40%;
        }

        /* Table rows sit in a scrolling box of their own (.ph-table-scroll), where view() would measure
           against that box. They follow the sheet's timeline instead, each row a step after the one above. */
        [data-motion="scroll"] .sheet .ph-table tbody tr {
            animation: kit-motion-from-left linear both;
            animation-timeline: --kit-sheet;
            animation-range: entry 40% cover 30%;
        }
        [data-motion="scroll"] .sheet .ph-table tbody tr:nth-child(2) { animation-range: entry 55% cover 35%; }
        [data-motion="scroll"] .sheet .ph-table tbody tr:nth-child(3) { animation-range: entry 70% cover 40%; }
        [data-motion="scroll"] .sheet .ph-table tbody tr:nth-child(4) { animation-range: entry 85% cover 45%; }
        [data-motion="scroll"] .sheet .ph-table tbody tr:nth-child(n+5) { animation-range: entry 100% cover 50%; }

        [data-motion="scroll"] .sheet .ph-contact-cta {
            animation: kit-motion-rise-24 linear both;
            animation-timeline: view();
            animation-range: entry 40% cover 30%;
        }
    }
}

@keyframes kit-motion-rise-16 {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes kit-motion-rise-24 {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

@keyframes kit-motion-pass {
    0% { opacity: 0; transform: translateY(40px); }
    10% { opacity: 1; transform: none; }
    90% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: translateY(-24px); }
}

@keyframes kit-motion-from-left {
    from { opacity: 0; transform: translateX(-32px); }
    to { opacity: 1; transform: none; }
}

@keyframes kit-motion-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes kit-motion-pop {
    0% { opacity: 0; transform: scale(.6); }
    70% { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: none; }
}
}

@layer tokens, product, kit, app;

/* The brand field and the 88 px band of print and screen formats (handoff of
   2026-10-05, "Design tokens" and "Logo construction"): the letterhead and
   Odoo band, the flyer top, the business card front, slides and social images.
   Moved here from object-ci on 2026-10-14, so the CI portal, its print
   templates and md2pdf draw the same band.

   Sizes are artboard px times --u. Without --u they are CSS px (1 artboard px
   = 1 px at 96 dpi), as in the print templates and md2pdf; object-ci's
   mock-ups set --u to fit a format into a column. --grid sets the cell in
   artboard px; a print template in mm sets --brand-cell itself (4mm on the
   business card). Text and logo on the field are white, also when the field
   sits on a .paper sheet.

   The field takes its colours from the teal scale, not from the page roles
   (--bg-base, --bg-top): flat teal 700, or the gradient from teal 500 at the
   bottom to teal 700 at 78% of the height. The page gradient of the UI may
   change; the brand field and everything printed from it stay as they are. */

@layer kit {
.brand-field {
    --brand-cell: calc(var(--grid, 20) * var(--u, 1px));
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #ffffff;
    background: var(--bg-base, #0f2d28);
}

.brand-field--gradient {
    background: var(--bg-gradient, linear-gradient(0deg, #358275 0%, #28655a 10%, #21554c 20%, #1c4a42 29%, #18423b 39%, #153b35 49%, #133630 59%, #11312c 68%, #0f2d28 78%)), var(--bg-base, #0f2d28);
}

[data-theme="dark"] .brand-field--gradient {
    background: var(--bg-gradient, linear-gradient(0deg, #2e8275 0%, #24655a 10%, #1e554c 20%, #1a4a42 29%, #17423b 39%, #143b35 49%, #123630 59%, #11312c 68%, #0f2d28 78%)), var(--bg-base, #0f2d28);
}

.brand-field__grid,
[data-theme="dark"] .brand-field__grid {
    opacity: var(--bg-grid-opacity, 0.2);
}

/* The triangle grid: a white right triangle with 3 px legs, right angle top
   left, every 20 px (legs and cell scale together), rows offset by half a
   cell, faded from 18% at the left to 60% at the right edge (35% of the
   width at 18%, then rising). */
.brand-field::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: var(--bg-grid-opacity, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M0 0h3L0 3z' fill='%23fff'/%3E%3C/svg%3E");
    background-size: var(--brand-cell) var(--brand-cell);
    background-position: calc(var(--brand-cell) / 2) 0;
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.18) 35%, rgba(0, 0, 0, 0.6) 100%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.18) 35%, rgba(0, 0, 0, 0.6) 100%);
}

/* A centred logo sits on its construction centre line, 1 unit (a tenth of
   its height) below the box centre; the tagline hangs under it. */
.brand-field-centre {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: calc(16 * var(--u, 1px));
}

.brand-field-logo {
    width: auto;
    transform: translateY(10%);
}

.brand-field-tagline {
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* The band: logo 40 px tall, 28 px from the top, so its centre line sits at
   44 px; the tagline in Plex Mono 500, 10 px, 1 px tracking, its baseline on
   the logo's O baseline at 56 px; 56 px of padding on both sides. */
.brand-band {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    height: calc(var(--band-height, 88) * var(--u, 1px));
    padding: calc(28 * var(--u, 1px)) calc(56 * var(--u, 1px)) 0;
}

.brand-band-logo {
    display: block;
    height: calc(40 * var(--u, 1px));
    width: auto;
}

.brand-band-tagline {
    padding-top: calc(19 * var(--u, 1px));
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: calc(10 * var(--u, 1px));
    line-height: 1;
    letter-spacing: calc(1 * var(--u, 1px));
    text-transform: uppercase;
    white-space: nowrap;
}
}

@layer tokens, product, kit, app;

/* ==========================================================================
   Unified Studio Shell (@kit/studio)
   Shared 3D / Configurator / Inspector shell for:
   - demo-satellite.fraxin.object.pl (Fraxin Olive)
   - app.tila.object.pl (Tila Terracotta & Saffron)
   - inspector.phenome.object.pl (Phenome Navy & Saffron)
   ========================================================================== */

@layer tokens, product, kit, app;

/* ==========================================================================
   Studio Docked & Floating Panels, Responsive Header (@kit/studio)
   ========================================================================== */

/* The dock scrolls, and a scroller clips its children's shadows. It reaches
   out by --v2-float-shadow-reach on every side and pads back in by the same
   amount, so its panels sit where they did and their shadows show whole. */

@layer kit {
.v2-left-dock {
  position: fixed;
  top: var(--v2-top);
  left: var(--v2-left);
  /* Never wider than the room right of the rail (--v2-left); next to an inspector the two share it, see studio.css. */
  width: max(0px, min(var(--v2-dock-w), calc(100% - var(--v2-left) - var(--v2-gap))));
  bottom: calc(var(--v2-gap) + var(--v2-lower-dock-h, 0px));
  box-sizing: content-box;
  margin: calc(-1 * var(--v2-float-shadow-reach));
  padding: var(--v2-float-shadow-reach);
  display: flex;
  flex-direction: column;
  gap: var(--v2-gap);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: var(--z-dock);
  pointer-events: none;
}

.fx-float-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 0;
  box-shadow: var(--v2-float-shadow);
  overflow: hidden;
  pointer-events: auto;
  min-height: 0;
}

.fx-float-panel.docked {
  width: 100%;
  flex-shrink: 0;
}

.floating-details-panel {
  position: fixed;
  top: var(--v2-top);
  right: var(--v2-gap);
  bottom: calc(var(--v2-gap) + var(--v2-lower-dock-h, 0px));
  width: min(var(--v2-details-w), calc(100% - var(--v2-gap) * 2));
  max-width: 90vw;
  z-index: var(--z-inspector);
}

.v2-panel-header {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-shrink: 0;
}

.v2-panel-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  /* The studio is monochrome with accents (owner, 2026-10-30): the title in the ink, its icon the product's cue. */
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.v2-panel-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.v2-panel-close {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v2-panel-close:hover {
  color: var(--text-main);
  background: var(--paper-fill-hover);
}

/* A PropertyGrid section's header: a mono caption over a 1px line (none while the section is folded). It is a button
   that folds the rows (the toggle) or a plain header (the title). The toggle is like the panel header tools, bare at
   rest, the paper's hover fill on hover and focus, the pressed line on press (states.css). */
.v2-property-section-toggle,
.v2-property-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  padding: var(--space-1) var(--space-2);
  border: 0;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-align: left;
  color: var(--text-main);
}

.v2-property-section-toggle {
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.v2-property-section-toggle[aria-expanded='false'] {
  border-bottom: 0;
}

.v2-property-section-toggle:is(:hover, :focus-visible) {
  background: var(--surface-section-hover, var(--paper-fill-hover));
}

.v2-property-section-toggle:active {
  background: transparent;
}

.v2-panel-title > :is(i, svg) {
  color: var(--paper-cue);
}

/* A collapsible panel (StudioPanel collapsible): the title is a button as wide as the header leaves it, with a caret
   that points down when the panel is open and right when it is folded, so the state does not rest on colour. Folded,
   the panel is its header alone and gives up its share of the dock's height. */
.v2-panel-toggle {
  flex: 1 1 auto;
  margin: calc(-1 * var(--space-2)) 0 calc(-1 * var(--space-2)) calc(-1 * var(--space-3));
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
}

.v2-panel-toggle:hover {
  background: var(--paper-fill-hover);
}

.v2-panel-toggle:focus-visible {
  outline: 1px solid var(--text-main);
  outline-offset: -3px;
}

.v2-panel-title > .v2-panel-caret {
  color: var(--text-main);
}

.fx-float-panel.collapsed {
  flex: 0 0 auto;
  min-height: 0;
}

.fx-float-panel.collapsed > .v2-panel-header {
  border-bottom: 0;
}

/* A host's own display for its panel body must not show a folded one. */
.fx-float-panel.collapsed > .v2-panel-body[hidden] {
  display: none;
}

.v2-panel-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ---- Timeline scrubber: square track and square thumb in every engine ---- */
.v2-timeline-range {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  margin: 0;
  background: transparent;
  border-radius: 0;
  accent-color: var(--color-primary);
}

.v2-timeline-range::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--border-light);
  border: none;
  border-radius: 0;
}

.v2-timeline-range::-moz-range-track {
  height: 4px;
  background: var(--border-light);
  border: none;
  border-radius: 0;
}

.v2-timeline-range::-moz-range-progress {
  height: 4px;
  background: var(--color-primary);
  border-radius: 0;
}

.v2-timeline-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 16px;
  margin-top: -6px; /* centres the 16px thumb on the 4px track */
  background: var(--color-primary);
  border: none;
  border-radius: 0;
}

.v2-timeline-range::-moz-range-thumb {
  width: 10px;
  height: 16px;
  background: var(--color-primary);
  border: none;
  border-radius: 0;
}

.v2-timeline-range:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 2px;
}

.v2-timeline-range:disabled {
  opacity: 0.4;
}
}

@layer tokens, product, kit, app;

/* ==========================================================================
   Shared Cloud Drive Modal (@kit/cloud)
   Token-driven styles for CloudDriveModal across Studio & Paper hosts.
   Scoped strictly to .kit-cloud-* so styles do not leak to other host dialogs.
   ========================================================================== */

@layer kit {
.kit-cloud-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 850;
  /* A scrim: it dims the page behind the open dialog and is the one fill allowed to be see-through. */
  background: rgba(9, 14, 30, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.kit-cloud-modal {
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--paper-line-focus, var(--border-light));
  background: var(--paper, var(--bg-panel));
  color: var(--text-dark, var(--text-main));
  font-family: var(--font-sans);
}

.kit-cloud-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--paper-line, var(--border-light));
  background: var(--paper, var(--bg-panel));
  color: var(--text-dark, var(--text-main));
  font-family: var(--font-sans);
}

.kit-cloud-dialog::backdrop {
  /* A scrim, see .kit-cloud-modal-backdrop. */
  background: rgb(6 12 24 / 72%);
}

.kit-cloud-panel.fx-float-panel {
  position: static;
  width: auto;
  max-height: none;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.kit-cloud-panel .v2-panel-body {
  padding: 0;
  overflow: visible;
}

.kit-cloud-modal-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.kit-cloud-modal-sub {
  font-size: 12px;
  color: var(--paper-text-muted, var(--text-muted));
  line-height: 1.45;
}

/* One column: the Client ID fields hold 70-character ids and need the full width of the modal. */
.kit-cloud-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.kit-cloud-field,
.kit-cloud-grid label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 12px;
  color: var(--paper-text-muted, var(--text-muted));
  min-width: 0;
}

.kit-cloud-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: var(--space-1) var(--space-2);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dark, var(--text-main));
  background: var(--paper-card, var(--bg-surface));
  border: 1px solid var(--paper-line-focus, var(--border-light));
  border-radius: 0;
}

.kit-cloud-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-dark, var(--text-main));
  background: var(--paper-card, var(--bg-surface));
  border: 1px solid var(--paper-line-focus, var(--border-light));
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
}

.kit-cloud-btn:hover:not(:disabled) {
  background: var(--paper-card-hover, var(--bg-surface-hover));
}

.kit-cloud-btn-primary {
  /* The label is the ink (button labels are neutral, owner 2026-11-11); the accent is the icon. */
  color: var(--text-dark, var(--text-main));
  /* Every control on the panel is framed in the focus line (3.4:1 on light paper); the primary one in the ink. */
  border-color: var(--text-dark, var(--text-main));
  font-weight: 600;
}

.kit-cloud-btn-primary:not(:disabled) :is(svg, i) {
  color: var(--paper-teal, var(--color-primary));
}

.kit-cloud-providers,
.kit-cloud-save-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.kit-cloud-status,
.kit-cloud-row {
  padding: var(--space-2) var(--space-2);
  background: var(--paper-card, var(--bg-panel));
  border: 1px solid var(--paper-line, var(--border-light));
}

.kit-cloud-status {
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* An error is named by a warning icon and a word above the message, never by a coloured bar. */
.kit-cloud-error-label {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: 2px;
  font: 700 10px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kit-cloud-file-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-height: 220px;
  overflow-y: auto;
}

.kit-cloud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.kit-cloud-row > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.kit-cloud-row small {
  display: block;
  font-size: 11px;
  color: var(--paper-text-muted, var(--text-muted));
}

.kit-cloud-row-actions {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}

.kit-cloud-empty {
  font-size: 12px;
  color: var(--paper-text-muted, var(--text-muted));
  padding: var(--space-2) 2px;
}

.kit-cloud-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A field rests in the paper's focus line (3.4:1 on light paper, owner 2026-11-12) and darkens it to the ink on hover;
   its fill stays, so the label and the cursor sit on the same colour. */
.kit-cloud-input:hover:not(:disabled) {
  border-color: var(--text-dark, var(--text-main));
}
}

@layer tokens, product, kit, app;

/* ==========================================================================
   Configurator shell (ConfiguratorShell, ViewportToolbar)
   The rail demo's layout (demo-rail.fraxin.object.pl, the reference for every configurator since 2026-11-16) on top
   of the StudioShell: a short word in a frame in the header, the fading camera bar, and the phone layout with the
   rail along the bottom edge. Square corners, 1px lines, tokens only.
   ========================================================================== */

@layer kit {
/* A configurator without rail tools gives the rail's room to the dock. */
.v2-configurator.no-rail {
  --v2-left: var(--v2-gap);
}

/* The camera bar is as wide as its tools, as the rail demo's (it wraps only when the stage is narrower). */
.v2-viewport-toolbar {
  width: max-content;
}

/* Without a middle slot the header keeps one row on narrow screens: the kit's second row would be empty. */
@media (max-width: 980px) {
  .v2-configurator.no-header-center {
    --v2-header-h: 38px;
  }
  .v2-configurator.no-header-center .v2-header {
    grid-template-rows: 36px;
  }
}

/* "Demo" and the like: a mono word in a 1px frame in the product's cue, the label in the ink. */
.v2-configurator-tag {
  display: inline-flex;
  align-items: center;
  height: calc(var(--v2-tool-h) - 6px);
  padding: 0 var(--space-2);
  border: 1px solid var(--paper-cue);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* The camera bar fades to 10% at rest so the model shows through (owner, 2026-11-16). Hover, keyboard focus inside
   it and an open menu (the host's menuOpen, or a button inside with aria-expanded="true") bring it to 100%. */
.v2-viewport-toolbar.is-fading {
  opacity: 0.1;
  transition: opacity 120ms ease;
}

.v2-viewport-toolbar.is-fading:is(:hover, :focus-within, .is-menu-open, :has([aria-expanded="true"])) {
  opacity: 1;
}

/* Without a hover (touch screens) the bar could never come back: it stays at 100%. */
@media (hover: none) {
  .v2-viewport-toolbar.is-fading {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v2-viewport-toolbar.is-fading {
    transition: none;
  }
}

/* A phone: the rail runs along the bottom edge, the dock and the inspector cover the view full width and take turns
   (ConfiguratorShell keeps one of them open), the camera bar sits above the rail with icons only, its views on a
   second row. */
@media (max-width: 760px) {
  .v2-configurator {
    --v2-left: var(--v2-gap);
    --v2-configurator-bottom: calc(var(--v2-rail-w) + var(--v2-gap) * 2);
    /* Two rows of 30px tools, the bar's 4px padding and 1px frame, and a gap. */
    --v2-configurator-toolbar-h: calc(var(--v2-tool-h) * 2 + var(--space-1) * 3 + 2px + var(--v2-gap));
  }

  .v2-configurator .v2-icon-rail {
    top: auto;
    left: var(--v2-gap);
    right: var(--v2-gap);
    bottom: var(--v2-gap);
    width: auto;
    height: var(--v2-rail-w);
    flex-direction: row;
    padding: 0 var(--space-1);
    overflow-x: auto;
  }

  .v2-configurator .v2-rail-group {
    flex-direction: row;
    width: auto;
  }

  .v2-configurator .v2-left-dock,
  .v2-configurator .floating-details-panel {
    left: var(--v2-gap);
    right: var(--v2-gap);
    width: auto;
    max-width: none;
    bottom: calc(var(--v2-configurator-bottom) + var(--v2-configurator-toolbar-h));
    z-index: var(--z-float-panel);
  }

  .v2-configurator .v2-left-dock {
    width: auto;
  }

  .v2-configurator .v2-header-breadcrumb {
    display: none;
  }

  .v2-configurator .v2-viewport-toolbar {
    left: 50%;
    bottom: var(--v2-configurator-bottom);
    max-width: calc(100% - var(--v2-gap) * 2);
  }

  .v2-configurator .v2-viewport-toolbar .btn-icon > :is(svg, i) + span {
    display: none;
  }

  /* The groups wrap as rows without separators; the row starts at the bar's edge (the inline lead that hides the
     first separator on a desktop is undone). */
  .v2-configurator .v2-viewport-toolbar > div {
    margin-left: 0 !important;
    justify-content: center;
  }

  .v2-configurator .v2-viewport-toolbar .v2-toolbar-separator {
    display: none;
  }
}
}


@layer kit {
:root {
  --v2-header-h: 38px;
  --v2-rail-w: 44px;
  /* The compact (.v2-icon-rail) and the expandable (.tc-rail) rail share the cell every icon sits in, and read the
     icon size and stroke from the kit's icon tokens (--icon-size-*, --icon-stroke in tokens.css), so they cannot
     drift apart. */
  --v2-rail-cell: 32px;
  /* One height for every tool in the studio's bars: header tools, canvas tools, zoom, selects (owner, 2026-11-12). */
  --v2-tool-h: 30px;
  /* CodeDiffViewer: added and removed lines, as text on paper at 4.5:1 or more; blue and orange, not green and red,
     and each line keeps its + or - sign. */
  --v2-diff-add: #1d4ed8;
  --v2-diff-remove: #9a3412;
  --v2-gap: var(--space-1); /* 4px between panels, as in @object/kit-editor (owner, 2026-11-14) */
  --v2-top: calc(var(--v2-header-h) + var(--v2-gap) * 2);
  --v2-left: calc(var(--v2-rail-w) + var(--v2-gap) * 2);
  --v2-dock-w: 320px;
  --v2-details-w: 340px;
  /* A floating panel never gets narrower than this; with room for less than two, one panel is shown. */
  --v2-panel-min-w: 220px;
  /* One shadow for every floating surface (header, rail, panels).
     It paints at most --v2-float-shadow-reach past an edge (1px offset plus
     3px blur), which equals --v2-gap, so a surface may just reach its neighbour. */
  --v2-float-shadow: var(--shadow-float, 0 1px 3px rgb(0 0 0 / 22%));
  --v2-float-shadow-reach: var(--space-1);
  --v2-rail-open-w: 220px;

  --z-rail: 80;
  --z-dock: 70;
  --z-float-panel: 100;
  --z-inspector: 105;
  --z-header: 110;
}

[data-theme="dark"] {
  --v2-diff-add: #60a5fa;
  --v2-diff-remove: #fb923c;
}

/* The studio is neutral paper in both themes (owner, 2026-11-12): header, rail, panels and dock are the sheet's
   paper, the viewport between them a grey two steps off it, so the preview reads apart from the controls. The
   product's colour is only its accent and cue. The tokens are re-pointed the way .paper re-points them on a sheet,
   so every studio control reads the same names. */
.v2-studio-app {
  --bg-panel: var(--paper);
  --text-main: var(--text-dark);
  --text-muted: var(--paper-text-muted);
  --border-light: var(--paper-line);
  --border-focus: var(--paper-line-focus);
  --bg-surface: var(--paper-card);
  --bg-surface-hover: var(--paper-card-hover);
  --color-primary-tint: var(--paper-primary-tint);
  --color-primary-tint-hover: var(--paper-primary-tint-hover);
  --color-accent-tint: var(--paper-accent-tint);
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--paper-card-hover);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}

.v2-viewport-area {
  position: fixed;
  inset: 0;
  z-index: 1;
  height: auto;
  background: var(--paper-card-hover);
}

/* ---- Floating Header (38px single row on desktop) --------------------- */
.v2-header {
  position: fixed;
  top: var(--v2-gap);
  left: var(--v2-gap);
  right: var(--v2-gap);
  height: var(--v2-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-3) 0 var(--space-4);
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  box-shadow: var(--v2-float-shadow);
  z-index: var(--z-header);
}

.v2-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.v2-header-logo {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: 'Major Mono Display', var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 2px;
  /* The product's name in the ink, like the text (owner, 2026-11-12); a drawn wordmark (an SVG in currentColor, as
     object-pages' wordmarks) sits at the cap height of the header's text. */
  color: var(--text-main);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

.v2-header-logo svg {
  height: 13px;
  width: auto;
  display: block;
}

.v2-header-breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-header-breadcrumb .sep {
  opacity: 0.4;
}

/* The title is set like the subtitle (owner, 2026-11-12): one size and weight after the logo, no "/" before it; the
   title keeps the ink, the subtitle the muted ink. */
.v2-header-breadcrumb .current {
  color: var(--text-main);
}

.v2-header-center,
.v2-header-right,
.view-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.v2-header-tools {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Button groups are never framed; a separator tells them apart. It keeps its own margins, so it touches
   neither the buttons beside it nor the edges above and below. */
.v2-header-tools > .sep,
.v2-toolbar-separator {
  flex: none;
  width: 1px;
  height: 18px;
  background: var(--border-light);
  margin: 0 var(--space-2);
}

/* ---- Unified Buttons & View Pills -------------------------------------
   The base tool: the panel's paper, a 1px line in the ink, hover and focus one step lighter (--paper-fill-hover), a
   selected tool two steps off the paper (--paper-fill-selected) with the product's cue (--paper-cue) on its icon and
   line, the label keeping the ink, disabled greyed (--paper-disabled-ink). Pressed is the rest fill with a 1px line
   inset in the label colour (states.css). Header and canvas toolbar override the framing below: their tools are bare. */
.btn-icon {
  background: var(--bg-panel);
  border: 1px solid var(--text-main);
  border-radius: 0;
  color: var(--text-main);
  padding: var(--space-1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  font: inherit;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-icon:hover:not(:disabled),
.btn-icon:focus-visible {
  background: var(--paper-fill-hover);
}

.btn-icon:active:not(:disabled) {
  background: var(--bg-panel);
}

.btn-icon.active {
  background: var(--paper-fill-selected);
  border-color: var(--paper-cue);
  color: var(--text-main);
  font-weight: 600;
}

.btn-icon.active :is(svg, i) {
  color: var(--paper-cue);
}

/* The primary button of a panel is the paper's action button: the action colour, one step lighter on hover and
   focus, one darker pressed, under --color-on-accent, with a 1px line in the panel's ink. */
.btn-icon.primary {
  background: var(--color-accent);
  border-color: var(--text-main);
  color: var(--color-on-accent);
  font-weight: 600;
}

.btn-icon.primary:hover:not(:disabled),
.btn-icon.primary:focus-visible {
  background: var(--color-accent-light);
}

/* Its focus ring sits outside, on the panel: the panel's ink, not the label ink of the fill (owner, 2026-11-12). */
.btn-icon.primary:focus-visible {
  outline-color: var(--text-main);
}

.btn-icon.primary:active:not(:disabled) {
  background: var(--color-accent-active);
}

.btn-icon:disabled,
.btn-icon.primary:disabled {
  background: var(--bg-panel);
  border-color: var(--paper-disabled-ink);
  color: var(--paper-disabled-ink);
  cursor: default;
}

/* Tools in the header and on the canvas toolbar are one height, --v2-tool-h, with or without a label; a tool with
   only an icon is square. */
.v2-header .btn-icon,
.v2-canvas-toolbar .btn-icon {
  box-sizing: border-box;
  height: var(--v2-tool-h);
  min-width: var(--v2-tool-h);
  padding: 0 var(--space-2);
  font-size: 11px;
}

/* The theme switch in the header is a tool like the others: --v2-tool-h square, not the 36px of a page header. */
.v2-header .theme-toggle {
  width: var(--v2-tool-h);
  height: var(--v2-tool-h);
}

/* Header: a tool with an icon and no label span is square; a text-only tool keeps its padding. */
.v2-header .btn-icon:has(> :is(svg, i)):not(:has(> span)) {
  width: var(--v2-tool-h);
  padding: 0;
}

.v2-canvas-toolbar .btn-icon.icon-only {
  width: var(--v2-tool-h);
  padding: 0;
}

/* A floating canvas toolbar (CanvasToolbar placement): its own bar over the viewport, framed like the header and
   the panels, centred on the free stage between them or along its side. */
.v2-canvas-toolbar--floating {
  position: absolute;
  z-index: 2;
  padding: var(--space-1);
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  box-shadow: var(--v2-float-shadow);
  max-width: calc(100% - var(--v2-stage-left, 0px) - var(--v2-stage-right, 0px));
  box-sizing: border-box;
}

.v2-canvas-toolbar--top,
.v2-canvas-toolbar--bottom {
  left: calc(var(--v2-stage-left, 0px) + (100% - var(--v2-stage-left, 0px) - var(--v2-stage-right, 0px)) / 2);
  transform: translateX(-50%);
}

.v2-canvas-toolbar--top { top: var(--v2-top); }
.v2-canvas-toolbar--bottom { bottom: calc(var(--v2-gap) + var(--v2-lower-dock-h, 0px)); }

.v2-canvas-toolbar--left,
.v2-canvas-toolbar--right {
  top: 50%;
  transform: translateY(-50%);
}

.v2-canvas-toolbar--left { left: var(--v2-stage-left, var(--v2-left)); }
.v2-canvas-toolbar--right { right: var(--v2-stage-right, var(--v2-gap)); }

/* Header tools are bare (owner, 2026-11-12, trial), the primary one included (the equal-specificity rules here come
   after .btn-icon.primary above, so they win): no fill and no frame at rest; hover and focus take the paper's
   hover fill, a selected tool the selected fill with the cue on its icon. The primary tool keeps its weight and
   takes the action as text on paper (--paper-orange) on its icon, so it stays the one action without a fill. */
.v2-header .btn-icon,
.v2-header .btn-icon:disabled {
  background: transparent;
  border-color: transparent;
}

.v2-header .btn-icon:not(:disabled):is(:hover, :focus-visible) {
  background: var(--paper-fill-hover);
}

/* Pressed is rest again, the bare paper; the pressed line (states.css) tells it apart. */
.v2-header .btn-icon:not(:disabled):active {
  background: transparent;
}

.v2-header .btn-icon.active {
  background: var(--paper-fill-selected);
}

.v2-header .btn-icon.primary {
  color: var(--text-main);
}

.v2-header .btn-icon.primary :is(svg, i) {
  color: var(--paper-orange);
}

/* Tools on the canvas toolbar carry no frame of their own (owner, 2026-11-12): the bar is the frame. Rest is the
   bar's paper, hover a step off it, a selected tool the selected fill, a bolder label and the product's cue on its
   icon, so it reads without colour. */
.v2-canvas-toolbar .btn-icon,
.v2-canvas-toolbar .btn-icon.active,
.v2-canvas-toolbar .btn-icon:disabled {
  border-color: transparent;
}

.v2-toolbar-separator.is-horizontal {
  width: 18px;
  height: 1px;
  margin: var(--space-2) 0;
}

/* The zoom readout is wider than a tool, so 100% and 100% do not make the bar jump. */
.v2-canvas-toolbar .v2-canvas-toolbar-zoom { min-width: 48px; }

.v2-canvas-toolbar-status {
  padding-right: var(--space-2);
}

/* StudioSelect: the kit's select (components/ui/listbox.tsx) drawn as a studio tool, the tool height, a 1px ink
   line and the kit's caret. The button is the visible control; the value sits in a hidden native select. */
.v2-studio-select {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.v2-studio-select-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  /* The 1px ink frame is the box's, not the button's: a long value is cut at this frame and the caret always sits
     inside it. The open list is in the top layer, so the overflow here does not cut it. */
  border: 1px solid var(--text-main);
  box-sizing: border-box;
  overflow: hidden;
  background: var(--bg-panel);
  /* The list takes the studio's paper, ink and type. */
  --kit-select-fill: var(--bg-panel);
  --kit-select-fill-hover: var(--paper-fill-hover);
  --kit-select-fill-selected: var(--paper-fill-selected);
  --kit-select-ink: var(--text-main);
  --kit-select-disabled-ink: var(--paper-disabled-ink);
  --kit-select-font: 11px var(--font-mono);
}

.v2-studio-select-input {
  appearance: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: calc(var(--v2-tool-h) - 2px);
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0 var(--space-5) 0 var(--space-2);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--bg-panel);
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.v2-studio-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-studio-select-input:is(:hover, [aria-expanded="true"]):not(:disabled) { background: var(--paper-fill-hover); }
.v2-studio-select-input:disabled { color: var(--paper-disabled-ink); cursor: default; }
.v2-studio-select-box:has(.v2-studio-select-input:disabled) { border-color: var(--paper-disabled-ink); }

/* The open list (owner, 2026-11-12 and 2026-11-15: round corners in Chromium, then in Firefox): the kit's list
   (controls.css, .kit-listbox), one tool height per option. */
.v2-studio-listbox .kit-listbox__option {
  display: flex;
  align-items: center;
  min-height: var(--v2-tool-h);
  padding: 0 var(--space-2);
}

.v2-studio-select-box .v2-studio-select-caret {
  z-index: 1;
  height: auto;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  width: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  pointer-events: none;
  color: var(--text-main);
}
.v2-studio-select-box:is(:hover, [data-open]):not(:has(:disabled)) .v2-studio-select-caret { background: var(--paper-fill-hover); }

.v2-canvas-toolbar .btn-icon.icon-only svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* A tree row's label (TreeInspector) and an editable property (PropertyGrid): tools on the paper like the
   buttons above. A selected row keeps the ink as its label; its icon takes the product's cue. */
.v2-tree-label {
  background: transparent;
  color: var(--text-main);
}

.v2-tree-label:hover:not(:disabled),
.v2-tree-label:focus-visible {
  background: var(--paper-fill-hover);
}

.v2-tree-label:active:not(:disabled) {
  background: transparent;
}

[aria-selected="true"] > .v2-tree-row .v2-tree-label :is(svg, i) {
  color: var(--paper-cue);
}

.v2-tree-label:disabled {
  color: var(--paper-disabled-ink);
  cursor: default;
}

.v2-property-input {
  background: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid var(--text-main);
  border-radius: 0;
}

.v2-property-input:hover:not(:disabled) {
  background: var(--paper-fill-hover);
}

.v2-property-input:focus-visible {
  background: var(--bg-panel);
}

.v2-property-input:disabled {
  border-color: var(--paper-disabled-ink);
  color: var(--paper-disabled-ink);
}

/* Segmented / View Pill: every pill keeps all four borders; neighbours overlap
   by 1px so they share one edge, and the hovered or active pill is raised so
   its whole border shows. Wrap a set in .v2-view-pills to remove any gap. */
.v2-view-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--text-main);
  border-radius: 0;
  /* At rest the surface the pills stand on shows through: the studio's paper, or a sheet. */
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: relative;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.v2-view-pill + .v2-view-pill {
  margin-left: -1px;
}

.v2-view-pills {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
}

.v2-view-pill:hover:not(.active):not(:disabled) {
  z-index: 1;
  height: auto;
  background: var(--paper-fill-hover);
}

.v2-view-pill:focus-visible {
  z-index: 3;
  background: var(--paper-fill-hover);
}

.v2-view-pill:active:not(.active):not(:disabled) {
  background: transparent;
}

.v2-view-pill.active {
  z-index: 2;
  background: var(--paper-fill-selected);
  color: var(--text-main);
  border-color: var(--paper-cue);
}

.v2-view-pill:disabled {
  background: transparent;
  border-color: var(--paper-disabled-ink);
  color: var(--paper-disabled-ink);
  cursor: default;
}

/* ---- Floating Left Icon Rail (44px wide, 32x32 borderless buttons) ---- */
.v2-icon-rail {
  position: fixed;
  top: var(--v2-top);
  left: var(--v2-gap);
  bottom: calc(var(--v2-gap) + var(--v2-lower-dock-h, 0px));
  width: var(--v2-rail-w);
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  box-shadow: var(--v2-float-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  /* Top and bottom inset close to the side inset: the 32px cell centred in the 44px rail leaves 5px at the sides, and the spacing scale has 4. */
  padding: var(--space-1) 0;
  z-index: var(--z-rail);
  user-select: none;
}

.v2-rail-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
}

.v2-rail-divider {
  width: 22px;
  height: 1px;
  background: var(--border-light);
  margin: 2px 0;
}

.v2-rail-btn {
  width: var(--v2-rail-cell);
  height: var(--v2-rail-cell);
  font-size: var(--icon-size-md, 14px);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  /* Transparent at rest so the selected item's line does not move anything. */
  border: 1px solid transparent;
  box-sizing: border-box;
  border-radius: 0;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s, color 0.15s;
}

.v2-rail-btn:hover,
.v2-rail-btn:focus-visible {
  background: var(--paper-fill-hover);
}

.v2-rail-btn:active {
  background: transparent;
}

/* Selected: the neutral fill is only about 1.3 : 1 against the rail, so the item also takes a 1px line in the
   product's cue (owner, 2026-10-30), as every selected studio tool: 6.9 to 7.5 : 1 against the light rail, 9.3 to
   9.9 : 1 against the dark one. */
.v2-rail-btn.active {
  color: var(--text-main);
  background: var(--paper-fill-selected);
  border-color: var(--paper-cue);
}

.v2-rail-btn.active :is(svg, i) {
  color: var(--paper-cue);
}

.v2-rail-btn:disabled,
.v2-rail-btn[aria-disabled="true"] {
  color: var(--paper-disabled-ink);
  background: transparent;
  cursor: default;
}

/* ---- Expandable Rail (StudioIconRail expandable, .tc-rail) --------------
   Closed it is exactly the compact rail: the same column, width and 32px
   icon cells. .is-open (hover, focus or pinned, set by the host) widens it
   over the dock and viewport to --v2-rail-open-w; it stays below the header.
   Hosts with their own .tc-rail rules (Tila) load after the kit and win. */
.tc-rail {
  position: fixed;
  top: var(--v2-top);
  left: var(--v2-gap);
  bottom: calc(var(--v2-gap) + var(--v2-lower-dock-h, 0px));
  width: var(--v2-rail-w);
  /* The inset at the top and bottom equals the inset at the sides: 5px inside the 1px edge, as the item's side
     margin (and the 32px cell centred in the 44px compact rail). */
  padding: var(--space-1) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  box-shadow: var(--v2-float-shadow);
  color: var(--text-main);
  z-index: var(--z-rail);
  user-select: none;
  transition: width 0.15s;
}

/* Open, the rail floats over the dock and the viewport, so its fill must hide them: the panel tint is laid over the
   opaque page colour, which keeps the brand's tint and loses the see-through. */
.tc-rail.is-open {
  width: var(--v2-rail-open-w);
  background: linear-gradient(var(--bg-panel), var(--bg-panel)), var(--bg-base);
}

/* A pinned rail (StudioShell railPinned) keeps the dock clear of it: --v2-left is measured from the open rail,
   so the left dock moves right by the width the rail gains instead of sitting under it. */
.v2-studio-app.rail-pinned {
  --v2-left: calc(var(--v2-rail-open-w) + var(--v2-gap) * 2);
}

.v2-studio-app.rail-pinned .v2-left-dock {
  transition: left 0.15s;
}

.tc-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.tc-rail-item {
  margin: 0 var(--space-1);
  width: calc(100% - 10px);
  min-height: var(--v2-rail-cell);
  position: relative;
  display: grid;
  grid-template-columns: var(--v2-rail-cell) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 var(--space-2);
  padding: 0 var(--space-2) 0 0;
  background: transparent;
  /* Transparent at rest so the selected item's 1px cue line does not move anything, matching .v2-rail-btn. */
  border: 1px solid transparent;
  box-sizing: border-box;
  border-radius: 0;
  color: var(--text-main);
  font: 400 11px var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.tc-rail-item:hover,
.tc-rail-item:focus-visible {
  color: var(--text-main);
  background: var(--paper-fill-hover);
}

.tc-rail-item:active {
  background: transparent;
}

/* Active differs from hover in more than colour: two neutral steps instead of one, the product's cue as line and icon,
   a bold label. */
.tc-rail-item.is-active {
  color: var(--text-main);
  background: var(--paper-fill-selected);
  border-color: var(--paper-cue);
}

.tc-rail-item.is-active .tc-rail-icon {
  color: var(--paper-cue);
}

.tc-rail-item.is-active .tc-rail-label {
  color: var(--text-main);
  font-weight: 600;
}

.tc-rail-item:focus-visible {
  outline: 1px solid var(--text-main);
  outline-offset: -3px;
}

.tc-rail-item:is(:disabled, [aria-disabled="true"]) {
  color: var(--paper-disabled-ink);
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.tc-rail-icon {
  position: relative;
  width: var(--v2-rail-cell);
  height: var(--v2-rail-cell);
  margin: -1px 0 -1px -1px;
  display: grid;
  place-items: center;
  font-size: var(--icon-size-md, 14px);
  line-height: 1;
}

/* Kit icons (Icon in kit/icons) take their size from the token; host icons in the places the kit draws them
   (toolbar and header buttons, panel titles, view pills) follow the same tokens. :where keeps these rules weaker
   than any host's own. */
.kit-icon {
  /* A 1em box, so an icon-only button keeps its size before the icon font loads. */
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
}

.kit-icon[data-size='sm'] { font-size: var(--icon-size-sm, 12px); }
.kit-icon[data-size='md'] { font-size: var(--icon-size-md, 14px); }
.kit-icon[data-size='lg'] { font-size: var(--icon-size-lg, 20px); }

:where(.btn-icon, .v2-view-pill) > i[class*='ph'] {
  font-size: var(--icon-size-md, 14px);
  line-height: 1;
}

:where(.v2-panel-title) > i[class*='ph'] {
  font-size: var(--icon-size-sm, 12px);
  line-height: 1;
}

/* SVG icons take the same size and stroke in both rails. :where keeps the rule weaker than any host's own. */
:where(.v2-rail-btn, .tc-rail-icon) svg {
  width: var(--icon-size-md, 14px);
  height: var(--icon-size-md, 14px);
  stroke-width: var(--icon-stroke, 1.5);
}

/* Unread marker: square like every other kit shape, ringed in the text colour
   so it reads on both themes without relying on hue. */
.tc-rail-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: var(--color-object-orange, var(--color-primary));
  border: 1px solid var(--text-main);
}

.tc-rail-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Closed, the label and the shortcut are out of the grid and out of sight (nothing peeks past the rail's edge),
   yet the label stays in the accessibility tree because it names the button. */
.tc-rail:not(.is-open) .tc-rail-label {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
}

.tc-rail:not(.is-open) .tc-rail-key {
  display: none;
}

.tc-rail:not(.is-open) .tc-rail-item {
  grid-template-columns: var(--v2-rail-cell);
  padding: 0;
}

.tc-rail-key {
  color: var(--text-muted);
}

.tc-rail-item.is-active .tc-rail-key {
  color: var(--text-muted);
}

.tc-rail-divider {
  flex: none;
  width: 22px;
  height: 1px;
  margin: 2px var(--space-2);
  background: var(--border-light);
  transition: width 0.15s;
}

.tc-rail.is-open .tc-rail-divider {
  width: calc(100% - 22px);
}

/* The divider before the bottom list pushes it to the rail's foot. */
.tc-rail-bottom {
  margin-top: auto;
}

.tc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Dock and inspector share the width ---------------------------------
   Both panels float over the viewport. When both are open they split the room between the rail's right edge
   (--v2-left, which a pinned rail pushes right) and the window's right edge, each taking at most half but never
   less than --v2-panel-min-w. When the room cannot hold two panels of that minimum, StudioShell measures its own
   width and sets `panels-single`: the panel opened most recently shows and the other is hidden (`single-hides-dock` or
   `single-hides-details`, also reported through onSingleFallback), as it does under 640px. `100%` is the window, or
   the stage that contains the fixed layer (transform). */
.v2-studio-app.with-dock.with-details .v2-left-dock {
  width: max(var(--v2-panel-min-w), min(var(--v2-dock-w), calc((100% - var(--v2-left) - var(--v2-gap) * 2) / 2)));
}

.v2-studio-app.with-dock.with-details .floating-details-panel {
  width: max(var(--v2-panel-min-w), min(var(--v2-details-w), calc((100% - var(--v2-left) - var(--v2-gap) * 2) / 2)));
}

.v2-studio-app.with-dock.with-details.panels-single .v2-left-dock {
  width: max(0px, min(var(--v2-dock-w), calc(100% - var(--v2-left) - var(--v2-gap))));
}

.v2-studio-app.with-dock.with-details.panels-single .floating-details-panel {
  width: max(0px, min(var(--v2-details-w), calc(100% - var(--v2-left) - var(--v2-gap))));
}

.v2-studio-app.with-dock.with-details.single-hides-dock .v2-left-dock,
.v2-studio-app.with-dock.with-details.single-hides-details .floating-details-panel {
  display: none;
}

/* ---- Bottom dock (StudioShell bottomDock, StudioBottomDock) --------------
   One full-width band along the bottom edge, as a video editor's timeline. StudioShell measures it into
   --v2-lower-dock-h: the viewport ends at its top edge, so it covers nothing of the model, and the rail, the left
   dock and the inspector end a gap above it. A host whose bottom edge holds something else (a phone's bottom rail)
   sets --v2-lower-dock-offset, and the dock and the viewport's end move up by that much. Its 1px top edge is the
   splitter; the header strip folds it. Square, 1px, opaque. */
.v2-studio-app.with-bottom-dock .v2-viewport-area {
  bottom: calc(var(--v2-lower-dock-h, 0px) + var(--v2-lower-dock-offset, 0px));
}

.v2-bottom-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--v2-lower-dock-offset, 0px);
  z-index: var(--z-dock);
}

.v2-bottom-dock-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(var(--bg-panel), var(--bg-panel)), var(--bg-base);
  border-top: 1px solid var(--border-light);
  color: var(--text-main);
}

/* The splitter: the 1px top edge is what shows; the hit area reaches 3px past it either way. */
.v2-bottom-dock-splitter {
  position: absolute;
  z-index: 1;
  height: auto;
  left: 0;
  right: 0;
  top: -4px;
  height: 7px;
  cursor: row-resize;
  touch-action: none;
}

.v2-bottom-dock-splitter::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 1px;
}

/* Hover shows the edge one neutral step darker, not in the product colour (owner, 2026-11-12: the cue was too
   loud across the whole window). */
.v2-bottom-dock-splitter:hover::after,
.v2-bottom-dock-splitter:focus-visible::after {
  background: var(--border-focus);
}

/* Focused from the keyboard it also takes the kit's 1px ring, so the focus does not rest on the cue colour. */
.v2-bottom-dock-splitter:focus-visible {
  outline: 1px solid var(--text-main);
  outline-offset: -1px;
}

/* The header strip: caret, title, the host's tools, close. The tools wrap onto more lines inside their column
   when the window is too narrow for one, and on a phone they take the rows under the title; nothing scrolls out of
   sight. */
.v2-bottom-dock-header {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-2);
  min-height: 30px;
  box-sizing: border-box;
  padding: 2px var(--space-2) 2px var(--space-1);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.v2-bottom-dock-panel.collapsed .v2-bottom-dock-header {
  border-bottom: 0;
}

/* The strip is one target that folds the dock: the pointer and the paper's hover fill across it; the host's tools
   keep their own states. */
.v2-bottom-dock-header {
  cursor: pointer;
}

.v2-bottom-dock-header:hover {
  background: var(--paper-fill-hover);
}


.v2-bottom-dock-header .v2-panel-title {
  grid-column: 2;
  white-space: nowrap;
}

.v2-bottom-dock-tools {
  grid-column: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: 2px var(--space-1);
}

.v2-bottom-dock-header .v2-panel-close {
  grid-column: 4;
}

.v2-bottom-dock-fold {
  grid-column: 1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text-main);
  cursor: pointer;
}

.v2-bottom-dock-fold:hover,
.v2-bottom-dock-fold:focus-visible {
  background: var(--paper-fill-hover);
}

.v2-bottom-dock-body {
  position: relative;
  overflow: auto;
  min-height: 0;
  /* The ceiling, in CSS so the server's markup does not depend on the window: StudioBottomDock's maxHeight, but never
     more than 60% of the window, and never under its minHeight (both set as variables on the body). */
  max-height: max(var(--v2-dock-min-h, 72px), min(var(--v2-dock-max-h, 480px), 60vh));
}

/* Zero-size probe StudioShell reads to learn --v2-left in pixels. */
.v2-left-probe {
  position: absolute;
  left: var(--v2-left);
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  visibility: hidden;
}

/* ---- Responsive Breakpoints (< 1180px narrower panels, < 980px two-row header, < 640px one panel) ---------
   These come last: the base rules above have the same specificity and would otherwise win over them. */
@media (max-width: 1180px) {
  :root {
    --v2-dock-w: 280px;
    --v2-details-w: 300px;
  }
}

@media (max-width: 980px) {
  .v2-studio-app {
    --v2-header-h: 84px;
    --v2-top: calc(var(--v2-header-h) + var(--v2-gap) * 2);
  }
  .v2-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 36px 40px;
    gap: 0 var(--space-2);
  }
  .v2-header-left {
    grid-area: 1 / 1;
  }
  .v2-header-right {
    grid-area: 1 / 2;
    justify-self: end;
  }
  .v2-header-center,
  .view-controls {
    grid-area: 2 / 1 / 3 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }
}

/* A phone: the bottom dock's tools take the rows under its title. */
@media (max-width: 640px) {
  .v2-bottom-dock-tools {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 2px 0 2px var(--space-1);
  }
}

/* A phone shows one floating panel at a time. StudioShell's own measurement sets panels-single there (the most
   recently opened panel wins); this rule is the fallback before it has measured. */
@media (max-width: 640px) {
  .v2-studio-app.with-dock.with-details:not(.panels-single) .v2-left-dock {
    display: none;
  }
  .v2-studio-app.with-details .floating-details-panel,
  .v2-studio-app.with-dock.with-details .floating-details-panel,
  .v2-studio-app.with-dock.with-details.panels-single .floating-details-panel,
  .v2-studio-app.with-dock.with-details.panels-single .v2-left-dock {
    width: max(0px, calc(100% - var(--v2-left) - var(--v2-gap)));
  }
}

/* ---- Left dock resize handle (StudioShell leftDockResizable) -------------
   A strip in the gap right of the dock, the dock's drawn width from the rail's edge. The 1px line shows on hover and
   focus in the neutral step, as on the other splitters. Not on a phone, where the dock takes the room, nor while the
   inspector hides the dock. */
.v2-left-dock-handle {
  position: fixed;
  top: var(--v2-top);
  bottom: calc(var(--v2-gap) + var(--v2-lower-dock-h, 0px));
  left: calc(var(--v2-left) + var(--v2-dock-drawn) + 2px); /* the panels' 1px borders sit outside their width */
  width: var(--v2-gap);
  z-index: var(--z-dock);
  cursor: ew-resize;
  touch-action: none;
}

.v2-left-dock-handle::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--v2-gap) / 2);
  width: 1px;
}

.v2-left-dock-handle:hover::after,
.v2-left-dock-handle:focus-visible::after {
  background: var(--border-focus);
}

.v2-left-dock-handle:focus-visible {
  outline: 1px solid var(--text-main);
  outline-offset: -1px;
}

.v2-studio-app.single-hides-dock .v2-left-dock-handle {
  display: none;
}

@media (max-width: 640px) {
  .v2-left-dock-handle {
    display: none;
  }
}
}

@layer tokens, product, kit, app;

/* ==========================================================================
   Code editor, editor tabs, problems list (studio kit).
   Modelled on the PHL web editor (phcode): a mono 13px/20px text with a number gutter, the current line's number in the
   product's cue, a filled current line, a file strip above, and diagnostics as code, message and file:line rows.
   Neutral paper in both themes, product colour only as cue. Syntax colours are the palette's text tokens
   (--paper-cue, --paper-teal, --paper-orange, --text-muted), which hold 4.5:1 on paper in every palette and theme;
   keywords also differ by weight so colour is never the only cue. Surfaces are solid; no radius, no shadow.
   The parts expect to sit in .v2-studio-app (StudioShell's root): the paper tokens they use (--bg-panel, --paper-*,
   --text-main) are re-pointed there, so outside it the colours are those of the host page.
   ========================================================================== */

@layer kit {
.v2-code-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- CodeEditor ------------------------------------------------------- */
.v2-code-editor {
  --v2-code-line-h: 20px;
  --v2-code-pad-y: var(--space-1);
  --v2-code-pad-x: var(--space-3);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: var(--bg-panel);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: var(--v2-code-line-h);
  font-variant-ligatures: none;
  tab-size: 2;
}

.v2-code-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.v2-code-inner {
  position: relative;
  display: flex;
  min-width: 100%;
  width: max-content;
  min-height: 100%;
}

.v2-code-gutter {
  position: sticky;
  left: 0;
  z-index: 3;
  flex: none;
  padding: var(--v2-code-pad-y) 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-light);
  color: var(--text-muted);
  user-select: none;
}

.v2-code-gutter-row {
  display: flex;
  align-items: center;
  height: var(--v2-code-line-h);
}

.v2-code-marker {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  font-size: 13px;
}

.v2-code-marker[data-severity='error'] { color: var(--v2-diff-remove); }
.v2-code-marker[data-severity='warning'] { color: var(--paper-orange); }
.v2-code-marker[data-severity='info'] { color: var(--paper-cue); }

.v2-code-number {
  flex: none;
  box-sizing: content-box;
  width: calc(var(--v2-code-digits) * 1ch);
  padding-right: var(--space-2);
  text-align: right;
  font-size: 12px;
}

.v2-code-gutter-row[data-current] .v2-code-number {
  color: var(--paper-cue);
  font-weight: 600;
}

.v2-code-body {
  position: relative;
  flex: 1 0 auto;
  min-width: 0;
}

.v2-code-current {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--v2-code-line-h);
  background: var(--paper-fill-hover);
  pointer-events: none;
}

/* The text area carries the caret, the selection and all input; its own text is invisible. The copy above it
   (pointer-events none) paints the same characters in colour. Both share font, padding and wrapping rules. */
.v2-code-input,
.v2-code-pre {
  margin: 0;
  padding: var(--v2-code-pad-y) calc(var(--v2-code-pad-x) + var(--space-5)) var(--v2-code-pad-y) var(--v2-code-pad-x);
  border: 0;
  border-radius: 0;
  font: inherit;
  line-height: var(--v2-code-line-h);
  letter-spacing: 0;
  white-space: pre;
  word-spacing: 0;
  tab-size: inherit;
  font-variant-ligatures: none;
}

.v2-code-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  /* The one deliberate transparent fill (owner's rule: no transparent fills): the text area lies over the highlighted
     copy and must let it show through; its own text is transparent for the same reason. */
  background: transparent;
  color: transparent;
  caret-color: var(--text-main);
  outline: none;
}

.v2-code-input::selection {
  background: var(--paper-fill-selected);
  color: transparent;
}

.v2-code-pre {
  position: relative;
  z-index: 2;
  pointer-events: none;
  color: var(--text-main);
}

.v2-code-line {
  min-height: var(--v2-code-line-h);
}

.v2-code-line[data-severity='error'],
.v2-code-line[data-severity='warning'] {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.v2-code-line[data-severity='error'] { text-decoration-style: wavy; text-decoration-color: var(--v2-diff-remove); }
.v2-code-line[data-severity='warning'] { text-decoration-style: dotted; text-decoration-color: var(--paper-orange); }

.v2-code-editor:focus-within {
  outline: 1px solid var(--border-focus);
  outline-offset: -1px;
}

.v2-tok-comment { color: var(--text-muted); }
.v2-tok-keyword { color: var(--paper-cue); font-weight: 600; }
.v2-tok-string { color: var(--paper-orange); }
.v2-tok-number { color: var(--paper-orange); font-weight: 500; }
.v2-tok-type { color: var(--paper-teal); }

/* ---- EditorTabs ------------------------------------------------------- */
.v2-editor-tabs {
  display: flex;
  align-items: stretch;
  height: var(--v2-tool-h);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  background: var(--paper-card);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* The strip has no line of its own: each tab carries the bottom line and the active one drops it, so the active tab
   joins the editor. This filler carries the line over the free part of the strip. */
.v2-editor-tabs::after {
  content: '';
  flex: 1 0 auto;
  border-bottom: 1px solid var(--border-light);
}

.v2-editor-tab {
  flex: none;
  display: flex;
  align-items: stretch;
  max-width: 220px;
  background: var(--paper-card);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
}

.v2-editor-tab:hover { background: var(--paper-card-hover); }

.v2-editor-tab[data-active] {
  background: var(--bg-panel);
  color: var(--text-main);
  border-bottom-color: var(--bg-panel);
}

.v2-editor-tab-main {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  padding: 0 var(--space-1) 0 var(--space-2);
  border: 0;
  border-top: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.v2-editor-tab[data-active] .v2-editor-tab-main {
  border-top-color: var(--paper-cue);
  font-weight: 500;
}

.v2-editor-tab-main:focus-visible,
.v2-editor-tab-close:focus-visible {
  outline: 1px solid var(--text-main);
  outline-offset: -3px;
}

.v2-editor-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-editor-tab-dot {
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--paper-cue);
}

.v2-editor-tab-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.v2-editor-tab-close:hover {
  background: var(--paper-fill-selected);
  color: var(--text-main);
}

/* ---- ProblemsList ----------------------------------------------------- */
.v2-problems {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}

.v2-problems-empty {
  padding: var(--space-2) var(--space-3);
  color: var(--text-muted);
}

.v2-problem {
  display: grid;
  grid-template-columns: 84px auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--v2-tool-h);
  padding: var(--space-1) var(--space-3);
  border: 0;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.v2-problem:hover { background: var(--paper-fill-hover); }
.v2-problem[aria-current='true'] {
  background: var(--paper-fill-selected);
  border-left: 1px solid var(--paper-cue);
  padding-left: var(--space-2);
}

.v2-problem:focus-visible {
  outline: 1px solid var(--text-main);
  outline-offset: -3px;
}

.v2-problem-sev {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.v2-problem[data-severity='error'] .v2-problem-sev i { color: var(--v2-diff-remove); }
.v2-problem[data-severity='warning'] .v2-problem-sev i { color: var(--paper-orange); }
.v2-problem[data-severity='info'] .v2-problem-sev i { color: var(--paper-cue); }

.v2-problem-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper-cue);
}

.v2-problem-message { min-width: 0; overflow-wrap: anywhere; }

.v2-problem-place {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (width < 640px) {
  .v2-problem {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px var(--space-2);
  }
  .v2-problem-message { grid-column: 1 / -1; grid-row: 2; }
  .v2-problem-code { justify-self: end; }
  .v2-problem-place { grid-column: 1 / -1; }
}
}

@layer tokens, product, kit, app;

/* Disabled controls on paper (owner, 2026-10-30): every control on a sheet or in a dialog keeps the paper as its
   fill and greys its label and line with --paper-disabled-ink, so switched off reads apart from the live ink. The
   kit's own controls without a disabled rule elsewhere; loaded last, so it wins over their hover and resting
   colours. A link is disabled with aria-disabled="true". */

@layer kit {
:is(.contact-btn, .kit-cloud-btn, .kit-cloud-input, .card-tab, .card-tabs-more, .card-tabs-menu a):is(:disabled, [aria-disabled="true"]),
:is(.contact-btn, .kit-cloud-btn, .kit-cloud-input, .card-tab, .card-tabs-more, .card-tabs-menu a):is(:disabled, [aria-disabled="true"]):hover {
    background: var(--paper);
    border-color: var(--paper-disabled-ink);
    color: var(--paper-disabled-ink);
    cursor: default;
    /* Chromium greys a disabled select with opacity 0.7 of its own; the kit draws disabled with colour only. */
    opacity: 1;
}

/* Pressed (owner, 2026-11-11: no state may rest on colour alone). A pressed control keeps its rest fill, because the
   fill ladder (rest, hover, selected) is already used up, and shows a 1px line in its own label colour, inset 3px from
   its edge, so it differs from rest, hover and selected on any palette and in both themes. The line is the same
   inset line the focus ring of a rail item uses. Footer links are bare text: their line sits outside the link. */
:is(.btn-secondary, .ph-button-outline, .btn-icon, .v2-tree-label, .v2-view-pill, .v2-rail-btn, .tc-rail-item,
    .v2-property-section-toggle, .v2-panel-close, .contact-btn, .kit-cloud-btn, .card-tab, .card-tabs-more, .card-tabs-menu a, .nav-link, .nav-cta, .nav-toggle,
    .ai-toggle, .theme-toggle, .lang-switch):active:not(:disabled):not([aria-disabled="true"]) {
    /* The line is the label colour at 50% (owner, 2026-11-12): it shows the press without a second frame. */
    outline: 1px solid color-mix(in srgb, currentColor 50%, transparent);
    outline-offset: -3px;
}

.social-link:active {
    outline: 1px solid color-mix(in srgb, currentColor 50%, transparent);
    outline-offset: 2px;
}

input[type="checkbox"]:active:not(:disabled) {
    outline: 1px solid var(--checkbox-line, var(--text-dark));
    outline-offset: -3px;
}
}

