/**
 * Garden console styles.
 *
 * ONE stylesheet. Views must not carry their own <style> block — the console previously had
 * four scattered across its screens plus forty classes that were used in markup but defined
 * nowhere, which is precisely why it looked like several different products stitched together.
 *
 * Pico stays underneath as the base, so anything not styled here still looks plain rather than
 * broken. The palette, however, is ours: §2 remaps Pico's own custom properties onto the Eden
 * Creative Collective tokens, which is what recolours every unclassed <button>, <input>,
 * <article> and <table> in fifty-eight view files without editing one of them.
 *
 *   1  fonts          self-hosted woff2, because CDN links are not an option here
 *   2  tokens         ECC brand scale + the Pico remap, per theme
 *   3  base elements  what Pico renders for us: buttons, forms, tables, cards
 *   4  shell          topbar, sidebar, main
 *   5  page furniture headers, tabs, stats, panels, tables, empty states
 *   6  small pieces   pills, chips, flashes, secrets
 *   7  screens        file tree, setup wizard, signed-out pages
 */

/* ── 3. base elements ─────────────────────────────────────────────────────────
   Shape and voice for what Pico renders. Colour is already handled above. */

h1, h2, h3, .grd-display {
  font-family: var(--grd-font-display);
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.15;
}
h4, h5, h6 { font-family: var(--grd-font-display); font-weight: 700; letter-spacing: .02em; }

/* ECC states its buttons in one line: a bordered, transparent chip that fills with teal on
   hover, and a filled `.btn-p` for the primary. Pico's `.outline` and `.secondary` already
   map onto that, so only the metrics need saying. Padding is looser than the reference's
   6px/13px — this console has forms people fill in all day, not a dense planner grid. */
button, [type=submit], [type=button], [type=reset], [role=button],
[type=file]::file-selector-button {
  border-radius: var(--grd-r);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: background-color var(--grd-e), border-color var(--grd-e), color var(--grd-e);
}
button:focus-visible, [type=submit]:focus-visible, [type=button]:focus-visible,
[role=button]:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--grd-teal2);
  outline-offset: 1px;
}

input, select, textarea { border-radius: var(--grd-r); font-size: .85rem; }
fieldset[role=group] :is(button, [type=submit], [role=button]) { white-space: nowrap; width: auto; }
/* --pico-border-radius is 8px, which on a 17px box is indistinguishable from a radio. */
[type=checkbox]:not([role=switch]) { border-radius: 3px; }
label { font-size: .85rem; }
/* The reference sets every field label as a 9px uppercase micro-caption. Held at 11px here so
   it stays legible at the density this console actually runs at. */
form > label, fieldset > label, .grd-panel label {
  font-weight: 600; letter-spacing: .04em;
}

article {
  border: 1px solid var(--grd-line);
  border-radius: var(--grd-rl);
}
article > header, article > footer {
  background: transparent; border-color: var(--grd-line);
  padding: 0 0 .7rem; margin: 0 0 .9rem;
}
article > footer { padding: .7rem 0 0; margin: .9rem 0 0; border-top: 1px solid var(--grd-line); }
article > header {
  font-family: var(--grd-font-display); font-size: 1.1rem; letter-spacing: .02em;
  color: var(--grd-heading);
}
article > header strong { font-weight: 700; }

code, kbd, samp { border-radius: 4px; font-size: .82em; }

/* ── 4. shell ─────────────────────────────────────────────────────────────────── */

.grd-shell { margin: 0; background: var(--grd-bg); }
.grd-plain { width: 100%; max-width: 26rem; margin: 0; }

/* The topbar is ECC's `.ah`: navy, sticky, mint wordmark, quiet controls on the right. It
   keeps the navy in BOTH themes — it is the one piece of permanent brand furniture. */
