/* FXDog components v4: buttons, forms, cards, tables, tabs, badges, toast,
   loading/empty/error states, pager. Depends on tokens.css + base.css.
   Selectors wrapped in :where() keep specificity at zero so page CSS can
   refine them without !important. */

/* ---------- buttons ----------
   Exactly three styles: primary (solid), secondary (outline), link (text).
   Legacy class names are mapped onto them so old markup/JS keeps working. */
:where(.btn, .btn-primary, .btn-secondary, .primary, .secondary, .ghost, .product-primary, .product-secondary,
    .download-btn, .ai-btn, .broker-query-submit, .pager button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--control-h);
  padding: 0 var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
:where(.btn, .primary, .secondary, .ghost, .product-primary, .product-secondary, .download-btn, .ai-btn,
    .broker-query-submit, .pager button):hover {
  text-decoration: none;
}
/* primary: solid original teal (product-ui.css accent), no gradient / glow / lift */
:where(.btn-primary, .primary, .product-primary, .download-btn, .ai-btn-primary, .broker-query-submit) {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}
:where(.btn-primary, .primary, .product-primary, .download-btn, .ai-btn-primary, .broker-query-submit):hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-ink);
}
/* secondary (outline) */
:where(.btn-secondary, .secondary, .ghost, .product-secondary, .pager button) {
  background: var(--panel);
  border-color: var(--border-strong);
  color: var(--text-strong);
}
:where(.btn-secondary, .secondary, .ghost, .product-secondary, .pager button):hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--text-strong);
}
/* text link */
:where(.btn-link, .product-textlink, .ghost-link, .home-directory-link > a, .flagship-official-link, .notice-read) {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary-text);
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  cursor: pointer;
}
:where(.btn-link, .product-textlink, .ghost-link, .home-directory-link > a, .flagship-official-link, .notice-read):hover {
  text-decoration: underline;
}
:where(.btn-sm) {
  min-height: 36px;
  padding: 0 var(--sp-4);
  font-size: var(--fs-14);
}
:where(.btn-lg) {
  min-height: 48px;
  padding: 0 var(--sp-6);
  font-size: var(--fs-16);
}
:where(.btn-block) {
  width: 100%;
}
:where(.btn, .primary, .secondary, .ghost, .product-primary, .product-secondary, .download-btn, .ai-btn,
    .broker-query-submit, .pager button, button):disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-group,
.actions,
.product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

/* ---------- form controls ---------- */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
    select, textarea) {
  width: 100%;
  min-height: var(--control-h);
  padding: 10px var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--text-strong);
  font-size: var(--fs-16); /* 16px prevents iOS zoom */
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
:where(textarea) {
  min-height: 120px;
  resize: vertical;
}
:where(select) {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2399a8c9' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
:where(input, select, textarea)::placeholder {
  color: var(--subtle);
}
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover {
  border-color: var(--muted);
}
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
:where(input[readonly]) {
  color: var(--muted);
  background: var(--panel);
}
:where(input[type="checkbox"], input[type="radio"]) {
  width: 16px;
  height: 16px;
  margin: 0 var(--sp-2) 0 0;
  vertical-align: -2px;
  accent-color: var(--primary);
}
:where(label) {
  color: var(--muted);
  font-size: var(--fs-14);
}
.form-card,
.form {
  display: block;
}
.form-card {
  max-width: 720px;
  padding: var(--sp-8);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-1);
}
.form-card h1 {
  margin: var(--sp-2) 0 var(--sp-6);
  font-size: var(--fs-24);
}
.form-card form > label,
.form-card form > .field > label {
  display: block;
  margin: 0 0 var(--sp-2);
  color: var(--text);
  font-weight: var(--fw-medium);
}
.form-card form > input,
.form-card form > select,
.form-card form > textarea,
.form-card form > div > input {
  margin-bottom: var(--sp-5);
}
.form-card form > button[type="submit"],
.form-card form > .primary {
  width: 100%;
  margin-top: var(--sp-2);
}
.form-help,
.form-hint,
.field-hint {
  margin: calc(var(--sp-2) * -1) 0 var(--sp-5);
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.6;
}
.form-foot {
  margin: var(--sp-6) 0 0;
  color: var(--muted);
  font-size: var(--fs-14);
}
.inline-field {
  display: flex;
  gap: var(--sp-2);
  align-items: stretch;
}
.inline-field > input {
  flex: 1;
  min-width: 0;
  margin: 0;
}
@media (max-width: 640px) {
  .form-card {
    padding: var(--sp-6) var(--sp-5);
  }
}

