/* Risk planner and readability improvements. Keep this after the other stylesheets. */
:root {
  --muted: #c0cab9;
  --text: #f7faf2;
}

nav {
  color: #d6dfcf;
}
.hero-copy > p,
.about p,
.section-top > p,
.service-grid p,
.steps p,
.purpose-card p,
.testimonial-placeholder p,
details p {
  color: #c5cfbf;
}
.eyebrow {
  font-size: 11px;
}
.fine-print,
.broker-note,
.risk {
  font-size: 12px;
  color: #bfcbb7;
}
.hero-note {
  font-size: 10px;
  color: #c5d5b8;
}
.tags span {
  font-size: 9px;
  color: #d3e4c6;
}
.price-grid p,
.price-grid ul,
.faqs details p {
  font-size: 14px;
}
.price-grid li.unavailable {
  color: #b1bdab;
}
.footer-top p,
.socials,
.footer-bottom {
  font-size: 12px;
  color: #c1cdb8;
}
.chart-disclaimer {
  font-size: 10px;
  color: #b6c7aa;
}
.terminal-top,
.chart-label,
.chart-time,
.chart-heading .muted {
  color: #b8c8ac;
}
.dashboard-kicker {
  color: #bccfb1;
  font-size: 10px;
}
.dashboard-stat small {
  color: #c3d2ba;
  font-size: 11px;
}
.dashboard-stat div > span {
  color: #adbea2;
  font-size: 9px;
}
.dashboard-shell table {
  font-size: 11px;
}
.dashboard-shell th {
  color: #bdcfb1;
  font-size: 10px;
}
.dashboard-badge {
  font-size: 10px;
}
.index-chip,
.index-chip > span,
.index-chip > small {
  font-size: 10px;
}
.dashboard-bottom,
.chart-legend,
.allocation-card > p,
.donut-key > span {
  font-size: 10px;
  color: #b8caaa;
}
.dashboard-tab,
.dashboard-support {
  font-size: 11px;
  color: #c1d1b6;
}
.timeframes button {
  font-size: 10px;
}
.dashboard-shell h4 {
  font-size: 14px;
}

