.invest-shell {
  max-width: min(1120px, calc(100% - 32px));
  margin: 24px auto 56px;
  padding: 0;
  color: #0f172a;
}

.invest-page-head {
  margin-bottom: 16px;
}

.invest-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b737c;
  margin-bottom: 8px;
}

.invest-breadcrumbs a {
  color: #6b737c;
  text-decoration: none;
}

.invest-breadcrumbs a:hover,
.invest-breadcrumbs a:focus-visible {
  color: #2f6fdf;
  text-decoration: underline;
}

.invest-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.invest-card {
  background: #ffffff;
  border: 1px solid rgba(20, 24, 30, 0.1);
  border-radius: 14px;
  box-shadow: 0 18px 34px -30px rgba(15, 23, 42, 0.7);
  padding: 18px;
}

.invest-shell > .invest-card + .invest-card {
  margin-top: 16px;
}

.invest-inputs > h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #101828;
}

.invest-intro {
  margin: 0 0 14px;
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
}

.invest-mode-bar {
  margin: 0 0 12px;
  border: 1px solid #d6e2f2;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7f9ff 100%);
  padding: 10px;
}

.invest-mode-title {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  font-weight: 700;
}

.invest-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invest-mode-tab {
  border: 1px solid #bfd1ef;
  background: #ffffff;
  color: #1f3f82;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  font-size: clamp(11px, 1.2vw, 13px);
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  white-space: normal;
}

.invest-mode-tab.is-active {
  border-color: #1b56c0;
  background: #1b56c0;
  color: #ffffff;
}

.invest-mode-description {
  margin: 10px 0 0;
  font-size: 13px;
  color: #334155;
}

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

.invest-field {
  display: grid;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.invest-field-span-2 {
  grid-column: 1 / -1;
}

.invest-field[hidden] {
  display: none;
}

.invest-affix-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  border: 1px solid #c8d3e7;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.invest-affix-input-suffix {
  grid-template-columns: 1fr auto;
}

.invest-select-input {
  grid-template-columns: 1fr;
}

.invest-affix-input input,
.invest-affix-input select {
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 40px;
  min-width: 0;
  width: 100%;
  font-size: 15px;
  padding: 0 10px;
  color: #111827;
}

.invest-select-input select {
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--rp-select-chevron-color, #334155) 50%),
    linear-gradient(135deg, var(--rp-select-chevron-color, #334155) 50%, transparent 50%);
  background-repeat: no-repeat;
  background-position:
    calc(100% - var(--rp-select-chevron-right, 18px)) 50%,
    calc(100% - var(--rp-select-chevron-right-inner, 13px)) 50%;
  background-size:
    var(--rp-select-chevron-size, 5px) var(--rp-select-chevron-size, 5px),
    var(--rp-select-chevron-size, 5px) var(--rp-select-chevron-size, 5px);
  padding-right: var(--rp-select-padding-right, 36px);
}

.invest-affix-input:focus-within {
  border-color: #2f6fdf;
  box-shadow: 0 18px 34px -30px rgba(15, 23, 42, 0.7);
}

.invest-affix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 34px;
  padding: 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0f2454;
  border-left: 1px solid #bcc8df;
  background: #f4f7fd;
  white-space: nowrap;
}

.invest-affix-prefix {
  border-left: 0;
  border-right: 1px solid #bcc8df;
}

.invest-affix-suffix {
  min-width: 0;
  width: auto;
  padding: 0 10px;
}

.invest-pill-field {
  border: 1px solid #d6e2f2;
  border-radius: 8px;
  padding: 8px;
}

.invest-pill-field-combined {
  display: grid;
  gap: 10px;
}

.invest-pill-field legend {
  padding: 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #475569;
  font-weight: 700;
}

.invest-pill-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.invest-pill-combined-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.invest-pill-group-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.invest-pill-row-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #475569;
  font-weight: 700;
  white-space: nowrap;
}

.invest-pill {
  position: relative;
  display: inline-flex;
}

.invest-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.invest-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #bfd1ef;
  border-radius: 999px;
  background: #ffffff;
  color: #1f3f82;
  font-size: clamp(10px, 0.95vw, 12px);
  font-weight: 700;
  padding: 0 clamp(9px, 1.4vw, 12px);
  cursor: pointer;
  white-space: nowrap;
}

.invest-pill input:checked + span {
  border-color: #1b56c0;
  background: #1b56c0;
  color: #ffffff;
}

