/* Everest Wealth: calculator suite (hub + individual calculators).
   The calculators ship their own markup (.calc-row, .calc-panel, .chip ...); this file restyles
   those classes in the site style (plum, amethyst, silver-violet, Montserrat + Source Serif 4) so they
   sit next to the JSE and tax calculators (jse-calculator.css). Everything is scoped to .ewcs. */

.ewcs {
  --ewcs-heading: var(--ew-font-heading, 'Montserrat', sans-serif);
  --ewcs-ui: var(--ew-font-display, 'Montserrat', sans-serif);
  --ewcs-body: var(--ew-font-body, Georgia, serif);
  --ewcs-plum: var(--ew-plum-900, #32174D);
  --ewcs-plum-deep: var(--ew-plum-950, #1A0B2B);
  --ewcs-amethyst: var(--ew-plum-600, #6B3FA0);
  --ewcs-violet: var(--ew-silver-violet, #C4B5FD);
  --ewcs-soft: var(--ew-plum-500, #8E7CA6);
  --ewcs-tint: var(--ew-plum-050, #F8F5FC);
  --ewcs-tint-2: var(--ew-plum-100, #F3EFF8);
  --ewcs-tint-line: var(--ew-plum-200, #E8DEF0);
  --ewcs-line-strong: var(--ew-border-strong, #D8CEE6);
  --ewcs-ink: var(--ew-ink, #181322);
  --ewcs-muted: var(--ew-ink-muted, #524C61);
  --ewcs-line: var(--ew-border, #E5E7EB);
  --ewcs-radius: var(--ew-radius-md, 13px);
  /* Names the calculator scripts still use inline. */
  --gold: var(--ewcs-amethyst);
  --success: #2F6B4C;
  --danger: #A3243B;
  --text-light: var(--ewcs-muted);
  --border: var(--ewcs-tint-line);
  --white: #FFFFFF;
  --dark: var(--ewcs-plum);
  --light-bg: var(--ewcs-tint);
  --section-alt: var(--ewcs-tint);
  color: var(--ewcs-ink);
  font-family: var(--ewcs-body);
  text-align: left;
  box-sizing: border-box;
}
.ewcs *, .ewcs *::before, .ewcs *::after { box-sizing: border-box; }
:where(.ewcs) p { max-width: none; }

/* ---------- Page frame ---------- */
.ewcs-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 660px;
  box-sizing: border-box;
  padding: 190px clamp(20px, 4vw, 51px) 48px;
  background: linear-gradient(135deg, #1A0B2B 0%, #32174D 55%, #461F6E 100%);
}
.ewcs-hero-in {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  width: 100%;
  max-width: var(--ew-container, 1200px);
}
.ewcs-crumb {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #D8CEE6;
}
.ewcs-crumb a { color: #E2D9F3; text-decoration: none; }
.ewcs-crumb a:hover { text-decoration: underline; }
.ewcs-eyebrow {
  margin: 0;
  font-family: var(--ewcs-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ewcs-violet);
}
.ewcs-eyebrow-light { color: var(--ewcs-amethyst); }
.ewcs-h1 {
  margin: 0;
  max-width: 13em;
  font-family: var(--ewcs-heading);
  font-weight: 600;
  font-size: clamp(2.6rem, 5.4vw, 4.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-wrap: balance;
}
.ewcs-h1 em { color: var(--ewcs-violet); font-style: italic; }
.ewcs-lead {
  margin: 0;
  max-width: 40em;
  font-size: clamp(1.05rem, 1.1vw + 0.7rem, 1.2rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}
.ewcs-back {
  display: inline-block;
  margin: 0;
  font-family: var(--ewcs-ui);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ewcs-violet);
  text-decoration: none;
}
.ewcs-back:hover { text-decoration: underline; }

.ewcs-sec {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: var(--ew-section-y, clamp(44px, 5.2vw, 76px)) clamp(20px, 4vw, 51px);
  background: #FFFFFF;
}
.ewcs-sec.is-tint {
  background-color: var(--ewcs-tint);
  background-image: radial-gradient(55% 70% at 100% 0%, rgba(107, 63, 160, 0.1), rgba(107, 63, 160, 0) 70%);
}
.ewcs-in { width: 100%; max-width: var(--ew-container, 1200px); display: flex; flex-direction: column; gap: 24px; }
.ewcs-h2 {
  margin: 0;
  font-family: var(--ewcs-heading);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--ewcs-plum);
  text-wrap: balance;
}
.ewcs-h2 em { color: var(--ewcs-amethyst); font-style: italic; }
.ewcs-sub { margin: 0; max-width: 44em; font-size: 1.05rem; line-height: 1.6; color: var(--ewcs-muted); }

/* ---------- Hub cards ---------- */
.ewcs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ewcs-grid > * { min-width: 0; }
.ewcs-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background: #FFFFFF;
  border: 1px solid var(--ewcs-tint-line);
  border-radius: calc(var(--ewcs-radius) + 5px);
  box-shadow: 0 24px 60px -44px rgba(50, 23, 77, 0.35), 0 2px 6px rgba(50, 23, 77, 0.04);
  text-decoration: none !important;
  color: inherit;
  transition: border-color 200ms, box-shadow 200ms, transform 200ms;
}
.ewcs-card:hover, .ewcs-card:focus-visible {
  border-color: var(--ewcs-amethyst);
  box-shadow: 0 28px 64px -40px rgba(50, 23, 77, 0.5), 0 2px 6px rgba(50, 23, 77, 0.06);
  transform: translateY(-2px);
}
.ewcs-card:focus-visible { outline: 2px solid var(--ewcs-amethyst); outline-offset: 3px; }
.ewcs-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: var(--ewcs-tint);
  color: var(--ewcs-amethyst);
}
.ewcs-card-icon svg { width: 20px; height: 20px; }
.ewcs-tag {
  margin: 0;
  font-family: var(--ewcs-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ewcs-amethyst);
}
.ewcs-card h3 {
  margin: 0;
  font-family: var(--ewcs-heading);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.12;
  color: var(--ewcs-plum);
}
.ewcs-card p { margin: 0; font-size: 0.97rem; line-height: 1.55; color: var(--ewcs-muted); }
.ewcs-go {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--ewcs-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ewcs-plum);
}
.ewcs-go::after { content: " \2192"; color: var(--ewcs-amethyst); }

/* ---------- Dark closing band ---------- */
.ewcs-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  padding: clamp(32px, 4vw, 52px);
  border-radius: calc(var(--ewcs-radius) + 7px);
  background: linear-gradient(135deg, #1A0B2B 0%, #32174D 55%, #461F6E 100%);
}
.ewcs-cta .ewcs-h2 { color: #FFFFFF; max-width: 18em; }
.ewcs-cta .ewcs-h2 em { color: var(--ewcs-violet); }
.ewcs-cta p { margin: 0; max-width: 40em; color: rgba(255, 255, 255, 0.88); line-height: 1.6; }
.ewcs-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ewcs-btn, .ewcs .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--ewcs-radius);
  font-family: var(--ewcs-ui);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 225ms cubic-bezier(0.16, 1, 0.3, 1), transform 225ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 225ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms;
}
.ewcs-btn-primary, .ewcs .btn-gold, .ewcs .btn-dark {
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #3E1C61 0%, #4D2378 55%, #6B3FA0 100%);
}
.ewcs-btn-primary:hover, .ewcs-btn-primary:focus-visible, .ewcs .btn-gold:hover, .ewcs .btn-dark:hover {
  background: linear-gradient(135deg, #4D2378 0%, #5E2B91 55%, #7D4FB8 100%);
  box-shadow: 0 10px 22px -8px rgba(109, 63, 160, 0.5);
  transform: translate3d(0, -0.5px, 0);
}
.ewcs-btn-light { color: #32174D !important; background: #FFFFFF; }
.ewcs-btn-light:hover { background: #F3EFF8; }
.ewcs-btn-ghost, .ewcs .btn-outline {
  color: var(--ewcs-plum) !important;
  background: #FFFFFF;
  border-color: var(--ewcs-line-strong);
}
.ewcs-btn-ghost:hover, .ewcs .btn-outline:hover { border-color: var(--ewcs-plum); }
.ewcs-cta .ewcs-btn-ghost { color: #FFFFFF !important; background: transparent; border-color: rgba(255, 255, 255, 0.45); }
.ewcs-cta .ewcs-btn-ghost:hover { border-color: #FFFFFF; }

/* ---------- Calculator shell ---------- */
.ewcs .calc-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px;
  background: #FFFFFF;
  border: 1px solid var(--ewcs-line);
  border-radius: calc(var(--ewcs-radius) + 7px);
  box-shadow: 0 30px 70px -40px rgba(50, 23, 77, 0.28), 0 2px 6px rgba(50, 23, 77, 0.04);
}
.ewcs .calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 18px;
  align-items: start;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid var(--ewcs-line);
  border-radius: calc(var(--ewcs-radius) + 7px);
  box-shadow: 0 30px 70px -40px rgba(50, 23, 77, 0.28), 0 2px 6px rgba(50, 23, 77, 0.04);
}
.ewcs .calc-layout > * { min-width: 0; }
.ewcs .calc-panel {
  padding: 28px;
  background: #FFFFFF;
  border: 1px solid var(--ewcs-tint-line);
  border-radius: var(--ewcs-radius);
}
.ewcs .calc-layout > .calc-panel:first-child { background: var(--ewcs-tint); }
.ewcs .calc-panel h3 {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  font-family: var(--ewcs-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ewcs-amethyst);
}

/* ---------- Inputs ---------- */
.ewcs .calc-row { margin: 0 0 22px; }
.ewcs .calc-row:last-child { margin-bottom: 0; }
.ewcs .calc-row label {
  display: block;
  margin: 0 0 8px;
  font-family: var(--ewcs-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ewcs-plum);
}
.ewcs .calc-row label span { color: var(--ewcs-muted); font-weight: 400; }
.ewcs .calc-row input[type="number"],
.ewcs .calc-row input[type="text"],
.ewcs .calc-row select,
.ewcs .ratio-select,
.ewcs .calc-item-row input,
.ewcs .calc-item-row select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--ewcs-line-strong);
  border-radius: var(--ewcs-radius);
  background-color: #FFFFFF;
  color: var(--ewcs-plum);
  font-family: var(--ewcs-ui);
  font-size: 17px;
  font-weight: 600;
  box-shadow: none;
  transition: border-color 160ms, box-shadow 160ms;
}
.ewcs .calc-item-row input, .ewcs .calc-item-row select { height: 44px; font-size: 14px; padding: 0 10px; }
.ewcs .calc-row input:hover, .ewcs .calc-row select:hover, .ewcs .ratio-select:hover { border-color: var(--ewcs-soft); }
.ewcs .calc-row input:focus, .ewcs .calc-row select:focus, .ewcs .ratio-select:focus,
.ewcs .calc-item-row input:focus, .ewcs .calc-item-row select:focus {
  outline: none;
  border-color: var(--ewcs-amethyst);
  box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.16);
}
.ewcs .calc-row select, .ewcs .ratio-select, .ewcs .calc-item-row select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B3FA0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.ewcs .ratio-select { margin-bottom: 24px; font-size: 15px; }
.ewcs .calc-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--ewcs-ink) !important;
  cursor: pointer;
}
.ewcs .calc-checkbox-label input[type="checkbox"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ewcs-plum);
  cursor: pointer;
}
.ewcs .calc-advanced-toggle {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px dashed var(--ewcs-line-strong);
  border-radius: var(--ewcs-radius);
  background: #FFFFFF;
  font-family: var(--ewcs-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ewcs-amethyst);
  cursor: pointer;
  transition: border-color 160ms, color 160ms;
}
.ewcs .calc-advanced-toggle:hover { border-color: var(--ewcs-amethyst); color: var(--ewcs-plum); }
.ewcs .calc-advanced-panel {
  display: none;
  margin: 0 0 16px;
  padding: 20px 20px 4px;
  background: #FFFFFF;
  border: 1px solid var(--ewcs-tint-line);
  border-radius: var(--ewcs-radius);
}
.ewcs .calc-advanced-panel.open { display: block; }
.ewcs .calc-error { margin: 12px 0 0; font-size: 13px; font-weight: 600; text-align: center; color: #A3243B; }
.ewcs .calc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.ewcs .mode-toggle-note { margin: 8px 0 16px; font-size: 12px; color: var(--ewcs-muted); }
.ewcs .calc-wrapper > .btn, .ewcs .calc-panel > .btn, .ewcs .calc-panel .calc-actions .btn { min-height: 52px; }

/* ---------- Chips ---------- */
.ewcs .chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.ewcs .chip {
  padding: 9px 16px;
  border: 1px solid var(--ewcs-line-strong);
  border-radius: 999px;
  background: #FFFFFF;
  font-family: var(--ewcs-ui);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ewcs-muted);
  cursor: pointer;
  transition: border-color 160ms, background 160ms, color 160ms;
}
.ewcs .chip:hover { border-color: var(--ewcs-amethyst); color: var(--ewcs-plum); }
.ewcs .chip.active { background: var(--ewcs-plum); border-color: var(--ewcs-plum); color: #FFFFFF; }
.ewcs .chip:focus-visible { outline: 2px solid var(--ewcs-amethyst); outline-offset: 2px; }

/* ---------- Results ---------- */
.ewcs .calc-summary-card, .ewcs .calc-result {
  --gold: var(--ewcs-violet);
  margin: 0 0 18px;
  padding: 28px 24px;
  border-radius: var(--ewcs-radius);
  background: linear-gradient(135deg, #1A0B2B 0%, #32174D 55%, #461F6E 100%);
  color: #FFFFFF;
  text-align: center;
}
.ewcs .calc-result { display: none; margin-top: 24px; margin-bottom: 0; }
.ewcs .calc-result.visible { display: block; }
.ewcs .calc-summary-label, .ewcs .calc-result .result-label {
  margin: 0 0 6px;
  font-family: var(--ewcs-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ewcs-violet);
}
.ewcs .calc-summary-value, .ewcs .calc-result .result-amount {
  font-family: var(--ewcs-heading);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.05;
  color: #FFFFFF;
  font-variant-numeric: lining-nums tabular-nums;
}
.ewcs .calc-summary-note { max-width: 520px; margin: 12px auto 0; font-size: 13.5px; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.ewcs .calc-result .result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
}
.ewcs .calc-result .result-row:last-child { border-bottom: 0; }
.ewcs .calc-result .result-row span:last-child { font-weight: 600; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.ewcs .calc-context {
  margin: 16px 0 0;
  padding: 16px 20px;
  background: var(--ewcs-tint);
  border: 1px solid var(--ewcs-tint-line);
  border-radius: var(--ewcs-radius);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ewcs-ink);
}
.ewcs .calc-context p { margin: 0; }
.ewcs .calc-context p + p { margin-top: 8px; }
.ewcs .calc-chart-wrap {
  position: relative;
  height: 320px;
  margin-top: 18px;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid var(--ewcs-tint-line);
  border-radius: var(--ewcs-radius);
}
.ewcs .calc-donut-wrap { position: relative; height: 260px; max-width: 260px; margin: 0 auto; }

/* ---------- Tables ---------- */
.ewcs .calc-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--ewcs-tint-line);
  border-radius: var(--ewcs-radius);
  background: #FFFFFF;
}
.ewcs .calc-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ewcs .calc-table th, .ewcs .calc-table td { padding: 10px 14px; text-align: right; border: 0; border-bottom: 1px solid var(--ewcs-tint-line); }
.ewcs .calc-table th:first-child, .ewcs .calc-table td:first-child { text-align: left; }
.ewcs .calc-table thead th {
  position: sticky;
  top: 0;
  background: var(--ewcs-tint);
  font-family: var(--ewcs-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ewcs-plum);
}
.ewcs .calc-table tbody tr:nth-child(even) { background: #FCFAFE; }
.ewcs .calc-table tbody tr:last-child td { border-bottom: 0; }
.ewcs .calc-table.calc-table-compare th:not(:first-child), .ewcs .calc-table.calc-table-compare td:not(:first-child) { text-align: center; }
.ewcs .calc-table.calc-table-compare td.best { color: var(--success); font-weight: 700; }

/* ---------- Line items (debts, budget, assets) ---------- */
.ewcs .calc-item-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 10px; }
.ewcs .calc-item-row.calc-item-row-5col {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas: "name name remove" "balance rate type";
}
.ewcs .calc-item-row.calc-item-row-5col > :nth-child(1) { grid-area: name; min-width: 0; }
.ewcs .calc-item-row.calc-item-row-5col > :nth-child(2) { grid-area: balance; min-width: 0; }
.ewcs .calc-item-row.calc-item-row-5col > :nth-child(3) { grid-area: rate; min-width: 0; }
.ewcs .calc-item-row.calc-item-row-5col > :nth-child(4) { grid-area: type; min-width: 0; }
.ewcs .calc-item-row.calc-item-row-5col > :nth-child(5) { grid-area: remove; justify-self: end; }
@media (max-width: 480px) {
  .ewcs .calc-item-row.calc-item-row-5col {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "remove" "balance" "rate" "type";
  }
  .ewcs .calc-item-row.calc-item-row-5col > :nth-child(5) { justify-self: start; }
}
.ewcs .calc-item-remove {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ewcs-line-strong);
  border-radius: var(--ewcs-radius);
  background: #FFFFFF;
  font-size: 18px;
  line-height: 1;
  color: var(--ewcs-muted);
  cursor: pointer;
}
.ewcs .calc-item-remove:hover { border-color: #A3243B; color: #A3243B; }
.ewcs .calc-item-add {
  margin-top: 4px;
  padding: 10px 16px;
  border: 1px dashed var(--ewcs-line-strong);
  border-radius: var(--ewcs-radius);
  background: #FFFFFF;
  font-family: var(--ewcs-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ewcs-amethyst);
  cursor: pointer;
}
.ewcs .calc-item-add:hover { border-color: var(--ewcs-amethyst); color: var(--ewcs-plum); }

/* ---------- Ratios, gauge, currency ---------- */
.ewcs .ratio-formula {
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--ewcs-tint);
  border: 1px solid var(--ewcs-tint-line);
  border-radius: var(--ewcs-radius);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--ewcs-plum);
}
.ewcs .ratio-description { margin-top: 16px; font-size: 13.5px; line-height: 1.7; color: var(--ewcs-muted); }
.ewcs .gauge-wrap { margin-top: 16px; }
.ewcs .gauge-track { position: relative; height: 10px; overflow: visible; background: var(--ewcs-tint-2); border: 1px solid var(--ewcs-tint-line); border-radius: 999px; }
.ewcs .gauge-zone { position: absolute; top: 0; bottom: 0; background: rgba(47, 107, 76, 0.28); border-radius: 999px; }
.ewcs .gauge-marker { position: absolute; top: -6px; width: 3px; height: 22px; background: var(--ewcs-plum); border-radius: 2px; }
.ewcs .gauge-marker::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -4px;
  border-left: 5.5px solid transparent;
  border-right: 5.5px solid transparent;
  border-top: 6px solid var(--ewcs-plum);
}
.ewcs .gauge-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--ewcs-muted); }
.ewcs .fx-converter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ewcs .fx-converter .calc-row { flex: 1; min-width: 140px; margin-bottom: 0; }
.ewcs .fx-swap-btn {
  width: 52px;
  height: 52px;
  border: 1px solid var(--ewcs-line-strong);
  border-radius: var(--ewcs-radius);
  background: #FFFFFF;
  font-size: 18px;
  color: var(--ewcs-amethyst);
  cursor: pointer;
}
.ewcs .fx-swap-btn:hover { border-color: var(--ewcs-amethyst); }
.ewcs .fx-rates-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.ewcs .fx-rate-card { padding: 16px; text-align: center; background: #FFFFFF; border: 1px solid var(--ewcs-tint-line); border-radius: var(--ewcs-radius); }
.ewcs .fx-rate-card .fx-code { margin-bottom: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ewcs-amethyst); }
.ewcs .fx-rate-card .fx-value { font-family: var(--ewcs-heading); font-size: 1.5rem; font-weight: 600; color: var(--ewcs-plum); }

/* ---------- Disclaimers and notes ---------- */
.ewcs .ewcs-disc { margin: 16px 0 0; font-size: 11.5px; font-style: italic; line-height: 1.6; color: var(--ewcs-muted); }
.ewcs .ewcs-disc-dark, .ewcs .calc-summary-card .ewcs-disc, .ewcs .calc-result .ewcs-disc { color: rgba(255, 255, 255, 0.72); }
.ewcs-note {
  margin: 0;
  padding: 18px 22px;
  background: #FFFFFF;
  border: 1px solid var(--ewcs-tint-line);
  border-left: 4px solid var(--ewcs-amethyst);
  border-radius: var(--ewcs-radius);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ewcs-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .ewcs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ewcs .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .ewcs .fx-rates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .ewcs-hero { padding-top: 184px; padding-bottom: 36px; min-height: 620px; }
  .ewcs-h1 { font-size: 2.6rem; }
  .ewcs-h2 { font-size: 2.05rem; }
  .ewcs-grid { grid-template-columns: minmax(0, 1fr); }
  .ewcs .calc-wrapper { padding: 20px; }
  .ewcs .calc-panel { padding: 22px 18px; }
  .ewcs .calc-layout { padding: 10px; }
  .ewcs .calc-chart-wrap { height: 260px; padding: 10px; }
  .ewcs .calc-table { font-size: 12.5px; }
  .ewcs .calc-table th, .ewcs .calc-table td { padding: 8px 10px; }
  .ewcs .calc-item-row:not(.calc-item-row-5col) { grid-template-columns: minmax(0, 1fr); }
  .ewcs .calc-item-row:not(.calc-item-row-5col) .calc-item-remove { justify-self: start; }
  .ewcs .calc-summary-value, .ewcs .calc-result .result-amount { font-size: 2.4rem; }
}

.ewcs .ewcs-fxnote { max-width: 720px; margin: 0 auto 14px; text-align: center; font-size: 12.5px; color: var(--ewcs-muted); }
.ewcs .ewcs-card p.ewcs-tag { font-size: 0.72rem; line-height: 1.4; color: var(--ewcs-amethyst); }

/* Gauge inside the dark result card (financial ratios) */
.ewcs .calc-summary-card, .ewcs .calc-result { --success: #8FDDB2; }
.ewcs .calc-summary-card .gauge-track { background: rgba(255, 255, 255, 0.16); border-color: transparent; }
.ewcs .calc-summary-card .gauge-zone { background: rgba(196, 181, 253, 0.55); }
.ewcs .calc-summary-card .gauge-marker { background: #FFFFFF; }
.ewcs .calc-summary-card .gauge-marker::after { border-top-color: #FFFFFF; }
.ewcs .calc-summary-card .gauge-labels { color: rgba(255, 255, 255, 0.78); }

/* ---------- Hub guide: "find your calculator" ---------- */
.ewcs [hidden], .ewcs-sec[hidden] { display: none !important; }
.ewcs-guide .ewcs-h2 { margin-bottom: 4px; }
.ewcs-intents { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ewcs-intent {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 52px;
  padding: 22px 24px;
  background: #FFFFFF;
  border: 1px solid var(--ewcs-line-strong);
  border-radius: calc(var(--ewcs-radius) + 5px);
  box-shadow: 0 24px 60px -44px rgba(50, 23, 77, 0.35), 0 2px 6px rgba(50, 23, 77, 0.04);
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color 200ms, background 200ms, transform 200ms, box-shadow 200ms;
}
.ewcs-intent:hover, .ewcs-intent:focus-visible {
  border-color: var(--ewcs-amethyst);
  transform: translateY(-2px);
  box-shadow: 0 28px 64px -40px rgba(50, 23, 77, 0.5), 0 2px 6px rgba(50, 23, 77, 0.06);
}
.ewcs-intent:focus-visible { outline: 2px solid var(--ewcs-amethyst); outline-offset: 3px; }
.ewcs-intent-label {
  font-family: var(--ewcs-heading);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ewcs-plum);
}
.ewcs-intent-label::after { content: "\00a0\2192"; color: var(--ewcs-amethyst); }
.ewcs-intent-sub { font-size: 0.92rem; line-height: 1.5; color: var(--ewcs-muted); }
.ewcs-intent[aria-pressed="true"] {
  background: linear-gradient(135deg, #1A0B2B 0%, #32174D 55%, #461F6E 100%);
  border-color: var(--ewcs-plum);
}
.ewcs-intent[aria-pressed="true"] .ewcs-intent-label { color: #FFFFFF; }
.ewcs-intent[aria-pressed="true"] .ewcs-intent-label::after { content: "\00a0\2713"; color: var(--ewcs-violet); }
.ewcs-intent[aria-pressed="true"] .ewcs-intent-sub { color: rgba(255, 255, 255, 0.85); }
.ewcs-guide-reset { margin: 0; }
.ewcs-linkbtn {
  padding: 8px 0;
  border: 0;
  background: none;
  font-family: var(--ewcs-ui);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ewcs-amethyst);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ewcs-linkbtn:hover { color: var(--ewcs-plum); }
.ewcs-linkbtn:focus-visible { outline: 2px solid var(--ewcs-amethyst); outline-offset: 3px; }
@media (min-width: 480px) { .ewcs-intents { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1025px) { .ewcs-intents { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Charts: bigger, and never shrink-wrapped ---------- */
.ewcs .calc-chart-wrap, .ewcs .calc-table-wrap { width: 100%; }
.ewcs .calc-chart-wrap { height: 440px; padding: 22px 24px 16px; }
.ewcs #ic-chart-wrap, .ewcs #fx-chart-wrap { height: 560px; max-width: 100% !important; padding: 28px 32px 20px; }
@media (max-width: 1024px) {
  .ewcs .calc-chart-wrap { height: 380px; }
  .ewcs #ic-chart-wrap, .ewcs #fx-chart-wrap { height: 460px; }
}
@media (max-width: 767px) {
  .ewcs .calc-chart-wrap { height: 320px; padding: 12px; }
  .ewcs #ic-chart-wrap, .ewcs #fx-chart-wrap { height: 380px; padding: 12px; }
}

.ewcs .calc-wrapper { width: 100%; }