.risk-section {
  padding-bottom: 80px !important;
}
.risk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: start;
}
.risk-inputs,
.risk-results {
  min-width: 0;
  padding: 28px;
  border: 1px solid #4a623a;
  border-radius: 15px;
  background: linear-gradient(135deg, #182115, #0e170f);
  box-shadow: 0 20px 55px #0003;
}
.risk-results {
  border-color: #a4e56b65;
  background: radial-gradient(ellipse at 100% 0, #a4e56b0a, transparent 60%), #10190f;
}
.risk-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 25px;
}
.risk-panel-heading .eyebrow {
  font-size: 9px;
  letter-spacing: 1.3px;
}
.risk-panel-heading h3 {
  font-size: 24px;
  margin: 13px 0 0;
  line-height: 1.3;
}
.risk-reset {
  border: 1px solid #5a7446;
  background: #a4e56b0a;
  color: #dbedce;
  border-radius: 5px;
  font-size: 11px;
  padding: 7px 11px;
  white-space: nowrap;
}
.risk-example-tag {
  font-size: 8px;
  color: var(--green);
  border: 1px solid #a4e56b45;
  padding: 5px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}
.risk-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 21px 17px;
}
.risk-field {
  min-width: 0;
}
.risk-field label {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  min-height: 36px;
  margin-bottom: 7px;
  color: #edf5e5;
}
.risk-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #5a7346;
  background: #090f09;
  padding: 0 12px;
  border-radius: 6px;
}
.risk-input-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #a4e56b12;
}
.risk-input-wrap > span {
  color: #a4e56b;
  font-size: 11px;
}
.risk-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  color: #f5ffe9;
  background: transparent;
  padding: 12px 0;
  font:
    600 17px Manrope,
    sans-serif;
}
.risk-field select {
  width: 100%;
  min-height: 50px;
  padding: 10px;
  background: #090f09;
  color: #f5ffe9;
  border: 1px solid #5a7346;
  border-radius: 6px;
  font:
    12px "DM Sans",
    sans-serif;
}
.risk-field select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.risk-field small {
  display: block;
  margin-top: 7px;
  color: #b5c4a8;
  font-size: 10px;
  line-height: 1.6;
}
.risk-advanced {
  margin-top: 26px;
  border-top: 1px solid #3a4d2e;
}
.risk-advanced summary {
  color: #e7f5da;
  font-size: 13px;
}
.risk-advanced summary > span {
  display: block;
  color: #adbf9d;
  font-size: 10px;
}
.risk-advanced .risk-fields {
  margin-top: 24px;
}
.risk-form-note {
  display: flex;
  align-items: start;
  gap: 10px;
  margin-top: 22px;
}
.risk-form-note > span {
  color: var(--green);
}
.risk-form-note p {
  margin: 0;
  font-size: 11px;
  color: #b7c8ab;
}
.risk-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.risk-metrics article {
  min-width: 0;
  padding: 16px 14px;
  border: 1px solid #415b30;
  border-radius: 8px;
  background: #1b291669;
}
.risk-metrics article > span {
  display: block;
  font-size: 10px;
  color: #c7d7bb;
}
.risk-metrics strong {
  display: block;
  margin: 8px 0;
  color: #c3f797;
  font:
    600 clamp(20px, 2.1vw, 30px) Manrope,
    sans-serif;
  line-height: 1.3;
  letter-spacing: -0.8px;
  overflow-wrap: anywhere;
}
.risk-metrics small {
  display: block;
  font-size: 9px;
  color: #bbccae;
  line-height: 1.7;
}
.risk-status {
  margin: 18px 0;
  padding: 14px;
  color: #e1f2d4;
  background: #a4e56b0a;
  border: 1px solid #779a514d;
  border-left: 3px solid #a4e56b;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.8;
}
.risk-status.over-budget,
#risk-errors {
  border-color: #deb27865;
  border-left-color: #e6b979;
  color: #ffe3bb;
  background: #e6b9790b;
}
#risk-errors {
  padding: 20px;
  border: 1px solid #deb27865;
  border-radius: 8px;
  font-size: 13px;
}
.risk-line-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.risk-line-heading h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #f1f9e9;
}
.risk-line-heading > span {
  font-size: 10px;
  color: #bdceb0;
}
.allocation-track {
  display: flex;
  width: 100%;
  height: 12px;
  background: #263321;
  border-radius: 6px;
  overflow: hidden;
  margin: 17px 0 12px;
}
.allocation-track span {
  height: 100%;
  transition: width 0.3s;
}
#allocated-funds {
  background: #a4e56b;
}
#free-funds {
  background: #637b4f;
}
#reserve-funds {
  background: #e3c98f;
}
.allocation-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.allocation-legend > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ccd9c1;
  font-size: 9px;
}
.allocation-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a4e56b;
}
.allocation-legend > span:nth-child(2) i {
  background: #637b4f;
}
.allocation-legend > span:nth-child(3) i {
  background: #e3c98f;
}
.risk-allocation > p {
  font-size: 10px;
  color: #bdcdb0;
}
.risk-facts {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid #3d5130;
}
.risk-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
}
.risk-facts span {
  font-size: 11px;
  color: #c4d1b8;
}
.risk-facts strong {
  color: #f1f8e9;
  font-weight: 500;
  font-size: 11px;
  text-align: right;
}
.risk-expectancy {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #3d5130;
}
.risk-expectancy > p {
  font-size: 11px;
  color: #c3d3b7;
}
.winrate-bars {
  display: grid;
  gap: 11px;
  padding: 12px 0;
}
.winrate-row {
  display: grid;
  grid-template-columns: 68px 1fr 70px;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: #d2e0c6;
}
.winrate-row > strong {
  text-align: right;
  font-weight: 500;
  color: #b5ed88;
}
.winrate-track {
  height: 6px;
  background: #2b3b23;
  border-radius: 3px;
  overflow: hidden;
}
.winrate-track > span {
  display: block;
  height: 100%;
  background: #a4e56b;
  border-radius: 3px;
  transition: width 0.3s;
}
.winrate-row.loss .winrate-track > span {
  background: #f0a29b;
}
.winrate-row.loss > strong {
  color: #ffb9b2;
}
.risk-expectancy > .risk-assumption {
  font-size: 10px;
  color: #b4c4a7;
}
.risk-method {
  margin-top: 20px;
  padding: 0 22px;
  border: 1px solid #435a34;
  border-radius: 8px;
  background: #10190f;
}
.risk-method details {
  border: 0;
  padding: 19px 0;
}
.risk-method details:first-child {
  padding-top: 19px;
}
.risk-method summary {
  font-size: 13px;
}
.risk-method p {
  font-size: 12px;
  color: #c6d4bb;
  line-height: 1.9;
}
#risk-output[hidden],
#risk-errors[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .risk-layout {
    gap: 17px;
  }
  .risk-inputs,
  .risk-results {
    padding: 21px;
  }
  .risk-metrics strong {
    font-size: 23px;
  }
  header nav {
    gap: 10px;
    font-size: 10px;
  }
}

@media (max-width: 900px) {
  .risk-layout {
    grid-template-columns: 1fr;
  }
  .risk-fields {
    gap: 22px;
  }
  .risk-field label {
    min-height: 0;
  }
  .risk-metrics strong {
    font-size: 30px;
  }
}

@media (max-width: 760px) {
  .fine-print,
  .broker-note {
    font-size: 11px;
  }
  header nav {
    font-size: 14px;
  }
  .hero-note {
    font-size: 7px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .risk-section {
    padding-bottom: 35px !important;
  }
  .risk-inputs,
  .risk-results {
    padding: 21px 16px;
  }
  .risk-panel-heading h3 {
    font-size: 21px;
  }
  .risk-panel-heading .eyebrow {
    font-size: 8px;
  }
  .risk-fields {
    gap: 19px 12px;
  }
  .risk-field label {
    font-size: 11px;
    min-height: 34px;
  }
  .risk-field input {
    font-size: 16px;
    padding: 12px 0;
  }
  .risk-input-wrap {
    padding: 0 9px;
    gap: 5px;
  }
  .risk-field small {
    font-size: 10px;
  }
  .risk-metrics {
    gap: 9px;
  }
  .risk-metrics article {
    padding: 13px 11px;
  }
  .risk-metrics strong {
    font-size: 24px;
  }
  .risk-line-heading {
    align-items: start;
  }
  .risk-line-heading > span {
    font-size: 9px;
  }
  .risk-facts span,
  .risk-facts strong {
    font-size: 10px;
  }
  .risk-facts > div {
    gap: 12px;
  }
  .risk-method {
    padding: 0 16px;
  }
  .dashboard-stat div > span {
    font-size: 8px;
  }
  .dashboard-stat small {
    font-size: 9px;
  }
  .index-chip > span,
  .index-chip > small {
    font-size: 8px;
  }
  .dashboard-bottom {
    font-size: 8px;
  }
  .dashboard-kicker {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .allocation-track span,
  .winrate-track > span {
    transition: none;
  }
}