.grd-topbar {
  display: flex; align-items: center; gap: .75rem;
  min-height: var(--grd-topbar-h);
  padding: .45rem 1.1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--grd-teal2) 25%, transparent);
  position: sticky; top: 0; z-index: 20;
  background: var(--grd-topbar-bg);
}
.grd-brand {
  font-family: var(--grd-font-display);
  font-size: 1.35rem; font-weight: 800; letter-spacing: .04em;
  text-decoration: none; color: var(--grd-mint); line-height: 1;
}
.grd-brand:hover { color: #fff; }
/* The script accent, used once — a tagline beside the wordmark. */
.grd-brand-note {
  font-family: var(--grd-font-script);
  font-size: .95rem; color: var(--grd-teal2); line-height: 1; white-space: nowrap;
}
.grd-topbar-right { margin-left: auto; display: flex; align-items: center; gap: .8rem; font-size: .8rem; }

/* The post editor's modal. Pico dresses `dialog > article` as a card; what it needs on top is a
   sensible width for a form this long and a body that scrolls rather than a dialog taller than
   the screen. */
.grd-modal > article { max-width: 46rem; width: calc(100vw - 2rem); }
.grd-modal > article > form { max-height: min(72vh, 46rem); overflow-y: auto; padding-right: .3rem; }
.grd-modal > article > header { margin-bottom: .6rem; }
.grd-modal > article > header h3 { margin: 0; font-size: 1.15rem; }

/* The undated drafts, as a list you choose from. Each row is what the draft IS — its title, its
   pillar, and a line of the caption, because two drafts started from the same prompt are told
   apart by their words rather than their names. */
.grd-draftlist { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow-y: auto; }
.grd-draft {
  display: flex; align-items: flex-start; gap: .8rem; flex-wrap: wrap;
  padding: .65rem .2rem; border-bottom: 1px solid var(--grd-line);
}
.grd-draft:last-child { border-bottom: 0; }
.grd-draft-what { flex: 1 1 14rem; min-width: 0; }
.grd-draft-what strong { display: block; font-size: .88rem; line-height: 1.3; }
.grd-draft-what small { display: block; font-size: .7rem; color: var(--grd-text-3); }
.grd-draft-caption { margin-top: .2rem; color: var(--grd-text-2) !important; }
.grd-draft-act { display: flex; gap: .4rem; flex-shrink: 0; }
.grd-draft-act button { margin: 0; width: auto; padding: .3rem .75rem; font-size: .75rem; white-space: nowrap; }

/* The undated count is a button now, not a label. It keeps the pill's look and loses the
   browser's button chrome. */
button.grd-pill-btn {
  border: 1px solid transparent; cursor: pointer; width: auto;
  font-family: inherit; line-height: inherit;
}
button.grd-pill-btn:hover { border-color: var(--grd-warn-text); }

/* An operator standing in a subscriber's calendar.
   Amber rather than red: nothing is wrong, but nothing here is yours either. It is sticky under
   the topbar because the state it reports is true of every screen below it, not of the one that
   happened to be open when it was entered — and it carries its own way out, since a state you can
   see and cannot leave is only half a warning.
   The form gets `margin: 0` by hand: Pico spaces every form with `margin-bottom`, and in a
   centre-aligned flex row that margin is part of the box being centred, so the button would sit
   8px above the sentence beside it. Same trap as the password eye. */
.grd-support-bar {
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
  padding: .5rem 1.1rem;
  font-size: .82rem; line-height: 1.35;
  color: var(--grd-warn-text);
  background: color-mix(in srgb, var(--grd-warn) 16%, var(--grd-bg));
  border-bottom: 1px solid color-mix(in srgb, var(--grd-warn) 45%, transparent);
  position: sticky; top: var(--grd-topbar-h); z-index: 19;
}
.grd-support-bar strong { color: var(--grd-text); }
.grd-support-bar form { margin: 0; margin-left: auto; }
.grd-support-leave {
  margin: 0; width: auto; padding: .25rem .8rem;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  color: var(--grd-warn-text); background: transparent;
  border: 1px solid color-mix(in srgb, var(--grd-warn) 60%, transparent);
  border-radius: var(--grd-rp);
}
.grd-support-leave:hover, .grd-support-leave:focus-visible {
  color: var(--grd-bg); background: var(--grd-warn-text);
  border-color: var(--grd-warn-text);
}
/* On a phone the sentence wraps to two lines and `margin-left: auto` would strand the button in
   the corner under it; below 34rem it starts its own row instead. */
@media (max-width: 34rem) {
  .grd-support-bar { gap: .5rem; }
  .grd-support-bar form { margin-left: 0; }
}

/* Pico gives every <details> `margin-bottom: var(--pico-spacing)` (16px) and forces
   `details summary { line-height: 1rem }`. A centre-aligned flex row centres the MARGIN box, so
   that margin was lifting the client switcher exactly 8px above every other control in the bar.
   Measured: every other control sat at -0.5px from the bar's centre, the switcher at -8.5px. */
.grd-switcher, .grd-switcher > summary { margin: 0; }
/* And again for the OPEN state, with the attribute in the selector. Pico's
   `details[open] > summary { margin-bottom: var(--pico-spacing) }` is an accordion affordance —
   room between the summary and the content it reveals — but this menu is absolutely positioned,
   so that 16px only made the switcher taller and, through the bar's centre alignment, nudged
   every other control the moment somebody clicked it. Pico's selector is (0,1,2) and beats a
   plain `.grd-switcher > summary` at (0,1,1); the attribute here makes it (0,2,1). */
.grd-switcher[open] > summary { margin: 0; }

/* One pill, one height — whether the chip is the switcher's <summary> or the plain <span> a
   single-client staff account gets, and whether it sits beside the theme button or not.
   The height comes from `line-height`, NOT from flex centring: Chrome hides a closed <details>'
   content through the summary, and giving that summary `display: inline-flex` breaks the
   mechanism — the switcher menu then renders permanently, 240x370, over the page. Never set
   `display` on this element. A transparent border on the chip matches the button's real one so
   the two pills come out the same height. */
.grd-chip, .grd-theme-btn {
  height: 1.825rem;              /* border-box: 27.2px line + the 1px borders below */
  padding: 0 .7rem; line-height: 1.7rem; overflow: hidden;
  border-radius: var(--grd-rp); font-size: .72rem; font-weight: 600; letter-spacing: .02em;
}
/* NOTE the selector: `span.grd-chip`, never a bare `.grd-chip`. The switcher's chip IS the
   <summary>, and Chrome only hides a closed <details>' content while that summary keeps its
   default `display: list-item` — set any display on it and the menu renders permanently over
   the page. The transparent border is safe on both and matches the button's real 1px. */
.grd-chip { border: 1px solid transparent; }
span.grd-chip { display: inline-block; }

/* The wordmark and its script tagline are two different typefaces sitting side by side, so they
   want a shared BASELINE, not a shared centre — Dancing Script's baseline sits ~1.5px above
   Barlow's at these sizes. The wrapper keeps that local, leaving the bar itself centre-aligned
   for the controls. */
.grd-brandwrap { display: flex; align-items: baseline; gap: .4rem; min-width: 0; }
.grd-quiet-link { text-decoration: none; color: var(--grd-mint); opacity: .75; }
.grd-quiet-link:hover { opacity: 1; color: #fff; }
.grd-menu-btn {
  display: none; margin: 0; padding: .1rem .5rem; background: none; border: 0;
  color: var(--grd-mint); font-size: 1.2rem; width: auto;
}
/* ECC's `.mt`: a bordered pill that fills on hover. */
.grd-theme-btn {
  margin: 0; width: auto;
  border: 1px solid var(--grd-teal);
  background: transparent; color: var(--grd-mint);
}
.grd-theme-btn:hover { background: var(--grd-teal); border-color: var(--grd-teal); color: #fff; }

.grd-body { display: grid; grid-template-columns: var(--grd-sidebar-w) 1fr; align-items: start; }

/* The standalone planner has no sidebar — its tab row is the navigation — so the shell is one
   column, centred rather than left-hugging a rail that is not there. */
.grd-body--solo { grid-template-columns: 1fr; }
.grd-body--solo .grd-main { margin-inline: auto; width: 100%; }

/* ── sidebar ───────────────────────────────────────────────────────────────────
   Nav items are ECC's `.nb`: transparent pills that take a teal border on hover and go solid
   when current. */

.grd-sidebar {
  padding: 1.1rem .7rem; border-right: 1px solid var(--grd-line);
  position: sticky; top: var(--grd-topbar-h);
  height: calc(100vh - var(--grd-topbar-h)); overflow-y: auto;
  background: var(--grd-bg);
}
.grd-navgroup { margin-bottom: 1.15rem; }
.grd-navgroup > summary,
.grd-navlabel {
  list-style: none; cursor: pointer;
  font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--grd-text-3); margin: 0 0 .4rem .55rem; padding: 0;
}
.grd-navgroup > summary::-webkit-details-marker { display: none; }
.grd-navgroup > summary:hover { color: var(--grd-mint); }
/* Pico lays every <nav> out as a flex row (`nav,nav ul{display:flex}`, `nav li{display:inline-block}`)
   and exempts only <aside> from it. The sidebar IS a <nav>, so it has to opt out by hand or the
   whole thing renders as one horizontal strip. */
.grd-sidebar, .grd-sidebar ul, .grd-sidebar li { display: block; }
.grd-sidebar ul { list-style: none; margin: 0; padding: 0; }
.grd-sidebar li { margin: 0 0 1px; padding: 0; }
.grd-sidebar li > a { display: block; margin: 0; }
.grd-sidebar a {
  display: block; padding: .4rem .65rem;
  border: 1px solid transparent; border-radius: var(--grd-rp);
  text-decoration: none; color: var(--grd-text-2);
  font-size: .85rem; font-weight: 500; line-height: 1.35;
  transition: var(--grd-e);
}
.grd-sidebar a:hover { border-color: var(--grd-teal); color: var(--grd-heading); }
.grd-sidebar a.is-active {
  background: var(--grd-teal); border-color: var(--grd-teal);
  color: #fff; font-weight: 600;
}

.grd-main { padding: var(--grd-gap) 1.6rem 4rem; max-width: 1180px; }

@media (max-width: 860px) {
  .grd-body { grid-template-columns: 1fr; }
  .grd-menu-btn { display: block; }
  .grd-sidebar {
    display: none; position: fixed; top: var(--grd-topbar-h); left: 0; bottom: 0; width: 80vw;
    max-width: var(--grd-sidebar-w); z-index: 30; height: auto;
  }
  .grd-sidebar.is-open { display: block; }
  .grd-main { padding: 1rem; }

  /* The topbar carries six things; below this width they wrap into a three-line block. The
     script tagline is the one piece that is decoration rather than a control, so it goes first. */
  .grd-brand-note { display: none; }
  .grd-topbar { flex-wrap: nowrap; padding: .4rem .7rem; gap: .5rem; }
  .grd-menu-btn { padding: 0 .35rem; line-height: 1.7rem; font-size: 1.1rem; }
  .grd-brand { font-size: 1.15rem; }
  .grd-topbar-right { gap: .55rem; font-size: .75rem; min-width: 0; }
  .grd-quiet-link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Narrower still: the signed-in person's name is reachable from the account screen, and the
   theme button reads as an icon on its own. */
@media (max-width: 560px) {
  .grd-topbar-right > .grd-quiet-link:not([href$='logout']) { display: none; }
  /* Horizontal padding only — the pill's height is the shared `line-height: 1.7rem`, and adding
     vertical padding on top of it made this button 43px against the chip's 29px. */
  .grd-theme-btn { padding: 0 .5rem; font-size: 0; }
  .grd-theme-btn::first-letter { font-size: .95rem; }
}

/* ── 5. page furniture ────────────────────────────────────────────────────────
   ECC's `.pt` / `.ps`: a condensed display title in mint over a quiet one-line blurb. */

.grd-page-header {
  display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.15rem; padding-bottom: .8rem; border-bottom: 1px solid var(--grd-line);
}
.grd-page-header h1, .grd-main > h2:first-child {
  margin: 0; font-family: var(--grd-font-display); font-size: 1.85rem; font-weight: 800;
  color: var(--grd-heading); line-height: 1.1; letter-spacing: .01em;
}
.grd-page-header p { margin: .3rem 0 0; color: var(--grd-text-2); font-size: .85rem; max-width: 62ch; }
.grd-page-actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.grd-page-actions button, .grd-page-actions a[role=button] { margin: 0; white-space: nowrap; width: auto; }

/* Sub-navigation within a screen (Shop's tabs, order filters, review states). Pills, matching
   the sidebar and the reference's `.nb` — the underline tab it replaced was the one piece of
   chrome that still looked like stock Pico. */
/* `align-items: center` is load-bearing, not tidiness. A flex row defaults to `stretch`, so
   every tab grows to the height of the tallest thing beside it — and once the row gained an
   action button on the right, the pills stretched to ITS height while their padding stayed at
   the top, leaving 8px above the label and 23px below. Centred, each pill is its own height and
   the text sits with equal space either side. */
.grd-tabs { display: flex; justify-content: flex-start; align-items: center; gap: .3rem;
            flex-wrap: wrap; margin-bottom: 1.15rem; }
.grd-tabs a {
  padding: .34rem .8rem; border-radius: var(--grd-rp);
  border: 1px solid transparent; background: transparent;
  text-decoration: none; color: var(--grd-text-2); font-size: .82rem; font-weight: 500;
  transition: var(--grd-e);
}
.grd-tabs a:hover { border-color: var(--grd-teal); color: var(--grd-heading); }
.grd-tabs a.is-active { background: var(--grd-teal); border-color: var(--grd-teal); color: #fff; font-weight: 600; }
.grd-tabs .grd-count { font-size: .72rem; opacity: .8; }

/* A screen-level action sitting on the tab row, pushed to the far edge. Text only — no fill and
   no border — but carrying the ACTIVE tab's type treatment, so it reads as part of the same
   strip rather than as a button somebody dropped in. `margin-left:auto` is what puts it at the
   right without a wrapper; the row already wraps, so on a narrow screen it drops below the tabs
   instead of squeezing them. */
/* The imported calendar layer. Deliberately NOT one of the holiday category colours: those say
   what KIND of holiday it is, while this says where the date came from — and which dates a
   re-import will replace. Outlined rather than filled, so it reads as annotation beside the
   solid holiday chips rather than competing with them. */
.grd-dot-imported { background: transparent; border: 2px solid var(--grd-teal); }
.grd-cal-imported {
  background: transparent; border: 1px dashed var(--grd-teal); color: var(--grd-text-2);
  cursor: default;
}

/* Modal actions: the thing you came to do, beside the way out. Two equal columns on anything
   wider than a phone and stacked below it, because side-by-side buttons at 360px leave neither
   of them a readable label. */
/* The imported calendars, as a pick-list. Each row is the file, then how many dates it put on
   the grid — which is the number somebody needs to decide whether they want it gone. */
.grd-cal-sources {
  margin: 1.2rem 0 0; padding: .9rem 0 0; border: 0; border-top: 1px solid var(--grd-line);
}
.grd-cal-sources legend {
  padding: 0; margin-bottom: .5rem; font-size: .78rem; font-weight: 600;
  color: var(--grd-heading);
}
.grd-cal-sources label {
  display: flex; align-items: center; gap: .55rem; margin: 0; padding: .3rem 0;
  font-size: .86rem; cursor: pointer;
}
.grd-cal-sources label > span { flex: 1 1 auto; word-break: break-all; }
.grd-cal-sources input[type="checkbox"] { margin: 0; flex: 0 0 auto; }

.grd-modal-actions { display: grid; grid-template-columns: 1fr; gap: .7rem; margin-top: 1.2rem; }
/* Two columns only when there IS a second action, and only where two labels still read — at
   360px a pair of half-width buttons gives neither of them room. */
@media (min-width: 480px) { .grd-modal-actions.is-pair { grid-template-columns: 1fr 1fr; } }
.grd-modal-actions > button { width: 100%; margin: 0; }
.grd-cal-count { margin: 1.2rem 0 0; padding-top: .9rem; border-top: 1px solid var(--grd-line); }

.grd-tabs-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.grd-tabs-actions button,
.grd-tabs-actions a {
  /* Pico gives every button a 16px bottom margin. Left on, it makes the wrapper — and so the
     whole tab row — 16px taller than anything in it, which is what pushed the pills out of
     alignment in the first place. */
  padding: .34rem .2rem; margin: 0; border: 0; background: none; box-shadow: none;
  font-size: .82rem; font-weight: 600; line-height: inherit;
  /* The brand green, which is the point — it should read as part of the tab strip, not shout.
     `--grd-link` rather than `--grd-teal` because the palette already picked, per theme, which
     green carries as TEXT: the tab's fill colour is chosen to sit UNDER white, and the same
     value used as type on the dark ground drops to 2.78:1. Same green, tuned for the job. */
  color: var(--grd-link); text-decoration: none; cursor: pointer;
  transition: var(--grd-e);
}
.grd-tabs-actions button:hover,
.grd-tabs-actions a:hover { color: var(--grd-accent-solid); text-decoration: underline; }
.grd-tabs-actions button:focus-visible,
.grd-tabs-actions a:focus-visible { outline: 2px solid var(--grd-teal); outline-offset: 2px; }

/* ── stat strip ───────────────────────────────────────────────────────────────
   ECC's `.stg` / `.stc` / `.stn` / `.stl`: bordered cards, a big condensed number, a micro
   uppercase caption underneath. */

.grd-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .7rem; margin-bottom: 1.4rem; align-items: start;
}
.grd-stat {
  background: var(--grd-surface); border: 1px solid var(--grd-line);
  border-radius: var(--grd-rl); padding: .85rem .9rem; text-align: center;
  transition: var(--grd-e);
  /* The markup is <small>label</small><strong>value</strong>; ECC's .stc leads with the number. */
  display: flex; flex-direction: column-reverse; justify-content: flex-end;
}
.grd-stat:hover { border-color: var(--grd-teal); }
.grd-stat strong {
  display: block; font-family: var(--grd-font-display); font-size: 1.95rem; font-weight: 800;
  color: var(--grd-heading); line-height: 1;
}
.grd-stat small {
  display: block; margin: .3rem 0 0; color: var(--grd-text-3); font-size: .66rem;
  text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
}
.grd-stat.is-warn { border-color: color-mix(in srgb, var(--grd-err) 45%, transparent); }
.grd-stat.is-warn strong { color: var(--grd-err-text); }

/* ── panels (replace the <details> that hid every primary action) ─────────── */

.grd-panel {
  border: 1px solid var(--grd-line); border-radius: var(--grd-rl);
  padding: 1.1rem 1.15rem; margin-bottom: 1.25rem; background: var(--grd-surface);
}
.grd-panel > h3 {
  margin-top: 0; margin-bottom: .9rem; font-size: 1.15rem; font-weight: 700;
  color: var(--grd-heading); text-transform: uppercase; letter-spacing: .04em;
}
.grd-panel form > label, .grd-panel form > fieldset { margin-bottom: .6rem; }
.grd-panel-actions { display: flex; gap: .5rem; margin-top: .75rem; }
.grd-panel-actions button { margin: 0; width: auto; }
/* The wizard's step body is the same card. */
.grd-wizard-panel {
  border: 1px solid var(--grd-line); border-radius: var(--grd-rl);
  padding: 1.15rem 1.25rem; background: var(--grd-surface);
}

/* ── tables ───────────────────────────────────────────────────────────────────
   Pico paints td/th with their own background, so a hover on <tr> alone never showed. */

.grd-records { width: 100%; font-size: .85rem; margin-bottom: .75rem; }
.grd-records th {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--grd-text-3); font-weight: 700;
}
.grd-records td, .grd-records th {
  padding: .55rem .6rem; vertical-align: middle;
  border-bottom: 1px solid var(--grd-line); background: transparent;
}
.grd-records tbody tr { transition: background var(--grd-e); }
.grd-records tbody tr:hover td { background: var(--grd-surface-2); }
.grd-records .grd-rowactions { white-space: nowrap; text-align: right; }
.grd-records .grd-rowactions a { font-size: .8rem; text-decoration: none; color: var(--grd-teal2); }
.grd-records .grd-rowactions a:hover { text-decoration: underline; color: var(--grd-mint); }
.grd-row-warn td { background: color-mix(in srgb, var(--grd-err) 12%, transparent); }
.grd-thumb, .grd-img-prev { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.grd-img-prev { border: 1px solid var(--grd-line); }

/* ── empty states ─────────────────────────────────────────────────────────────
   ECC's `.mz` / `.add-prm-row`: a dashed teal invitation, never a dead end. */

.grd-empty {
  text-align: center; padding: 2.5rem 1rem;
  border: 2px dashed color-mix(in srgb, var(--grd-teal2) 34%, transparent);
  border-radius: var(--grd-rl); background: var(--grd-surface);
  transition: var(--grd-e);
}
.grd-empty:hover { border-color: var(--grd-teal2); }
.grd-empty h4 { margin: 0 0 .35rem; font-size: 1.05rem; color: var(--grd-heading); }
.grd-empty p { margin: 0 auto 1rem; color: var(--grd-text-2); max-width: 46ch; font-size: .85rem; }
.grd-empty button, .grd-empty a[role=button] { margin: 0; width: auto; }

/* ── 6. small pieces ──────────────────────────────────────────────────────────── */

.grd-muted { color: var(--grd-text-3); }
.grd-err { color: var(--grd-err-text); }

/* A destructive action reads as destructive. Outline rather than filled: it sits beside Save,
   and the loudest button in a form should be the one people mean to press. */
.grd-danger.outline, button.grd-danger {
  --pico-color: var(--grd-err-text);
  --pico-border-color: color-mix(in srgb, var(--grd-err) 55%, transparent);
  --pico-background-color: transparent;
}
.grd-danger:is(:hover, :focus) {
  --pico-color: #fff;
  --pico-background-color: var(--grd-err);
  --pico-border-color: var(--grd-err);
}

/* ECC's `.pl`: a 30%-tint ground, a 50%-tint border and the light text of the same hue. */
.grd-pill {
  display: inline-block; padding: .1rem .55rem; border-radius: var(--grd-rp);
  background: var(--grd-surface-2); color: var(--grd-text-2);
  border: 1px solid var(--grd-line);
  font-size: .68rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap;
}
.grd-pill.is-good {
  background: color-mix(in srgb, var(--grd-ok) 22%, transparent);
  border-color: color-mix(in srgb, var(--grd-ok) 45%, transparent);
  color: var(--grd-ok-text);
}
.grd-pill.is-warn {
  background: color-mix(in srgb, var(--grd-err) 20%, transparent);
  border-color: color-mix(in srgb, var(--grd-err) 45%, transparent);
  color: var(--grd-err-text);
}
.grd-chip {
  background: var(--grd-accent-solid); color: #fff; white-space: nowrap;
}
.grd-stars { color: #ef9f27; letter-spacing: .05em; }
.grd-secret, .grd-spec {
  font-family: var(--pico-font-family-monospace); word-break: break-all;
  background: var(--grd-inset); color: var(--grd-text-2);
  border: 1px solid var(--grd-line);
  padding: .6rem .7rem; border-radius: var(--grd-r); font-size: .8rem;
}
.grd-spec { word-break: normal; white-space: pre-wrap; max-height: 22rem; overflow: auto; }

/* ECC's `.db` / `.xb`: an accent rule down the left edge rather than a full-bleed alert. */
/* ── the flash, where you can actually see it ─────────────────────────────────
   One flash element in the shell is the contract, and it sat at the top of <main>. On a page as
   long as the calendar that means a confirmation for something you did 900px down the page paints
   where nobody is looking: "Use this → draft post" created the post and answered "Post created."
   into a box above the fold, so the button read as broken. It is the same element and the same
   single target — it is just pinned in view now.
   The wrapper takes no clicks, or an empty one would sit over the page swallowing them; the
   message inside takes its own back so it stays selectable. */
#grd-flash {
  position: fixed; z-index: 60;
  top: calc(var(--grd-topbar-h) + .6rem); left: 50%; transform: translateX(-50%);
  width: min(34rem, calc(100% - 2rem));
  pointer-events: none;
}
#grd-flash > * {
  pointer-events: auto;
  box-shadow: var(--grd-shadow);
  border-left-width: 3px;
  margin: 0;
}
/* OPAQUE. In the page these two are a tint over whatever is behind them, which is right for a
   message sitting in the flow — floating over the topbar and the support banner it meant two
   sentences occupying the same pixels. The tint is mixed with the surface instead of with
   transparency, so the tone is the same and the text underneath is gone. */
#grd-flash > .grd-flash-ok  { background: color-mix(in srgb, var(--grd-ok) 16%, var(--grd-surface)); }
#grd-flash > .grd-flash-err { background: color-mix(in srgb, var(--grd-err) 16%, var(--grd-surface)); }
/* An operator in somebody's calendar has a banner under the topbar; the toast clears it rather
   than landing on top of the one line saying whose calendar this is. */
body:has(.grd-support-bar) #grd-flash { top: calc(var(--grd-topbar-h) + 3.2rem); }
/* A confirmation has been read by the time it has been on screen a few seconds; an ERROR has to
   be acted on, so it stays until the next write replaces it. */
#grd-flash > .grd-flash-ok { animation: grdFlashOut .4s ease 6s forwards; }
@keyframes grdFlashOut { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  #grd-flash > .grd-flash-ok { animation-duration: .01s; }
}
/* Inside a modal it is part of the card, not a floating toast: console.js moves the element in
   while the dialog is open, because the top layer is above every z-index there is. */
dialog #grd-flash {
  position: static; transform: none; width: auto; margin-bottom: .6rem;
}

.grd-flash-ok, .grd-flash-err, .grd-setup-invite {
  padding: .65rem .85rem; border-radius: var(--grd-r);
  font-size: .85rem; border: 1px solid transparent; border-left-width: 3px;
}
:is(p, div, article, section).grd-flash-ok,
:is(p, div, article, section).grd-flash-err { display: block; margin-bottom: 1rem; }
/* The same two classes double as inline status badges inside table cells — a block box with a
   rule down its left edge is a page-level message, not a word in a column. */
span.grd-flash-ok, span.grd-flash-err {
  display: inline-block; padding: .1rem .55rem; border-radius: var(--grd-rp);
  font-size: .68rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap;
  border-left-width: 1px; margin: 0;
}
.grd-flash-ok {
  background: color-mix(in srgb, var(--grd-ok) 14%, transparent);
  border-color: color-mix(in srgb, var(--grd-ok) 30%, transparent);
  border-left-color: var(--grd-ok); color: var(--grd-ok-text);
}
.grd-flash-err {
  background: color-mix(in srgb, var(--grd-err) 12%, transparent);
  border-color: color-mix(in srgb, var(--grd-err) 30%, transparent);
  border-left-color: var(--grd-err); color: var(--grd-err-text);
}
/* The onboarding invitation on the console's front door. Not an alert — an offer. */
.grd-setup-invite {
  padding: 1.1rem 1.2rem; border-radius: var(--grd-rl);
  background: var(--grd-surface); border: 1px solid var(--grd-line);
  border-left: 3px solid var(--grd-teal2); font-size: .9rem;
}
.grd-setup-invite header { margin-bottom: .4rem; font-family: var(--grd-font-display);
                           font-size: 1.15rem; color: var(--grd-heading); letter-spacing: .02em; }
.grd-setup-invite p { color: var(--grd-text-2); margin-bottom: .8rem; }
.grd-setup-invite a[role=button] { margin: 0; width: auto; }

.grd-pager { display: flex; justify-content: flex-start; gap: 1rem; align-items: center;
             margin-top: .75rem; font-size: .8rem; }
.grd-searchbar, .grd-recsearch { margin-bottom: .75rem; }
.grd-searchbar fieldset, .grd-recsearch fieldset { margin-bottom: 0; }
.grd-subfilter { display: flex; justify-content: flex-start; gap: .75rem; flex-wrap: wrap;
                 margin-bottom: 1rem; font-size: .82rem; }
.grd-subfilter a { text-decoration: none; }

.grd-rowactions { white-space: nowrap; }
.grd-rowactions form { display: inline; margin: 0; }
.grd-mini { padding: .22rem .55rem; font-size: .72rem; margin: 0 .15rem 0 0; width: auto; }
.grd-rolelist { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .9rem;
                margin: 0; font-size: .82rem; }
.grd-rolelist dt { margin: 0; }
.grd-rolelist dd { margin: 0; color: var(--grd-text-3); }

/* Recovery codes: shown once, meant to be copied or printed. */
.grd-codes { list-style: none; padding: 0; margin: .5rem 0;
             display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .35rem; }
.grd-codes li { font-family: var(--pico-font-family-monospace); font-size: .85rem;
                letter-spacing: .04em; padding: .35rem .55rem; border-radius: var(--grd-r);
                background: var(--grd-inset); border: 1px solid var(--grd-line); }

/* Topbar client switcher. One account can span several clients, so the current one has to be
   visible and changeable from every screen. */
.grd-switcher { position: relative; display: inline-block; }
.grd-switcher > summary { list-style: none; cursor: pointer; }
.grd-switcher > summary::-webkit-details-marker { display: none; }
.grd-switcher > summary::after { display: none; }
.grd-switcher-menu { position: absolute; right: 0; top: calc(100% + .45rem); z-index: 50;
                     min-width: 15rem; max-height: 60vh; overflow-y: auto;
                     background: var(--grd-surface);
                     border: 1px solid var(--grd-line);
                     border-radius: var(--grd-rl); box-shadow: var(--grd-shadow);
                     padding: .3rem; }
.grd-switcher-menu form { margin: 0; }
.grd-switcher-menu button { width: 100%; text-align: left; background: none; border: 0;
                            color: var(--grd-text); padding: .42rem .6rem; margin: 0;
                            border-radius: var(--grd-r); font-size: .82rem; font-weight: 500; }
.grd-switcher-menu button:hover { background: var(--grd-surface-2); color: var(--grd-heading); }
.grd-switcher-menu button.is-current { background: var(--grd-teal); color: #fff; }
.grd-switcher-menu button small { display: block; opacity: .75; font-size: .7rem; font-weight: 400; }

/* ── 7. screens ───────────────────────────────────────────────────────────────── */

/* File tree (Cultivator's explorer panel). */
.grd-workspace { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .grd-workspace { grid-template-columns: 1fr; } }
.grd-tree { border: 1px solid var(--grd-line); border-radius: var(--grd-rl);
            background: var(--grd-surface);
            padding: .6rem; max-height: 78vh; overflow: auto; font-size: .85rem; }
.grd-tree ul { list-style: none; margin: 0; padding-left: 1rem; }
.grd-tree li { padding: .1rem 0; }
.grd-tree .grd-node { cursor: pointer; }
.grd-tree .grd-node:hover { color: var(--grd-teal2); }

/* Setup wizard. */
.grd-wizard { display: grid; grid-template-columns: minmax(200px, 250px) 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 800px) { .grd-wizard { grid-template-columns: 1fr; } }
/* Another <nav>, and Pico flexes those (see .grd-sidebar): without this the step list and the
   "n of 7 done" line below it become flex siblings and sit on top of each other. */
.grd-wizard-nav, .grd-wizard-nav ol, .grd-wizard-nav li { display: block; }
.grd-wizard-nav ol { list-style: none; padding: 0; margin: 0; }
.grd-wizard-nav li { padding: 0; margin: 0 0 2px; }
.grd-wizard-nav > p { margin: .9rem 0 0; font-size: .78rem; }
.grd-wizard-nav li a { display: flex; margin: 0; gap: .6rem; align-items: flex-start; padding: .5rem .6rem;
                       border: 1px solid transparent; border-radius: var(--grd-r);
                       text-decoration: none; color: var(--grd-text-2); transition: var(--grd-e); }
.grd-wizard-nav li a:hover { border-color: var(--grd-teal); color: var(--grd-heading); }
.grd-wizard-nav li.is-current a { background: var(--grd-teal); border-color: var(--grd-teal); color: #fff; }
.grd-step-num { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid;
                place-items: center; font-size: .74rem; font-weight: 700;
                background: var(--grd-surface-2); color: var(--grd-text-2); }
.grd-wizard-nav li.is-done .grd-step-num { background: var(--grd-teal2); color: #fff; }
.grd-wizard-nav li.is-current .grd-step-num { background: rgb(255 255 255 / .22); color: #fff; }
.grd-step-body { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.grd-step-body small { opacity: .8; font-size: .72rem; overflow: hidden; text-overflow: ellipsis; }
.grd-wizard-step > header h3 { margin-bottom: .25rem; color: var(--grd-heading); }
.grd-wizard-foot { display: flex; gap: .75rem; align-items: center; margin-top: 1.4rem;
                   padding-top: 1rem; border-top: 1px solid var(--grd-line); }
.grd-wizard-foot button, .grd-wizard-foot a[role=button] { width: auto; margin: 0; }
/* Skipping is a link, not a button. It used to be the most prominent forward control on every
   step, so a client who had just filled the form in clicked it thinking it meant "next". */
.grd-skip { margin-left: auto; font-size: .82rem; color: var(--grd-text-3); text-decoration: none; }
.grd-skip:hover { color: var(--grd-heading); text-decoration: underline; }

/* A step the client's own answer made unnecessary. Marked, never hidden. */
.grd-wizard-nav li.is-optional a { opacity: .55; }
.grd-wizard-nav li.is-optional a:hover { opacity: 1; }
.grd-records tr.is-optional td { opacity: .6; }
.grd-optional-note { border-left-color: var(--grd-text-3) !important;
                     background: var(--grd-surface-2) !important; color: var(--grd-text-2) !important; }

.grd-wizard-progress { margin: 1rem 0 0; padding-top: .8rem; font-size: .8rem;
                       border-top: 1px solid var(--grd-line); line-height: 1.5; }
.grd-wizard-progress .grd-ready { display: block; color: var(--grd-ok-text); }

/* "Advanced settings" — the six hosting fields a non-technical client cannot answer. */
.grd-advanced { border: 1px solid var(--grd-line); border-radius: var(--grd-r);
                padding: .6rem .8rem; margin: .3rem 0 1rem; background: var(--grd-surface-2); }
.grd-advanced > summary { cursor: pointer; font-size: .82rem; font-weight: 600;
                          color: var(--grd-text-2); letter-spacing: .02em; }
.grd-advanced > summary:hover { color: var(--grd-heading); }
.grd-advanced[open] > summary { margin-bottom: .7rem; }

/* The branded email, shown as its recipient sees it. An iframe because the message carries its
   own <html> and inline styles, and rendering it inline would let a template change restyle the
   console around it. `sandbox=""` in the markup blocks scripts and navigation. */
.grd-mailpreview { display: block; width: 100%; height: 30rem; border: 1px solid var(--grd-line);
                   border-radius: var(--grd-r); background: #f4f6f5; }

/* Pick-a-picture grid: choosing a logo is a click, not a path typed from memory. */
.grd-pickgrid { border: 0; padding: 0; margin: 0 0 1rem; }
.grd-pickgrid legend { font-size: .82rem; font-weight: 600; color: var(--grd-text-2);
                       padding: 0; margin-bottom: .5rem; }
.grd-pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; }
.grd-pickgrid legend { grid-column: 1 / -1; }
.grd-pick { display: block; margin: 0; padding: .5rem; text-align: center; cursor: pointer;
            border: 1px solid var(--grd-line); border-radius: var(--grd-r);
            background: var(--grd-surface); transition: var(--grd-e); }
.grd-pick:hover { border-color: var(--grd-teal); }
.grd-pick.is-current { border-color: var(--grd-teal2);
                       box-shadow: 0 0 0 1px var(--grd-teal2) inset; }
.grd-pick input { position: absolute; opacity: 0; pointer-events: none; }
.grd-pick img { display: block; width: 100%; height: 56px; object-fit: contain; margin-bottom: .35rem; }
.grd-pick small { display: block; font-size: .68rem; color: var(--grd-text-3);
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grd-pick-none { display: grid; place-items: center; height: 56px; margin-bottom: .35rem;
                 border-radius: 4px; background: var(--grd-inset);
                 color: var(--grd-text-3); font-size: .72rem; }
.grd-wizard-foot button, .grd-wizard-foot a[role=button] { width: auto; margin: 0; }

/* Signed-out pages: sign in, forgotten password, reset, accept an invitation. These render
   inside .grd-plain, which the shell uses when nobody is signed in. ECC gates its app behind a
   navy full-bleed screen with one centred card; this is that, minus the theatre. */
/* Pico paints the root element, so a background on <body> alone would stop at the content box
   and leave the page's own ground showing underneath. The gate takes the whole viewport. */
body.grd-shell:has(> .grd-plain) {
  background: var(--grd-navy); min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 2rem 1rem;
}
.grd-auth {
  margin: 0; background: var(--grd-surface);
  border: 1px solid var(--grd-line-strong); border-radius: 14px; padding: 1.8rem 1.6rem;
}
.grd-auth hgroup { margin-bottom: 1.2rem; }
.grd-auth h2 { font-family: var(--grd-font-display); font-size: 1.6rem; font-weight: 700;
               color: var(--grd-heading); margin-bottom: .15rem; }
.grd-auth hgroup p { font-family: var(--grd-font-script); font-size: 1.05rem;
                     color: var(--grd-teal2); margin: 0; }
.grd-auth label { margin-bottom: .75rem; }
.grd-auth button { width: 100%; text-transform: uppercase; letter-spacing: .07em; }
.grd-auth small { display: block; margin: -.4rem 0 .9rem; color: var(--grd-text-3); }
.grd-auth p:last-child { margin-bottom: 0; }
.grd-auth-alt { margin-top: 1.5rem; border-top: 1px solid var(--grd-line); padding-top: .75rem; }
.grd-auth-alt summary { font-size: .82rem; color: var(--grd-text-3); cursor: pointer; }
.grd-auth-alt button { width: auto; }


/* ── social planner ───────────────────────────────────────────────────────────
   The pillar colours are the reference design's, which is why they are literals rather than
   brand tokens: a content pillar is a fixed taxonomy, not a themeable surface. They keep their
   meaning in both palettes because each is used as a 3px edge on a card, never as a text ground. */
:root {
  --grd-pillar-educate:   #1d9e75;
  --grd-pillar-inspire:   #7f77dd;
  --grd-pillar-promote:   #d85a30;
  --grd-pillar-community: #378add;
  --grd-pillar-convert:   #e24b4a;
  --grd-pillar-evergreen: #ba7517;
}
.grd-pillar-educate   { --grd-pillar: var(--grd-pillar-educate); }
.grd-pillar-inspire   { --grd-pillar: var(--grd-pillar-inspire); }
.grd-pillar-promote   { --grd-pillar: var(--grd-pillar-promote); }
.grd-pillar-community { --grd-pillar: var(--grd-pillar-community); }
.grd-pillar-convert   { --grd-pillar: var(--grd-pillar-convert); }
.grd-pillar-evergreen { --grd-pillar: var(--grd-pillar-evergreen); }

.grd-cal-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
.grd-cal-head button { width: auto; margin: 0; }
.grd-cal-title { font-family: var(--grd-font-display); font-size: 1.25rem; color: var(--grd-heading);
                 letter-spacing: .02em; }
.grd-cal-tz { margin-left: auto; font-size: .72rem; }

.grd-cal-legend { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: .7rem; font-size: .7rem;
                  color: var(--grd-text-3); }
.grd-cal-key { display: inline-flex; align-items: center; gap: .3rem; }
.grd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grd-pillar, var(--grd-teal2)); }
.grd-dot-holiday { background: var(--grd-text-3); }

.grd-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.grd-cal-dow { text-align: center; font-size: .64rem; font-weight: 700; letter-spacing: .07em;
               text-transform: uppercase; color: var(--grd-text-3); padding: .35rem 0; }
.grd-cal-cell { min-height: 84px; padding: .3rem; border: 1px solid var(--grd-line);
                border-radius: var(--grd-r); background: var(--grd-surface); overflow: hidden;
                transition: var(--grd-e); }
.grd-cal-cell.is-empty { background: transparent; border-color: transparent; }
.grd-cal-cell.is-today { border-color: var(--grd-teal2); }
/* Set by console.js while a post is dragged over a day. */
.grd-cal-cell.is-drop { border-color: var(--grd-teal2); background: var(--grd-surface-2); }
.grd-cal-num { display: block; font-size: .68rem; font-weight: 700; color: var(--grd-text-2);
               margin-bottom: .15rem; }
.grd-cal-hol { display: block; font-size: .6rem; color: var(--grd-text-3); white-space: nowrap;
               overflow: hidden; text-overflow: ellipsis; }
.grd-cal-post { display: block; width: 100%; margin: 0 0 2px; padding: .12rem .3rem; border: 0;
                border-left: 3px solid var(--grd-pillar, var(--grd-teal2));
                border-radius: 3px; background: var(--grd-surface-2); color: var(--grd-text);
                font-size: .62rem; text-align: left; white-space: nowrap; overflow: hidden;
                text-overflow: ellipsis; cursor: grab; }
.grd-cal-post:hover { background: var(--grd-inset); }

.grd-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem;
             align-items: start; }
.grd-board-col { background: var(--grd-surface); border: 1px solid var(--grd-line);
                 border-radius: var(--grd-rl); overflow: hidden; }
.grd-board-head { padding: .5rem .7rem; font-family: var(--grd-font-display); font-size: .82rem;
                  font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
                  color: var(--grd-heading); background: var(--grd-surface-2); }
.grd-board-card { margin: .4rem; padding: .5rem; border: 1px solid var(--grd-line);
                  border-left: 3px solid var(--grd-pillar, var(--grd-teal2));
                  border-radius: var(--grd-r); background: var(--grd-bg); }
.grd-board-card strong { display: block; font-size: .8rem; margin-bottom: .2rem; }
.grd-board-card select { font-size: .7rem; padding: .15rem .3rem; margin: .35rem 0 0; height: auto; }
.grd-board-card form { margin: 0; }
.grd-board-empty { padding: .5rem .7rem; font-size: .75rem; }

.grd-prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .7rem;
               align-items: start; }
.grd-prompt { border-left: 3px solid var(--grd-pillar, var(--grd-teal2)); margin: 0; }
.grd-prompt header { display: flex; align-items: baseline; gap: .4rem; }
.grd-prompt-caption { white-space: pre-wrap; font-size: .78rem; line-height: 1.55;
                      background: var(--grd-inset); padding: .6rem; border-radius: var(--grd-r);
                      font-family: var(--grd-font-body); }
.grd-prompt-tags { font-size: .72rem; color: var(--grd-info-text); word-break: break-word; }

.grd-bar-row { display: grid; grid-template-columns: 9rem 1fr 2.5rem; align-items: center;
               gap: .5rem; margin-bottom: .3rem; font-size: .78rem; }
.grd-bar-label { color: var(--grd-text-2); }
.grd-bar { display: block; height: 10px; border-radius: 5px; background: var(--grd-surface-2); }
.grd-bar i { display: block; height: 100%; border-radius: 5px; background: var(--grd-teal2); }
.grd-bar-n { text-align: right; font-weight: 700; color: var(--grd-heading); }

/* ── the tips, in two columns ─────────────────────────────────────────────────
   A grid rather than CSS `columns`: opening one accordion in a multi-column flow re-packs every
   card after it, so the thing you were about to read jumps to the other side of the page. Grid
   cells stay where they are and only grow. */
.grd-tipcols {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem; align-items: start;
}
@media (max-width: 60rem) { .grd-tipcols { grid-template-columns: minmax(0, 1fr); } }

.grd-tips { margin: .5rem 0 0; padding-left: 1.1rem; }
/* Near-white, not the soft green. This is the one screen people READ rather than scan for a
   control, and body copy at --grd-text-2 on a dark ground is a page you give up on. */
.grd-tips li {
  margin-bottom: .55rem; font-size: .85rem; line-height: 1.6;
  color: var(--grd-text);
}
.grd-tips li::marker { color: var(--grd-teal2); }
/* The three registers the export-sizes table gets right: a name to find, a value that stands out,
   a note that stays quiet. */
.grd-tip-lead  { color: var(--grd-heading); font-weight: 700; }
.grd-tip-num   { color: var(--grd-teal2); font-weight: 700; font-variant-numeric: tabular-nums; }
.grd-tip-quote { color: var(--grd-text-2); font-style: italic; }
/* Every panel on this tab, the size table included — it is a peer of the tip cards and reading as
   a different kind of thing made the page look half-styled. */
#planner-tips details > summary {
  font-family: var(--grd-font-display); font-size: 1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--grd-heading);
}
.grd-sizes code { font-size: .78rem; color: var(--grd-info-text); }

.grd-conn { padding: .6rem 0; border-bottom: 1px solid var(--grd-line); }
.grd-conn:last-child { border-bottom: 0; }
.grd-conn-head { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; margin-bottom: .4rem; }
.grd-conn-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; font-size: .82rem; }
.grd-conn-row form { margin: 0; }
.grd-conn form { margin: 0; }
.grd-target { display: block; margin-bottom: .2rem; }