/* ---------- cards ---------- */
.card,
.info-card,
.uc-card {
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel);
}
.card-grid,
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-4);
}
.legal-card {
  max-width: 860px;
  padding: var(--sp-10) var(--sp-12);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel);
}
.legal-card h2 {
  margin: var(--sp-8) 0 var(--sp-3);
  font-size: var(--fs-20);
}
.legal-card h2:first-child {
  margin-top: 0;
}
.legal-card p,
.legal-card li {
  color: var(--text);
  font-size: var(--fs-16);
  line-height: 1.8;
}
.legal-card .legal-updated {
  margin: var(--sp-8) 0 0;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--fs-14);
}
@media (max-width: 640px) {
  .legal-card {
    padding: var(--sp-6) var(--sp-5);
  }
}

/* ---------- tables ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel);
}
.data-table,
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-14);
}
.data-table th,
.data-table td,
.table th,
.table td {
  padding: 14px var(--sp-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.data-table thead th,
.table thead th {
  /* not sticky: .table-wrap scrolls horizontally, which would pin the header inside the wrapper */
  background: var(--panel-2);
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.data-table tbody tr:hover td,
.table tbody tr:hover td {
  background: color-mix(in srgb, var(--primary-soft) 60%, transparent);
}
.data-table tbody tr:last-child td,
.table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table .num,
.table .num {
  text-align: right;
  white-space: nowrap;
}

/* ---------- tabs / segmented control ---------- */
.tabs,
.segmented,
.notice-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--panel);
}
.tabs > a,
.tabs > button,
.segmented > a,
.segmented > button,
.notice-switch > a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.tabs > a:hover,
.tabs > button:hover,
.segmented > a:hover,
.segmented > button:hover,
.notice-switch > a:hover {
  color: var(--text);
  text-decoration: none;
}
.tabs > .active,
.segmented > .active,
.notice-switch > a.active,
.tabs > [aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 600;
}

/* ---------- badges / pills / status ---------- */
.pill,
.badge,
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 1px var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
  line-height: 20px;
  white-space: nowrap;
}
.badge-primary {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary-text);
}
.badge-up,
.st-done {
  border-color: transparent;
  background: var(--up-soft);
  color: var(--up);
}
.badge-down,
.st-rej {
  border-color: transparent;
  background: var(--down-soft);
  color: var(--down);
}
.badge-warn,
.st-pending {
  border-color: transparent;
  background: var(--warn-soft);
  color: var(--warn);
}
.badge-info {
  border-color: transparent;
  background: var(--info-soft);
  color: var(--info);
}
.st-done,
.st-rej,
.st-pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-12);
  line-height: 20px;
  white-space: nowrap;
}
.st-done::before,
.st-rej::before,
.st-pending::before,
.dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- alert / inline message ---------- */
.alert {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--text);
  font-size: var(--fs-14);
  line-height: 1.6;
}
.alert-error {
  border-left-color: var(--down);
}
.alert-warn {
  border-left-color: var(--warn);
}

/* ---------- accordion ---------- */
details > summary {
  cursor: pointer;
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
.faq details,
.product-faq details {
  border-bottom: 1px solid var(--border);
}
.faq details:first-child,
.product-faq details:first-child {
  border-top: 1px solid var(--border);
}
.flagship-faq {
  border-bottom: 1px solid var(--border);
}
.faq summary,
.product-faq summary,
.flagship-faq summary {
  position: relative;
  padding: var(--sp-4) var(--sp-8) var(--sp-4) 0;
  color: var(--text-strong);
  font-size: var(--fs-16);
  font-weight: 600;
}
.faq summary::after,
.product-faq summary::after,
.flagship-faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}
.faq details[open] summary::after,
.product-faq details[open] summary::after,
.flagship-faq[open] summary::after {
  content: "−";
}
.faq details p,
.product-faq details p,
.flagship-faq p {
  margin: 0 0 var(--sp-5);
  color: var(--muted);
  font-size: var(--fs-14);
  line-height: 1.8;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  right: var(--sp-6);
  bottom: var(--sp-6);
  z-index: 90;
  display: none;
  max-width: min(420px, calc(100vw - 32px));
  padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-10);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--panel-2);
  color: var(--text);
  font-size: var(--fs-14);
  line-height: 1.5;
  box-shadow: var(--shadow-2);
}
.toast::before {
  content: "i";
  position: absolute;
  left: var(--sp-3);
  top: var(--sp-3);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--info-soft);
  color: var(--info);
  font-size: var(--fs-12);
  font-weight: var(--fw-bold);
}
.toast-success::before {
  content: "✓";
  background: var(--up-soft);
  color: var(--up);
}
.toast-error::before {
  content: "!";
  background: var(--down-soft);
  color: var(--down);
}
@media (max-width: 640px) {
  .toast {
    left: var(--sp-4);
    right: var(--sp-4);
    bottom: var(--sp-4);
    max-width: none;
  }
}

