/* Hike One Design System — generated by build.py, do not edit by hand. */
/* Epilogue (variable, weights 300–700) — self-hosted; its license is OFL.txt in this folder. */

/* latin-ext */
@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/epilogue/epilogue-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/epilogue/epilogue-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Generated by build.py — do not edit by hand. */
:root {
  --ho-breakpoint-xs: 20rem;
  --ho-breakpoint-s: 30rem;
  --ho-breakpoint-m: 48rem;
  --ho-breakpoint-l: 62rem;
  --ho-color-marine-blue-100: #0046ff;
  --ho-color-marine-blue-40: #6690ff;
  --ho-color-sunflower-orange-100: #ffa011;
  --ho-color-coral-red-100: #f55052;
  --ho-color-charcoal-100: #1d1d1d;
  --ho-color-sand-100: #fcf5ee;
  --ho-color-clay-100: #f1e8df;
  --ho-color-white-100: #ffffff;
  --ho-color-electric-blue-100: #00ddf6;
  --ho-color-vibrant-magenta-100: #ff59ff;
  --ho-color-success-100: #81ce16;
  --ho-color-informative-100: #0046fe;
  --ho-color-warning-100: #ffa011;
  --ho-color-error-100: #f55052;
  --ho-duration-0: 1000ms;
  --ho-duration-1: 500ms;
  --ho-duration-2: 450ms;
  --ho-duration-3: 400ms;
  --ho-duration-4: 350ms;
  --ho-duration-5: 300ms;
  --ho-duration-6: 250ms;
  --ho-duration-7: 200ms;
  --ho-duration-8: 150ms;
  --ho-duration-9: 100ms;
  --ho-easing-linear: cubic-bezier(0, 0, 1, 1);
  --ho-easing-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  --ho-easing-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ho-easing-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
  --ho-spacing-0: 0;
  --ho-spacing-1: 0.25rem;
  --ho-spacing-2: 0.5rem;
  --ho-spacing-3: 0.75rem;
  --ho-spacing-4: 1rem;
  --ho-spacing-5: 1.5rem;
  --ho-spacing-6: 2rem;
  --ho-spacing-7: 2.5rem;
  --ho-spacing-8: 3rem;
  --ho-spacing-9: 4rem;
  --ho-spacing-10: 5rem;
  --ho-spacing-11: 6rem;
  --ho-spacing-12: 7rem;
  --ho-spacing-13: 9rem;
  --ho-spacing-14: 11.125rem;
  --ho-radius-1: 1rem;
  --ho-radius-2: 0.5rem;
  --ho-radius-infinite: 62.4375rem;
  --ho-font-family-brand: Epilogue, system-ui, sans-serif;
  --ho-font-weight-light: 300;
  --ho-font-weight-regular: 400;
  --ho-font-weight-medium: 500;
  --ho-font-weight-bold: 700;
  --ho-font-size-1: 0.75rem;
  --ho-font-size-2: 1rem;
  --ho-font-size-3: 1.25rem;
  --ho-font-size-4: 1.5rem;
  --ho-font-size-5: 2.25rem;
  --ho-font-size-6: 3rem;
  --ho-font-size-7: 3.75rem;
  --ho-font-line-height-1: 1rem;
  --ho-font-line-height-2: 1.5rem;
  --ho-font-line-height-3: 2rem;
  --ho-font-line-height-4: 2.25rem;
  --ho-font-line-height-5: 3rem;
  --ho-font-line-height-6: 3.5rem;
  --ho-font-line-height-7: 4.5rem;
  --ho-neutral-80: #1d1d1dcc;
  --ho-neutral-60: #1d1d1d99;
  --ho-neutral-40: #1d1d1d66;
  --ho-neutral-20: #1d1d1d33;
  --ho-neutral-10: #1d1d1d1a;
  --ho-neutral-5: #1d1d1d0d;
  --ho-text-default: #1d1d1d;
  --ho-text-muted: #616161;
  --ho-text-inverse: #ffffff;
  --ho-text-link: #0046ff;
  --ho-text-inverse-muted: #ffffffa8;
  --ho-surface-page: #fcf5ee;
  --ho-surface-card: #ffffff;
  --ho-surface-subtle: #f1e8df;
  --ho-surface-inverse: #1d1d1d;
  --ho-surface-inverse-hover: #ffffff14;
  --ho-surface-inverse-raised: #ffffff1a;
  --ho-surface-inverse-raised-hover: #ffffff2e;
  --ho-surface-highlight: #0046ff0f;
  --ho-border-default: #1d1d1d1a;
  --ho-border-strong: #1d1d1d33;
  --ho-border-focus: #0046ff;
  --ho-border-inverse: #ffffff29;
  --ho-border-inverse-strong: #ffffff80;
  --ho-action-primary: #1d1d1d;
  --ho-action-primary-hover: #0046ff;
  --ho-action-on-primary: #ffffff;
  --ho-action-on-primary-hover: #ffffff;
  --ho-action-inverted: #ffffff;
  --ho-action-on-inverted: #1d1d1d;
  --ho-action-disabled-opacity: 0.4;
  --ho-field-background: #ffffff;
  --ho-field-border: #f1e8df;
  --ho-field-border-hover: #0046ff;
  --ho-field-border-focus: #0046ff;
  --ho-field-error-text: #f55052;
  --ho-status-success: #81ce16;
  --ho-status-info: #0046fe;
  --ho-status-warning: #ffa011;
  --ho-status-error: #f55052;
  --ho-status-error-subtle: #f550521a;
  --ho-status-info-subtle: #0046ff14;
  --ho-status-warning-subtle: #ffa01133;
  --ho-status-success-subtle: #81ce161f;
  --ho-shadow-1: 0 0.5rem 1.5rem #1d1d1d14;
  --ho-shadow-2: 0 0.25rem 0.75rem #1d1d1d4d;
  --ho-shadow-3: 0 0.5rem 2rem #1d1d1d4d;
  --ho-shadow-4: 0 1.5rem 4rem #1d1d1d33;
  --ho-space-0: 0;
  --ho-space-1: 0.25rem;
  --ho-space-2: 0.5rem;
  --ho-space-3: 0.75rem;
  --ho-space-4: 1rem;
  --ho-space-5: 1.5rem;
  --ho-space-6: 2rem;
  --ho-space-7: 2.5rem;
  --ho-space-8: 3rem;
  --ho-space-9: 4rem;
  --ho-space-10: 5rem;
  --ho-space-11: 6rem;
  --ho-space-12: 7rem;
  --ho-space-13: 9rem;
  --ho-space-14: 11.125rem;
}

@media (max-width: 767px) {
  :root {
    --ho-space-7: 1.5rem;
    --ho-space-8: 1.5rem;
    --ho-space-9: 2rem;
    --ho-space-10: 2.5rem;
    --ho-space-11: 3rem;
    --ho-space-12: 4rem;
    --ho-space-13: 5rem;
    --ho-space-14: 6rem;
  }
}

.ho-inverse {
  --ho-neutral-80: #ffffffcc;
  --ho-neutral-60: #ffffff99;
  --ho-neutral-40: #ffffff66;
  --ho-neutral-20: #ffffff33;
  --ho-neutral-10: #ffffff1a;
  --ho-neutral-5: #ffffff0d;
  --ho-text-default: #ffffff;
  --ho-text-muted: #ffffffa8;
  --ho-text-link: #ffffff;
  --ho-surface-page: #1d1d1d;
  --ho-surface-card: #282828;
  --ho-surface-subtle: #ffffff1a;
  --ho-border-default: #ffffff29;
  --ho-border-strong: #ffffff80;
  --ho-border-focus: #ffffff;
  --ho-action-primary: #ffffff;
  --ho-action-on-primary: #1d1d1d;
  --ho-field-background: #ffffff00;
  --ho-field-border: #ffffff80;
  --ho-field-border-hover: #ffffffa8;
  --ho-field-border-focus: #ffffff;
}

.ho-inverse .ho-menu__list {
  --ho-neutral-80: #1d1d1dcc;
  --ho-neutral-60: #1d1d1d99;
  --ho-neutral-40: #1d1d1d66;
  --ho-neutral-20: #1d1d1d33;
  --ho-neutral-10: #1d1d1d1a;
  --ho-neutral-5: #1d1d1d0d;
  --ho-text-default: #1d1d1d;
  --ho-text-muted: #616161;
  --ho-text-link: #0046ff;
  --ho-surface-page: #fcf5ee;
  --ho-surface-card: #ffffff;
  --ho-surface-subtle: #f1e8df;
  --ho-border-default: #1d1d1d1a;
  --ho-border-strong: #1d1d1d33;
  --ho-border-focus: #0046ff;
  --ho-action-primary: #1d1d1d;
  --ho-action-on-primary: #ffffff;
  --ho-field-background: #ffffff;
  --ho-field-border: #f1e8df;
  --ho-field-border-hover: #0046ff;
  --ho-field-border-focus: #0046ff;
}

/*
 * Hike One — base components, built on dist/tokens.css.
 * Source: Figma › HODS - Website Primitives › Atoms (Buttons, inputfield).
 * Deviations from Figma are marked PROVISIONAL.
 * Needs a browser with CSS nesting (all current browsers since 2023).
 */

/* ── Naming ────────────────────────────────────────────────────────────────
 * Follows the HODS Webflow Handbook: BEM blocks and elements (block__element),
 * modifiers as separate "combo" classes with the is-- prefix, all lowercase.
 * The ho- prefix on blocks is ours, to avoid clashes with other CSS in a tool.
 *   <button class="ho-button is--inverted">
 */

