/* ==========================================================================
   Е-Пособие (eposobie.ru) — Modern Consumer Fintech UI (T-Bank / Wise / Ramp)
   Typography: Golos Text + JetBrains Mono. Tactile custom controls, zero clutter.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-canvas: #f6f7f9;
  --bg-surface: #ffffff;
  --bg-panel: #f1f3f7;
  --bg-subtle: #f8f9fb;
  --bg-aside: #f8fafd;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverted: #ffffff;

  --border: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-strong: #cbd5e1;
  --ring: rgba(15, 23, 42, 0.1);

  --primary: #0f172a;
  --primary-hover: #1e293b;
  --accent: #2563eb;
  --accent-soft: #eff6ff;

  --emerald: #059669;
  --emerald-bg: #ecfdf5;
  --emerald-border: #a7f3d0;

  --amber: #d97706;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;

  --rose: #e11d48;
  --rose-bg: #fff1f2;
  --rose-border: #fecdd3;

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-shell: 0 1px 3px rgba(15, 23, 42, 0.03), 0 16px 40px -12px rgba(15, 23, 42, 0.07);
  --shadow-popover: 0 14px 44px -10px rgba(15, 23, 42, 0.18), 0 4px 14px -2px rgba(15, 23, 42, 0.08);

  --font-sans: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  background-image: radial-gradient(1100px 380px at 50% -100px, rgba(37, 99, 235, 0.06), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.num,
.mono,
table td,
table th,
input[type="number"] {
  font-variant-numeric: tabular-nums;
}

.ep-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Remove ugly browser number spinner arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.ep-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .ep-container {
    padding: 0 16px;
  }
}

/* Header — Crisp, Single-Line, Never Clips */
.ep-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.ep-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.ep-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none !important;
}

.ep-brand-name {
  white-space: nowrap;
}

.ep-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--text-inverted);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.ep-brand-sub {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 2px 8px;
  background: var(--bg-panel);
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .ep-brand-sub {
    display: none;
  }
}

.ep-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ep-nav::-webkit-scrollbar {
  display: none;
}

.ep-nav-link {
  padding: 6px 9px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none !important;
  transition: color 0.14s ease, background-color 0.14s ease;
}

.ep-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-panel);
}

.ep-nav-link.is-active {
  color: var(--text-primary);
  background: var(--bg-panel);
  font-weight: 600;
}

/* Breadcrumbs & Hero */
.ep-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 20px 0 0;
}

.ep-breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.ep-breadcrumbs-sep {
  color: var(--border-strong);
}

.ep-hero {
  padding: 26px 0 22px;
}

.ep-h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 780px;
}

.ep-lead {
  margin: 8px 0 0;
  max-width: 700px;
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Balanced Split-Panel Calculator Shell (Wise / T-Bank Architecture) */
.ep-calc-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(350px, 0.94fr);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-shell);
  margin-bottom: 48px;
}

@media (max-width: 960px) {
  .ep-calc-shell {
    grid-template-columns: 1fr;
  }
}

.ep-calc-main {
  min-width: 0;
  padding: 28px 32px;
}

.ep-calc-aside {
  min-width: 0;
  background: var(--bg-aside);
  border-left: 1px solid var(--border);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 960px) {
  .ep-calc-main {
    padding: 22px 18px;
  }
  .ep-calc-aside {
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 24px 18px;
  }
}

.ep-pane-block {
  padding: 22px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.ep-pane-block:first-child {
  padding-top: 0;
}

.ep-pane-block:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ep-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.ep-block-heading {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.ep-mini-heading {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ep-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

@media (max-width: 620px) {
  .ep-grid-2 {
    grid-template-columns: 1fr;
  }
}

.ep-field {
  min-width: 0;
  margin-bottom: 14px;
}

.ep-field:last-child {
  margin-bottom: 0;
}

.ep-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.ep-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
}

.ep-label-row .ep-label {
  margin-bottom: 0;
}

.ep-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Segmented Tabs */
.ep-segmented {
  display: inline-flex;
  background: var(--bg-panel);
  padding: 3px;
  border-radius: var(--radius-sm);
  gap: 2px;
  width: 100%;
}

.ep-segmented-inline {
  width: auto;
}

.ep-seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.ep-seg-btn:hover {
  color: var(--text-primary);
}

.ep-seg-btn.is-active {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Custom Combobox & Dropdown */
.ep-combobox {
  position: relative;
  width: 100%;
  min-width: 0;
}

.ep-combobox-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ep-combobox-trigger:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.ep-combobox-trigger:focus-visible,
.ep-combobox.is-open .ep-combobox-trigger {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

.ep-combobox-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.ep-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ep-combobox-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ep-combobox-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-combobox-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-combobox-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ep-combobox-pm-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.ep-combobox-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg-panel);
}

.ep-combobox-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep-combobox.is-open .ep-combobox-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.ep-combobox-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 340px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popover);
  z-index: 150;
  display: none;
  overflow: hidden;
}

.ep-combobox.is-open .ep-combobox-panel {
  display: block;
  animation: epPopoverIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes epPopoverIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ep-combobox-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.ep-search-icon {
  position: absolute;
  left: 22px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.ep-combobox-search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 8px 10px 8px 32px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.ep-combobox-search:focus {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--primary);
}

.ep-combobox-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.ep-chip-btn {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 3px 9px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ep-chip-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.ep-chip-btn.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverted);
}

.ep-combobox-list {
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
}

.ep-combobox-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.08s ease;
}

.ep-combobox-option:hover,
.ep-combobox-option.is-highlighted {
  background: var(--bg-panel);
}

.ep-combobox-option.is-selected {
  background: var(--accent-soft);
  font-weight: 600;
}

.ep-combobox-option-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ep-combobox-option-name {
  font-size: 0.86rem;
  color: var(--text-primary);
}