/* ── planner: preview card, launcher, media ───────────────────────────────────
   Brand colours are the platforms' own, so they are literals — a client scans this row by
   colour, and recolouring Instagram to the site palette would defeat that. */
.grd-preview { margin-top: 1rem; border-left: 3px solid var(--grd-pillar, var(--grd-teal2)); }
.grd-preview header { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.grd-preview-meta { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .8rem; }
.grd-preview-dirs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .8rem; }
@media (max-width: 700px) { .grd-preview-dirs { grid-template-columns: 1fr; } }
.grd-brief { padding: .55rem .7rem; border-radius: var(--grd-r); background: var(--grd-surface-2);
             border-left: 3px solid var(--grd-teal2); font-size: .8rem; line-height: 1.55;
             color: var(--grd-text-2); margin-bottom: .5rem; }
.grd-brief.is-reel  { border-left-color: var(--grd-mint); }
.grd-brief.is-cross { border-left-color: var(--grd-warn); }
.grd-brief-label { display: block; font-size: .62rem; font-weight: 700; text-transform: uppercase;
                   letter-spacing: .08em; color: var(--grd-text-3); margin-bottom: .2rem; }
.grd-preview-cap { white-space: pre-wrap; font-family: var(--grd-font-body); font-size: .85rem;
                   line-height: 1.6; background: var(--grd-inset); padding: .7rem;
                   border-radius: var(--grd-r); margin-bottom: .5rem; }