/* ── Typography ────────────────────────────────────────────────────────────
 * A class per text style (.ho-<name>), made by the build from the tokens (text-style.*).
 */
/* Text styles */
.ho-display { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-7); line-height: var(--ho-font-line-height-7); font-weight: var(--ho-font-weight-bold); }
.ho-h1 { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-6); line-height: var(--ho-font-line-height-6); font-weight: var(--ho-font-weight-bold); }
.ho-h2 { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-5); line-height: var(--ho-font-line-height-5); font-weight: var(--ho-font-weight-bold); }
.ho-h3 { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-4); line-height: var(--ho-font-line-height-4); font-weight: var(--ho-font-weight-bold); }
.ho-h4 { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-3); line-height: var(--ho-font-line-height-3); font-weight: var(--ho-font-weight-bold); }
.ho-body-large { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-3); line-height: var(--ho-font-line-height-3); font-weight: var(--ho-font-weight-regular); }
.ho-body-regular { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-2); line-height: var(--ho-font-line-height-2); font-weight: var(--ho-font-weight-regular); }
.ho-body-small { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-1); line-height: var(--ho-font-line-height-1); font-weight: var(--ho-font-weight-regular); }
.ho-label { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-2); line-height: var(--ho-font-line-height-2); font-weight: var(--ho-font-weight-medium); }
.ho-label-small { margin: 0; color: inherit; font-family: var(--ho-font-family-brand); font-size: var(--ho-font-size-1); line-height: var(--ho-font-line-height-1); font-weight: var(--ho-font-weight-medium); }

/* Modifiers */
:where(.ho-display, .ho-h1, .ho-h2, .ho-h3, .ho-h4, .ho-body-large, .ho-body-regular, .ho-body-small, .ho-label, .ho-label-small) {
  &.is--light   { font-weight: var(--ho-font-weight-light); }
  &.is--regular { font-weight: var(--ho-font-weight-regular); }
  &.is--medium  { font-weight: var(--ho-font-weight-medium); }
  &.is--bold    { font-weight: var(--ho-font-weight-bold); }
  &.is--muted   { color: var(--ho-text-muted); }
  &.is--centred { text-align: center; }
}

/* ── Button ────────────────────────────────────────────────────────────────
 * Webflow Handbook classes:
 *   ho-button            text only          <button class="ho-button">Save</button>
 *   ho-button-icon       text + icon        place an <svg class="ho-icon"> before or after the label
 *   ho-button-icon-only  icon only, 40×40   always add an aria-label
 * Modifiers: is--inverted (for dark backgrounds), is--full-width,
 *            is--small, is--secondary, is--ghost, is--subtle (all PROVISIONAL, see below)
 */
.ho-button,
.ho-button-icon,
.ho-button-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ho-space-2);
  min-height: 3rem;
  padding: var(--ho-space-2) var(--ho-space-5);
  border: 0;
  border-radius: var(--ho-radius-infinite);
  background: var(--ho-action-primary);
  color: var(--ho-action-on-primary);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-3);
  line-height: var(--ho-font-line-height-3);
  font-weight: var(--ho-font-weight-medium);
  white-space: nowrap;   /* rule: a button never wraps onto two lines */
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ho-duration-8) var(--ho-easing-out-cubic), color var(--ho-duration-8) var(--ho-easing-out-cubic);

  &:hover {
    background: var(--ho-action-primary-hover);
    color: var(--ho-action-on-primary-hover);
  }

  /* Figma: 2px marine-blue border. Drawn as an outline so the button doesn't shift. */
  &:focus-visible {
    outline: 2px solid var(--ho-border-focus);
    outline-offset: 0;
  }

  &:disabled,
  &[aria-disabled="true"] {
    opacity: var(--ho-action-disabled-opacity);
    pointer-events: none;
  }

  &.is--inverted {
    background: var(--ho-action-inverted);
    color: var(--ho-action-on-inverted);
  }

  &.is--inverted:hover {
    background: var(--ho-action-primary-hover);
    color: var(--ho-action-on-primary-hover);
  }

  /* PROVISIONAL — not in Figma. Secondary action next to a primary button:
   * outlined, no fill. */
  &.is--secondary {
    background: transparent;
    color: var(--ho-text-default);
    box-shadow: inset 0 0 0 1px var(--ho-border-strong);
  }

  &.is--secondary:hover {
    background: var(--ho-surface-subtle);
    color: var(--ho-text-default);
  }

  /* PROVISIONAL — not in Figma. A quiet secondary action (archive, sign out)
   * next to content: no fill until hover, muted text. */
  &.is--ghost {
    background: transparent;
    color: var(--ho-text-muted);
  }

  &.is--ghost:hover {
    background: var(--ho-surface-subtle);
    color: var(--ho-text-default);
  }

  &.is--full-width {
    display: flex;
    width: 100%;
  }

  /* PROVISIONAL — not in Figma. The website button (20px text, 48px high) is
   * large for an information-dense tool; this smaller size keeps the style. */
  &.is--small {
    min-height: 2.5rem;
    padding: var(--ho-space-2) var(--ho-space-4);
    font-size: var(--ho-font-size-2);
    line-height: var(--ho-font-line-height-2);
  }

  &.is--small .ho-icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  /* PROVISIONAL — not in Figma. The quietest action, e.g. "+ Add time window" under a
   * list of fields: small (12px, 32px high), muted, no fill until hover. */
  &.is--subtle {
    min-height: 2rem;
    padding: var(--ho-space-1) var(--ho-space-3);
    gap: var(--ho-space-1);
    background: transparent;
    color: var(--ho-text-muted);
    font-size: var(--ho-font-size-1);
    line-height: var(--ho-font-line-height-1);
  }

  &.is--subtle:hover {
    background: var(--ho-surface-subtle);
    color: var(--ho-text-default);
  }

  &.is--subtle .ho-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.ho-button-icon-only {
  min-height: 2.5rem;
  width: 2.5rem;
  padding: var(--ho-space-2);
}

/* ── Icon ──────────────────────────────────────────────────────────────────
 * Icons in icons/ use currentColor, so they take on the text color.
 * 24px; is--small 16px, is--xsmall 14px (next to small text).
 */
.ho-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;

  &.is--small { width: 1rem; height: 1rem; }
  &.is--xsmall { width: 0.875rem; height: 0.875rem; }
}

/* ── Field ─────────────────────────────────────────────────────────────────
 * <div class="ho-field">
 *   <label class="ho-field__label" for="cpv">CPV code</label>
 *   <input class="ho-field__input" id="cpv"
 *          aria-invalid="true" aria-describedby="cpv-error">
 *   <p class="ho-field__error" id="cpv-error">CPV code is missing its check digit</p>
 * </div>
 *
 * Accessibility:
 * - Always connect label and input (for/id), so the label is read out and
 *   clicking it focuses the field.
 * - On an error, set aria-invalid="true" and point aria-describedby at the
 *   error message, so screen readers read the message with the field.
 * - Errors that appear while typing or after submitting: render the error
 *   element up front (empty) with aria-live="polite", then fill it, so the
 *   change is announced.
 * - The message says what is wrong and how to fix it; never rely on color alone.
 */
.ho-field {
  display: flex;
  flex-direction: column;
  gap: var(--ho-space-2);
  font-family: var(--ho-font-family-brand);
  color: var(--ho-text-default);
}

.ho-field__label {
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);
  font-weight: var(--ho-font-weight-medium);
}

.ho-field__input {
  min-height: 3rem;
  padding: var(--ho-space-2);
  border: 1px solid var(--ho-field-border);
  border-radius: var(--ho-radius-2);
  background: var(--ho-field-background);
  color: var(--ho-text-default);
  font: inherit;
  font-size: var(--ho-font-size-3);
  line-height: var(--ho-font-line-height-3);
  font-weight: var(--ho-font-weight-regular);
  caret-color: var(--ho-field-border-focus);
}

textarea.ho-field__input {
  padding-block: var(--ho-space-2);
  resize: vertical;
}

.ho-field__input::placeholder {
  color: var(--ho-text-muted);
}

.ho-field__input:hover {
  border-color: var(--ho-field-border-hover);
}

/* Figma: the border becomes 2px. Done with an inset shadow so the text doesn't shift. */
.ho-field__input:focus {
  outline: none;
  border-color: var(--ho-field-border-focus);
  box-shadow: inset 0 0 0 1px var(--ho-field-border-focus);
}

/* Figma keeps the border clay in the error state; the error message is red. */
.ho-field__error:empty {
  display: none;
}

.ho-field__error {
  margin: 0;
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);
  color: var(--ho-field-error-text);
}

/* PROVISIONAL — not in Figma. Compact size for filters in a tool. */
.ho-field.is--small .ho-field__input {
  min-height: 2.5rem;
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);
}

/* PROVISIONAL — not in Figma. Large: a prominent search on top of a page. */
.ho-field.is--large .ho-field__input {
  min-height: 3.5rem;
  font-size: var(--ho-font-size-3);
  line-height: var(--ho-font-line-height-3);
}

.ho-field.is--large .ho-field__icon {
  width: 1.5rem;
  height: 1.5rem;
  left: var(--ho-space-5);
}