/* ---------- loading / empty / error states ---------- */
.fx-state {
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  padding: var(--sp-10) var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}
.fx-state--compact {
  padding: var(--sp-6) var(--sp-4);
}
.fx-state__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--sp-1);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--muted);
}
.fx-state__icon svg {
  width: 20px;
  height: 20px;
}
.fx-state--error .fx-state__icon {
  background: var(--warn-soft);
  color: var(--warn);
}
.fx-state__title {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
}
.fx-state__text {
  max-width: 440px;
  margin: 0;
  font-size: var(--fs-14);
  line-height: 1.6;
}
.fx-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}
.fx-state__actions .btn {
  min-height: 36px;
}
.fx-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: fx-spin 0.8s linear infinite;
}
@keyframes fx-spin {
  to {
    transform: rotate(360deg);
  }
}
.fx-skeleton-list {
  display: grid;
  gap: var(--sp-3);
}
.fx-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}
.fx-skeleton-card {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel);
}
.fx-skeleton {
  display: block;
  height: 12px;
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--skeleton-a) 0%, var(--skeleton-b) 40%, var(--skeleton-a) 80%);
  background-size: 300% 100%;
  animation: fx-shimmer 1.4s ease-in-out infinite;
}
.fx-skeleton--title {
  width: 45%;
  height: 18px;
}
.fx-skeleton--short {
  width: 60%;
}
.fx-skeleton--block {
  height: 72px;
}
@keyframes fx-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* ---------- pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin: var(--sp-8) 0 0;
}
.pager button {
  min-height: 38px;
  padding: 0 var(--sp-4);
}
.pager-info {
  color: var(--muted);
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
}
.pager-info b,
.pager-info span {
  color: var(--text-strong);
}
.pager select {
  width: auto;
  min-height: 38px;
  font-size: var(--fs-14);
}

/* ---------- inline SVG icons (v2) ---------- */
.ic {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
}

/* =====================================================================
   v5 · interaction states, sizing on the 8px scale, data tables,
   loading / empty states. Colours come only from tokens.css.
   ===================================================================== */

/* ---------- buttons: size ---------- */
:where(.btn, .btn-primary, .btn-secondary, .primary, .secondary, .ghost, .product-primary, .product-secondary,
    .download-btn, .ai-btn, .broker-query-submit) {
  min-height: var(--control-h);
  padding: 0 var(--sp-5);
  font-size: var(--text-small);
  font-weight: var(--fw-semibold);
  line-height: 1;
}
:where(.btn-sm, .pager button, .fx-state__actions .btn) {
  min-height: var(--control-h-sm);
  padding: 0 var(--sp-4);
}
:where(.btn-lg) {
  min-height: var(--control-h-lg);
  padding: 0 var(--sp-8);
  font-size: var(--text-body);
}

/* ---------- buttons: active / disabled ---------- */
:where(.btn-primary, .primary, .product-primary, .download-btn, .ai-btn-primary, .broker-query-submit):active {
  background: color-mix(in srgb, var(--primary) 82%, #000);
  border-color: color-mix(in srgb, var(--primary) 82%, #000);
}
:where(.btn-secondary, .secondary, .ghost, .product-secondary, .pager button):active {
  background: var(--panel-2);
  border-color: var(--primary-text);
}
:where(.btn, .primary, .secondary, .ghost, .product-primary, .product-secondary, .download-btn, .ai-btn,
    .broker-query-submit, .pager button, button):is(:disabled, [aria-disabled="true"], .is-disabled) {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
:where(button, .btn, .primary, .secondary)[aria-busy="true"] {
  cursor: progress;
  opacity: 0.7;
}

/* ---------- text links ---------- */
:where(main a:not([class])):hover,
:where(.btn-link, .product-textlink, .ghost-link, .home-directory-link > a, .flagship-official-link, .notice-read):hover {
  color: var(--primary-text);
  text-decoration: underline;
}
:where(main a:not([class]), .btn-link, .product-textlink, .ghost-link, .flagship-official-link, .notice-read):active {
  opacity: 0.75;
}

/* ---------- focus ring: one style everywhere ----------
   keyboard focus = 2px cyan outline offset 2px; text inputs use border + 3px soft ring */
:where(a, button, summary, [tabindex], .btn, input[type="checkbox"], input[type="radio"]):focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
  border-radius: var(--r-md);
  box-shadow: none;
}
:where(a, button, summary, [tabindex]):focus:not(:focus-visible) {
  outline: none;
}

/* ---------- form controls ---------- */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
    select) {
  min-height: var(--control-h);
  padding: 8px var(--sp-3);
}
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus-visible {
  outline: none;
}
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):disabled {
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--muted);
  opacity: 0.7;
  cursor: not-allowed;
}
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):user-invalid {
  border-color: var(--down);
}
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):user-invalid:focus {
  box-shadow: 0 0 0 3px var(--down-soft);
}
:where(input[type="checkbox"], input[type="radio"]):disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.form-card form > label,
.form-card form > .field > label {
  margin: 0 0 var(--sp-2);
  color: var(--text);
  font-size: var(--text-small);
  font-weight: var(--fw-medium);
  line-height: var(--lh-ui);
}
.form-card form > input,
.form-card form > select,
.form-card form > textarea,
.form-card form > div > input {
  margin-bottom: var(--sp-5);
}
.form-help,
.form-hint,
.field-hint {
  margin: calc(var(--sp-4) * -1) 0 var(--sp-5);
  padding-top: var(--sp-1);
  font-size: var(--text-caption);
}

