:root {
  --ht-container: 1180px;
  --ht-radius-sm: 10px;
  --ht-radius-md: 16px;
  --ht-radius-lg: 24px;
  --ht-space-1: .5rem;
  --ht-space-2: .75rem;
  --ht-space-3: 1rem;
  --ht-space-4: 1.5rem;
  --ht-space-5: 2rem;
  --ht-space-6: 3rem;
  --ht-shadow-card: 0 8px 30px rgba(15, 23, 42, .08);
}

.ht-container { width: min(100% - 2rem, var(--ht-container)); margin-inline: auto; }
.ht-section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.ht-grid { display: grid; gap: var(--ht-space-4); }
.ht-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ht-card { background: #fff; border: 1px solid #e5e7eb; border-radius: var(--ht-radius-md); overflow: hidden; }
.ht-card--elevated { box-shadow: var(--ht-shadow-card); border-color: transparent; }
.ht-card__body { padding: var(--ht-space-4); }
.ht-card__title { margin: 0 0 var(--ht-space-2); font-size: 1.2rem; line-height: 1.25; }
.ht-card__text { margin: 0; color: #4b5563; }

.ht-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .7rem 1rem; border-radius: 999px; border: 1px solid transparent; text-decoration: none; font-weight: 700; cursor: pointer; }
.ht-button:focus-visible, .ht-input:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.ht-button--primary { background: #111827; color: #fff; }
.ht-button--secondary { background: #fff; color: #111827; border-color: #d1d5db; }

.ht-search { display: grid; grid-template-columns: 1fr auto; gap: .75rem; padding: .5rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 999px; box-shadow: var(--ht-shadow-card); }
.ht-input { width: 100%; min-height: 44px; padding-inline: 1rem; border: 0; border-radius: 999px; background: transparent; font: inherit; }
.ht-input:focus { outline: none; }

.ht-eyebrow { margin: 0 0 .5rem; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ht-heading { margin: 0; line-height: 1.08; letter-spacing: -.02em; }
.ht-muted { color: #6b7280; }

@media (max-width: 800px) {
  .ht-grid--3 { grid-template-columns: 1fr; }
  .ht-search { grid-template-columns: 1fr; border-radius: var(--ht-radius-md); }
  .ht-search .ht-button { width: 100%; }
}

/* Back to top: intentionally subtle, only visible after meaningful scroll. */
.hl-back-to-top {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 90;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 50%;
    background: var(--hl-accent);
    color: #fff;
    box-shadow: 0 8px 24px rgba(23,32,42,.18);
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.hl-back-to-top[hidden] { display: none; }
.hl-back-to-top.is-visible { opacity: 1; transform: translateY(0); }
.hl-back-to-top:hover { background: var(--hl-accent-dark); }
.hl-back-to-top:focus-visible { outline: 3px solid rgba(23,105,210,.28); outline-offset: 3px; }

@media (max-width: 620px) {
    .hl-back-to-top {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hl-back-to-top { transition: none; }
}