.ho-field.is--large .ho-field__control > .ho-field__icon + .ho-field__input {
  padding-left: calc(var(--ho-space-5) + 1.5rem + var(--ho-space-3));
}

/* PROVISIONAL — not in Figma. Fully rounded, like the buttons and the menu bar
 * on hike.one; for a search field. Extra side padding keeps the text clear of the curve. */
.ho-field.is--rounded .ho-field__input {
  border-radius: var(--ho-radius-infinite);
  padding-inline: var(--ho-space-5);
}

/* PROVISIONAL — not in Figma. Icon inside the field, e.g. a magnifying glass for
 * search without a separate button (submit with Enter). Wrap the input:
 *   <div class="ho-field__control">
 *     <svg class="ho-icon ho-field__icon" aria-hidden="true">…</svg>
 *     <input class="ho-field__input" type="search" aria-label="Search">
 *   </div>
 */
.ho-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.ho-field__icon {
  position: absolute;
  left: var(--ho-space-4);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ho-text-muted);
  pointer-events: none;
  transition: color var(--ho-duration-8) var(--ho-easing-out-cubic);
}

.ho-field__control:focus-within .ho-field__icon {
  color: var(--ho-text-default);
}

.ho-field .ho-field__control > .ho-field__icon + .ho-field__input {
  flex: 1;
  padding-left: calc(var(--ho-space-4) + 1.25rem + var(--ho-space-3));
}

/* ── Date picker ───────────────────────────────────────────────────────────
 * A date field in the style of the other fields, with a month calendar. Not in Figma
 * yet (PROVISIONAL). Enhances <input type="date" data-ho-datepicker> (datepicker.js,
 * loaded separately); without JS the native field stays. Inside an .ho-field (is--small).
 */
.ho-datepicker {
  position: relative;
  display: block;
}

.ho-datepicker__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ho-datepicker__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ho-space-2);
  width: 100%;
  min-height: 2.5rem;
  padding: 0 var(--ho-space-2) 0 var(--ho-space-3);
  border: 1px solid var(--ho-field-border);
  border-radius: var(--ho-radius-2);
  background: var(--ho-field-background);
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);
  text-align: left;
  cursor: pointer;

  &:hover { border-color: var(--ho-field-border-hover); }
  &:focus-visible,
  &[aria-expanded="true"] {
    outline: none;
    border-color: var(--ho-field-border-focus);
    box-shadow: inset 0 0 0 1px var(--ho-field-border-focus);
  }
  & .ho-icon { width: 1.25rem; height: 1.25rem; color: var(--ho-text-muted); }
}

.ho-datepicker__value.is--empty { color: var(--ho-text-muted); }

.ho-datepicker__popover {
  position: absolute;
  top: calc(100% + var(--ho-space-1));
  left: 0;
  z-index: 20;
  width: 18rem;
  padding: var(--ho-space-3);
  background: var(--ho-surface-card);
  border: 1px solid var(--ho-border-default);
  border-radius: var(--ho-radius-2);
  box-shadow: var(--ho-shadow-1);
  font-family: var(--ho-font-family-brand);

  &[hidden] { display: none; }
}

.ho-datepicker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--ho-space-2);
}

.ho-datepicker__month {
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);
  font-weight: var(--ho-font-weight-medium);
}

.ho-datepicker__nav,
.ho-datepicker__day {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--ho-radius-infinite);
  background: none;
  color: var(--ho-text-default);
  font: inherit;
  cursor: pointer;

  &:hover:not(:disabled) { background: var(--ho-surface-subtle); }
  &:focus-visible { outline: 2px solid var(--ho-border-focus); outline-offset: 1px; }
}

.ho-datepicker__nav {
  width: 2rem;
  height: 2rem;

  & .ho-icon { width: 1rem; height: 1rem; }
}

.ho-datepicker__grid {
  width: 100%;
  border-collapse: collapse;

  & th {
    padding-bottom: var(--ho-space-1);
    color: var(--ho-text-muted);
    font-size: var(--ho-font-size-1);
    line-height: var(--ho-font-line-height-1);
    font-weight: var(--ho-font-weight-regular);
  }
  & td { padding: 1px; text-align: center; }
}

.ho-datepicker__day {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto;
  font-size: var(--ho-font-size-1);

  &.is--outside { color: var(--ho-text-muted); }
  &.is--today { box-shadow: inset 0 0 0 1px var(--ho-text-default); }
  /* The chosen day: filled in Sunflower, no ring (also when it's today). */
  &.is--selected,
  &.is--selected:hover { background: var(--ho-color-sunflower-orange-100); color: var(--ho-color-charcoal-100); box-shadow: none; }
  &:disabled { opacity: 0.3; cursor: default; }
}

.ho-datepicker__foot {
  display: flex;
  justify-content: space-between;
  margin-top: var(--ho-space-2);
  padding-top: var(--ho-space-2);
  border-top: 1px solid var(--ho-border-default);
}

.ho-datepicker__link {
  padding: var(--ho-space-1) 0;
  border: 0;
  background: none;
  color: var(--ho-text-default);
  font: inherit;
  font-size: var(--ho-font-size-1);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

/* ── Time picker ───────────────────────────────────────────────────────────
 * A time field in the same style as the date picker: the time and a clock icon, and a
 * popover with two scrolling columns (hours : minutes). Not in Figma yet (PROVISIONAL).
 * Enhances <input type="time" data-ho-timepicker min max step> (timepicker.js); the
 * toggle and popover reuse the date picker's classes.
 */
.ho-timepicker__popover { width: auto; padding: var(--ho-space-2); }

/* Two scrolling columns side by side: hours : minutes. */
.ho-timepicker__columns {
  display: flex;
  align-items: stretch;
  gap: var(--ho-space-1);
}

.ho-timepicker__colon {
  align-self: center;
  color: var(--ho-text-muted);
  font-size: var(--ho-font-size-2);
  font-weight: var(--ho-font-weight-medium);
}

.ho-timepicker__column {
  display: grid;
  gap: 1px;
  align-content: start;
  width: 4rem;
  max-height: 12rem;
  padding: 2px;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

/* Square-ish cells with slightly rounded corners that fill the column (not pills). */
.ho-timepicker__option {
  width: 100%;
  height: 2.25rem;
  border: 0;
  border-radius: 0.375rem;
  background: none;
  color: var(--ho-text-default);
  font: inherit;
  font-size: var(--ho-font-size-2);
  font-variant-numeric: tabular-nums;
  cursor: pointer;

  &:hover:not(:disabled) { background: var(--ho-surface-subtle); }
  &:focus-visible { outline: 2px solid var(--ho-border-focus); outline-offset: -2px; }
  &.is--selected,
  &.is--selected:hover { background: var(--ho-color-sunflower-orange-100); color: var(--ho-color-charcoal-100); }
  &:disabled { opacity: 0.3; cursor: default; }
}

/* ── Tags ──────────────────────────────────────────────────────────────────
 * A field with tags (chips with a ×) and an input to add more, e.g. keywords or codes.
 * Not in Figma yet (PROVISIONAL). Enhances <textarea data-ho-tags> (tags.js; one item per
 * line), optionally with suggestions while typing (data-suggest).
 */
.ho-tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ho-space-2);
  min-height: 2.5rem;
  padding: var(--ho-space-2);
  border: 1px solid var(--ho-field-border);
  border-radius: var(--ho-radius-2);
  background: var(--ho-field-background);
  cursor: text;

  &:hover { border-color: var(--ho-field-border-hover); }
  &:focus-within { border-color: var(--ho-field-border-focus); box-shadow: inset 0 0 0 1px var(--ho-field-border-focus); }
}

.ho-tags__list {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ho-tags__tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;          /* a long tag shortens with … instead of widening the field */
  max-width: 100%;
  min-height: 2rem;
  padding: 0 var(--ho-space-1) 0 var(--ho-space-3);
  border-radius: 0.375rem;
  background: var(--ho-surface-subtle);
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-2);           /* same size as the text you type */
  line-height: var(--ho-font-line-height-2);
}

.ho-tags__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ho-tags__remove {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: none;
  color: var(--ho-text-muted);
  cursor: pointer;

  &:hover { background: var(--ho-neutral-10); color: var(--ho-text-default); }
  &:focus-visible { outline: 2px solid var(--ho-border-focus); outline-offset: -1px; }
  & .ho-icon { width: 0.875rem; height: 0.875rem; }
}

.ho-tags__input {
  flex: 1 0 8rem;
  min-width: 0;
  min-height: 2rem;
  padding: 0 var(--ho-space-2);
  border: 0;
  background: none;
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-2);

  &:focus { outline: none; }
  &::placeholder { color: var(--ho-text-muted); }
}

.ho-tags__value { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.ho-tags__menu {
  position: absolute;
  top: calc(100% + var(--ho-space-1));
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 16rem;
  margin: 0;
  padding: var(--ho-space-1);
  overflow-y: auto;
  list-style: none;
  background: var(--ho-surface-card);
  border: 1px solid var(--ho-border-default);
  border-radius: var(--ho-radius-2);
  box-shadow: var(--ho-shadow-1);

  &[hidden] { display: none; }
}

.ho-tags__option {
  display: flex;
  gap: var(--ho-space-2);
  padding: var(--ho-space-2);
  border-radius: 0.375rem;
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-1);
  line-height: var(--ho-font-line-height-1);
  cursor: pointer;

  &:hover, &.is--active { background: var(--ho-surface-subtle); }
}

