/* ==========================================================================
   Cleer — public website + customer dashboard design system
   --------------------------------------------------------------------------
   Warm, editorial, calm. Coral #FF6B5A · Outfit (sans) + Literata (serif).
   Concentric radius: outer 24px → inner 16px → inputs 12px.
   Motion: cubic-bezier(0.2, 0, 0, 1); high-frequency fades ≤ 150ms;
   scale-on-press 0.96; staged hero entrances ~100ms apart.
   ========================================================================== */

:root {
  --brand: #ff6b5a;
  --brand-dark: #f25341;
  --brand-deep: #d43a29;
  --brand-soft: rgba(255, 107, 90, 0.12);

  --ink: #2e2c2a;
  --muted: #7c7873;
  --canvas: #f8f6f2;
  --surface: #fcfbf9;
  --elevated: #ffffff;
  --accent: #e8e5e0;
  --accent-strong: #d8d4ce;

  --success: #1f7a4d;
  --success-soft: rgba(31, 122, 77, 0.1);
  --danger: #b3402f;
  --danger-soft: rgba(179, 64, 47, 0.08);

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ring: 0 0 0 3px rgba(255, 107, 90, 0.16);

  --shadow-card: none;
  --shadow-raise: none;
  --shadow-brand: none;

  --outline-img: 1px solid oklch(0 0 0 / 0.1);

  --r-outer: 1rem;     /* 16px */
  --r-inner: 0.75rem;  /* 12px */
  --r-input: 0.625rem; /* 10px */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(255, 107, 90, 0.24); }

img { outline: var(--outline-img); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Typography -------------------------------------------------------------- */
.font-serif { font-family: 'Literata', Georgia, serif; }

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--brand { color: var(--brand-dark); }

.display {
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.display strong, .display .accent { font-weight: 500; color: var(--brand); }

/* ------------------------------------------------------------------------- */
/* Buttons                                                                     */
/* ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  padding: 0.7rem 1.5rem;
  border-radius: 9999px;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color 150ms var(--ease),
    border-color 150ms var(--ease),
    color 150ms var(--ease),
    box-shadow 150ms var(--ease),
    opacity 150ms var(--ease),
    transform 150ms var(--ease);
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover { background: var(--brand-dark); }
.btn--primary:disabled { box-shadow: none; }

.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--accent);
}
.btn--secondary:hover { border-color: var(--accent-strong); background: var(--elevated); }

.btn--ghost {
  background: transparent;
  color: var(--muted);
  padding: 0.5rem 0.875rem;
  font-weight: 600;
}
.btn--ghost:hover { background: var(--accent); color: var(--ink); }

.btn--lg { font-size: 1rem; padding: 0.85rem 1.9rem; }
.btn--block { width: 100%; }

.btn .btn-icon { width: 1.1rem; height: 1.1rem; flex: none; }

/* ------------------------------------------------------------------------- */
/* Form fields                                                                 */
/* ------------------------------------------------------------------------- */
.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.field-label .hint { color: var(--muted); font-weight: 400; }

.field-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--elevated);
  border: 1px solid var(--accent-strong);
  border-radius: var(--r-input);
  padding: 0.68rem 0.9rem;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease), background-color 150ms var(--ease);
}
.field-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: var(--ring);
}
.field-input::placeholder { color: rgba(124, 120, 115, 0.5); }
.field-input.field-password { padding-right: 2.9rem; }

select.field-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C7873' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.4rem;
}

.field-error {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
  border-color: var(--danger) !important;
}

.field-help { margin-top: 0.4rem; font-size: 0.75rem; color: var(--muted); }

