:root {
  --bg: #070B0A;
  --panel: #0D1512;
  --panel-2: #101A16;
  --text: #F3F6F4;
  --text-dim: #9AA8A2;
  --text-mute: #5E6D67;
  --accent: #2FE0AE;
  --accent-ink: #06120F;
  --border: #1E2A25;
  --danger: #ff8f87;
  --radius-lg: 24px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(47, 224, 174, 0.13), transparent 38rem),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
.table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 32px;
}

.hero {
  max-width: 760px;
  margin: 0 auto 38px;
  text-align: center;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 36px;
  margin-bottom: 18px;
}

.language-control {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.language-control label {
  color: var(--text-mute);
  font-size: 0.72rem;
}

.language-control select {
  max-width: 132px;
  min-height: 36px;
  padding: 0 30px 0 10px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.unofficial-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  color: var(--accent);
  border: 1px solid rgba(47, 224, 174, 0.35);
  border-radius: 999px;
  background: rgba(47, 224, 174, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.35rem, 6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

h1 span {
  display: inline-block;
  color: var(--accent);
  background: linear-gradient(105deg, #8fffdc, var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 .title-lead {
  color: var(--text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hero > p {
  margin-bottom: 0;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.8;
}

.referral-banner {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 9px 14px;
  overflow-wrap: anywhere;
  text-align: center;
  border: 1px solid rgba(47, 224, 174, 0.34);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 8% 15%, rgba(47, 224, 174, 0.1), transparent 9rem),
    rgba(47, 224, 174, 0.055);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.13);
}

.referral-banner .ad-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: max-content;
  min-width: max-content;
  min-height: 23px;
  padding: 3px 8px;
  overflow-wrap: normal;
  color: var(--text-dim);
  white-space: nowrap;
  word-break: keep-all;
  border: 1px solid rgba(154, 168, 162, 0.38);
  border-radius: 999px;
  background: rgba(7, 11, 10, 0.5);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1;
}

.referral-banner p {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.65;
}

.referral-banner .referral-lead {
  display: inline;
}

.referral-banner a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  margin: 0 5px;
  padding: 4px 9px;
  color: var(--accent-ink);
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  box-shadow: 0 5px 15px rgba(47, 224, 174, 0.13);
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.referral-banner a:hover {
  background: #8fffdc;
  box-shadow: 0 7px 20px rgba(47, 224, 174, 0.22);
  transform: translateY(-1px);
}

.referral-banner a:focus-visible {
  outline: 2px solid #8fffdc;
  outline-offset: 3px;
}

.referral-banner a:active {
  transform: translateY(0);
}

.referral-banner .referral-tail {
  color: var(--text);
  font-weight: 750;
}

.simulator-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}

.panel {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(13, 21, 18, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.panel-heading {
  margin-bottom: 28px;
}

.panel-heading h2 {
  margin: 3px 0 0;
  font-size: 1.45rem;
}

.panel-heading h2:first-child {
  margin-top: 0;
}

.eyebrow {
  margin-bottom: 0;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.field-group {
  min-width: 0;
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}

.field-group > label,
.field-group legend,
.wallet-form > label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 650;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-2);
}

input:hover {
  border-color: #33473e;
}

.input-with-unit {
  position: relative;
}

.input-with-unit input {
  padding-right: 48px;
}

.input-with-unit > span {
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--accent);
  font-weight: 800;
  transform: translateY(-50%);
}

.hint,
.status-message {
  min-height: 1.35em;
  margin: 8px 0 0;
  color: var(--text-mute);
  font-size: 0.77rem;
  line-height: 1.55;
}

.hint.is-warning,
.status-message.is-error {
  color: var(--danger);
}

.status-message.is-success {
  color: var(--accent);
}

.toggle-grid {
  display: grid;
  gap: 8px;
}

.toggle-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.toggle-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.toggle-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.toggle-button {
  min-width: 0;
  min-height: 42px;
  padding: 8px 5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel-2);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.toggle-button:hover {
  color: var(--text);
  border-color: #33473e;
}

.toggle-button.is-active {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent);
}

.toggle-button:disabled {
  color: var(--text-mute);
  border-color: var(--border);
  background: rgba(16, 26, 22, 0.5);
  cursor: not-allowed;
  opacity: 0.48;
}

.fixed-values {
  margin: 0;
  padding: 4px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-2);
}