.ho-tags__label { flex: none; font-weight: var(--ho-font-weight-medium); font-variant-numeric: tabular-nums; }
.ho-tags__hint { color: var(--ho-text-muted); }

/* ── Tip ───────────────────────────────────────────────────────────────────
 * A small info icon after a text; hover or focus shows a short explanation. Not in Figma
 * yet (PROVISIONAL). No JS needed.
 *   <span class="ho-tip"><button class="ho-tip__button" type="button" aria-describedby="tip-1">
 *     <svg class="ho-icon" aria-hidden="true"><use href="#ho-icon-info"/></svg><span class="ho-visually-hidden">Why?</span></button>
 *     <span class="ho-tip__bubble" id="tip-1" role="tooltip">Explanation…</span></span>
 */
.ho-tip {
  position: relative;
  display: inline-flex;
  vertical-align: -0.2em;
}

.ho-tip__button {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ho-text-muted);
  cursor: help;

  & .ho-icon { width: 1rem; height: 1rem; }
  &:hover { color: var(--ho-text-default); }
  &:focus-visible { outline: 2px solid var(--ho-border-focus); outline-offset: 2px; border-radius: 50%; }
}

.ho-tip__bubble {
  position: absolute;
  bottom: calc(100% + var(--ho-space-2));
  left: 50%;
  z-index: 30;
  width: max-content;
  max-width: 18rem;
  padding: var(--ho-space-2) var(--ho-space-3);
  border-radius: var(--ho-radius-2);
  background: var(--ho-surface-inverse);
  color: var(--ho-text-inverse);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-1);
  line-height: var(--ho-font-line-height-1);
  font-weight: var(--ho-font-weight-regular);
  text-align: left;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--ho-duration-8) var(--ho-easing-out-cubic);
}

.ho-tip:hover .ho-tip__bubble,
.ho-tip:focus-within .ho-tip__bubble {
  opacity: 1;
  visibility: visible;
}

/* On dark the explanation is light, so it stands out. */
.ho-inverse .ho-tip__bubble { background: var(--ho-color-white-100); color: var(--ho-color-charcoal-100); }

/* ── Weekdays ──────────────────────────────────────────────────────────────
 * The days of the week as round toggles (checkboxes), e.g. on which days a tool fetches.
 * Not in Figma yet (PROVISIONAL). Chosen days are filled in Sunflower, without a border.
 *   <fieldset class="ho-weekdays"><legend class="ho-field__label">Days</legend>
 *     <label class="ho-weekdays__day"><input type="checkbox" name="days" value="0" checked><span>Mo</span></label> …
 *   </fieldset>
 */
.ho-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ho-space-2);
  margin: 0;
  padding: 0;
  border: 0;

  & > legend { width: 100%; margin-bottom: var(--ho-space-3); padding: 0; }

  @media (max-width: 29.9375rem) {
    gap: var(--ho-space-1);
    & .ho-weekdays__day span { width: 2.25rem; height: 2.25rem; }
  }
}

.ho-weekdays__day {
  position: relative;
  cursor: pointer;

  & input { position: absolute; width: 1px; height: 1px; opacity: 0; }
  & span {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--ho-field-border);
    border-radius: var(--ho-radius-infinite);
    background: var(--ho-field-background);
    color: var(--ho-text-default);
    font-family: var(--ho-font-family-brand);
    font-size: var(--ho-font-size-1);
    font-weight: var(--ho-font-weight-medium);
  }
  &:hover span { border-color: var(--ho-field-border-hover); }
  & input:checked + span { background: var(--ho-color-sunflower-orange-100); border-color: transparent; color: var(--ho-color-charcoal-100); }
  & input:focus-visible + span { outline: 2px solid var(--ho-border-focus); outline-offset: 2px; }
}

/* ── Menu ──────────────────────────────────────────────────────────────────
 * A small contextual menu behind a "⋯" button, e.g. for card actions.
 * Not in Figma yet (PROVISIONAL). Built on <details>, so it opens without JS:
 *   <details class="ho-menu">
 *     <summary class="ho-button-icon-only is--ghost" aria-label="More actions">
 *       <svg class="ho-icon" aria-hidden="true">…dots-three…</svg>
 *     </summary>
 *     <div class="ho-menu__list">
 *       <button class="ho-menu__item" type="submit"><svg class="ho-icon">…</svg> Archive</button>
 *     </div>
 *   </details>
 * The tool closes it on a click outside and on Escape (a few lines of JS).
 * The shadow is --ho-shadow-1 (PROVISIONAL, like all elevation tokens).
 */
.ho-menu {
  position: relative;
  display: inline-block;

  & > summary {
    list-style: none;
    cursor: pointer;
  }

  & > summary::-webkit-details-marker {
    display: none;
  }

  &[open] > summary {
    background: var(--ho-surface-subtle);
    color: var(--ho-text-default);
  }
}

.ho-menu__list {
  position: absolute;
  top: calc(100% + var(--ho-space-1));
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 11rem;
  padding: var(--ho-space-1);
  background: var(--ho-surface-card);
  border: 1px solid var(--ho-border-default);
  border-radius: var(--ho-radius-2);
  box-shadow: var(--ho-shadow-1);
}

.ho-menu__item {
  display: flex;
  align-items: center;
  gap: var(--ho-space-2);
  width: 100%;
  padding: var(--ho-space-2) var(--ho-space-3);
  border: 0;
  border-radius: 0.375rem;
  background: none;
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;

  &:hover {
    background: var(--ho-surface-subtle);
  }

  &:focus-visible {
    outline: 2px solid var(--ho-border-focus);
    outline-offset: -2px;
  }

  & .ho-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--ho-text-muted);
  }
}

/* ── Checkbox ──────────────────────────────────────────────────────────────
 * Native checkbox or radio with a label; also works as a menu item for filters.
 * Not in Figma yet (PROVISIONAL): only the brand color is applied.
 *   <label class="ho-checkbox"><input type="checkbox" name="source" value="freep"> Freep</label>
 *   <label class="ho-menu__item ho-checkbox"><input type="radio" name="sort" value="newest"> Newest</label>
 */
.ho-checkbox {
  display: flex;
  align-items: center;
  gap: var(--ho-space-2);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);
  color: var(--ho-text-default);
  cursor: pointer;

  & > input {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    flex: none;
    accent-color: var(--ho-action-primary);
    cursor: pointer;
  }

  &:has(> input:focus-visible) {
    outline: 2px solid var(--ho-border-focus);
    outline-offset: -2px;
  }
}

/* PROVISIONAL — not in Figma. A single choice in a menu (e.g. sort order):
 * the radio is hidden, the chosen option shows a check mark. The input stays in
 * the page, so keyboard and screen readers work as with a normal radio.
 *   <label class="ho-menu__item ho-checkbox is--option">
 *     <input type="radio" name="sort" value="newest" checked>
 *     <svg class="ho-icon ho-menu__check" aria-hidden="true">…check…</svg> Newest
 *   </label>
 */
.ho-checkbox.is--option > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ho-menu__item .ho-menu__check {
  visibility: hidden;
  color: var(--ho-text-default);
}

.ho-menu__item.is--option:has(> input:checked) {
  font-weight: var(--ho-font-weight-medium);

  & .ho-menu__check {
    visibility: visible;
  }
}

/* PROVISIONAL — not in Figma. A link to the current choice (e.g. the version you're
 * looking at): aria-current="true" shows the check mark. Extra info on the right
 * (e.g. a date) goes in ho-menu__aside. A list under a button in the middle of a bar:
 * ho-menu__list is--centred (right-aligned on small screens).
 *   <a class="ho-menu__item" href="…" aria-current="true"><svg class="ho-icon ho-menu__check">…</svg>2.3.2
 *     <span class="ho-menu__aside">18 Oct</span></a>
 */
.ho-menu__item[aria-current] {
  font-weight: var(--ho-font-weight-medium);

  & .ho-menu__check { visibility: visible; }
}

.ho-menu__aside {
  margin-left: auto;
  padding-left: var(--ho-space-4);
  color: var(--ho-text-muted);
  font-size: var(--ho-font-size-1);
  font-weight: var(--ho-font-weight-regular);
}

.ho-menu__list.is--centred {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  top: calc(100% + var(--ho-space-2));
  min-width: 15rem;

  @media (max-width: 40rem) { left: auto; right: 0; transform: none; }
}

/* ── Badge ─────────────────────────────────────────────────────────────────
 * A short status label, e.g. "New" on a card. Not in Figma yet (PROVISIONAL).
 *   <span class="ho-badge">New</span>  <span class="ho-badge is--subtle">Archived</span>
 *   <span class="ho-badge is--marine-blue">New</span>  <span class="ho-badge is--sunflower">Interested</span>
 * Default: white on Charcoal (the only place white text is allowed). Main
 * brand colors: is--marine-blue, is--sunflower, is--coral (Charcoal text);
 * is--success in the status green. Their text stays Charcoal, also inside ho-inverse.
 */
