.tool-hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 32px;
  align-items: center;
  padding: 120px 0 56px;
}

.tool-title {
  max-width: 10ch;
}

.hero-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-intro-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.hero-intro-point {
  position: relative;
  z-index: 1;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.038),
    rgba(255, 255, 255, 0.022)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-intro-label {
  display: block;
  font-size: 0.82rem;
  color: var(--gg-muted);
  margin-bottom: 8px;
}

.section-emphasis {
  padding-top: 10px;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, 0.84fr);
  gap: 28px;
  align-items: start;
}

.results-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chart-section {
  padding-top: 0;
}

.calc-card,
.results-card {
  min-height: 100%;
}

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

.card-heading h3 {
  margin: 0 0 8px;
  font-size: 1.28rem;
}

.card-heading p {
  margin: 0;
  color: var(--gg-text-soft);
}

.input-group {
  margin-bottom: 22px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.026),
    rgba(255, 255, 255, 0.016)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.group-head {
  margin-bottom: 16px;
}

.group-head-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.group-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gg-cyan);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-head h4 {
  margin: 0;
  font-size: 1.06rem;
  color: rgba(240, 236, 255, 0.96);
}

.ghost-action-btn {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(32, 220, 255, 0.22);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.045),
    rgba(255, 255, 255, 0.025)
  );
  color: var(--gg-text);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  white-space: nowrap;
}

.ghost-action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(32, 220, 255, 0.4);
  box-shadow: 0 10px 22px rgba(32, 220, 255, 0.08);
}

.helper-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.helper-copy {
  color: var(--gg-text-soft);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 560px;
}

.helper-status {
  color: var(--gg-cyan);
  font-size: 0.88rem;
  font-weight: 800;
  min-height: 22px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  color: rgba(240, 236, 255, 0.94);
  font-weight: 700;
  font-size: 1rem;
}

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

.select-wrap select,
.input-main {
  width: 100%;
  min-height: 64px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(32, 220, 255, 0.26);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.025)
  );
  color: var(--gg-text);
  outline: none;
  font-size: 1.05rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-scheme: dark;
}

.select-wrap select:hover,
.select-wrap select:focus,
.input-main:hover,
.input-main:focus {
  border-color: rgba(32, 220, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(32, 220, 255, 0.08);
}

.select-wrap select option,
select option {
  background-color: #141a2b !important;
  color: #f4efff !important;
}

.mode-toggle {
  display: grid;
  gap: 10px;
}

.mode-toggle-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-btn {
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.025)
  );
  color: var(--gg-text);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.mode-btn:hover {
  transform: translateY(-1px);
}

.mode-btn.active {
  border-color: rgba(32, 220, 255, 0.28);
  box-shadow: 0 10px 26px rgba(32, 220, 255, 0.08);
  background: linear-gradient(
    135deg,
    rgba(32, 220, 255, 0.16),
    rgba(124, 58, 237, 0.18)
  );
}

.down-toggle {
  margin-bottom: 10px;
}

.split-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-info {
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.038),
    rgba(255, 255, 255, 0.022)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-info-tight {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mini-info-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--gg-cyan);
  font-weight: 800;
  font-size: 0.9rem;
}

.mini-info p {
  margin: 0;
  color: var(--gg-text-soft);
  line-height: 1.7;
}

.button-row {
  display: flex;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.results-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.results-title {
  margin: 10px 0 0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

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

.result-box {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.016)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.result-box-highlight {
  border-color: rgba(32, 220, 255, 0.16);
}

.result-label,
.summary-label,
.loan-stat-label,
.warning-label {
  display: block;
  color: var(--gg-muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-value {
  display: block;
  margin-top: 10px;
  font-size: 1.5rem;
  line-height: 1.2;
  word-break: break-word;
}

.result-value-hero {
  font-size: 2rem;
  background: linear-gradient(
    90deg,
    var(--gg-cyan) 0%,
    #73b8ff 38%,
    #9d89ff 72%,
    var(--gg-magenta) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f0ecff;
}

.summary-panel,
.warning-panel,
.full-chart-card,
.chart-preview-card {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.026),
    rgba(255, 255, 255, 0.015)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-panel,
.warning-panel {
  margin-top: 16px;
}

.summary-text,
.warning-text {
  margin: 12px 0 0;
  color: var(--gg-text-soft);
  line-height: 1.75;
}

.loan-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.loan-stat-item {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.016)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.loan-stat-item strong {
  display: block;
  margin-top: 10px;
  font-size: 1.08rem;
  line-height: 1.4;
}

.comparison-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 44px;
  padding: 0 18px;

  border-radius: 999px;

  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;

  white-space: nowrap;
  text-align: center;

  color: #22170a;
  background: #ffd36a;
}

.result-badge.buy {
  background: #41c6e7;
}

.result-badge.rent {
  background: #dd973c;
}

.result-badge.close {
  background: #9fc5ff;
}

.result-badge.invalid {
  background: #ff9aa5;
}

.input-chip {
  display: flex;
  align-items: center;
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(32, 220, 255, 0.26);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.025)
  );
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  overflow: hidden;
}

.input-chip:hover,
.input-chip:focus-within {
  border-color: rgba(32, 220, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(32, 220, 255, 0.08);
}

.input-chip-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 0 14px;
  color: var(--gg-muted);
  font-size: 0.92rem;
  font-weight: 800;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.input-chip-field {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 62px;
  padding: 0 16px !important;
  border-radius: 0 !important;
  flex: 1 1 auto;
}

.input-chip-field:hover,
.input-chip-field:focus {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.unit-switch-wrap {
  display: block;
}

.unit-switch-wrap[hidden] {
  display: none !important;
}

.chart-preview-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

.chart-preview-glow {
  position: absolute;
  inset: auto -10% -28% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(157, 137, 255, 0.18),
    rgba(157, 137, 255, 0)
  );
  pointer-events: none;
}

.chart-preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.chart-preview-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(32, 220, 255, 0.16),
    rgba(124, 58, 237, 0.18)
  );
  border: 1px solid rgba(32, 220, 255, 0.22);
  color: var(--gg-text);
  font-size: 0.82rem;
  font-weight: 800;
}

.chart-preview-title {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 1.24rem;
  line-height: 1.2;
}

.chart-preview-text {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--gg-text-soft);
  line-height: 1.75;
}