/* Password reveal (two SVGs cross-fade, per icon-transitions recipe) ------- */
.field-eye {
  position: absolute;
  inset: 0 0 0 auto;
  width: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 150ms var(--ease);
}
.field-eye:hover { color: var(--ink); }
.field-eye svg {
  width: 1.15rem;
  height: 1.15rem;
  transition: opacity 150ms var(--ease), transform 150ms var(--ease), filter 150ms var(--ease);
}
.field-eye .eye-off { position: absolute; opacity: 0; transform: scale(0.25); filter: blur(4px); }
.field-eye .eye-on  { opacity: 1; transform: scale(1); filter: blur(0); }
.field-eye.is-visible .eye-on  { opacity: 0; transform: scale(0.25); filter: blur(4px); }
.field-eye.is-visible .eye-off { opacity: 1; transform: scale(1); filter: blur(0); }

/* ------------------------------------------------------------------------- */
/* Animated password criteria (signup)                                         */
/* ------------------------------------------------------------------------- */
.criteria-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  max-width: 150px;
  color: var(--muted);
  transition:
    color 300ms var(--ease),
    opacity 300ms var(--ease),
    transform 300ms var(--ease),
    max-width 400ms var(--ease),
    margin 400ms var(--ease);
  transform-origin: left center;
}
.criteria-item.met { color: var(--success); }
.criteria-item.dissolving { opacity: 0; transform: scale(0.96); }
.criteria-item.collapsed { max-width: 0 !important; margin: 0 !important; opacity: 0; }

#confirm-container {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease), opacity 300ms var(--ease), margin 400ms var(--ease);
  margin-top: 0;
}
#confirm-container.show { max-height: 220px; opacity: 1; margin-top: 1.25rem; }

/* ------------------------------------------------------------------------- */
/* Cards                                                                       */
/* ------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: none;
  border-radius: var(--r-outer);
  box-shadow: none;
}
.card--pad { padding: 1.5rem; }
@media (min-width: 640px) { .card--pad { padding: 1.75rem; } }

.card--hover { transition: background-color 150ms var(--ease); }
.card--hover:hover { background: var(--elevated); }

/* Inner surfaces sit 8px inside an outer radius → inner radius 12px. */
.inset {
  background: var(--canvas);
  border: none;
  border-radius: var(--r-inner);
}