.ho-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--ho-space-1);
  /* Optically centred: Epilogue's caps and digits sit high in the line, so 1.5px
   * more padding on top than below (same 20px height). */
  padding: 0.21875rem var(--ho-space-2) 0.03125rem;
  border-radius: var(--ho-radius-infinite);
  background: var(--ho-action-primary);
  color: var(--ho-action-on-primary);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-1);
  line-height: var(--ho-font-line-height-1);
  font-weight: var(--ho-font-weight-medium);
  white-space: nowrap;

  &.is--subtle {
    background: var(--ho-surface-subtle);
    color: var(--ho-text-default);
  }

  /* Main brand colors, always with Charcoal text (white only on Charcoal).
   * is--marine-blue uses the 40% tint: full Marine Blue with Charcoal text
   * doesn't reach 4.5:1. */
  &.is--marine-blue {
    background: var(--ho-color-marine-blue-40);
    color: var(--ho-color-charcoal-100);
  }

  &.is--sunflower {
    background: var(--ho-color-sunflower-orange-100);
    color: var(--ho-color-charcoal-100);
  }

  &.is--coral {
    background: var(--ho-color-coral-red-100);
    color: var(--ho-color-charcoal-100);
  }

  /* Status green (e.g. "New"), Charcoal text. */
  &.is--success {
    background: var(--ho-status-success);
    color: var(--ho-color-charcoal-100);
  }

  & .ho-icon {
    width: 0.875rem;
    height: 0.875rem;
  }
}

/* ── Dialog ────────────────────────────────────────────────────────────────
 * A large modal on the native <dialog> element (focus trap, Escape and the
 * backdrop come with it). Not in Figma yet (PROVISIONAL); the shadow too.
 *   <dialog class="ho-dialog" aria-labelledby="d-title">
 *     <header class="ho-dialog__header"><h2 id="d-title">…</h2>
 *       <button class="ho-button-icon-only is--ghost ho-dialog__close" aria-label="Close">…x…</button></header>
 *     <div class="ho-dialog__body">…</div>
 *     <footer class="ho-dialog__footer">…buttons…</footer>
 *   </dialog>
 * Open with dialog.showModal(). Full screen on small screens.
 */
.ho-dialog {
  width: min(60rem, calc(100vw - 2 * var(--ho-space-5)));
  max-height: min(90vh, 64rem);
  padding: 0;
  border: 0;
  border-radius: var(--ho-radius-1);
  background: var(--ho-surface-card);
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  box-shadow: var(--ho-shadow-4);

  &[open] {
    display: flex;
    flex-direction: column;
  }

  &::backdrop {
    background: rgb(29 29 29 / 0.45);
  }

  @media (max-width: 40rem) {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
}

.ho-dialog__header {
  display: flex;
  align-items: flex-start;
  gap: var(--ho-space-4);
  padding: var(--ho-space-6) var(--ho-space-6) var(--ho-space-5);
  border-bottom: 1px solid var(--ho-border-default);
}

.ho-dialog__close {
  margin: calc(var(--ho-space-2) * -1) calc(var(--ho-space-2) * -1) 0 auto;
  flex: none;
}

.ho-dialog__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--ho-space-6);
}

.ho-dialog__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ho-space-2);
  padding: var(--ho-space-4) var(--ho-space-6);
  border-top: 1px solid var(--ho-border-default);
}

/* PROVISIONAL — not in Figma. A floating panel that doesn't block the page (open with
 * dialog.show(), not showModal()), bottom right, e.g. the list of changes in Compare.
 * Leaves room on the right for the Scenarios tab. Not full screen on small screens.
 * ho-dialog__header is--draggable shows a grab cursor; the dragging itself is up to the tool. */
.ho-dialog.is--floating[open] {
  position: fixed;
  inset: auto 3.5rem var(--ho-space-5) auto;
  z-index: 5;
  margin: 0;
  width: min(24rem, calc(100vw - 2 * var(--ho-space-5)));
  height: auto;
  max-width: none;
  max-height: min(70vh, 40rem);
  border-radius: var(--ho-radius-1);
  box-shadow: var(--ho-shadow-3);

  @media (max-width: 40rem) {
    inset: auto var(--ho-space-4) var(--ho-space-4) auto;
    width: calc(100vw - 2 * var(--ho-space-4));
    max-height: 50vh;
  }
}

/* PROVISIONAL — not in Figma. A short question, e.g. "Don't forget to save": narrow and
 * centred, also on small screens (not full screen). */
.ho-dialog.is--small {
  width: min(28rem, calc(100vw - 2 * var(--ho-space-4)));

  @media (max-width: 40rem) {
    height: fit-content;
    max-height: calc(100dvh - 2 * var(--ho-space-4));
    margin: auto;
    border-radius: var(--ho-radius-1);
  }

  & .ho-dialog__header { padding: var(--ho-space-5) var(--ho-space-5) var(--ho-space-3); border-bottom: 0; }
  & .ho-dialog__body { flex: none; padding: 0 var(--ho-space-5) var(--ho-space-5); }
  & .ho-dialog__footer { justify-content: flex-end; padding: var(--ho-space-4) var(--ho-space-5); }

  /* Too narrow for the buttons side by side: each its own full-width row, the main action on top. */
  @media (max-width: 29.9375rem) {
    & .ho-dialog__footer { flex-direction: column-reverse; align-items: stretch; }
  }
}

.ho-dialog__header.is--draggable {
  cursor: grab;
  user-select: none;

  &:active { cursor: grabbing; }
}

/* ── Navlink ───────────────────────────────────────────────────────────────
 * A menu item in a top bar. Source: the menu bar on hike.one (Webflow class
 * "navlink"): 20px medium Charcoal, Marine Blue on hover, the current page
 * underlined with 2px Charcoal. Mark the current page with aria-current="page".
 *   <nav class="ho-nav"><a class="ho-navlink" href="/" aria-current="page">Opportunities</a> …</nav>
 * Modifier: is--small (16px, for tools).
 */
.ho-nav {
  display: flex;
  align-items: center;
  gap: var(--ho-space-6);
}

.ho-navlink {
  display: inline-flex;
  align-items: center;
  padding: var(--ho-space-1) 0;
  border-bottom: 2px solid transparent;
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-3);
  line-height: var(--ho-font-line-height-3);
  font-weight: var(--ho-font-weight-medium);
  text-decoration: none;
  transition: color var(--ho-duration-8) var(--ho-easing-out-cubic);

  &:hover {
    color: var(--ho-action-primary-hover);
  }

  &[aria-current="page"] {
    border-bottom-color: var(--ho-text-default);
    color: var(--ho-text-default);
  }

  &:focus-visible {
    outline: 1px solid var(--ho-border-focus);
    outline-offset: 2px;
  }

  /* PROVISIONAL — not in Figma. 16px for the functional menu bar of a tool;
   * the website size (20px) is large next to dense content. */
  &.is--small {
    font-size: var(--ho-font-size-2);
    line-height: var(--ho-font-line-height-2);
  }
}

/* ── Message ───────────────────────────────────────────────────────────────
 * A short status message, e.g. a failed sign-in. Not in Figma yet (PROVISIONAL).
 * Always with an icon on the left and the text in __body (since 2.0.0):
 *   <div class="ho-message is--error" role="alert">
 *     <svg class="ho-icon ho-message__icon" aria-hidden="true"><use href="#ho-icon-warning-circle"/></svg>
 *     <div class="ho-message__body"><strong>Freep:</strong> didn’t respond.
 *       <span class="ho-message__hint">Usually temporary.</span>
 *       <span class="ho-message__detail">ReadTimeout: …</span>
 *       <div class="ho-message__action"><button class="ho-button is--small is--secondary">Try again</button>
 *         <a class="ho-link-arrow" href="…">See status <svg class="ho-icon">…</svg></a></div>
 *     </div>
 *   </div>
 * States and their icon: is--info → info, is--warning → warning, is--success →
 * check-circle, is--error → warning-circle; without a state (neutral) → info.
 * Charcoal text on a light tint, so it stays readable (coral text on white
 * doesn't reach 4.5:1). Use role="alert" when it appears after an action, and
 * point aria-describedby on the related fields at it.
 */
.ho-message {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--ho-space-3);
  align-items: start;
  margin: 0;
  padding: var(--ho-space-3) var(--ho-space-4);
  border-radius: var(--ho-radius-2);
  background: var(--ho-neutral-5);
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);

  &.is--error {
    background: var(--ho-status-error-subtle);
  }

  /* PROVISIONAL — not in Figma: info, warning and success. */
  &.is--info {
    background: var(--ho-status-info-subtle);
  }

  &.is--warning {
    background: var(--ho-status-warning-subtle);
  }

  &.is--success {
    background: var(--ho-status-success-subtle);
  }

  /* Less room above and below, e.g. a short note in a form. */
  &.is--compact {
    padding-block: var(--ho-space-2);
  }

  & a {
    color: inherit;
  }
}

/* PROVISIONAL — not in Figma. Parts of a message: an explanation on its own line,
 * the technical detail (e.g. an error code) small and monospace, and an action
 * (a button and an icon link side by side). */
.ho-message__hint {
  display: block;
  margin-top: var(--ho-space-1);
}

.ho-message__detail {
  display: block;
  margin-top: var(--ho-space-1);
  font-family: ui-monospace, Menlo, monospace;
  font-size: var(--ho-font-size-1);
  color: var(--ho-text-muted);
  overflow-wrap: anywhere;
}

.ho-message__action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ho-space-2) var(--ho-space-5);
  margin-top: var(--ho-space-3);

  & .ho-button,
  & .ho-button-icon {
    background: var(--ho-surface-card);
  }

  & .ho-link-arrow { font-size: var(--ho-font-size-2); line-height: var(--ho-font-line-height-2); }
}

/* The icon matches the state (see above). */
.ho-message__icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

