/* ── Redesigned USDT calculator — Direction B (floating focal element) ──────
   The calculator is the raised focal panel of the hero: it upgrades the base
   .pm-panel to the FLOATING plane (surface-raised + shadow-4 + primary glow rim
   + lit top edge) so it reads as lifted above the hero. Orange is reserved for
   ONE thing per view: the result number (the payoff). Everything else that used
   to be orange decoratively (buy-rate badge, min-amount notice) is de-accented.
   ---------------------------------------------------------------------------- */
.pm-num { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }

/* FLOATING plane — overrides .pm-panel (source order + higher specificity). */
.pm-panel.pm-calc {
  background-color: var(--surface-raised);
  box-shadow: var(--shadow-4), var(--glow-primary), inset 0 1px 0 var(--border-highlight);
}
.pm-calc { padding: clamp(1.25rem, 1rem + 1.4vw, 1.75rem); }

/* Direction toggle (segmented, animated pill) — sits on a sunken track */
.pm-calc__toggle {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: var(--space-1);
  border: 1px solid var(--border-subtle);
  border-top-color: var(--border-highlight);
  border-radius: var(--radius-pill);
  background-color: var(--surface-sunken);
  box-shadow: var(--shadow-1);
}
.pm-calc__toggle-pill {
  position: absolute;
  top: var(--space-1);
  bottom: var(--space-1);
  left: var(--space-1);
  width: calc(50% - var(--space-1));
  border-radius: var(--radius-pill);
  background-color: var(--primary-fill);
  box-shadow: var(--glow-primary);
  transition: transform var(--dur-base) var(--ease-expo);
  will-change: transform;
}
/* Default direction = SELL (first tab) → pill stays left. BUY shifts it right. */
.pm-calc__toggle:has(#calc-toggle-buy-tab.is-selected) .pm-calc__toggle-pill {
  transform: translateX(100%);
}
.pm-calc__toggle-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.625rem;
  padding-inline: var(--space-3);
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--dur-base) var(--ease-out);
}
.pm-calc__toggle-btn:hover { color: var(--text-primary); }
.pm-calc__toggle-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface-sunken), 0 0 0 4px var(--focus-color);
}
.pm-calc__toggle-btn.is-selected { color: var(--text-on-accent); }

/* Rate badges — buy = blue, sell = teal (no decorative orange) */
.pm-calc__rates {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.pm-calc__rate-badge {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-top-color: var(--border-highlight);
  border-radius: var(--radius-pill);
  background-color: var(--surface-1);
  font-size: var(--fs-sm);
  line-height: 1;
}
.pm-calc__rate-badge-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.pm-calc__rate-badge--sell .pm-num { color: var(--teal-300); }
.pm-calc__rate-badge--buy .pm-num { color: var(--text-link); }

/* Prominent amount input */
.pm-calc__amount { margin-top: var(--space-5); }
.pm-calc__amount .pm-input-group { padding-block: var(--space-2); }
.pm-calc__amount input { font-size: clamp(1.5rem, 1.2rem + 2vw, 2.25rem); }

/* Min-amount notice — informational (primary), NOT orange (reserved for result) */
.pm-calc__notice {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--primary-500);
  border-radius: var(--radius-md);
  background-color: var(--surface-1);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: var(--lh-normal);
}

/* Unmistakable result — a sunken well; the NUMBER is the single orange payoff */
.pm-calc__result {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--primary-500) 14%, transparent) 0%, transparent 55%),
    var(--surface-sunken);
  box-shadow: inset 0 1px 0 var(--border-highlight);
}
.pm-calc__result[hidden] { display: none; }
.pm-calc__result-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-secondary);
}
.pm-calc__result-value {
  margin-top: var(--space-2);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-display);
  line-height: 1;
}
.pm-calc__result-value .pm-num {
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  font-weight: var(--fw-bold);
  color: var(--text-accent); /* ORANGE — the one deliberate accent per view */
}
.pm-calc__result-unit {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
}

@media (prefers-reduced-motion: reduce) {
  .pm-calc__toggle-pill { transition: none; }
}

/* Read-the-rate aside — up/eq/down are meaning-bearing (paired with words);
   the single accent per this content view is the "down" marker. */
.pm-rate-note { margin-top: var(--space-6); }
.pm-rate-note__title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-primary); }
.pm-rate-note__text { margin-top: var(--space-2); font-size: var(--fs-sm); line-height: var(--lh-relaxed); color: var(--text-secondary); }
.pm-rate-note__list { margin-top: var(--space-3); padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); line-height: var(--lh-relaxed); color: var(--text-secondary); }
.pm-rate-note .pm-up { color: var(--teal-300); font-weight: var(--fw-semibold); }
.pm-rate-note .pm-eq { color: var(--text-primary); font-weight: var(--fw-semibold); }
.pm-rate-note .pm-down { color: var(--text-accent); font-weight: var(--fw-semibold); }
.pm-rate-note strong { color: var(--text-primary); }

/* Sign cards — semantic +/O/− coding (glyph + color, meaning-bearing) */
.pm-sign-card__head { display: flex; align-items: center; gap: var(--space-3); }
.pm-sign-card__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background-color: var(--surface-1);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}
.pm-sign-card__glyph--pos { color: var(--teal-300); }
.pm-sign-card__glyph--zero { color: var(--text-muted); }
.pm-sign-card__glyph--neg { color: var(--text-accent); }
.pm-sign-card__icon--pos { stroke: var(--teal-300); }
.pm-sign-card__icon--zero { stroke: var(--text-muted); }
.pm-sign-card__icon--neg { stroke: var(--text-accent); }
.pm-sign-card__icon { width: 1.125rem; height: 1.125rem; }
.pm-sign-card h3 { font-size: var(--fs-base); }
.pm-sign-card__text { margin-top: var(--space-3); font-size: var(--fs-sm); line-height: var(--lh-relaxed); color: var(--text-secondary); }
.pm-sign-card__text + .pm-sign-card__text { margin-top: 6px; }
