/* ============================================================
 * ScaffOS design tokens - V432
 *
 * Copied VERBATIM from ap-estimator/assets/app.css per EST Claw's brief
 * of 9 Sep 2026. Same custom-property names on purpose: --ape-* means the
 * same thing in both plugins, so a value can be changed in one place when
 * the language moves.
 *
 * DO NOT edit values here to suit a PM screen. If a token is wrong for PM,
 * that is a conversation with EST Claw, not a local override - two plugins
 * with the same token name and different values is worse than no tokens.
 *
 * Direction, in one line: an engineering instrument, not a SaaS dashboard.
 * Dense over airy, quiet over branded, figures that line up over figures
 * that look nice.
 *
 * ONE KNOWN CONFLICT, deliberately unresolved here: --ape-accent is
 * reserved in EST for current-state and primary highlight only. In PM's
 * cashflow grid, yellow already means TOTAL - that is Daniel's own
 * workbook language and V359.1.5 avoided yellow for row separators so it
 * would not smear. The cashflow keeps the workbook meaning. Everywhere
 * else follows EST.
 *
 * V454: the faces ARE adopted now - see the @font-face block below.
 * ============================================================ */

/* V454: the faces, self-hosted. Copied verbatim from ap-estimator/assets/
 * fonts - the same seven woff2 files, ~148K total.
 *
 * NO CDN, per the brief and for a reason that matters here: the portal has
 * to render the same on a site with no outbound access, and a font that
 * arrives late reflows a table of money. Paths are relative to this
 * stylesheet, so assets/css/../fonts resolves without any PHP.
 *
 * font-display: swap - the system stack shows immediately and the page
 * settles rather than blocking on the download. */
@font-face { font-family:'AP Plex'; src:url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'AP Plex'; src:url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'AP Plex'; src:url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'AP Plex'; src:url('../fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'AP Plex Mono'; src:url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'AP Plex Mono'; src:url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'AP Plex Mono'; src:url('../fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); font-weight:600; font-style:normal; font-display:swap; }

:root {
  /* Type */
  --ape-font:      'AP Plex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ape-font-mono: 'AP Plex Mono', 'SF Mono', Menlo, Consolas, monospace;

  --ape-t-micro: 11px;   /* table headers, eyebrows */
  --ape-t-small: 12px;   /* hints, captions */
  --ape-t-body:  14px;   /* default */
  --ape-t-lead:  16px;   /* panel titles */
  --ape-t-h2:    20px;   /* section headings */
  --ape-t-h1:    26px;   /* estimate title */
  --ape-t-fig:   30px;   /* headline figures */

  /* Surface */
  --ape-canvas:        #F7F5F0;
  --ape-card:          #ffffff;
  --ape-card-alt:      #FAF9F5;
  --ape-border:        #E8E4DB;
  --ape-border-strong: #D4CFC1;
  --ape-divider:       #EFEBE1;

  /* Text */
  --ape-text:           #1F1F1F;
  --ape-text-secondary: #5C5A55;
  --ape-text-muted:     #918D82;

  /* Semantic - reserved uses only */
  --ape-accent:      #F5B800;   /* Assetprep yellow - current-state / primary highlight ONLY */
  --ape-accent-dim:  #C79A00;   /* darker, for legibility on light bg (charts, values) */
  --ape-accent-tint: #FDF3D6;
  --ape-pos:         #0F7B3C;
  --ape-pos-tint:    #E6F3EB;
  --ape-neg:         #B7472A;
  --ape-neg-tint:    #F9EAE3;
  --ape-info:        #2563EB;
  --ape-info-tint:   #E8F0FD;

  /* Charts - same semantics as the hub */
  --ape-chart-revenue: #C79A00;
  --ape-chart-cost:    #B7472A;
  --ape-chart-margin:  #0F7B3C;

  /* Spacing - 4px base. Use the scale, not arbitrary px. */
  --ape-s1: 4px;  --ape-s2: 8px;  --ape-s3: 12px; --ape-s4: 16px;
  --ape-s5: 24px; --ape-s6: 32px; --ape-s7: 48px;

  /* Radius + elevation. Shadows are almost nothing on purpose -
     depth comes from borders and background steps, not lift. */
  --ape-r-sm: 4px;   --ape-r-md: 6px;   --ape-r-lg: 10px;
  --ape-shadow-1: 0 1px 2px rgba(31,31,31,.04);
  --ape-shadow-2: 0 2px 8px rgba(31,31,31,.06);

  /* Width */
  --ape-shell: 1780px;
}
@media (min-width: 2100px) { :root { --ape-shell: 2000px; } }
@media (max-width: 1100px) { :root { --ape-shell: 100%; } }