.ho-message__body {
  min-width: 0;
}

/* PROVISIONAL — not in Figma. A message you can close (e.g. "what came in"): a quiet ×
 * on the right, as the last child. What closing does (and whether it comes back) is up to the tool.
 *   <div class="ho-message is--info"> …icon… <div class="ho-message__body">…</div>
 *     <button class="ho-button-icon-only is--ghost is--small ho-message__close" type="button" aria-label="Close">…x…</button></div> */
.ho-message:has(> .ho-message__close) { grid-template-columns: auto 1fr auto; }

.ho-message__close {
  min-height: 2rem;
  width: 2rem;
  margin: calc(var(--ho-space-1) * -1) calc(var(--ho-space-2) * -1) calc(var(--ho-space-1) * -1) 0;
  color: var(--ho-text-default);

  & .ho-icon { width: 1rem; height: 1rem; }
  &:hover { background: var(--ho-neutral-5); }
}

/* ══ Tool layout ══════════════════════════════════════════════════════════════
 * Components for internal tools on *.tools.hike.one, first built for Project
 * Scout. All PROVISIONAL — not in Figma yet (see OPEN-QUESTIONS.md, item 15).
 */

/* ── Top bar ───────────────────────────────────────────────────────────────
 * The functional variant of the hike.one menu bar: white, against the top edge,
 * sticky. "Hike One.tools | Tool name" on the left; menu (ho-nav) and a quiet
 * sign-out on the right. Markup: templates/topbar/. Height: --ho-topbar-height.
 */
:root {
  --ho-topbar-height: 4.5rem;
}

.ho-topbar {
  position: sticky;
  top: 0;
  z-index: 20;                       /* above menus (10) */
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--ho-topbar-height);
  padding: var(--ho-space-3) var(--ho-space-5);
  background: var(--ho-surface-card);
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
}

/* Logo, ".tools" and the tool name share one baseline: the bottom of the logo. */
.ho-topbar__home {
  display: flex;
  align-items: flex-end;
  gap: var(--ho-space-3);
  color: inherit;
  text-decoration: none;
}

.ho-topbar__lockup { display: flex; align-items: flex-end; gap: 0.125rem; }
.ho-topbar__logo { display: block; width: 5.5rem; height: auto; }
/* The brand mark (the H), instead of the logo on XS screens (< 480px) so the bar fits. A <span hidden>
 * around the svg, so older versions of the design system don't show it. */
.ho-topbar__mark { display: none; }
.ho-topbar__mark svg { display: block; width: auto; height: 1.25rem; }
.ho-topbar__suffix { font-size: 0.85rem; line-height: 1; transform: translateY(0.16em); }
.ho-topbar__divider { align-self: center; width: 1px; height: 1.25rem; background: var(--ho-border-strong); }
.ho-topbar__tool {
  font-size: 1.125rem;
  line-height: 1;
  font-weight: var(--ho-font-weight-bold);
  white-space: nowrap;
  transform: translateY(0.16em);
}

.ho-topbar__end { display: flex; align-items: center; gap: var(--ho-space-6); }

/* A quiet action next to the menu, e.g. "Sign out". */
.ho-topbar__action {
  display: inline-flex;
  align-items: center;
  gap: var(--ho-space-1);
  padding: var(--ho-space-1) var(--ho-space-2);
  margin-right: calc(var(--ho-space-2) * -1);
  border-radius: var(--ho-radius-2);
  color: var(--ho-text-muted);
  font-size: var(--ho-font-size-1);
  line-height: var(--ho-font-line-height-1);
  text-decoration: none;
  transition: color var(--ho-duration-8) var(--ho-easing-out-cubic);

  /* The same hover as the menu items next to it (ho-navlink): Marine Blue text. */
  &:hover { color: var(--ho-action-primary-hover); }
  &:focus-visible { outline: 2px solid var(--ho-border-focus); outline-offset: 0; }
  & .ho-icon { width: 1rem; height: 1rem; }
}

@media (max-width: 40rem) {
  .ho-topbar { padding-inline: var(--ho-space-4); }
  .ho-topbar__end { gap: var(--ho-space-4); }
  .ho-topbar__action { font-size: 0; gap: 0; }   /* icon only; the text stays for screen readers */
  .ho-topbar__action .ho-icon { width: 1.25rem; height: 1.25rem; }
}

@media (max-width: 29.9375rem) {
  .ho-topbar__lockup { display: none; }
  .ho-topbar__mark { display: block; }
}

/* ── Banner ────────────────────────────────────────────────────────────────
 * A full-width notice right under the top bar, e.g. "Test mode". White on
 * Charcoal, so it can't be mistaken for content.
 * Dev mode banners (dev mode, test scenario) always go at the very top, above the
 * top bar, with is--dev (not sticky); other banners go right under the top bar.
 *   <p class="ho-banner" role="status"><strong>Test mode.</strong> … <a href="…">Turn off</a></p>
 */
.ho-banner {
  position: sticky;
  top: var(--ho-topbar-height);
  z-index: 19;
  margin: 0;
  padding: var(--ho-space-2) var(--ho-space-5);
  background: var(--ho-surface-inverse);
  color: var(--ho-text-inverse);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-1);
  line-height: var(--ho-font-line-height-1);
  text-align: center;

  & a { color: inherit; margin-left: var(--ho-space-2); }

  @media (max-width: 40rem) { padding-inline: var(--ho-space-4); }

  /* Dev mode and test scenario: at the very top, above the top bar, not sticky. Always shown while
   * dev mode is on. Two in a row (dev mode, then a scenario) get a thin line between them. */
  &.is--dev { position: static; }
  &.is--dev + &.is--dev { border-top: 1px solid var(--ho-border-inverse); }
}

/* ── Page header ───────────────────────────────────────────────────────────
 * Title with a subtitle, and on the right a quiet action (e.g. "Fetch now")
 * on the line of the title.
 *   <div class="ho-page-header"><div class="ho-page-header__title"><h1 class="ho-h1">…</h1><p>…</p></div>
 *     <div class="ho-page-header__action">…</div></div>
 */
.ho-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ho-space-3);
}

.ho-page-header__title {
  display: grid;
  gap: var(--ho-space-1);

  & > p { margin: 0; color: var(--ho-text-muted); }
  & a { color: var(--ho-text-default); }
}

/* On the line of the title (an ho-h1): as tall as that line, contents centred. */
.ho-page-header__action {
  display: flex;
  align-items: center;
  gap: var(--ho-space-1);
  min-height: var(--ho-font-line-height-6);
  margin: 0;
  color: var(--ho-text-muted);
  font-size: var(--ho-font-size-1);
  line-height: var(--ho-font-line-height-1);

  & .ho-button-icon { min-height: 2rem; padding: 0 var(--ho-space-2); font-size: inherit; line-height: inherit; }
  & .ho-icon { width: 1rem; height: 1rem; }

  /* Under the title on small screens: no need to match the title's height. */
  @media (max-width: 40rem) { min-height: 2rem; }
}

/* ── Toolbar ───────────────────────────────────────────────────────────────
 * Above a list: search on the left, filter menus on the right, a line below.
 */
.ho-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ho-space-3) var(--ho-space-5);
  padding-bottom: var(--ho-space-3);
  border-bottom: 1px solid var(--ho-border-default);
}

.ho-toolbar__search { flex: 1 1 20rem; max-width: 36rem; margin-right: auto; }

.ho-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ho-space-1);

  & .ho-button-icon { color: var(--ho-text-default); }
  & fieldset { margin: 0; min-width: 11rem; }

  @media (max-width: 40rem) {
    & .ho-menu__list { left: 0; right: auto; }   /* don't fall off the screen */
  }
}

/* ── Card ──────────────────────────────────────────────────────────────────
 * A white surface with a thin border, e.g. one item in a list.
 * Modifiers: is--highlight (a Marine Blue bar on the left, e.g. "new"),
 *            is--compact (smaller radius and padding, e.g. a tile in a grid),
 *            is--dev (only visible in dev mode: a tint darker, dashed border; PROVISIONAL),
 *            is--flush (no padding: the content brings its own, e.g. a dialog's parts on a page).
 */
.ho-card {
  padding: var(--ho-space-5);
  background: var(--ho-surface-card);
  border: 1px solid var(--ho-border-default);
  border-radius: var(--ho-radius-1);
  color: var(--ho-text-default);

  &.is--highlight { box-shadow: inset 6px 0 0 var(--ho-color-marine-blue-100); }
  &.is--compact { padding: var(--ho-space-4); border-radius: var(--ho-radius-2); }
  &.is--dev { background: var(--ho-surface-subtle); border: 1px dashed var(--ho-neutral-40); box-shadow: none; }
  &.is--flush { padding: 0; }   /* the content brings its own padding, e.g. dialog parts on a page */
}

/* ── Meta ──────────────────────────────────────────────────────────────────
 * Facts as label + value pairs, e.g. Closes / Duration / Rate.
 *   <dl class="ho-meta"><div><dt>Closes</dt><dd>22 Oct 2026</dd></div> …</dl>
 */
.ho-meta {
  display: grid;
  gap: var(--ho-space-3);
  align-content: start;
  margin: 0;
  font-family: var(--ho-font-family-brand);

  & dt { font-size: var(--ho-font-size-1); line-height: var(--ho-font-line-height-1); color: var(--ho-text-muted); }
  & dd { margin: 0; font-size: var(--ho-font-size-2); line-height: var(--ho-font-line-height-2); }
}