/* ------------------------------------------------------------------------- */
/* Badges / pills                                                              */
/* ------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
}
.pill .dot { width: 0.4rem; height: 0.4rem; border-radius: 9999px; background: currentColor; flex: none; }

.pill--muted { background: var(--accent); color: var(--muted); }
.pill--ink   { background: var(--ink); color: #fff; }
.pill--brand { background: var(--brand-soft); color: var(--brand-deep); }
.pill--success { background: var(--success-soft); color: var(--success); }
.pill--danger  { background: var(--danger-soft); color: var(--danger); }
.pill--outline { background: transparent; border: 1px solid var(--accent-strong); color: var(--muted); }

/* ------------------------------------------------------------------------- */
/* Small shared bits                                                           */
/* ------------------------------------------------------------------------- */
.check {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.4rem;
  width: 1.4rem;
  border-radius: 9999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.check svg { width: 0.8rem; height: 0.8rem; }

.divider { border: 0; border-top: 1px solid var(--accent); }

/* ------------------------------------------------------------------------- */
/* Code blocks                                                                 */
/* ------------------------------------------------------------------------- */
.code-block {
  background: #f1eee8;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  tab-size: 2;
  border-radius: var(--r-inner);
  overflow-x: auto;
}
.code-block code { font-family: inherit; }
.code-block .c-muted { color: #8a857f; }
.code-block .c-brand { color: #d43a29; }
.code-block .c-green { color: #1f7a4d; }
.code-block .c-amber { color: #b9773b; }

/* ------------------------------------------------------------------------- */
/* Flash toasts                                                                */
/* ------------------------------------------------------------------------- */
.flash-stack {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  width: calc(100% - 2rem);
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.flash-stack--inline {
  position: static;
  transform: none;
  width: auto;
  max-width: none;
  margin-bottom: 1.5rem;
  z-index: auto;
}
.flash {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-inner);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow-card);
  animation: flash-in 260ms var(--ease);
}
.flash--success { background: var(--ink); color: #fff; }
.flash--error   { background: var(--brand); color: #fff; }
.flash--info, .flash--message { background: var(--ink); color: #fff; }
.flash--warning { background: #b9773b; color: #fff; }
.flash span { flex: 1; }
.flash-close {
  flex: none;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.75;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: opacity 150ms var(--ease);
}
.flash-close:hover { opacity: 1; }
.flash.flash-out { opacity: 0; transform: translateY(-8px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------------- */
/* Staged entrances (one-shot hero sequence)                                   */
/* ------------------------------------------------------------------------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.enter { animation: rise-in 0.7s var(--ease) both; }
.enter-1 { animation-delay: 0ms; }
.enter-2 { animation-delay: 100ms; }
.enter-3 { animation-delay: 200ms; }
.enter-4 { animation-delay: 300ms; }
.enter-5 { animation-delay: 400ms; }

/* ------------------------------------------------------------------------- */
/* Marketing navigation                                                        */
/* ------------------------------------------------------------------------- */
.mark-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--canvas);
  border-bottom: 1px solid var(--accent);
}
.mark-nav-inner {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand-mark { font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-size: 1.5rem; color: var(--ink); text-decoration: none; }
.brand-mark .dot { color: var(--brand); }

.mark-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms var(--ease);
}
.mark-link:hover { color: var(--ink); }

/* ------------------------------------------------------------------------- */
/* Application shell (LinkedIn-style dashboard)                                */
/* ------------------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--canvas);
  border-bottom: 1px solid var(--accent);
}
.app-header-bar {
  width: 100%;
  padding-inline: 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.app-header .brand-mark { font-size: 1.375rem; }

.app-company {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 16rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  overflow: hidden;
}
.app-company span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-account { display: flex; align-items: center; gap: 0.75rem; }
.app-account .who { font-size: 0.8125rem; font-weight: 500; color: var(--muted); }

.app-body {
  width: 100%;
  display: flex;
  align-items: flex-start;
}

.app-nav {
  flex: none;
  width: 15rem;
  position: sticky;
  top: 4rem;
  padding: 1.5rem 1.25rem 3rem 1.5rem;
  display: none;
}
@media (min-width: 1024px) {
  .app-nav { display: flex; flex-direction: column; gap: 0.25rem; }
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 2rem 1.5rem 5rem;
}
@media (min-width: 1024px) {
  .app-main { padding: 2rem 2.5rem 5rem; }
}
@media (min-width: 1400px) {
  .app-main { padding: 2.25rem 3.5rem 5rem; }
}

/* Top nav (collapsed, below lg) ------------------------------------------- */
.app-topnav {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.5rem 1.5rem 0.75rem;
  border-top: 1px solid var(--accent);
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 1024px) { .app-topnav { display: none; } }

/* Nav link (shared by sidebar + top nav) ---------------------------------- */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.8rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.nav-link:hover { background: rgba(46, 44, 42, 0.05); color: var(--ink); }
.nav-link.active { background: var(--ink); color: #fff; font-weight: 600; }
.nav-link .nav-icon { width: 1.15rem; height: 1.15rem; flex: none; }

.app-topnav .nav-link { padding: 0.5rem 0.9rem; }

/* ------------------------------------------------------------------------- */
/* Section headers inside dashboard content                                   */
/* ------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.page-sub { margin: 0.35rem 0 0; font-size: 0.875rem; color: var(--muted); }

.section-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.section-sub { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--muted); }

/* ------------------------------------------------------------------------- */
/* Tables (webhook log)                                                        */
/* ------------------------------------------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.data-table th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--accent);
}
.data-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--accent);
  vertical-align: top;
  color: var(--ink);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.75rem; }

/* ------------------------------------------------------------------------- */
/* Activity feed (dashboard overview)                                         */
/* ------------------------------------------------------------------------- */
.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--accent);
}
.activity-row:last-child { border-bottom: 0; }
.activity-thumb {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: var(--r-inner);
  overflow: hidden;
  border: 1px solid var(--accent-strong);
  background: var(--canvas);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.activity-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; outline: none; }
.activity-thumb--empty { color: var(--muted); }

/* ------------------------------------------------------------------------- */
/* FAQ / details                                                               */
/* ------------------------------------------------------------------------- */
.faq-item { border: none; border-radius: var(--r-outer); background: var(--surface); box-shadow: none; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { width: 1.1rem; height: 1.1rem; color: var(--muted); flex: none; transition: transform 150ms var(--ease); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 1.5rem 1.5rem; font-size: 0.9rem; line-height: 1.65; color: var(--muted); }
.faq-item .faq-body a { color: var(--brand-deep); font-weight: 500; text-decoration: none; }
.faq-item .faq-body a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------------- */
/* Empty states                                                                */
/* ------------------------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------------- */
/* HTMX                                                                        */
/* ------------------------------------------------------------------------- */
.htmx-indicator { opacity: 0; transition: opacity 150ms var(--ease); }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.htmx-request.btn { pointer-events: none; }
.htmx-swapping { opacity: 0.5; transition: opacity 150ms var(--ease); }

/* ------------------------------------------------------------------------- */
/* EDI endpoint field-map builder (drag & drop)                              */
/* ------------------------------------------------------------------------- */
.builder-grid { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .builder-grid { grid-template-columns: 1fr 1fr; } }

.builder-panel {
  background: var(--surface);
  border: none;
  border-radius: var(--r-inner);
  padding: 1.25rem;
}
.builder-panel--source { background: var(--canvas); }
.builder-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.field-palette { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.field-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 9999px;
  background: var(--accent);
  border: none;
  color: var(--ink);
  font-size: 0.8125rem;
  cursor: grab;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease), transform 150ms var(--ease);
}
.field-chip:hover { background: var(--accent-strong); box-shadow: var(--ring); }
.field-chip:active { cursor: grabbing; transform: scale(0.96); }
.field-chip .grip { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.08em; }
.field-chip code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.75rem; }

.mapping-zone {
  min-height: 14rem;
  border: 1.5px dashed var(--accent-strong);
  border-radius: var(--r-inner);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.mapping-zone.drag-over { border-color: var(--brand); background: var(--brand-soft); }
.builder-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
  padding: 2.5rem 1rem;
}

.mapping-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--elevated);
  border: none;
  border-radius: var(--r-input);
  padding: 0.5rem 0.75rem;
  animation: rise-in 0.3s var(--ease) both;
  transition: box-shadow 150ms var(--ease), border-color 150ms var(--ease);
}
.mapping-row[draggable="true"] { cursor: grab; }
.mapping-row[draggable="true"]:active { cursor: grabbing; }
.mapping-row.drop-before { border-color: var(--brand); box-shadow: 0 -2px 0 0 var(--brand); }
.mapping-row.drop-after { border-color: var(--brand); box-shadow: 0 2px 0 0 var(--brand); }
.mapping-row .grip { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; }
.mapping-source { flex: none; }
.mapping-source code {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--canvas);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}
.mapping-arrow { color: var(--brand); font-weight: 600; flex: none; }
.mapping-target {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.mapping-target:focus { outline: none; border-color: var(--brand); background: #fff; }
.mapping-remove {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 9999px;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.mapping-remove:hover { color: var(--danger); background: var(--danger-soft); }

/* ------------------------------------------------------------------------- */
/* Sub-navigation (Data tab)                                                   */
/* ------------------------------------------------------------------------- */
.subnav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}
.subnav-link {
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.subnav-link:hover { background: var(--accent); color: var(--ink); }
.subnav-link.active { background: var(--ink); color: #fff; }

/* ------------------------------------------------------------------------- */
/* Reduced motion                                                              */
/* ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}
