/* ─────────────────────────── ELEMENT BASE ─────────────────────────── */
/* Bare-element foundation (front-end only; kept out of tokens.css so it never
   reaches the iframe-less CKEditor editing area — see css/wysiwyg.css for the
   .ck-content twin of these rules). */
body {
  margin: 0;
  font-family: var(--gt-font-body);
  font-size: var(--gt-text-md);
  line-height: var(--gt-leading-normal);
  color: var(--gt-ink);
  background: var(--gt-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
}
h1, h2, h3, h4, h5 { font-family: var(--gt-font-head); font-weight: var(--gt-head-weight); letter-spacing: var(--gt-head-tracking); line-height: var(--gt-leading-tight); margin: 0; color: var(--gt-ink); text-wrap: balance; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--gt-focus-ring); border-radius: var(--gt-radius-sm); }
::selection { background: var(--gt-primary-soft); }

/* ─────────────────────── RICH-TEXT / BODY ELEMENTS ───────────────────────
   Global element styling; components override on their own class. */
/* Body copy carries the muted ink + relaxed measure. */
p { margin: 0; color: var(--gt-ink-2); line-height: var(--gt-leading-relaxed); }
/* Heading sizes. */
h2 { font-size: var(--gt-text-2xl); }
h3 { font-size: var(--gt-text-xl); }
h4 { font-size: var(--gt-text-lg); }
h5 { font-size: var(--gt-text-md); }
h6 { font-size: var(--gt-text-sm); }
/* Links. */
a { color: var(--gt-link); text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--gt-link) 40%, transparent); border-radius: 3px; transition: text-decoration-color .15s, color .15s; }
a:hover { text-decoration-color: currentColor; }
/* Tables — figure.table is CKEditor's wrapper. Reset figure UA margin (rhythm adds the
   top margin back) and let wide tables scroll. */
figure { margin: 0; }
figure.table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* The table component's scroll wrapper — same concern as figure.table. Global
   rather than in table.css: views-view-table.html.twig and dataset/table.html.twig
   emit the class from raw markup and never attach component CSS. */
.gt-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: var(--gt-text-sm); }
table caption { text-align: left; font-size: var(--gt-text-xs); color: var(--gt-ink-3); margin-bottom: var(--gt-space-2); }
th { text-align: left; padding: var(--gt-space-3) var(--gt-space-4); font-weight: var(--gt-w-bold); color: var(--gt-ink); background: var(--gt-surface-2); border-bottom: 2px solid var(--gt-border-2); }
td { padding: var(--gt-space-3) var(--gt-space-4); border-bottom: var(--gt-border-width) solid var(--gt-border); color: var(--gt-ink-2); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gt-surface-2); }
/* Blockquote. This rule is also the `blockquote` component's only styling —
   it renders a real <blockquote>, so it needs no CSS of its own. Narrowing the
   selector breaks CKEditor body copy; deleting it breaks the component. The
   .ck-content twin lives in css/wysiwyg.css. */
.gt-blockquote, blockquote { border-left: 4px solid var(--gt-primary); padding: var(--gt-space-1) 0 var(--gt-space-1) var(--gt-space-5); font-family: var(--gt-font-head); font-size: var(--gt-text-xl); font-weight: var(--gt-w-medium); color: var(--gt-ink); letter-spacing: var(--gt-head-tracking); line-height: var(--gt-leading-snug); }
.gt-blockquote cite, blockquote cite { display: block; font-family: var(--gt-font-body); font-size: var(--gt-text-sm); font-weight: var(--gt-w-regular); font-style: normal; color: var(--gt-ink-3); margin-top: 10px; }
blockquote p { color: inherit; line-height: inherit; }
blockquote > p + p { margin-top: 10px; }
/* Lists — restore the markers and indent the reset leaves off. */
ul, ol { margin: 0; padding-left: var(--gt-space-5); color: var(--gt-ink-2); line-height: var(--gt-leading-relaxed); }
ul { list-style: disc; }
ol { list-style: decimal; }
li::marker { color: var(--gt-ink-3); }
/* Vertical rhythm — placed last so it wins margin-top over the element margin resets
   above (equal specificity, later source). Top-margin applies only when a block follows
   a sibling, so first-child component titles keep margin:0 without a wrapper. */
* + h2 { margin-top: var(--gt-space-8); }
* + h3 { margin-top: var(--gt-space-6); }
* + h4 { margin-top: var(--gt-space-5); }
* + h5, * + h6 { margin-top: var(--gt-space-4); }
* + p, * + ul, * + ol, * + blockquote, * + figure, * + table { margin-top: var(--gt-space-4); }
/* .gt-spinner and .gt-progress moved to their own components (01-atoms). */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
/* Visually hidden, still announced. Drupal core ships `.visually-hidden` and
   the theme's own templates use it, but kit components emit `gt-vh` (event-card
   dates it, event-list-item too) and must stay self-contained — they render in
   Storybook, where core's stylesheets do not exist. */
.gt-vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════ LAYOUT UTILITIES ═══════════════ */
/* Vertical flow rhythm for stacked content components (page body). */
.gt-flow > * + * { margin-top: var(--gt-space-10); }
.gt-row { display: flex; flex-wrap: wrap; gap: var(--gt-space-3); align-items: center; }
.gt-stack { display: flex; flex-direction: column; gap: var(--gt-space-4); }
/* The one grid for card lists (card-grid, step-grid and plan-grid print it).
   A class per count, not a column variable, because each count collapses on
   its own path: 4 and 3 go to 2 at 1040px, anything wider than 1 goes to 1 at
   720px, and 1 never changes. A variable cannot know what it collapses from. */
.gt-grid { display: grid; gap: var(--gt-space-6); }
.gt-grid--1 { grid-template-columns: 1fr; }
.gt-grid--2 { grid-template-columns: repeat(2, 1fr); }
.gt-grid--3 { grid-template-columns: repeat(3, 1fr); }
.gt-grid--4 { grid-template-columns: repeat(4, 1fr); }
.gt-grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1040px) { .gt-grid--3, .gt-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .gt-grid--2, .gt-grid--3, .gt-grid--4 { grid-template-columns: 1fr; } }