.ep-combobox-option-district {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ep-combobox-option-right {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Family Bar & Tactile Pill Toggles (Replaces native checkboxes) */
.ep-family-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ep-family-counter {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ep-pill-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ep-pill-toggle {
  cursor: pointer;
  user-select: none;
}

.ep-pill-toggle-ui {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.ep-pill-toggle:hover .ep-pill-toggle-ui {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.ep-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background-color 0.14s ease, transform 0.14s ease;
}

.ep-pill-toggle input:checked + .ep-pill-toggle-ui {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--text-inverted);
  font-weight: 600;
}

.ep-pill-toggle input:checked + .ep-pill-toggle-ui .ep-pill-dot {
  background: #34d399;
  transform: scale(1.1);
}

/* Precision Inputs, Quick Chips & Steppers */
.ep-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ep-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 6px 64px 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.ep-input:hover {
  border-color: var(--border-strong);
}

.ep-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

.ep-input-unit {
  position: absolute;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
}

.ep-quick-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.ep-quick-chip {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 4px 2px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.ep-quick-chip:hover {
  border-color: var(--border-strong);
  background: var(--bg-panel);
  color: var(--text-primary);
}

.ep-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  height: 38px;
  overflow: hidden;
}

.ep-stepper-btn {
  width: 34px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.ep-stepper-btn:hover {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.ep-stepper-val {
  min-width: 46px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0 8px;
  white-space: nowrap;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}

/* Progressive Disclosure Drawer */
.ep-drawer {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-subtle);
}

.ep-drawer-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.ep-drawer-summary::-webkit-details-marker {
  display: none;
}

.ep-drawer-summary-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ep-drawer-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ep-drawer-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.ep-drawer-action {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ep-drawer[open] .ep-drawer-summary {
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 11px 11px 0 0;
}

.ep-drawer-body {
  padding: 16px;
  background: var(--bg-surface);
  border-radius: 0 0 11px 11px;
}

/* Right Column: Bank-Grade Live Verdict Summary */
.ep-verdict-top {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.ep-verdict-status-row {
  margin-bottom: 12px;
}

.ep-verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.ep-verdict-badge.is-approved {
  background: var(--emerald-bg);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.ep-verdict-badge.is-refusal {
  background: var(--rose-bg);
  color: var(--rose);
  border: 1px solid var(--rose-border);
}

.ep-verdict-amount-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ep-verdict-monthly {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text-primary);
  white-space: nowrap;
}

.ep-verdict-annual {
  font-family: var(--font-mono);
  font-size: 0.81rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.ep-verdict-headline {
  margin: 10px 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* 2-Column Income vs PM Comparison Bar (Never collides) */
.ep-scale-box {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.ep-scale-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.ep-scale-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ep-scale-stat-right {
  text-align: right;
}

.ep-scale-stat-label {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.ep-scale-stat-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.ep-scale-track {
  width: 100%;
  height: 7px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.ep-scale-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--emerald);
  transition: width 0.2s ease;
}

.ep-scale-fill.is-over {
  background: var(--rose);
}

/* Tiers 50 / 75 / 100% Strip */
.ep-tiers-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.ep-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ep-tier-pill {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--bg-surface);
  transition: all 0.14s ease;
}

.ep-tier-pill.is-current {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--text-inverted);
}

.ep-tier-pct {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--text-muted);
}

.ep-tier-pill.is-current .ep-tier-pct {
  color: #94a3b8;
}

.ep-tier-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 3px;
  white-space: nowrap;
}

.ep-mrot-section {
  padding-top: 16px;
}

/* Paid Plan & Robokassa Box */
.ep-plan-box {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.ep-plan-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.ep-plan-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.ep-plan-list {
  margin: 8px 0 14px;
  padding-left: 16px;
  font-size: 0.79rem;
  color: var(--text-secondary);
}

.ep-plan-list li {
  margin-bottom: 4px;
}

.ep-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: var(--text-inverted);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0 16px;
  cursor: pointer;
  transition: background-color 0.14s ease;
  text-decoration: none !important;
}

.ep-btn-primary:hover {
  background: var(--primary-hover);
  color: var(--text-inverted);
}

.ep-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
}

.ep-btn-secondary:hover {
  background: var(--bg-panel);
}

/* Editorial Content Sections, Tables & FAQ */
.ep-section {
  margin: 44px 0;
}

.ep-h2 {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.ep-h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 18px 0 10px;
}

.ep-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.ep-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.ep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.ep-table th,
.ep-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.ep-table th {
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.ep-table tr:last-child td {
  border-bottom: none;
}

.ep-table tr:hover td {
  background: var(--bg-subtle);
}

.ep-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  white-space: nowrap;
}

.ep-badge-ok {
  background: var(--emerald-bg);
  color: var(--emerald);
}

.ep-badge-warn {
  background: var(--amber-bg);
  color: var(--amber);
}

.ep-badge-danger {
  background: var(--rose-bg);
  color: var(--rose);
}

.ep-callout {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  margin: 14px 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.ep-callout-warn {
  border-color: var(--amber-border);
  background: var(--amber-bg);
  color: #92400e;
}

.ep-faq-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
}

.ep-faq-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.ep-faq-item:last-child {
  border-bottom: none;
}

.ep-faq-q {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text-primary);
}

.ep-faq-a {
  margin-top: 6px;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.ep-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 36px 0 44px;
  margin-top: 64px;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.ep-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

@media (max-width: 760px) {
  .ep-footer-grid {
    grid-template-columns: 1fr;
  }
}

.ep-footer-links {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.ep-footer-links li {
  margin-bottom: 6px;
}

.ep-footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
}

.ep-footer-links a:hover {
  color: var(--text-primary);
}