.fixed-values > div {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.fixed-values > div:last-child {
  border-bottom: 0;
}

.fixed-values dt {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--text-dim);
  font-size: 0.83rem;
  overflow-wrap: anywhere;
}

.fixed-values dd {
  flex: 0 0 auto;
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 750;
  text-align: right;
}

.wallet-form {
  margin-bottom: 24px;
}

.wallet-row,
.points-row {
  display: flex;
  min-width: 0;
  gap: 10px;
}

.wallet-row input,
.points-row input {
  flex: 1 1 auto;
}

.primary-button {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 0 18px;
  color: var(--accent-ink);
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  font-weight: 800;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-mute);
  font-size: 0.72rem;
}

.separator::before,
.separator::after {
  height: 1px;
  background: var(--border);
  content: "";
  flex: 1;
}

.separator span {
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.unit-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  margin: 0;
  padding: 0 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-2);
  cursor: pointer;
}

.unit-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.unit-switch span {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #2a3832;
  transition: background 160ms ease;
}

.unit-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-dim);
  content: "";
  transition: transform 160ms ease, background 160ms ease;
}

.unit-switch:has(input:checked) span {
  background: rgba(47, 224, 174, 0.32);
}

.unit-switch:has(input:checked) span::after {
  background: var(--accent);
  transform: translateX(14px);
}

.unit-switch:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.unit-switch.is-hidden {
  display: none;
}

.projection-block {
  margin: 4px 0 28px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
}

.projection-heading {
  margin-bottom: 20px;
}

.projection-heading h3 {
  margin: 3px 0 0;
  font-size: 1.05rem;
}

.projection-targets {
  margin-bottom: 16px;
}

.projection-summary {
  padding: 14px 16px;
  border: 1px solid rgba(47, 224, 174, 0.22);
  border-radius: 12px;
  background: rgba(47, 224, 174, 0.06);
}

.projection-summary[hidden] {
  display: none;
}

.projection-summary p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.projection-summary strong {
  color: var(--accent);
  font-size: 1rem;
}

.result-card {
  margin: 6px 0 28px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(47, 224, 174, 0.35);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 10%, rgba(47, 224, 174, 0.13), transparent 45%),
    var(--panel-2);
}

.result-card > p {
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.result-card > strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: clamp(2.25rem, 7vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.result-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}

.result-card dl > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(7, 11, 10, 0.4);
}

.result-card dt {
  color: var(--text-mute);
  font-size: 0.7rem;
}

.result-card dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 750;
}

.scenario-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.scenario-heading h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.scenario-heading span {
  min-width: 0;
  color: var(--text-mute);
  font-size: 0.7rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  min-width: 530px;
  border-collapse: collapse;
  font-size: 0.78rem;
  white-space: nowrap;
}

th,
td {
  padding: 12px 11px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--text-mute);
  background: var(--panel-2);
  font-size: 0.68rem;
  font-weight: 750;
}

td {
  color: var(--text-dim);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.is-selected td {
  color: var(--text);
  background: rgba(47, 224, 174, 0.1);
}

tbody tr.is-selected td:first-child {
  color: var(--accent);
  font-weight: 800;
  box-shadow: inset 3px 0 0 var(--accent);
}

footer {
  max-width: 900px;
  margin: 28px auto 0;
  color: var(--text-mute);
  font-size: 0.74rem;
  line-height: 1.65;
  text-align: center;
}

footer p {
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .page-shell {
    padding-top: 38px;
  }

  .simulator-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 26px;
  }

  .hero {
    margin-bottom: 26px;
  }

  .hero > p {
    font-size: 0.94rem;
  }

  .referral-banner {
    gap: 8px;
    padding: 9px 10px;
  }

  .language-control {
    flex-direction: column;
    align-items: flex-end;
  }

  .language-control label {
    line-height: 1;
  }

  .panel {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .toggle-grid-four,
  .toggle-grid-three,
  .toggle-grid-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toggle-grid-five .toggle-button:first-child {
    grid-column: 1 / -1;
  }

  .wallet-row {
    align-items: stretch;
  }

  .wallet-row input {
    min-width: 0;
  }

  .primary-button {
    min-width: 0;
    max-width: 45%;
    padding: 0 12px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .result-card {
    padding: 20px 16px;
  }

  .result-card dl {
    grid-template-columns: minmax(0, 1fr);
  }
}