.grd-preview-tags { font-size: .78rem; color: var(--grd-info-text); word-break: break-word; }
.grd-preview-warn { font-size: .78rem; margin: .4rem 0 0; }
.grd-preview-media { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .7rem; }
.grd-preview-media img, .grd-preview-media video { width: 74px; height: 74px; object-fit: cover;
                                                   border-radius: var(--grd-r); border: 1px solid var(--grd-line); }

.grd-launch { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.grd-launch form { margin: 0; }
.grd-launch-btn { color: #fff; border: 1px solid transparent; }
.grd-platform-instagram { background: #c13584; }
.grd-platform-facebook  { background: #1877f2; }
.grd-platform-linkedin  { background: #0a66c2; }
.grd-platform-tiktok    { background: #111; border-color: #333; }
.grd-platform-pinterest { background: #e60023; }
.grd-platform-x         { background: #000; border-color: #333; }
/* An unticked platform stays available but recedes — you can still hand off to it. */
.grd-launch-btn.outline { background: transparent; color: var(--grd-text-2); border-color: var(--grd-line); }
.grd-launch-btn.outline:hover { border-color: var(--grd-teal); color: var(--grd-heading); }

.grd-anchor { color: var(--grd-warn-text); margin-right: .15rem; }
.grd-cal-post.is-anchor { border-left-width: 4px; }
button.grd-cal-hol { display: block; width: 100%; margin: 0 0 1px; padding: 0 .2rem; border: 0;
                     background: transparent; color: var(--grd-text-3); font-size: .6rem;
                     text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
                     cursor: pointer; border-left: 3px solid var(--grd-text-3); border-radius: 2px; }
button.grd-cal-hol:hover { background: var(--grd-surface-2); color: var(--grd-heading); }
.grd-hol-federal  { border-left-color: #378add; }
.grd-hol-dei      { border-left-color: #d85a30; }
.grd-hol-lgbtqia  { border-left-color: #7f77dd; }
.grd-hol-smallbiz { border-left-color: #ba7517; }
.grd-hol-cultural { border-left-color: #1d9e75; }
.grd-hol-awareness{ border-left-color: #d4537e; }
.grd-hol-panel { border-left-color: var(--grd-text-3); }

.grd-media { border: 1px solid var(--grd-line); border-radius: var(--grd-r); padding: .7rem; }
.grd-media legend { font-size: .8rem; font-weight: 600; color: var(--grd-text-2); padding: 0 .3rem; }
.grd-media-strip { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.grd-media-item { position: relative; display: inline-block; }
.grd-media-item img, .grd-media-item video { width: 64px; height: 64px; object-fit: cover;
                                             border-radius: var(--grd-r); border: 1px solid var(--grd-line); display: block; }
.grd-media-item.is-uploading, .grd-media-item.is-error {
  display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 .4rem;
  border-radius: var(--grd-r); background: var(--grd-surface-2); font-size: .62rem;
  color: var(--grd-text-3); text-align: center; }
.grd-media-item.is-error { color: var(--grd-err-text); }
.grd-media-remove { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
                    padding: 0; margin: 0; border-radius: 50%; border: 1px solid var(--grd-line);
                    background: var(--grd-surface); color: var(--grd-text-2); font-size: .7rem;
                    line-height: 1; cursor: pointer; }
.grd-media-remove:hover { background: var(--grd-err); color: #fff; border-color: var(--grd-err); }


/* ── the profile tab ──────────────────────────────────────────────────────────
   Ported from the planner this product grew out of, where the account page was a board of cards
   rather than a column of settings. The measurements are that file's: 12px card radius, a 16px
   pad, an uppercase Barlow Condensed card title, and field labels at 10px with .06em of tracking —
   small and quiet, so the answer is what the eye lands on rather than the question. The colours
   are NOT ported: §2 already remaps Pico onto the same Eden palette, so these use the tokens and
   therefore follow the light theme, which the original had only a partial answer for. */
.grd-acct-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem; align-items: start; margin-bottom: .9rem;
}
/* A column INSIDE the grid, so one tall card can sit beside two short ones stacked. Without it
   each card is its own grid item and the row is as tall as the tallest — which left half the
   password row empty and pushed everything else down a screen. */
.grd-acct-col { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.grd-acct-sec {
  background: var(--grd-surface); border: 1px solid var(--grd-surface-2);
  border-radius: var(--grd-rl); padding: 1rem;
}
.grd-acct-sec h3 {
  font-family: var(--grd-font-display); font-size: 1rem; font-weight: 700;
  color: var(--grd-heading); text-transform: uppercase; letter-spacing: .04em;
  margin: 0 0 .75rem;
}
/* The promotional card reads as an offer rather than as another form. Built from the ACCENT over
   the surface, not from a fixed navy: `--grd-navy` is one colour in both themes, so a navy wash
   over a white card came out grey and muddy in light mode. A tint of the accent follows whichever
   surface is under it. */
.grd-acct-sec.is-featured {
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--grd-teal2) 13%, var(--grd-surface)), var(--grd-surface));
  border-color: color-mix(in srgb, var(--grd-teal2) 35%, transparent);
}
.grd-acct-blurb { font-size: .72rem; color: var(--grd-text-2); line-height: 1.55; margin: 0 0 .75rem; }
.grd-acct-line  { font-size: .82rem; margin: 0 0 .4rem; }
.grd-acct-save  { margin-bottom: 1.1rem; }
.grd-acct-save button { width: auto; margin: 0; }

/* A field: a small uppercase label over a full-width control, and the hint under it in the same
   quiet grey. `.grd-af` rather than Pico's label-wrapping-input, because the label has to sit in
   its own line box to carry the tracking without stretching the control. */
.grd-af { margin-bottom: .7rem; }
.grd-af > label {
  display: block; margin-bottom: .25rem;
  font-size: .625rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--grd-text-3);
}
.grd-af input, .grd-af select, .grd-af textarea { width: 100%; margin-bottom: 0; font-size: .82rem; }
.grd-af small { display: block; margin-top: .3rem; font-size: .68rem; color: var(--grd-text-3); line-height: 1.5; }

/* Goal chips. The checkbox is the control and it is still there — visually replaced, not removed,
   so the keyboard tabs through them and a screen reader hears checked/unchecked. State is carried
   by fill AND weight AND a tick, never by colour alone. */
/* Content goals: one pill per goal, outlined until it is chosen.
   
   `.grd-goal`, NOT `.grd-chip`. `.grd-chip` is the topbar's client chip — a component that is a
   FILLED green pill by definition (§ shell) — so borrowing the name handed every goal label that
   component's background, height and padding. The result was a filled cell with an outlined pill
   floating inside it: two nested pills, one of which nobody asked for. A class name is an
   interface; reusing one because it reads well locally is how a change to a topbar chip turns up
   on a profile form.
   
   THE LABEL PAINTS NOTHING. It is a hit target and nothing else — no background, no border, no
   height of its own. Everything visible is the span inside it, so "selected" is the button filling
   in rather than a box lighting up behind it.
   
   `role="group"` on the container is for the screen reader — it announces "Content Goals" for the
   set — and Pico styles that ATTRIBUTE as its input-group COMPONENT, giving every child
   `flex: 1 1 auto`. That stretched each pill to share the row, three across and ragged. The role
   stays; its styling is opted out of by hand, exactly as every <nav> here has to.
   
   The margin is spelled out both ways because Pico's `label:not(:last-of-type)
   { margin-inline-end: 1em }` is specificity (0,1,1) and BEATS a single class. */
.grd-goals { display: flex; flex-wrap: wrap; gap: .35rem; }
.grd-goals > .grd-goal { flex: 0 0 auto; }
.grd-goals .grd-goal {
  position: relative;            /* the checkbox inside is out of flow; it anchors here */
  margin: 0; margin-inline-end: 0; padding: 0;
  background: none; border: 0; height: auto; line-height: normal;
  cursor: pointer;
}
.grd-goal input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.grd-goal span {
  display: inline-block; padding: .3rem .7rem; border-radius: var(--grd-rp);
  border: 1px solid var(--grd-line-strong); font-size: .72rem; line-height: 1.25;
  color: var(--grd-text-2); white-space: nowrap; background: none;
  transition: background var(--grd-e), color var(--grd-e), border-color var(--grd-e);
}
.grd-goal:hover span { color: var(--grd-heading); border-color: var(--grd-teal2); }
/* Chosen: the BUTTON fills. */
.grd-goal input:checked + span {
  background: var(--grd-accent-solid); border-color: var(--grd-accent-solid);
  color: #fff; font-weight: 600;
}
/* No tick inside. Reserving space for one put every label off-centre in its pill, and not
   reserving it made the whole row re-wrap on each click. State is the fill — solid against
   outlined is a difference in greyscale, not a hue — plus the checkbox, which a screen reader
   reads as checked either way. */
.grd-goal input:focus-visible + span { outline: 2px solid var(--grd-teal2); outline-offset: 2px; }

/* The picture, and the control that replaces it. */
.grd-avatar-row { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.grd-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; border: 2px solid var(--grd-teal2); background: var(--grd-surface-2);
}
.grd-avatar.is-empty {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--grd-font-display); font-size: 1.4rem; font-weight: 700;
  letter-spacing: .03em; color: var(--grd-heading);
  border-style: dashed; border-color: color-mix(in srgb, var(--grd-teal2) 55%, transparent);
}
/* `align-items: start`, or the button stretches. A column flex container stretches its children
   to the widest one by default, and the hint line beside it ("JPG, PNG, GIF or WEBP.") is wider
   than the label — so "Add a Photo" rendered as a slab the width of the sentence under it,
   whatever its own `width` said. */
.grd-avatar-act { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; }
/* Pico pulls a hint up under the field it explains: `:where(input, …) + small { margin-top: -12px }`.
   The file input sits between the button and its hint — invisible, but still the `input` in that
   selector — so the hint was dragged 12px up and struck through the button above it. */
.grd-avatar-act small { margin-top: 0; font-size: .68rem; color: var(--grd-text-3); line-height: 1.4; }
.grd-avatar-remove { font-size: .7rem; color: var(--grd-text-3); margin: .1rem 0 0; }
/* Visually hidden, NOT display:none — the input is the real control, so it has to stay focusable
   and announced. The label beside it is what gets drawn. */
.grd-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.grd-file-btn {
  display: inline-block; width: auto; margin: 0; margin-inline-end: 0; cursor: pointer;
  padding: .35rem .85rem; border-radius: var(--grd-r); line-height: 1.25;
  border: 1px solid var(--grd-line-strong); background: transparent;
  font-size: .75rem; font-weight: 600; color: var(--grd-text-2); white-space: nowrap;
}
.grd-file-btn:hover { background: var(--grd-teal); border-color: var(--grd-teal); color: #fff; }
.grd-file-input:focus-visible + .grd-file-btn,
.grd-file-btn:focus-visible { outline: 2px solid var(--grd-teal2); outline-offset: 2px; }

/* The shared password control, wearing this tab's field styling.
   Its markup belongs to five screens and is not changed for one of them — but sitting beside
   "CURRENT PASSWORD" in small caps, its own plain labels read as a different form bolted on. */
.grd-acct-sec .grd-pw > label {
  display: block; margin-bottom: .7rem;
  font-size: .625rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--grd-text-3);
}
.grd-acct-sec .grd-pw > label input { margin-top: .25rem; font-size: .82rem; }
.grd-acct-sec .grd-pw-hint { display: block; margin: -.3rem 0 .7rem; font-size: .68rem; }

/* Storage: the bar, and the files behind it. A <meter> is styled per engine, so both the WebKit
   and the Firefox pseudo-elements are named — miss one and the bar renders in the browser's own
   blue-green on half the machines that open it. */
.grd-storage { grid-column: 1 / -1; }
.grd-meter { width: 100%; height: .55rem; margin: .1rem 0 .7rem; border: 0; border-radius: var(--grd-rp);
             background: var(--grd-surface-2); }
.grd-meter::-webkit-meter-bar { background: var(--grd-surface-2); border: 0; border-radius: var(--grd-rp); }
.grd-meter::-webkit-meter-optimum-value { background: var(--grd-teal2); border-radius: var(--grd-rp); }
.grd-meter::-webkit-meter-suboptimum-value { background: var(--grd-warn); border-radius: var(--grd-rp); }
.grd-meter::-webkit-meter-even-less-good-value { background: var(--grd-err); border-radius: var(--grd-rp); }
.grd-meter::-moz-meter-bar { background: var(--grd-teal2); border-radius: var(--grd-rp); }
.grd-meter:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--grd-warn); }
.grd-meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--grd-err); }

.grd-filelist { list-style: none; margin: .6rem 0 0; padding: 0; max-height: 22rem; overflow-y: auto; }
.grd-file { display: flex; align-items: center; gap: .7rem; padding: .4rem 0;
            border-bottom: 1px solid var(--grd-line); }
.grd-file:last-child { border-bottom: 0; }
.grd-file-thumb { width: 40px; height: 40px; flex-shrink: 0; object-fit: cover;
                  border-radius: var(--grd-r); border: 1px solid var(--grd-line); }
.grd-file-thumb.is-video { display: flex; align-items: center; justify-content: center;
                           background: var(--grd-surface-2); color: var(--grd-teal2); font-size: .9rem; }
.grd-file-meta { flex: 1 1 auto; min-width: 0; }
.grd-file-name { display: block; font-size: .78rem; word-break: break-all; }
.grd-file-meta small { font-size: .68rem; color: var(--grd-text-3); }
.grd-file form { margin: 0; }
.grd-file button { margin: 0; width: auto; padding: .25rem .7rem; font-size: .72rem; }

/* The operator's own links: a dot, a line, a tint on hover. */
.grd-rl {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .7rem; margin-bottom: .3rem;
  background: var(--grd-surface-2); border-radius: var(--grd-r);
  text-decoration: none; color: var(--grd-text-2); font-size: .76rem;
  transition: background var(--grd-e), color var(--grd-e);
}
a.grd-rl:hover { background: color-mix(in srgb, var(--grd-teal2) 14%, transparent); color: var(--grd-heading); }
.grd-rl.is-flat { cursor: default; }
.grd-rl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grd-teal2); flex-shrink: 0; }

/* A featured product. */
.grd-feat {
  display: block; padding: .7rem; margin-bottom: .5rem;
  background: var(--grd-surface-2); border: 1px solid var(--grd-surface-2);
  border-radius: var(--grd-r); text-decoration: none;
  transition: background var(--grd-e), border-color var(--grd-e);
}
a.grd-feat:hover { border-color: var(--grd-teal2); background: color-mix(in srgb, var(--grd-teal2) 10%, transparent); }
.grd-feat-label {
  display: block; font-size: .58rem; font-weight: 700; color: var(--grd-teal2);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: .15rem;
}
.grd-feat-title { display: block; font-size: .78rem; color: var(--grd-text); line-height: 1.4; }
.grd-feat-desc  { display: block; font-size: .68rem; color: var(--grd-text-3); line-height: 1.4; margin-top: .15rem; }

/* Two columns is the design; one is the only honest thing to do with 380px. The cards are
   content-sized, so the row that was beside another simply continues down. */
@media (max-width: 56rem) {
  .grd-acct-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Where to find your Square keys — shown by the installer and the payments screen, from one file.
   Numbered, because it is a sequence somebody follows with another tab open, and the numbers are
   what they come back to after switching away. */
.grd-sqhelp { margin: .3rem 0 1rem; }
.grd-steps-num { margin: .4rem 0 .8rem; padding-left: 1.4rem; }
.grd-steps-num li { margin-bottom: .55rem; font-size: .82rem; line-height: 1.6; color: var(--grd-text); }
.grd-steps-num li::marker { color: var(--grd-teal2); font-weight: 700; }
.grd-steps-num strong { color: var(--grd-heading); }
.grd-steps-num em { color: var(--grd-text-2); font-style: italic; }
/* The two things that cost a support conversation if missed. */
.grd-sqhelp-warn {
  font-size: .8rem; line-height: 1.6; margin: .6rem 0 0;
  padding: .6rem .75rem; border-radius: var(--grd-r);
  border-left: 3px solid var(--grd-warn);
  background: color-mix(in srgb, var(--grd-warn) 12%, transparent);
  color: var(--grd-text);
}
.grd-sqhelp-warn strong { color: var(--grd-warn-text); }

/* The way back from a delete that only hid something. Sits tight under the count it explains. */
.grd-restore { margin: -.2rem 0 .9rem; }
.grd-restore button { width: auto; margin: 0; }

.grd-prompt.is-custom { border-left-color: var(--grd-teal2); }
.grd-prompt fieldset { margin: 0; }
.grd-add-prompt { margin-top: 1rem; }
.grd-seed-offer { margin-top: 1rem; text-align: left; }
.grd-seed-offer form { margin: .6rem 0 0; }

/* ── planner: the last of the template's interactions ────────────────────────── */

/* An empty day offers to take the next undated draft. Faint until hovered — a grid of plus
   signs would read as clutter on a full month. */
.grd-cal-place { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; padding: 0;
                 margin: 0; border: 0; border-radius: 3px; background: transparent;
                 color: var(--grd-text-3); font-size: .8rem; line-height: 1; cursor: pointer;
                 opacity: 0; transition: var(--grd-e); }
.grd-cal-cell { position: relative; }
.grd-cal-cell.is-placeable:hover .grd-cal-place { opacity: 1; }
.grd-cal-place:hover { background: var(--grd-teal); color: #fff; }
.grd-cal-cell.is-placeable:hover { border-color: var(--grd-teal); }

.grd-preview-toggle { margin-left: auto; }
.grd-preview header { width: 100%; }

/* A board card's title opens it, exactly as a calendar chip does. */
.grd-board-open { display: block; width: 100%; margin: 0 0 .2rem; padding: 0; border: 0;
                  background: transparent; color: var(--grd-text); font-size: .8rem;
                  font-weight: 600; text-align: left; cursor: pointer; line-height: 1.3; }
.grd-board-open:hover { color: var(--grd-heading); text-decoration: underline; }
.grd-board-card.is-anchor { border-left-width: 4px; }

/* The floating action button: what it adds depends on the tab. */
.grd-fab { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 40;
           width: 3rem; height: 3rem; padding: 0; margin: 0; border-radius: 50%;
           border: 0; background: var(--grd-accent-solid); color: #fff;
           font-size: 1.6rem; line-height: 1; cursor: pointer;
           box-shadow: var(--grd-shadow); transition: var(--grd-e); }
.grd-fab:hover { background: var(--grd-teal); transform: scale(1.06); }
@media (max-width: 560px) { .grd-fab { right: 1rem; bottom: 1rem; width: 2.6rem; height: 2.6rem;
                                       font-size: 1.4rem; } }

/* Files can be dropped onto the media area, not only browsed for. */
.grd-media.is-drop { border-color: var(--grd-teal2); background: var(--grd-surface-2); }

/* Clicking a day starts a post there, so it has to look like it does something. */
.grd-cal-cell[data-day] { cursor: pointer; }
.grd-cal-cell[data-day]:hover { border-color: var(--grd-teal); background: var(--grd-surface-2); }
/* Their own contents are not the day — they carry their own actions. */
.grd-cal-cell button { cursor: pointer; }
.grd-cal-hint { margin-left: auto; font-size: .68rem; }

/* ── 12. Explore: the query builder ───────────────────────────────────────────
   Server-rendered, because Garden has no build step. goHeadless does this in React; the
   behaviour is the same and the plumbing is plainer. */

.grd-explore-form { margin-bottom: 1rem; }

.grd-explore-head {
  display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin-bottom: 1rem;
}
.grd-explore-head label { margin: 0; }
.grd-explore-head input,
.grd-explore-head select { margin: 0; }
.grd-explore-head input[type=number] { width: 6rem; }
.grd-explore-entity { min-width: 16rem; flex: 1 1 16rem; }
.grd-explore-head button { margin: 0; }

.grd-explore-where legend,
.grd-explore-grid legend,
.grd-explore-rel legend { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.grd-explore-where legend select { margin: 0; width: auto; padding: .15rem 1.6rem .15rem .4rem; font-size: .85em; }

/* One condition per row: field, operator, value, remove. */
.grd-cond {
  display: grid; grid-template-columns: minmax(8rem, 1.2fr) minmax(6rem, .8fr) minmax(8rem, 1.4fr) auto;
  gap: .5rem; margin-bottom: .5rem;
}
.grd-cond select, .grd-cond input { margin: 0; }
.grd-cond button { margin: 0; padding: 0 .6rem; }

.grd-explore-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem .75rem;
}
.grd-explore-grid label { margin: 0; }
.grd-explore-grid select, .grd-explore-grid input { margin: 0; }
.grd-explore-hint { grid-column: 1 / -1; margin: 0 0 .5rem; font-size: .9em; }

.grd-explore-preview { margin-bottom: 1rem; }
.grd-explore-preview summary { cursor: pointer; }

.grd-code, .grd-code-out {
  background: var(--grd-surface-2); border: 1px solid var(--grd-line);
  border-radius: var(--grd-r); padding: .6rem .75rem;
  font-family: var(--pico-font-family-monospace); font-size: .82rem;
  white-space: pre-wrap; word-break: break-all; max-height: 22rem; overflow: auto;
}
.grd-code-out { word-break: normal; }
textarea.grd-code-input {
  font-family: var(--pico-font-family-monospace); font-size: .85rem; white-space: pre;
  overflow-x: auto;
}

.grd-explore-count { margin: 0 0 .5rem; }
.grd-tablewrap { overflow-x: auto; }   /* wide results scroll, the page never does */
.grd-explore-table { margin: 0; font-size: .9rem; }
.grd-explore-table th { white-space: nowrap; }
.grd-explore-table td { vertical-align: top; }
.grd-explore-table td.grd-num { text-align: right; font-variant-numeric: tabular-nums; }

/* The relationship map. Indentation carries the direction; no diagram library. */
.grd-relmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; }
.grd-relmap h4 { margin: 0 0 .5rem; }
.grd-rellist { list-style: none; padding: 0; margin: 0; }
.grd-rellist li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem;
  padding: .35rem 0; border-bottom: 1px solid var(--grd-line);
}
.grd-arrow { color: var(--grd-text-3); }

/* The tree: depth as indentation, so a flat ordered list reads as a hierarchy. */
.grd-tree code { font-size: .82rem; }
.grd-tree td { padding-top: .3rem; padding-bottom: .3rem; }

/* ── the operator console ───────────────────────────────────────────────────────
   Colour is never the only encoding: every state pill carries the WORD as well, so
   "Trial · 12d" and "Lapsed" read the same to somebody who cannot tell the two tints
   apart. The tints exist so a full table can be scanned rather than read. */

.grd-pill.is-trial {
  background: color-mix(in srgb, var(--grd-info) 20%, transparent);
  border-color: color-mix(in srgb, var(--grd-info) 45%, transparent);
  color: var(--grd-info-text);
}
.grd-pill.is-paying {
  background: color-mix(in srgb, var(--grd-ok) 22%, transparent);
  border-color: color-mix(in srgb, var(--grd-ok) 45%, transparent);
  color: var(--grd-ok-text);
}
.grd-pill.is-lapsed {
  background: color-mix(in srgb, var(--grd-warn) 20%, transparent);
  border-color: color-mix(in srgb, var(--grd-warn) 45%, transparent);
  color: var(--grd-warn-text);
}
.grd-pill.is-none { opacity: .72; }

/* A suspended row is dimmed but never hidden — it is still somebody's account, and the
   reason to look at this screen is usually that one of these rows is why. */
.grd-table tr.is-suspended > td { opacity: .55; }

/* Numbers right-align so decimal points line up and a column is scannable. */
.grd-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Row actions sit at the right-hand end and do not stretch the row. */
.grd-rowaction { text-align: right; white-space: nowrap; }
/* `width: auto` is load-bearing, not tidying. Pico sizes `button[type=submit]` to `width: 100%`
   — a sensible default for a form's own submit — and "Open" IS a submit, so it stretched to the
   full width of the cell while "Manage" beside it, a `type="button"`, kept its content width. The
   pair rendered as one wide slab and one small pill on the same row. */
.grd-rowaction button { margin: 0; padding: .2rem .6rem; font-size: .72rem; width: auto; }
/* Two actions per row: "Open" is a form (it POSTs with a token), "Manage" is a plain button.
   The form goes inline so the two read as one pair rather than stacking, and its margin is zeroed
   because Pico gives every form a `margin-bottom` — inside a table cell that pushes the whole row
   taller and drops the pair below the text beside it. Same trap as the password eye. */
.grd-rowaction form { display: inline; margin: 0; }
.grd-rowaction > * + * { margin-left: .4rem; }

/* Visible to a screen reader, not on screen. A column of buttons still needs a heading. */
.grd-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.grd-warn { color: var(--grd-warn-text); }

/* A row of independent one-button forms — each posts on its own, so they are separate
   <form>s rather than one form with several submits. */
.grd-actions-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .9rem 0 .3rem; }
.grd-actions-row form { margin: 0; }
.grd-actions-row button { margin: 0; }

/* Key/value facts about the install. */
.grd-kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: .4rem 0 0; }
.grd-kv dt { color: var(--grd-text-3); font-size: .78rem; }
.grd-kv dd { margin: 0; font-size: .82rem; }

/* Deletion, and it should look like it. Open, it is red-edged; closed, it is a quiet
   line somebody has to choose to open. */
.grd-danger { margin-top: 1.4rem; border-top: 1px solid var(--grd-line); padding-top: .9rem; }
.grd-danger > summary { cursor: pointer; color: var(--grd-err-text); font-size: .82rem; }
.grd-danger[open] {
  border: 1px solid color-mix(in srgb, var(--grd-err) 45%, transparent);
  border-radius: var(--grd-r); padding: .9rem 1rem; background: color-mix(in srgb, var(--grd-err) 8%, transparent);
}
.grd-btn-danger {
  background: var(--grd-err); border-color: var(--grd-err); color: #fff;
}
.grd-btn-danger:hover { filter: brightness(1.08); }

/* ── what a subscriber is choosing between ──────────────────────────────────── */
.grd-plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem; margin: 1.2rem 0;
}
.grd-plan {
  margin: 0; display: flex; flex-direction: column; gap: .6rem;
}
.grd-plan > header { display: flex; flex-direction: column; gap: .15rem; }
.grd-plan-price { font-family: var(--grd-font-display); font-size: 1.55rem; color: var(--grd-heading); }
.grd-plan ul { margin: 0; padding-left: 1.1rem; font-size: .82rem; color: var(--grd-text-2); }
/* The featured plan is marked by a BORDER and a heavier price, not by colour alone — a
   host theme can flatten a background, and then every card looks the same. */
.grd-plan.is-featured { border: 1px solid var(--grd-teal2); }
.grd-plan.is-featured .grd-plan-price { font-weight: 700; }
/* The button sits at the bottom whatever the feature list length, so a row of cards has
   its actions on one line. */
.grd-plan form { margin: auto 0 0; }
.grd-plan button { width: 100%; margin: 0; }

/* A search strip: a box, a filter, a button, on one line.
   It had no rule at all, so every control stretched to full width and the three stacked —
   on the prompts screen as well as the admin one. A class with no rule behind it is styling
   that silently does nothing, which is why smoke_standalone now asserts there are none. */
.grd-recsearch {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem;
}
.grd-recsearch > input[type="search"] { flex: 1 1 16rem; margin: 0; }
.grd-recsearch > select { flex: 0 1 12rem; margin: 0; }
/* `width: auto` is load-bearing: Pico styles every <button> to `width: 100%`, so without it the
   button claims a whole row to itself and the strip wraps to two lines. */
.grd-recsearch > button { flex: 0 0 auto; width: auto; margin: 0; }
.grd-actions-row button { width: auto; }
.grd-danger button { width: auto; }

/* ── setup ──────────────────────────────────────────────────────────────────────
   The one page somebody sees before anything works, so it carries its own layout
   rather than the shell's: there is no session, no nav, and possibly no database. */
.grd-install { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.2rem 4rem; }

/* Requirements. Each row says what it is for, and a failed one says how to fix it —
   pass/fail is carried by the word and the mark, never by colour alone. */
.grd-checks { list-style: none; margin: .6rem 0 0; padding: 0; }
.grd-checks li {
  display: grid; grid-template-columns: 1.4rem 1fr; gap: .1rem .5rem;
  padding: .45rem 0; border-bottom: 1px solid var(--grd-line);
}
.grd-checks li > * { grid-column: 2; }
.grd-checks li::before {
  grid-column: 1; grid-row: 1 / span 3; font-weight: 700; line-height: 1.4;
}
.grd-checks li.is-ok::before  { content: "✓"; color: var(--grd-ok-text); }
.grd-checks li.is-bad::before { content: "✗"; color: var(--grd-err-text); }
.grd-checks small { color: var(--grd-text-3); font-size: .76rem; }
.grd-checks .grd-fix { color: var(--grd-warn-text); }

/* What the installer did, in the order it did it — so a failure says how far it got. */
.grd-steps { margin: .4rem 0 1rem 1.1rem; padding: 0; font-size: .85rem; color: var(--grd-text-2); }
.grd-steps li { margin: .15rem 0; }

/* ── choosing a password ────────────────────────────────────────────────────────
   The toggle and the meter are injected by console.js, so everything here styles
   something that may not exist — which is the point: with no JavaScript the two
   plain inputs still look right on their own. */

.grd-pw { margin-bottom: .4rem; }

/* The eye sits INSIDE the field's own box rather than beside it, so the input keeps
   its full width and the two fields stay the same size as every other field on the
   form. The label is the positioning context. */
/* The wrapper takes the input's bottom margin, and the input gives it up.
   Pico spaces a field with `margin-bottom: var(--pico-spacing)`, and that margin is part
   of the WRAPPER's height — so centring the button on the wrapper put it half a margin
   (8px) below the middle of the box it is supposed to sit in. Moving the margin up one
   level makes the wrapper exactly as tall as the input, which is what `top: 50%` has to
   mean for this to line up. The spacing itself is unchanged: it is the same variable, on
   the element one step out. */
.grd-pw-box { position: relative; display: block; margin-bottom: var(--pico-spacing); }
.grd-pw-box > input { margin-bottom: 0; padding-right: 2.9rem; }
/* Two classes deep on purpose: `.grd-auth button { width: 100% }` styles every button in
   the sign-in card, and a single-class rule loses to it — which stretched this one across
   the whole field and dropped it under the text. */
/* Icon-only, so the hit target is set explicitly rather than left to fall out of the
   glyph's size: 32px square is comfortable on a phone, where this is tapped with a
   thumb beside a keyboard that is already covering half the screen. */
.grd-pw-box > .grd-pw-eye {
  position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; margin: 0; padding: 0;
  background: transparent; color: var(--grd-text-3);
  border: 1px solid transparent; border-radius: var(--grd-rp);
}
.grd-pw-box > .grd-pw-eye > svg { display: block; }
.grd-pw-box > .grd-pw-eye:hover { color: var(--grd-heading); border-color: var(--grd-line); }
/* The keyboard needs to see where it is. Pico's own focus ring is drawn for full-width
   controls and is too loud at 2rem, so this one is drawn to fit. */
.grd-pw-box > .grd-pw-eye:focus-visible {
  outline: 2px solid var(--grd-teal2); outline-offset: 1px; border-color: transparent;
}
/* Pressed changes the ICON (an eye, then an eye struck through) as well as the colour,
   so the state survives a theme that flattens backgrounds and reads to somebody who
   cannot separate the two tints. The accessible name changes with it. */
.grd-pw-box > .grd-pw-eye[aria-pressed="true"] { color: var(--grd-heading); }

/* The gauge. Width is the signal; the word beneath it is the answer — a bar alone
   asks somebody to interpret a colour, which is exactly what a colour-blind person
   cannot do. */
.grd-pw-meter { margin: -.2rem 0 .7rem; }
.grd-pw-bar {
  height: 4px; border-radius: 2px; overflow: hidden;
  background: color-mix(in srgb, var(--grd-line) 70%, transparent);
}
.grd-pw-bar > span {
  display: block; height: 100%; width: 0; border-radius: 2px;
  transition: width .18s ease, background-color .18s ease;
}
.grd-pw-bar > span.is-weak   { background: var(--grd-err); }
.grd-pw-bar > span.is-fair   { background: var(--grd-warn); }
.grd-pw-bar > span.is-good   { background: var(--grd-teal2); }
.grd-pw-bar > span.is-strong { background: var(--grd-ok); }

.grd-pw-say, .grd-pw-match {
  margin: .25rem 0 0; font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  min-height: 1em;   /* reserved, so the form does not jump as the words change */
  color: var(--grd-text-3);
}
.grd-pw-say.is-weak   { color: var(--grd-err-text); }
.grd-pw-say.is-fair   { color: var(--grd-warn-text); }
.grd-pw-say.is-good,
.grd-pw-say.is-strong { color: var(--grd-ok-text); }
.grd-pw-match.is-ok   { color: var(--grd-ok-text); }
.grd-pw-match.is-bad  { color: var(--grd-err-text); }

@media (prefers-reduced-motion: reduce) {
  .grd-pw-bar > span { transition: none; }
}
.grd-pw-hint { display: block; margin: .1rem 0 .9rem; }
