/* Harvest Compute theme: common.css
   Shared look for every screen: the colour tokens, buttons, inputs, cards, chips, dialogs, empty states.

   Stage 1 of the warm look (9 Nov 2026). Ben liked the styling of Astra's demo ("i like the styling"), so Claude
   rebuilt its palette here as token values; nothing from the demo's code is used. Adapted from the demo:
     - warm cream surfaces, deep green text, forest green actions, earthy warning and error colours (Astra's values);
     - borders: Astra's dark #85877b outline is used only on controls (--ctl), so dense panels and tables keep light
       dividers (--line, --line2);
     - power keeps its own orange (Astra had merged it with warning), a shade deeper in light mode for 3:1 on cream;
       the map's own colours are unchanged;
     - base text stays 14px (the demo used 15px) so the dense map panels keep their layout.
   Loaded after every add-on, so rules here win over the add-on defaults at the same specificity.
   Use the tokens (var(--accent) ...), scope every rule under the screen root, no url() to other sites, no @import. */

:root{
  --bg:#f5f2eb; --panel:#fffcf5; --fg:#29362d; --muted:#5d5f53; --line:#d9d5c6; --line2:#ebe7db; --ctl:#85877b;
  --accent:#346344; --accent-fg:#ffffff; --sel:#006d77; --warn:#8b4b20; --bad:#a62d29; --ok:#346344; --power:#c46f1f;
  --chip:#e6e9da; --radius:8px; --shadow:0 4px 16px rgba(41,54,45,.10);
  /* site types (20 Nov 2026): greenhouse only, datacenter only, datacenter + greenhouse. Claude's starting values
     for Astra to adjust; each is 3:1 or better on every panel colour, and the red is not the error red (--bad) */
  --type-gh:#2e7d4f; --type-dc:#c62828; --type-both:#1f5fbf;
  /* ranking bands (21 Nov 2026; Ben: "color coding rankings ... across the whole board"): the map's own score
     shades, with an ink for each that reads at 4.5:1 or better on it. The chip is a filled shape, so the same values
     serve the light and the dark schemes. */
  --rank-good:#1a9641; --rank-good-ink:#031208; --rank-ok:#fdae61; --rank-ok-ink:#3d2600; --rank-poor:#d7301f; --rank-poor-ink:#ffffff;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --bg:#1e241f; --panel:#272f28; --fg:#f0eee4; --muted:#b5bbab; --line:#414b40; --line2:#323b32; --ctl:#858e7f;
  --accent:#a2c697; --accent-fg:#1e241f; --sel:#80d1d4; --warn:#edb77e; --bad:#ffaaa0; --ok:#a2c697;
  --chip:#354333; --shadow:0 4px 16px rgba(0,0,0,.35);
  --type-gh:#6cc48e; --type-dc:#ff6b6b; --type-both:#7fb0ff;
} }
:root[data-theme="dark"]{
  --bg:#1e241f; --panel:#272f28; --fg:#f0eee4; --muted:#b5bbab; --line:#414b40; --line2:#323b32; --ctl:#858e7f;
  --accent:#a2c697; --accent-fg:#1e241f; --sel:#80d1d4; --warn:#edb77e; --bad:#ffaaa0; --ok:#a2c697;
  --chip:#354333; --shadow:0 4px 16px rgba(0,0,0,.35);
  --type-gh:#6cc48e; --type-dc:#ff6b6b; --type-both:#7fb0ff;
}
/* the ranking chip (HC.ranking.chip): a small filled pill in the band's shade with the word (Good, OK, Poor) or the
   number in it. A site type's badge is an outline with an icon, so the two cannot be taken for each other. */
.hc-rank{--r:var(--chip);--ri:var(--fg);display:inline-block;padding:0 7px;border-radius:999px;background:var(--r);color:var(--ri);font-size:11px;font-weight:600;line-height:1.6;letter-spacing:.01em;white-space:nowrap;vertical-align:middle;font-variant-numeric:tabular-nums;-webkit-print-color-adjust:exact;print-color-adjust:exact}   /* printed with its fill, or the white word on the red chip would vanish on paper */
.hc-rank[data-rank="good"]{--r:var(--rank-good);--ri:var(--rank-good-ink)}
.hc-rank[data-rank="ok"]{--r:var(--rank-ok);--ri:var(--rank-ok-ink)}
.hc-rank[data-rank="poor"]{--r:var(--rank-poor);--ri:var(--rank-poor-ink)}
@media (forced-colors:active){.hc-rank{border:1px solid CanvasText}}
/* the site type badge (HC.siteTypes.badge): the icon in the type's colour and the word in the text colour, so it
   reads without colour; the same on every screen */
.hc-type{--t:var(--muted);display:inline-flex;align-items:center;gap:4px;padding:1px 8px 1px 6px;border:1px solid var(--t);border-radius:999px;background:color-mix(in srgb,var(--t) 9%,var(--panel));color:var(--fg);font-size:12px;font-weight:500;line-height:1.5;white-space:nowrap;vertical-align:middle;text-transform:none;letter-spacing:0}
.hc-type[data-type="gh"],.hc-type-ic[data-type="gh"]{--t:var(--type-gh)}
.hc-type[data-type="dc"],.hc-type-ic[data-type="dc"]{--t:var(--type-dc)}
.hc-type[data-type="gh_dc"],.hc-type-ic[data-type="gh_dc"]{--t:var(--type-both)}
.hc-type-ic{color:var(--t);flex:0 0 auto;vertical-align:middle}

/* Controls: a clear outline (3:1 against the panel) and a visible focus ring everywhere. */
input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{border-color:var(--ctl)}
:focus-visible{outline:3px solid var(--sel);outline-offset:2px}
button,a.btn{border-color:var(--ctl)}
button.primary{border-color:var(--accent)}

/* The site workflow bar (Find site ... Presentations) had fixed light colours that failed in dark mode. */
.wf .wf-st[data-s=done] .n{color:var(--accent-fg)}
.wf .wf-st[aria-current=step]{background:var(--chip)}
.wf .wf-st[aria-current=step] .n{box-shadow:0 0 0 2px var(--chip),0 0 0 3.5px var(--accent)}
