.investment-hero { padding-top: 42px; padding-bottom: 38px; }
.investment-hero__badge { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; padding: 5px 11px; border: 1px solid rgba(232,101,10,.42); border-radius: 999px; background: rgba(232,101,10,.13); color: #ff9b55; font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.investment-hero__badge span { font-size: 15px; line-height: 1; }
.investment-hero p { max-width: 720px; line-height: 1.65; }

.investment-app { width: 100%; max-width: 1180px; margin: 0 auto; }
.investment-layout { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 18px; align-items: start; margin-top: 18px; }
.investment-controls, .investment-results { padding: 22px; }
.investment-controls { overflow: hidden; }

.investment-fields { display: flex; flex-direction: column; }
.investment-field { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--c-border); }
.investment-field:last-child { margin-bottom: 0; }
.investment-field__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 7px; }
.investment-field__head label { color: var(--c-text); font-size: 13px; font-weight: 600; }
.investment-field__head > span { color: var(--c-muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .55px; white-space: nowrap; }
.investment-stepper { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: stretch; min-height: 44px; margin-bottom: 13px; overflow: hidden; border: 1.5px solid var(--c-border); border-radius: 9px; background: #fafaf8; transition: border-color var(--transition), box-shadow var(--transition), background var(--transition); }
.investment-stepper:focus-within { border-color: var(--c-accent); background: #fff; box-shadow: 0 0 0 3px rgba(232,101,10,.12); }
.investment-stepper:has(input[aria-invalid="true"]) { border-color: var(--c-red); background: #fff8f7; }
.investment-stepper > button { display: grid; place-items: center; border: 0; border-radius: 0; background: #e8eef4; color: #244664; font-size: 21px; font-weight: 500; line-height: 1; transition: background var(--transition), color var(--transition); }
.investment-stepper > button:last-child { background: #e8eef4; color: #244664; }
.investment-stepper > button:hover { background: #d9e4ed; color: #17364f; }
.investment-stepper > button:last-child:hover { background: #d9e4ed; color: #17364f; }
.investment-stepper > button:focus-visible { position: relative; z-index: 2; outline: 2px solid var(--c-navy); outline-offset: -3px; }
.investment-number { position: relative; min-width: 0; }
.investment-number input { width: 100%; height: 100%; min-height: 41px; padding: 8px 86px 8px 12px; border: 0; border-radius: 0; outline: 0; background: transparent; color: var(--c-text); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: none; -moz-appearance: textfield; }
.investment-number input::-webkit-inner-spin-button, .investment-number input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.investment-number span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--c-muted); font-size: 12px; font-weight: 600; pointer-events: none; }

.investment-field input[type="range"], .investment-subfield input[type="range"] { --range-progress: 0%; appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 5px; border-radius: 999px; outline: 0; cursor: pointer; background: linear-gradient(to right, var(--c-accent) 0 var(--range-progress), #dddcd7 var(--range-progress) 100%); }
.investment-field input[type="range"]::-webkit-slider-thumb, .investment-subfield input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 3px solid #fff; border-radius: 50%; background: var(--c-accent); box-shadow: 0 1px 5px rgba(30,43,60,.3); }
.investment-field input[type="range"]::-moz-range-thumb, .investment-subfield input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: var(--c-accent); box-shadow: 0 1px 5px rgba(30,43,60,.3); }
.investment-scale { display: flex; justify-content: space-between; margin-top: 8px; color: #8b8a86; font-size: 10px; font-variant-numeric: tabular-nums; }

.investment-options { margin: 18px -22px 0; border-top: 8px solid var(--c-bg); }
.investment-options__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px 8px; }
.investment-options__head > span { color: var(--c-text); font-size: 12px; font-weight: 700; }
.investment-options__head small { color: var(--c-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; }
.investment-option { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; margin: 0 22px; border-top: 1px solid var(--c-border); }
.investment-option > div { display: flex; flex-direction: column; gap: 2px; }
.investment-option strong { color: var(--c-text); font-size: 13px; font-weight: 600; }
.investment-option div span { color: var(--c-muted); font-size: 11px; line-height: 1.45; }
.investment-switch { position: relative; flex: 0 0 auto; width: 42px; height: 24px; }
.investment-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.investment-switch > span { position: absolute; inset: 0; border-radius: 99px; background: #c9c9c5; cursor: pointer; transition: background .2s; }
.investment-switch > span::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s; }
.investment-switch input:checked + span { background: var(--c-accent); }
.investment-switch input:checked + span::before { transform: translateX(18px); }
.investment-switch input:focus-visible + span { outline: 3px solid rgba(232,101,10,.25); outline-offset: 2px; }
.investment-switch em { position: absolute; }
.investment-subfield { margin: -1px 22px 4px; padding: 14px; border: 1px solid #f1c5a7; border-radius: 8px; background: #fff9f5; animation: investmentReveal .2s ease; }
.investment-subfield[hidden] { display: none; }
.investment-subfield .investment-stepper { margin-bottom: 12px; }
.investment-results { position: sticky; top: 78px; align-self: start; background: linear-gradient(150deg, #fff 0%, #fff 62%, #fbfaf7 100%); }
.investment-total { padding: 4px 0 20px; border-bottom: 1px solid var(--c-border); }
.investment-total > span { display: block; margin-bottom: 4px; color: var(--c-muted); font-size: 12px; }
.investment-total > strong { display: block; color: var(--c-navy); font-size: clamp(34px, 5vw, 48px); font-weight: 600; line-height: 1.08; letter-spacing: -1.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.investment-total > small { display: block; margin-top: 8px; color: var(--c-muted); font-size: 10px; }
.investment-summary { padding: 4px 0; }
.investment-summary > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--c-border); }
.investment-summary > div[hidden] { display: none; }
.investment-summary p { display: flex; flex-direction: column; color: var(--c-text); font-size: 12px; font-weight: 600; }
.investment-summary p small { margin-top: 2px; color: var(--c-muted); font-size: 9px; font-weight: 400; }
.investment-summary strong { color: var(--c-text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.investment-dot { width: 8px; height: 8px; border-radius: 50%; }
.investment-dot--principal { background: #3479b9; }
.investment-dot--profit { background: #12a594; }
.investment-dot--total { background: var(--c-accent); }
.investment-dot--tax { background: var(--c-red); }
.investment-dot--real { background: var(--c-green); }
.investment-ratio { margin: 17px 0; }
.investment-ratio > div { position: relative; isolation: isolate; display: flex; width: 100%; height: 14px; padding: 2px; overflow: hidden; border: 1px solid #d7e3ec; border-radius: 999px; background: #edf2f6; box-shadow: inset 0 1px 3px rgba(30,43,60,.08), 0 2px 8px rgba(30,43,60,.05); animation: investmentRatioPulse 4.8s ease-in-out infinite; }
.investment-ratio > div::after { content: ''; position: absolute; z-index: 3; top: 2px; bottom: 2px; left: -18%; width: 18%; border-radius: 999px; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.08) 22%, rgba(255,255,255,.38) 50%, rgba(255,255,255,.08) 78%, transparent 100%); pointer-events: none; animation: investmentBarShimmer 4.8s linear infinite; }
.investment-ratio > div span { min-width: 0; width: 0; background-size: 180% 100%; transition: width .55s cubic-bezier(.22,1,.36,1); animation: investmentGradientFlow 5s ease-in-out infinite; }
#principalBar { border-radius: 999px 4px 4px 999px; background-image: linear-gradient(105deg, #2563b8 0%, #3b82d0 48%, #67a8df 100%); }
#profitBar { border-left: 2px solid rgba(255,255,255,.88); border-radius: 4px 999px 999px 4px; background-image: linear-gradient(105deg, #0d9488 0%, #14b8a6 50%, #5bd5c7 100%); }
.investment-ratio p { margin-top: 7px; color: var(--c-muted); font-size: 10px; text-align: right; }
.investment-ratio p b { margin: 0 4px; color: #c4c2bd; }
#principalShare { color: #2f70bd; font-weight: 700; }
#profitShare { color: #0f978a; font-weight: 700; }
.investment-insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.investment-insights > div { min-width: 0; padding: 12px 10px; border: 1px solid var(--c-border); border-radius: 8px; background: #fff; }
.investment-insights span { display: block; min-height: 28px; color: var(--c-muted); font-size: 9px; line-height: 1.35; }
.investment-insights strong { display: block; margin-top: 5px; color: var(--c-navy); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.investment-disclaimer { margin-top: 16px; padding: 11px 12px; border-left: 3px solid #d8b36a; border-radius: 0 7px 7px 0; background: #fffaf0; color: #755b2b; font-size: 10px; line-height: 1.55; }

.investment-chart-panel { position: relative; margin-top: 18px; padding: 24px; overflow: hidden; border-color: #dce5ed; background: linear-gradient(145deg, #fff 0%, #fbfdff 100%); box-shadow: 0 8px 28px rgba(30,43,60,.07); }
.investment-chart-panel::before { content: ''; position: absolute; top: 0; left: 24px; width: 76px; height: 3px; border-radius: 0 0 4px 4px; background: var(--c-accent); }
.investment-chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.investment-chart-head > div:first-child > span { color: var(--c-accent); font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.investment-chart-head h2 { margin-top: 2px; color: var(--c-text); font-size: 18px; font-weight: 600; }
.investment-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; color: #526274; font-size: 10px; }
.investment-legend span { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #e1e8ee; border-radius: 999px; background: #fff; }
.investment-legend span[hidden] { display: none; }
.investment-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.investment-chart-wrap { position: relative; width: 100%; height: 340px; padding: 12px 10px 4px; overflow: hidden; border: 1px solid #e0e8ef; border-radius: 12px; background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.investment-chart-wrap canvas { width: 100%; height: 100%; max-width: none; border: 0; border-radius: 0; background: transparent; }
.investment-chart-table { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.investment-chart-table > div { padding: 11px; border: 1px solid #e0e8ef; border-radius: 8px; background: #fff; box-shadow: 0 2px 7px rgba(30,43,60,.035); }
.investment-chart-table span, .investment-chart-table small { display: block; color: var(--c-muted); font-size: 9px; }
.investment-chart-table strong { display: block; margin: 3px 0 1px; color: var(--c-navy); font-size: 12px; font-variant-numeric: tabular-nums; }

.investment-info { max-width: 1180px; }
.investment-seo { padding-top: 18px; }
.investment-seo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.investment-seo-grid article { padding: 20px; border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.investment-seo-grid h3 { margin-bottom: 7px; color: var(--c-navy); font-size: 14px; font-weight: 600; }
.investment-seo-grid p { color: var(--c-muted); font-size: 12px; line-height: 1.7; }
.investment-tax-info { display: grid; grid-template-columns: .65fr 1.35fr; gap: 35px; align-items: start; padding-top: 28px; padding-bottom: 28px; }
.investment-tax-info h2 { text-align: left; }
.investment-kicker { display: inline-block; margin-bottom: 8px; color: var(--c-accent); font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.investment-tax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.investment-tax-grid p { padding: 16px; border: 1px solid var(--c-border); border-radius: 9px; background: #fff; color: var(--c-muted); font-size: 12px; line-height: 1.7; }
.investment-tax-grid strong { color: var(--c-text); }
.investment-tax-grid a { color: var(--c-accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.investment-related { width: 100%; max-width: 1180px; margin: 0 auto 42px; padding: 24px 20px 0; }
.investment-related h2 { margin-bottom: 14px; color: var(--c-text); font-size: 18px; font-weight: 600; }
.investment-related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.investment-related-grid a { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--c-border); border-radius: 9px; background: #fff; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.investment-related-grid a:hover { transform: translateY(-2px); border-color: #f0b58d; box-shadow: var(--shadow-md); }
.investment-related-grid a > span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: rgba(232,101,10,.09); color: var(--c-accent); font-size: 20px; }
.investment-related-grid strong { color: var(--c-text); font-size: 13px; }
.investment-related-grid p { margin-top: 2px; color: var(--c-muted); font-size: 10px; }
.investment-related-grid b { color: var(--c-accent); font-size: 18px; }

@keyframes investmentReveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes investmentGradientFlow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes investmentBarShimmer { from { left: -18%; } to { left: 105%; } }
@keyframes investmentRatioPulse { 0%, 100% { border-color: #d7e3ec; box-shadow: inset 0 1px 3px rgba(30,43,60,.08), 0 2px 8px rgba(30,43,60,.05); } 50% { border-color: rgba(20,184,166,.28); box-shadow: inset 0 1px 3px rgba(30,43,60,.06), 0 0 0 2px rgba(20,184,166,.045), 0 3px 10px rgba(37,99,184,.07); } }

@media (max-width: 900px) {
  .investment-layout { grid-template-columns: 1fr; }
  .investment-results { position: static; min-height: auto; }
  .investment-tax-info { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 680px) {
  .investment-hero { padding: 30px 18px 28px; }
  .investment-hero__badge { font-size: 10px; }
  .investment-app { padding: 0; }
  .investment-layout { margin-top: 12px; }
  .investment-controls, .investment-results, .investment-chart-panel { padding: 17px; }
  .investment-options { margin-left: -17px; margin-right: -17px; }
  .investment-options__head { padding-left: 17px; padding-right: 17px; }
  .investment-option { margin-left: 17px; margin-right: 17px; }
  .investment-subfield { margin-left: 17px; margin-right: 17px; }
  .investment-total > strong { font-size: 36px; }
  .investment-summary > div { grid-template-columns: 9px minmax(0, 1fr) auto; gap: 8px; }
  .investment-summary strong { font-size: 13px; }
  .investment-insights { grid-template-columns: 1fr; }
  .investment-insights > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .investment-insights span { min-height: auto; }
  .investment-insights strong { margin-top: 0; }
  .investment-chart-head { align-items: flex-start; flex-direction: column; }
  .investment-legend { justify-content: flex-start; }
  .investment-chart-wrap { height: 280px; }
  .investment-chart-table { grid-template-columns: repeat(2, 1fr); }
  .investment-chart-table > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .investment-seo-grid, .investment-tax-grid, .investment-related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .investment-controls, .investment-results, .investment-chart-panel { border-radius: 8px; }
  .investment-field__head { gap: 8px; }
  .investment-field__head label { font-size: 12px; }
  .investment-number input { font-size: 16px; }
  .investment-total > strong { font-size: 31px; }
  .investment-chart-wrap { height: 245px; }
}

@media (prefers-reduced-motion: reduce) {
  .investment-subfield { animation: none; }
  .investment-ratio > div span { animation: none; }
  .investment-ratio > div span, .investment-related-grid a { transition: none; }
}
