/* App-wide additions on top of hd-ui (keep small; prefer hd- classes). */
.hd-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--hd-fg); text-decoration: none; font-size: 14px; }
.hd-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.fx-landing { max-width: 720px; margin: 0 auto; padding: 72px 24px; text-align: center; }
.fx-landing h1 { font-size: 34px; letter-spacing: -0.02em; margin: 16px 0 12px; }
.fx-landing p { font-size: 16px; color: var(--hd-muted); line-height: 1.6; margin: 0 auto 24px; max-width: 560px; }
.fx-landing .hd-gap-8 { justify-content: center; }
.fx-ws-list { display: flex; flex-direction: column; }
.fx-ws-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--hd-border-soft); text-decoration: none; color: var(--hd-fg); }
.fx-ws-list a:first-child { border-top: 0; }
.fx-ws-list a:hover { background: var(--hd-hover); }
.fx-slug-row { display: flex; align-items: center; gap: 6px; }
.fx-slug-row .hd-control { flex: 1; min-width: 0; }
.fx-slug-row span { color: var(--hd-muted); font-size: 13px; white-space: nowrap; }
.hd-hint.bad { color: var(--hd-red); }
/* Honeypot field on public forms (views/partials/bot-fields.ejs): off-screen, not display:none, so bots still see it */
.fx-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.hd-r { text-align: right; }

/* ---------- Redesign look on Bootstrap leftovers and settings navigation (tokens: hd-ui.css :root) ---------- */
.hd .btn-primary, .hd .btn-success { background: var(--hd-accent) !important; border-color: var(--hd-accent) !important; }
.hd .btn-primary:hover, .hd .btn-success:hover { background: var(--hd-accent-hover) !important; border-color: var(--hd-accent-hover) !important; }
.hd-control:focus, .hd .form-control:focus, .hd .form-select:focus { border-color: var(--hd-accent); }
.hd-crumbs a { color: var(--hd-muted); }
/* Settings sub-navigation: same active pill as the menu */
.hd-subnav a { color: var(--hd-muted); font-weight: 500; border-radius: var(--hd-radius); }
.hd-subnav a:hover { background: var(--hd-hover); color: var(--hd-fg); text-decoration: none; }
.hd-subnav a.on { background: var(--hd-sel); color: var(--hd-fg); font-weight: 600; }
.hd-subnav .hd-subnav-h { font-size: 10px; letter-spacing: 0.06em; color: var(--hd-faint); }
.hd-subnav { top: calc(var(--fx-bar-h, 64px) + 16px); }
.hd-card { border-color: var(--hd-border); border-radius: var(--hd-radius-lg); }

/* Page headers are as tall as a button whether or not they have one, so the title sits at the same
   height on every page (Team, with its Invite button, used to sit 4px lower than Domains) */
.hd-head { min-height: 31px; }
@media (pointer: coarse) { .hd-head { min-height: 36px; } }

/* Platform admin health page (views/admin/health.ejs) */
.fx-stack { margin: 6px 0 0; padding: 10px; max-height: 240px; overflow: auto; background: var(--hd-hover); border-radius: 6px; font-size: 11.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; max-width: 560px; }
.fx-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.fx-checks .hd-tag { min-width: 34px; justify-content: center; }

/* Settings → Categories (views/settings/categories.ejs, categories-form.ejs) */
.fx-cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; margin-right: 8px; vertical-align: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.fx-cat-row { align-items: flex-start; }
.fx-cat-main { min-width: 0; flex: 1 1 auto; }
.fx-cat-main .hd-act-t { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; overflow-wrap: anywhere; }
.fx-cat-main .hd-act-s { overflow-wrap: anywhere; line-height: 1.5; }
.fx-cat-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.fx-cat-tools form { display: inline; margin: 0; }
.fx-cat-tools .hd-btn.icon:disabled { opacity: 0.35; }
.fx-cat-gtools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fx-cat-gtools form { display: inline; margin: 0; }
.fx-cat-colour { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fx-cat-colour input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--hd-border); border-radius: 6px; background: var(--hd-surface); cursor: pointer; }
.fx-cat-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-cat-swatches label { position: relative; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.fx-cat-swatches input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fx-cat-swatches input:checked + span, .fx-cat-swatches input:focus-visible + span { position: absolute; inset: -3px; border-radius: 50%; box-shadow: 0 0 0 2px var(--hd-accent); }
@media (pointer: coarse) {
  .fx-cat-tools .hd-btn, .fx-cat-gtools .hd-btn { min-height: 36px; }
  .fx-cat-tools .hd-btn.icon, .fx-cat-gtools .hd-btn.icon { width: 36px; }
  .fx-cat-swatches label { width: 36px; height: 36px; }
}
@media (max-width: 575.98px) {
  .fx-cat-row { flex-wrap: wrap; gap: 8px; }
  .fx-cat-tools { width: 100%; justify-content: flex-end; }
}

/* Settings → Help centre (views/settings/helpcentre*.ejs) */
.hc-set-packs { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hc-set-packs legend { margin-bottom: 8px; }
.hc-set-pack { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--hd-border); border-radius: var(--hd-radius); cursor: pointer; min-height: 44px; }
.hc-set-pack:has(input:checked) { border-color: var(--hd-fg); box-shadow: var(--hd-ring); }
.hc-set-pack input { margin-top: 3px; }
.hc-set-pack .hd-hint { display: block; margin-top: 2px; }
.hc-art { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.hc-art-main { min-width: 0; flex: 1 1 260px; }
.hc-art-main .hd-act-t { flex-wrap: wrap; overflow-wrap: anywhere; }
.hc-art-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hc-art-tools form { margin: 0; }
.hc-art-form { display: flex; align-items: center; gap: 6px; }
.hc-art-form select { width: auto; max-width: 180px; min-height: 36px; }
.hc-art-pos { width: 70px; min-height: 36px; }
.hc-art-tools .hd-btn.sm { min-height: 36px; }
.hc-art-tools .hd-btn.icon.sm { width: 36px; }
.hc-ins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.hc-ins-grid .hd-card { margin: 0; }
@media (max-width: 600px) { .hc-art-form select { max-width: 150px; } }

/* The admin page inside Shopify (views/shopify/app.ejs): no app shell, framed by the Shopify admin */
.fxs-shopify { max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; }
.fxs-shopify .hd-card-body p { margin: 8px 0 0; }
.fxs-shopify-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fxs-shopify-actions .hd-btn { min-height: 36px; }