/* ---------- cards & panels: one padding, one radius ---------- */
.card,
.info-card,
.uc-card {
  padding: var(--sp-6);
}
.form-card {
  padding: var(--sp-8);
  box-shadow: none;
}
.legal-card {
  padding: var(--sp-10) var(--sp-12);
}
.legal-card h2 {
  margin: var(--sp-8) 0 var(--sp-2);
  font-size: var(--text-h3);
}

/* ---------- data tables: 40px header, 56px rows, thin dividers, numbers right ---------- */
.table-wrap {
  border-radius: var(--r-lg);
}
.data-table,
.table {
  font-size: var(--text-small);
  line-height: var(--lh-ui);
}
.data-table th,
.data-table td,
.table th,
.table td {
  height: var(--row-h);
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.data-table thead th,
.table thead th {
  height: var(--row-h-head);
  padding-block: 0;
  background: var(--panel-2);
  color: var(--muted);
  font-size: var(--text-caption);
  font-weight: var(--fw-medium);
  letter-spacing: 0;
}
.data-table tbody tr:hover td,
.table tbody tr:hover td {
  background: var(--panel-2);
}
.data-table .num,
.table .num,
.data-table td.num,
.data-table th.num {
  text-align: right;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- badges: square-ish, quiet ---------- */
.pill,
.badge,
.tag-chip {
  border-radius: var(--r-sm);
}
.st-done,
.st-rej,
.st-pending {
  border-radius: var(--r-sm);
}

/* ---------- loading / empty / error states (existing containers) ---------- */
.fx-state {
  gap: var(--sp-2);
  padding: var(--sp-10) var(--sp-6);
  border-radius: var(--r-lg);
}
.fx-state--compact {
  padding: var(--sp-6) var(--sp-4);
}
.fx-state__icon {
  width: 24px;
  height: 24px;
  margin-bottom: 0;
  border-radius: 0;
  background: none;
}
.fx-state--error .fx-state__icon {
  background: none;
}
.fx-state__title {
  font-size: var(--text-body);
  font-weight: var(--fw-semibold);
}
.fx-state__text {
  font-size: var(--text-small);
  line-height: var(--lh-ui);
}
.fx-state__actions {
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}
.fx-spinner {
  width: 20px;
  height: 20px;
}
/* skeleton: flat pulse instead of a gradient sweep */
.fx-skeleton {
  background: var(--skeleton-b);
  background-size: auto;
  animation: fx-pulse 1.2s ease-in-out infinite;
}
@keyframes fx-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.fx-skeleton-card {
  gap: var(--sp-3);
  padding: var(--sp-6);
}
/* a plain text placeholder left in a data container before JS fills it */
.fx-loading-text {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  padding: var(--sp-6) var(--sp-4);
  color: var(--muted);
  font-size: var(--text-small);
}
.fx-loading-text::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: fx-spin 0.8s linear infinite;
}

/* ---------- accordion summary states ---------- */
.faq summary:hover,
.product-faq summary:hover,
.flagship-faq summary:hover {
  color: var(--primary-text);
}

/* ---------- tabs: hover / focus ---------- */
.tabs > a:hover,
.tabs > button:hover,
.segmented > a:hover,
.segmented > button:hover,
.notice-switch > a:hover {
  background: var(--panel-2);
}
.tabs > .active:hover,
.segmented > .active:hover,
.notice-switch > a.active:hover,
.tabs > [aria-pressed="true"]:hover {
  background: var(--primary);
  color: var(--primary-ink);
}
.tabs > a,
.tabs > button,
.segmented > a,
.segmented > button,
.notice-switch > a {
  min-height: var(--control-h-sm);
  padding: 0 var(--sp-3);
}
