/**
 * Garden design tokens — the Eden Creative Collective scale, and the fonts that carry it.
 *
 * Extracted from app.css so the CONSOLE and the SITE BUILDER can share one palette without one
 * of them keeping a copy. The builder cannot load app.css whole: §3 styles bare `button`,
 * `input` and `article`, which would fight VvvebJs's own editor.css and break its chrome. It
 * can load this, because this declares nothing but custom properties and @font-face.
 *
 * Loaded as a separate <link> rather than an @import — an @import is a second, SERIAL request,
 * and two <link>s fetch in parallel.
 *
 *   consumers: views/layout/base.phtml, public/install.php,
 *              public/assets/vvveb/builder.html
 */

/* ── 1. fonts ─────────────────────────────────────────────────────────────────
   Barlow Condensed is the display voice (headings, stat numbers, the brand mark);
   Inter carries body and UI; Dancing Script is the accent script, used only for the
   tagline under the brand. Inter and Dancing Script ship as variable fonts — one file
   each covering the whole weight range — so five files cover eight faces. */

@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/barlow-condensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/barlow-condensed-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('/assets/fonts/barlow-condensed-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Dancing Script'; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url('/assets/fonts/dancing-script-var.woff2') format('woff2');
}

/* ── 2. tokens ────────────────────────────────────────────────────────────────
   Brand constants first: these do not change with the theme. */

:root {
  --grd-navy:  #0a3d35;
  --grd-teal:  #1a6b54;
  --grd-teal2: #1d9e75;
  --grd-mint:  #b8ddd0;
  --grd-pale:  #e8f5f0;

  --grd-font-display: 'Barlow Condensed', 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --grd-font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --grd-font-script:  'Dancing Script', 'Brush Script MT', cursive;

  --grd-r:  8px;    /* controls, buttons, rows  */
  --grd-rl: 12px;   /* cards and panels         */
  --grd-rp: 20px;   /* pills and chips          */
  --grd-e:  .18s ease;

  --grd-sidebar-w: 232px;
  --grd-gap: 1.25rem;
  --grd-topbar-h: 3.25rem;

  /* Pico scales its root font-size up to 131.25% on a wide screen, which is why the console
     read as oversized next to the reference design. Pinned: the ECC look is a dense one. */
  --pico-font-size: 100%;
  --pico-font-family: var(--grd-font-body);
  --pico-line-height: 1.55;
  --pico-border-radius: var(--grd-r);
  --pico-transition: var(--grd-e);
  --pico-form-element-spacing-vertical: .5rem;
  --pico-form-element-spacing-horizontal: .8rem;
  --pico-typography-spacing-vertical: .9rem;
}

/* Dark is the default — it is the palette the design was drawn in. `:root:not([data-theme])`
   is matched too so a page that forgets the attribute still gets the brand rather than Pico's
   stock blue. Both selectors are (0,2,0), which is what Pico uses, and this sheet loads second. */