/* ── Stat ──────────────────────────────────────────────────────────────────
 * Key figures: a label with a large value.
 *   <dl class="ho-stats"><div class="ho-stat"><dt>Energy</dt><dd>17 Wh</dd></div> …</dl>
 */
.ho-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr));
  gap: var(--ho-space-3);
  margin: 0;
}

.ho-stat {
  font-family: var(--ho-font-family-brand);

  & dt { font-size: var(--ho-font-size-1); line-height: var(--ho-font-line-height-1); color: var(--ho-text-muted); }
  & dd { margin: 0; font-size: var(--ho-font-size-4); line-height: var(--ho-font-line-height-4); font-weight: var(--ho-font-weight-bold); white-space: nowrap; }
}

/* ── Breakdown ─────────────────────────────────────────────────────────────
 * How a figure is made up: label and value on one line, under a thin line, e.g.
 * under a key figure on a card. PROVISIONAL — not in Figma.
 *   <dl class="ho-breakdown ho-body-small"><div><dt>Servers</dt><dd>12 Wh</dd></div> …</dl>
 */
.ho-breakdown {
  display: grid;
  gap: var(--ho-space-1);
  margin: 0;
  padding-top: var(--ho-space-3);
  border-top: 1px solid var(--ho-border-default);
  font-family: var(--ho-font-family-brand);

  & > div { display: flex; justify-content: space-between; gap: var(--ho-space-3); }
  & dd { margin: 0; white-space: nowrap; }
}

/* ── Arrow link ────────────────────────────────────────────────────────────
 * A link to go somewhere, e.g. "View on Freep →". The arrow moves on hover.
 */
.ho-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--ho-space-2);
  width: fit-content;
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  font-weight: var(--ho-font-weight-medium);
  text-decoration: none;

  & .ho-icon { width: 1.125rem; height: 1.125rem; transition: transform var(--ho-duration-8) var(--ho-easing-out-cubic); }
  &:hover { text-decoration: underline; }
  &:hover .ho-icon { transform: translateX(0.125rem); }
  &:focus-visible { outline: 2px solid var(--ho-border-focus); outline-offset: 2px; border-radius: 0.25rem; }
}

/* ── Disclosure ────────────────────────────────────────────────────────────
 * A collapsible section on <details>, e.g. "Archived (3)".
 */
.ho-disclosure {
  padding-top: var(--ho-space-4);
  border-top: 1px solid var(--ho-border-default);
  font-family: var(--ho-font-family-brand);

  & > summary {
    width: fit-content;
    color: var(--ho-text-muted);
    font-size: var(--ho-font-size-2);
    line-height: var(--ho-font-line-height-2);
    font-weight: var(--ho-font-weight-medium);
    cursor: pointer;
  }

  & > summary:hover,
  &[open] > summary { color: var(--ho-text-default); }
  & > summary:focus-visible { outline: 2px solid var(--ho-border-focus); outline-offset: 2px; }
}

/* ── Table ─────────────────────────────────────────────────────────────────
 * A table in a white card; scrolls sideways on small screens.
 *   <div class="ho-table-wrap"><table class="ho-table">…</table></div>
 */
.ho-table-wrap {
  overflow-x: auto;
  background: var(--ho-surface-card);
  border: 1px solid var(--ho-border-default);
  border-radius: var(--ho-radius-2);
}

.ho-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ho-font-family-brand);

  & th, & td {
    padding: var(--ho-space-3) var(--ho-space-4);
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--ho-border-default);
    white-space: nowrap;
  }

  & thead th { font-weight: var(--ho-font-weight-regular); color: var(--ho-text-muted); font-size: var(--ho-font-size-1); }
  & tbody th { font-weight: var(--ho-font-weight-medium); }
  & tbody tr:last-child > * { border-bottom: 0; }
  & td.is--wrap { white-space: normal; min-width: 14rem; }
  & th.is--wrap { white-space: normal; }   /* a row label that may wrap, e.g. on small screens */
}

/* ── Dot ───────────────────────────────────────────────────────────────────
 * A small status dot: neutral, is--success or is--error. Next to a menu item
 * (in an ho-navlink) it is a notification dot.
 */
.ho-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ho-neutral-40);
  vertical-align: 0.1em;
  flex: none;

  &.is--success { background: var(--ho-status-success); }
  &.is--error { background: var(--ho-color-coral-red-100); }
}

.ho-navlink .ho-dot { align-self: flex-start; margin: 0.25rem 0 0 0.25rem; }

/* ── Toggle ────────────────────────────────────────────────────────────────
 * An on/off toggle with its label, e.g. "Dev mode" (called switch before 3.0.0). PROVISIONAL — not in Figma.
 * As a link or button (the state lives on the server):
 *   <a class="ho-toggle" role="switch" aria-checked="false" href="?dev=1">
 *     <span class="ho-toggle__label">Dev mode</span><span class="ho-toggle__track" aria-hidden="true"></span></a>
 * Or with a checkbox inside a <label>:
 *   <label class="ho-toggle"><input class="ho-toggle__input" type="checkbox"> …label and track…</label>
 */
.ho-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--ho-space-2);
  padding: var(--ho-space-1) 0;
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);
  font-weight: var(--ho-font-weight-medium);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--ho-radius-infinite);

  &:focus-visible,
  &:has(.ho-toggle__input:focus-visible) {
    outline: 2px solid var(--ho-border-focus);
    outline-offset: 2px;
  }

  /* Small (12px), e.g. a setting in a form; as wide as its content. */
  &.is--small {
    width: fit-content;
    font-size: var(--ho-font-size-1);
    line-height: var(--ho-font-line-height-1);
  }
}

.ho-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ho-toggle__track {
  position: relative;
  flex: none;
  width: 2.25rem;
  height: 1.25rem;
  border-radius: var(--ho-radius-infinite);
  background: var(--ho-neutral-20);
  transition: background-color var(--ho-duration-8) var(--ho-easing-out-cubic);

  &::after {
    content: "";
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--ho-color-white-100);   /* white on the grey track, also on dark */
    box-shadow: 0 1px 2px rgb(29 29 29 / 0.25);
    transition: transform var(--ho-duration-8) var(--ho-easing-out-cubic);
  }
}

.ho-toggle:hover .ho-toggle__track { background: var(--ho-neutral-40); }

.ho-toggle[aria-checked="true"] .ho-toggle__track,
.ho-toggle:has(.ho-toggle__input:checked) .ho-toggle__track {
  background: var(--ho-action-primary);

  &::after { transform: translateX(1rem); background: var(--ho-action-on-primary); }
}

@media (prefers-reduced-motion: reduce) {
  .ho-toggle__track, .ho-toggle__track::after { transition: none; }
}

/* ── Page ──────────────────────────────────────────────────────────────────
 * The base of a tool page: the Sand background, the brand font, links in the text
 * color, and a centred main column of 64rem. PROVISIONAL — not in Figma.
 *   <body class="ho-page"> … top bar … <main class="ho-main">…</main></body>
 * Low specificity (:where), so every component keeps its own colors.
 */
:where(.ho-page, .ho-page *) { box-sizing: border-box; }
.ho-page {
  margin: 0;
  background: var(--ho-surface-page);
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
}
:where(.ho-page) a { color: inherit; }
:where(.ho-page) .is--muted { color: var(--ho-text-muted); }

.ho-main {
  display: grid;
  gap: var(--ho-space-5);
  max-width: 64rem;
  margin: 0 auto;
  padding: var(--ho-space-9) var(--ho-space-5) var(--ho-space-7);

  @media (max-width: 40rem) { padding: var(--ho-space-9) var(--ho-space-4) var(--ho-space-5); }
}

/* ── Form ──────────────────────────────────────────────────────────────────
 * A form in sections, e.g. a settings card: generous space, a thin line between
 * the sections. PROVISIONAL — not in Figma.
 *   <form class="ho-card ho-form"><h2 class="ho-h3">Fetching</h2>
 *     <div class="ho-form__section"><p class="ho-label-small">Time windows</p> …</div>
 *     <div><button class="ho-button is--small">Save</button></div></form>
 */
.ho-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* may shrink, e.g. with long tags */
  gap: var(--ho-space-6);
  align-content: start;
  margin: 0;
}

.ho-card.ho-form {
  padding: var(--ho-space-6);

  @media (max-width: 29.9375rem) { padding: var(--ho-space-5); }
}

.ho-form__section {
  display: grid;
  gap: var(--ho-space-3);
  padding-top: var(--ho-space-6);
  border-top: 1px solid var(--ho-border-default);
}

/* ── Repeat ────────────────────────────────────────────────────────────────
 * Rows of fields you add (+) and remove (×), with a maximum, e.g. time windows.
 * PROVISIONAL — not in Figma. Behaviour: form.js (works with the pickers and tags).
 *   <div class="ho-repeat" data-ho-repeat data-max="4">
 *     <ol class="ho-repeat__rows">
 *       <li class="ho-repeat__row">…fields… <button class="ho-button-icon-only is--ghost is--small"
 *           type="button" data-ho-repeat-remove aria-label="Remove">…x…</button></li>
 *     </ol>
 *     <template><li class="ho-repeat__row">…an empty row…</li></template>
 *     <button class="ho-button-icon is--subtle ho-repeat__add" type="button" data-ho-repeat-add>…plus… Add</button>
 *     <div class="ho-repeat__limit" hidden>…a message: at most 4…</div>
 *   </div>
 * Without JS the rows that are there still submit.
 */