.invest-validation {
  margin: 10px 0 0;
  min-height: 20px;
  font-size: 13px;
  color: #b91c1c;
  font-weight: 600;
}

.invest-results h2,
.invest-chart-card h2,
.invest-schedule-card h2,
.invest-reference h2 {
  margin: 0 0 12px;
  color: #101828;
}

.invest-result-lead {
  margin: 0 0 12px;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
}

.invest-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.invest-kpis article {
  border: 1px solid #dbe5f4;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
  min-width: 0;
}

.invest-kpis h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #667085;
}

.invest-kpis p {
  margin: 6px 0 0;
  font-size: clamp(16px, 1.25vw, 24px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #101828;
  white-space: nowrap;
}

.invest-kpi-solved {
  grid-column: 1 / -1;
  border-color: #bfd1ef;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
}

.invest-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.invest-chart-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.invest-chart-wrap {
  position: relative;
  background: #ffffff;
  border: 1px solid #d6deee;
  border-radius: 14px;
  padding: 8px;
}

#invest-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  cursor: crosshair;
}

.invest-axis {
  stroke: #94a3b8;
  stroke-width: 1.1;
}

.invest-grid-line {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.invest-axis-text {
  fill: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.invest-bar-contrib {
  fill: #1b56c0;
}

.invest-bar-interest {
  fill: #24AD60;
}

.invest-chart-tooltip {
  position: absolute;
  transform: none;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
}

.invest-chart-legend {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.invest-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.invest-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.invest-legend-swatch-contrib {
  background: #1b56c0;
}

.invest-legend-swatch-interest {
  background: #24AD60;
}

.invest-schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.invest-schedule-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invest-schedule-tab {
  border: 1px solid #c8d3e7;
  background: #ffffff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.invest-schedule-tab.is-active {
  border-color: #2f6fdf;
  background: #e8efff;
  color: #0f2454;
}

.invest-table-wrap {
  margin-top: 12px;
  border: 1px solid #dbe5f4;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  overflow-x: auto;
}

.invest-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 660px;
}

.invest-table th,
.invest-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  white-space: nowrap;
}

.invest-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
}

.invest-reference {
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid rgba(20, 24, 30, 0.08);
  border-radius: 12px;
  padding: 20px;
}

.invest-reference h2 {
  margin: 16px 0 8px;
  font-size: 22px;
  line-height: 1.3;
  color: #101828;
}

.invest-reference h2:first-child {
  margin-top: 0;
}

.invest-reference p,
.invest-reference li {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #374151;
}

.invest-reference ul {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.invest-reference a {
  color: #2f6fdf;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.invest-reference a:hover,
.invest-reference a:focus-visible {
  color: #1f5cc9;
}

.invest-faq {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.invest-faq-item {
  border: 1px solid #d4d9e1;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.invest-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.invest-faq-item summary::-webkit-details-marker {
  display: none;
}

.invest-faq-item summary::before {
  content: "\25B6";
  font-size: 11px;
  color: #334155;
  transform: translateY(-1px);
  transition: transform 0.15s ease;
}

.invest-faq-item[open] summary::before {
  transform: rotate(90deg) translateX(1px);
}

.invest-faq-item > p {
  margin: 0;
  padding: 0 14px 14px 34px;
  font-size: 15px;
  line-height: 1.65;
  color: #374151;
}

.invest-links {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

@media (min-width: 1000px) {
  .invest-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }

  .invest-results {
    position: sticky;
    top: 18px;
  }
}

@media (max-width: 980px) {
  .invest-grid {
    grid-template-columns: 1fr;
  }

  .invest-field-span-2 {
    grid-column: auto;
  }

  .invest-kpis {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .invest-shell {
    width: min(1120px, calc(100% - 20px));
    margin: 16px auto 40px;
    padding: 0;
  }

  .invest-inputs > h1 {
    font-size: 28px;
  }

  .invest-mode-tabs {
    gap: 6px;
  }

  .invest-mode-tab {
    min-height: 34px;
    padding: 0 11px;
    font-size: clamp(11px, 2.6vw, 12px);
  }

  .invest-pill-combined-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .invest-pill-row-label {
    white-space: normal;
  }

  .invest-reference {
    padding: 14px;
  }

  .invest-table-wrap {
    padding: 9px 10px;
  }

  .invest-table {
    min-width: 560px;
  }
}