.chart-preview-points {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.chart-preview-point {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.032),
    rgba(255, 255, 255, 0.018)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-preview-label {
  display: block;
  margin-bottom: 8px;
  color: var(--gg-muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chart-preview-mock {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  height: 92px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.mock-grid {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.mock-grid-1 {
  top: 22px;
}
.mock-grid-2 {
  top: 46px;
}
.mock-grid-3 {
  top: 70px;
}

.mock-line {
  position: absolute;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 999px;
  transform-origin: left center;
}

.mock-line-rent {
  top: 54px;
  background: linear-gradient(
    90deg,
    rgba(255, 205, 97, 0.95),
    rgba(255, 140, 92, 0.9)
  );
  transform: skewY(-13deg);
  box-shadow: 0 0 16px rgba(255, 183, 77, 0.24);
}

.mock-line-buy {
  top: 30px;
  background: linear-gradient(
    90deg,
    rgba(32, 220, 255, 0.95),
    rgba(157, 137, 255, 0.92)
  );
  transform: skewY(-10deg);
  box-shadow: 0 0 16px rgba(32, 220, 255, 0.24);
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.chart-head-wide {
  margin-bottom: 18px;
}

.chart-title-large {
  margin: 8px 0 10px;
  font-size: 1.45rem;
  line-height: 1.1;
}

.chart-sub {
  margin: 0;
  color: var(--gg-text-soft);
  line-height: 1.7;
  max-width: 760px;
}

.chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gg-text-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
}

.legend-swatch-rent {
  background: linear-gradient(
    135deg,
    rgba(255, 205, 97, 0.95),
    rgba(255, 140, 92, 0.9)
  );
}

.legend-swatch-buy {
  background: linear-gradient(
    135deg,
    rgba(32, 220, 255, 0.95),
    rgba(157, 137, 255, 0.92)
  );
}

.chart-shell {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at top left,
      rgba(32, 220, 255, 0.08),
      transparent 38%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(157, 137, 255, 0.08),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.01)
    );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-shell-large {
  min-height: 420px;
}

.chart-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1160 / 420;
}

.chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--gg-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.chart-range-label {
  display: inline-block;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.chart-axis-label {
  fill: rgba(217, 212, 236, 0.75);
  font-size: 12px;
  font-weight: 700;
}

.chart-year-label {
  fill: rgba(217, 212, 236, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.chart-fill-rent {
  fill: url(#rentFill);
  opacity: 0.22;
}

.chart-fill-buy {
  fill: url(#buyFill);
  opacity: 0.22;
}

.chart-path-rent {
  fill: none;
  stroke: url(#rentStroke);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 12px rgba(255, 183, 77, 0.24));
}

.chart-path-buy {
  fill: none;
  stroke: url(#buyStroke);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 14px rgba(32, 220, 255, 0.24));
}

.chart-dot-rent {
  fill: #ffbf6b;
}

.chart-dot-buy {
  fill: #8fc7ff;
}

.chart-note {
  fill: rgba(240, 236, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .tool-hero,
  .calculator-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .input-grid,
  .results-grid,
  .loan-stats,
  .comparison-stat-grid,
  .hero-intro-points,
  .chart-preview-points {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tool-hero {
    padding: 106px 0 44px;
  }

  .button-row,
  .results-top,
  .chart-head,
  .group-head-flex,
  .chart-preview-top {
    flex-direction: column;
    align-items: stretch;
  }

  .full-chart-card {
    padding: 16px;
  }

  .mode-toggle-two {
    grid-template-columns: 1fr 1fr;
  }

  .button-row .gg-btn {
    width: 100%;
  }

  .results-title {
    font-size: 1.72rem;
  }

  .result-value {
    font-size: 1.28rem;
  }

  .result-value-hero {
    font-size: 1.85rem;
  }

  .chart-shell-large {
    min-height: 0;
  }

  .chart-svg {
    aspect-ratio: 320 / 220;
  }

  .chart-foot {
    gap: 10px;
    font-size: 0.82rem;
  }

  .chart-title-large {
    font-size: 1.24rem;
  }

  .legend-item {
    font-size: 0.88rem;
  }

  .chart-axis-label,
  .chart-year-label,
  .chart-note {
    font-size: 10px;
  }
}