.ho-repeat { display: grid; gap: var(--ho-space-3); }

.ho-repeat__rows {
  display: grid;
  gap: var(--ho-space-2);
  margin: 0;
  padding: 0;
  list-style: none;

  &:empty { display: none; }
}

.ho-repeat__row {
  display: flex;
  align-items: center;
  gap: var(--ho-space-2);
}

/* Between two fields, e.g. the dash in 08:00 – 09:00. */
.ho-repeat__sep { text-align: center; }
.ho-repeat__add { width: fit-content; margin-left: calc(var(--ho-space-3) * -1); }   /* the plus right under the fields */
.ho-repeat__limit[hidden] { display: none; }

/* ── Bar ───────────────────────────────────────────────────────────────────
 * A full-width bar as high as the top bar, with three slots: start, middle (centred)
 * and end. With ho-inverse it's Charcoal, e.g. the Compare bar that has to stand apart
 * from the tool under it. PROVISIONAL — not in Figma.
 *   <header class="ho-bar ho-inverse"><a class="ho-button is--small is--ghost ho-bar__start">Back</a>
 *     <div class="ho-bar__middle">…</div><div class="ho-bar__end">…</div></header>
 * ho-bar__hint is text that goes on small screens; ho-bar__icon a small muted icon.
 */
.ho-bar {
  position: relative;
  z-index: 30;                       /* a menu in the bar falls over banners and the page */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--ho-space-3) var(--ho-space-5);
  min-height: var(--ho-topbar-height);
  padding: var(--ho-space-3) var(--ho-space-5);
  background: var(--ho-surface-card);
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);

  &.ho-inverse { background: var(--ho-surface-inverse); color: var(--ho-text-inverse); }

  @media (max-width: 40rem) { grid-template-columns: auto 1fr; }
}

.ho-bar__start { justify-self: start; }

.ho-bar__middle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--ho-space-2);
  margin: 0;

  @media (max-width: 40rem) { justify-content: flex-start; }
}

.ho-bar__end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ho-space-3);

  @media (max-width: 40rem) { grid-column: 1 / -1; justify-content: flex-start; }
}

.ho-bar__hint {
  color: var(--ho-text-muted);

  @media (max-width: 40rem) { display: none; }
}

.ho-bar__icon {
  display: inline-flex;
  color: var(--ho-text-muted);

  & .ho-icon { width: 1rem; height: 1rem; }
}

.ho-inverse :is(.ho-bar__hint, .ho-bar__icon) { color: var(--ho-text-inverse-muted); }

/* ── Tag ───────────────────────────────────────────────────────────────────
 * A quiet block with a short value, e.g. a version number, with an optional note
 * ("live"). As a button that opens a menu: is--toggle (with a caret that turns).
 * Clay on light, white-transparent on ho-inverse. PROVISIONAL — not in Figma.
 *   <span class="ho-tag">2.3.1 <span class="ho-tag__note">live</span></span>
 *   <details class="ho-menu"><summary class="ho-tag is--toggle">2.3.2 …caret-down…</summary> …</details>
 */
.ho-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--ho-space-2);
  min-height: 2rem;
  padding: 0.125rem var(--ho-space-3) 0;   /* text optically in the middle */
  border-radius: var(--ho-radius-2);
  background: var(--ho-surface-subtle);
  color: var(--ho-text-default);
  font-family: var(--ho-font-family-brand);
  font-size: var(--ho-font-size-2);
  line-height: var(--ho-font-line-height-2);
  font-weight: var(--ho-font-weight-medium);
  white-space: nowrap;

  &.is--toggle {
    gap: var(--ho-space-1);
    padding-right: var(--ho-space-2);
    cursor: pointer;
  }

  &.is--toggle .ho-icon {
    width: 1rem;
    height: 1rem;
    margin-top: -0.125rem;
    transition: transform var(--ho-duration-8) var(--ho-easing-out-cubic);
  }

  &.is--toggle:hover { box-shadow: inset 0 0 0 1px var(--ho-border-strong); }
}

.ho-tag__note {
  color: var(--ho-text-muted);
  font-size: var(--ho-font-size-1);
  font-weight: var(--ho-font-weight-regular);
}

.ho-menu[open] > .ho-tag.is--toggle {
  background: var(--ho-surface-subtle);
  box-shadow: inset 0 0 0 1px var(--ho-border-strong);

  & .ho-icon { transform: rotate(180deg); }
}

.ho-inverse .ho-tag.is--toggle:hover,
.ho-inverse .ho-menu[open] > .ho-tag.is--toggle { background: var(--ho-surface-inverse-raised-hover); color: var(--ho-text-inverse); box-shadow: none; }

/* ── List ──────────────────────────────────────────────────────────────────
 * A plain list of items. PROVISIONAL — not in Figma.
 *   <ul class="ho-list"><li class="ho-list__item is--clickable">
 *     <div class="ho-list__head"><span class="ho-label">Button</span> <span class="ho-badge">New</span>
 *       <span class="ho-list__count ho-body-small is--muted">3</span></div>
 *     <p class="ho-list__note ho-body-small">…</p></li></ul>
 * is--clickable: hover background (e.g. it highlights or opens something); is--active: the
 * current one. is--divided on the list: rows with a line under each, content and an
 * action side by side (e.g. archived items with "Restore").
 */
.ho-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--ho-font-family-brand);

  &.is--divided .ho-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ho-space-4);
    padding: var(--ho-space-3) 0;
    border-bottom: 1px solid var(--ho-border-default);
    border-radius: 0;
  }

  &.is--divided a { text-decoration: none; }
  &.is--divided a:hover { text-decoration: underline; }
}

.ho-list__item {
  padding: var(--ho-space-3) var(--ho-space-2);
  border-radius: var(--ho-radius-1);

  & p { margin: 0; }

  &.is--clickable { cursor: pointer; }
  &.is--clickable:hover,
  &.is--active { background: var(--ho-surface-subtle); }
  &:focus-visible { outline: 2px solid var(--ho-border-focus); outline-offset: -2px; }
}

.ho-list__head { display: flex; align-items: center; gap: var(--ho-space-2); }

.ho-list__count {
  margin-left: auto;
  white-space: nowrap;

  & .ho-icon { width: 0.875rem; height: 0.875rem; margin-left: var(--ho-space-1); vertical-align: -0.1em; }
}

.ho-list__item .ho-list__note { margin: var(--ho-space-1) 0 0; }

.ho-inverse .ho-list__item:is(.is--clickable:hover, .is--active) { background: var(--ho-surface-inverse-hover); }
.ho-inverse .ho-list__item:focus-visible { outline-offset: -2px; }

/* ── Inverse ───────────────────────────────────────────────────────────────
 * Charcoal with white text, for things that must stand apart from the tool under
 * them (the Compare bar, its panel and dialog). Put it on the bar, dialog or section.
 * Everything inside follows by itself: the semantic tokens (text, surfaces, lines,
 * fields, focus) have an inverse value (tokens › $extensions.mode.inverse), and a
 * menu that opens from it is light again. A new component follows too, as long as it
 * uses those tokens. Colors that are always light (a sunflower badge) keep Charcoal text.
 * The primary action is white on dark, like is--inverted. PROVISIONAL — not in Figma.
 *   <dialog class="ho-dialog ho-inverse">…</dialog>
 */
.ho-inverse {
  background: var(--ho-surface-inverse);
  color: var(--ho-text-default);

  /* Links and focus outside a .ho-page, which sets them for light. */
  & a:where(:not([class*="ho-"])) { color: var(--ho-text-link); }   /* components keep their own colors */
  & .is--muted { color: var(--ho-text-muted); }
  & :focus-visible { outline: 2px solid var(--ho-border-focus); outline-offset: 2px; }

  /* Quiet buttons are white on dark, not muted as on light. */
  & :is(.ho-button, .ho-button-icon, .ho-button-icon-only).is--ghost { color: var(--ho-text-default); }

  /* A close button stays quiet on dark, also without is--ghost. */
  & .ho-dialog__close { background: transparent; color: var(--ho-text-default); }

  /* Hover on dark is a little quieter than surface-subtle. */
  & .ho-dialog__close:hover,
  & :is(.ho-button, .ho-button-icon).is--secondary:hover { background: var(--ho-surface-inverse-hover); }

  & .ho-menu__list :focus-visible { outline-offset: -2px; }
}

/* A modal on dark gets a faint light edge, so it stands out against the backdrop. */
.ho-dialog.ho-inverse:modal { box-shadow: 0 0 0 1px var(--ho-border-inverse), var(--ho-shadow-4); }

/* ── Highlight ─────────────────────────────────────────────────────────────
 * Marks a spot on a page, e.g. where a change is in Compare (positioned by the tool).
 * PROVISIONAL — not in Figma.
 */
.ho-highlight {
  border-radius: 0.25rem;
  outline: 2px solid var(--ho-color-marine-blue-100);
  outline-offset: 2px;
  background: var(--ho-surface-highlight);
}

/* ── Utilities ─────────────────────────────────────────────────────────────── */
/* Spinning icon while something loads; still for people who prefer less motion. */
.ho-icon.is--spin { animation: ho-spin 1s linear infinite; }
@keyframes ho-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ho-icon.is--spin { animation: none; } }

/* Text for screen readers only. */
.ho-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