:root[data-theme='dark'],
:root:not([data-theme]) {
  --grd-bg:         #0d1a17;
  --grd-surface:    #122720;
  --grd-surface-2:  #1a3530;
  --grd-line:       #1a3530;
  --grd-line-strong:#1d9e75;
  --grd-text:       #e8f5f0;
  --grd-text-2:     #9dcfbf;
  --grd-text-3:     #6aab96;
  --grd-heading:    #b8ddd0;
  --grd-topbar-bg:  #0a3d35;
  --grd-inset:      #0a3d35;

  --grd-ok:   #1d9e75; --grd-ok-text:   #5dcaa5;
  --grd-warn: #ba7517; --grd-warn-text: #ef9f27;
  --grd-err:  #e24b4a; --grd-err-text:  #f09595;
  --grd-info: #378add; --grd-info-text: #85b7eb;

  --grd-shadow: 0 6px 24px rgb(0 0 0 / .45);

  /* White on --grd-teal2 is only 3.39:1. teal2 stays the accent for borders, focus rings and
     the 3px rules (non-text, needs 3:1), but anything carrying white LABEL text uses this. */
  --grd-accent-solid: #17845f;      /* white text: 4.66:1 */
  --grd-bdr-ctl: var(--grd-line-strong);
  --grd-link: var(--grd-teal2);

  --pico-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(157, 207, 191)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --pico-icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(157, 207, 191)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  --pico-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(157, 207, 191)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
  --pico-icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(157, 207, 191)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  --pico-icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(157, 207, 191)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ECC's `.lm` override. Same hues, inverted weight — a white card on a pale mint ground. */
:root[data-theme='light'] {
  --grd-bg:         #f4f9f7;
  --grd-surface:    #ffffff;
  --grd-surface-2:  #f0f8f5;
  --grd-line:       #d7ece4;
  --grd-line-strong:#b8ddd0;
  --grd-text:       #0a3d35;
  --grd-text-2:     #1a6b54;
  --grd-text-3:     #217a5d;   /* ECC's #2a8a6a is 3.99:1 here — under AA for body text */
  --grd-heading:    #0a3d35;
  --grd-topbar-bg:  #0a3d35;
  --grd-inset:      #eef7f3;

  --grd-ok:   #1a6b54; --grd-ok-text:   #0f6e56;
  --grd-warn: #ba7517; --grd-warn-text: #8a5510;
  --grd-err:  #c9403f; --grd-err-text:  #b3302f;
  --grd-info: #1a5fa5; --grd-info-text: #1a5fa5;

  --grd-shadow: 0 6px 24px rgb(10 61 53 / .12);

  --grd-accent-solid: #157f5e;      /* white text: 4.97:1 */
  /* ECC's --bdr #b8ddd0 is 1.47:1 on white — far under the 3:1 WCAG 1.4.11 asks of a control
     boundary. Kept as the decorative --grd-line-strong; form controls use this instead. */
  --grd-bdr-ctl: #4f8f7a;           /* 3.79:1 on white */
  /* teal2 as link text is 3.18:1 on this ground; the darker teal is 6.03:1. */
  --grd-link: var(--grd-teal);

  --pico-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(26, 107, 84)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --pico-icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(26, 107, 84)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  --pico-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(26, 107, 84)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
  --pico-icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(26, 107, 84)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  --pico-icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(26, 107, 84)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
}

/* The remap. Every --pico-* below is one Pico reads somewhere in its own rules, so setting it
   here recolours the element Pico draws — no class, no view edit. Kept in Pico's own order. */
:root[data-theme='dark'],
:root:not([data-theme]),
:root[data-theme='light'] {
  --pico-background-color: var(--grd-bg);
  --pico-color: var(--grd-text);
  --pico-text-selection-color: color-mix(in srgb, var(--grd-teal2) 30%, transparent);
  --pico-muted-color: var(--grd-text-3);
  --pico-muted-border-color: var(--grd-line);

  --pico-primary: var(--grd-link);
  --pico-primary-background: var(--grd-accent-solid);
  --pico-primary-border: var(--grd-accent-solid);
  --pico-primary-underline: color-mix(in srgb, var(--grd-teal2) 50%, transparent);
  --pico-primary-hover: var(--grd-mint);
  --pico-primary-hover-background: var(--grd-teal);
  --pico-primary-hover-border: var(--grd-teal);
  --pico-primary-hover-underline: var(--grd-mint);
  --pico-primary-focus: color-mix(in srgb, var(--grd-teal2) 45%, transparent);
  --pico-primary-inverse: #fff;

  --pico-secondary: var(--grd-text-2);
  --pico-secondary-background: var(--grd-surface-2);
  --pico-secondary-border: var(--grd-line);
  --pico-secondary-underline: color-mix(in srgb, var(--grd-text-2) 50%, transparent);
  --pico-secondary-hover: var(--grd-text);
  --pico-secondary-hover-background: color-mix(in srgb, var(--grd-teal) 35%, var(--grd-surface-2));
  --pico-secondary-hover-border: var(--grd-teal);
  --pico-secondary-hover-underline: var(--grd-text);
  --pico-secondary-focus: color-mix(in srgb, var(--grd-text-3) 35%, transparent);
  --pico-secondary-inverse: var(--grd-text);

  --pico-contrast: var(--grd-heading);
  --pico-contrast-background: var(--grd-navy);
  --pico-contrast-border: var(--grd-teal);
  --pico-contrast-underline: color-mix(in srgb, var(--grd-heading) 50%, transparent);
  --pico-contrast-hover: var(--grd-mint);
  --pico-contrast-hover-background: var(--grd-teal);
  --pico-contrast-hover-border: var(--grd-teal2);
  --pico-contrast-hover-underline: var(--grd-mint);
  --pico-contrast-focus: color-mix(in srgb, var(--grd-mint) 35%, transparent);
  --pico-contrast-inverse: var(--grd-mint);

  --pico-box-shadow: none;
  --pico-h1-color: var(--grd-heading);
  --pico-h2-color: var(--grd-heading);
  --pico-h3-color: var(--grd-heading);
  --pico-h4-color: var(--grd-heading);
  --pico-h5-color: var(--grd-text);
  --pico-h6-color: var(--grd-text-2);

  --pico-mark-background-color: color-mix(in srgb, var(--grd-warn) 30%, transparent);
  --pico-mark-color: var(--grd-text);
  --pico-ins-color: var(--grd-ok-text);
  --pico-del-color: var(--grd-err-text);
  --pico-blockquote-border-color: var(--grd-line-strong);
  --pico-blockquote-footer-color: var(--grd-text-3);

  --pico-button-box-shadow: none;
  --pico-button-hover-box-shadow: none;

  --pico-table-border-color: var(--grd-line);
  --pico-table-row-stripped-background-color: var(--grd-surface-2);

  --pico-code-background-color: var(--grd-inset);
  --pico-code-color: var(--grd-text-2);
  --pico-code-kbd-background-color: var(--grd-text-2);
  --pico-code-kbd-color: var(--grd-bg);

  --pico-form-element-background-color: var(--grd-surface);
  --pico-form-element-selected-background-color: var(--grd-surface-2);
  --pico-form-element-border-color: var(--grd-bdr-ctl);
  --pico-form-element-color: var(--grd-text);
  --pico-form-element-placeholder-color: var(--grd-text-3);
  --pico-form-element-active-background-color: var(--grd-surface);
  --pico-form-element-active-border-color: var(--grd-mint);
  --pico-form-element-focus-color: var(--grd-teal2);
  --pico-form-element-invalid-border-color: var(--grd-err);
  --pico-form-element-invalid-active-border-color: var(--grd-err);
  --pico-form-element-invalid-focus-color: color-mix(in srgb, var(--grd-err) 45%, transparent);
  --pico-form-element-valid-border-color: var(--grd-ok);
  --pico-form-element-valid-active-border-color: var(--grd-ok);
  --pico-form-element-valid-focus-color: color-mix(in srgb, var(--grd-ok) 45%, transparent);

  --pico-switch-background-color: var(--grd-surface-2);
  --pico-switch-checked-background-color: var(--grd-teal2);
  --pico-switch-color: #fff;

  --pico-range-border-color: var(--grd-surface-2);
  --pico-range-active-border-color: var(--grd-teal);
  --pico-range-thumb-border-color: var(--grd-surface);
  --pico-range-thumb-color: var(--grd-teal2);
  --pico-range-thumb-active-color: var(--grd-mint);

  --pico-accordion-border-color: var(--grd-line);
  --pico-accordion-active-summary-color: var(--grd-mint);
  --pico-accordion-close-summary-color: var(--grd-text);
  --pico-accordion-open-summary-color: var(--grd-text-2);

  --pico-card-background-color: var(--grd-surface);
  --pico-card-border-color: var(--grd-line);
  --pico-card-box-shadow: none;
  --pico-card-sectioning-background-color: var(--grd-surface-2);

  --pico-dropdown-background-color: var(--grd-surface);
  --pico-dropdown-border-color: var(--grd-line);
  --pico-dropdown-box-shadow: var(--grd-shadow);
  --pico-dropdown-color: var(--grd-text);
  --pico-dropdown-hover-background-color: var(--grd-surface-2);

  --pico-modal-overlay-background-color: rgb(3 12 10 / .72);
  --pico-progress-background-color: var(--grd-surface-2);
  --pico-progress-color: var(--grd-teal2);
  --pico-tooltip-background-color: var(--grd-navy);
  --pico-tooltip-color: var(--grd-mint);
}

