.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;
}

.section-muted {
  position: relative;
}

.section-muted::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
  gap: 28px;
  align-items: stretch;
}

.calc-card,
.results-card {
  min-height: 100%;
  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-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.input-grid-top {
  margin-bottom: 20px;
}

.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;
}

.input-wrap,
.select-wrap {
  position: relative;
}

.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)
  );
}

.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;
}

.compound-grid {
  display: grid;
  gap: 12px;
}

.compound-grid-height {
  grid-template-columns: 1fr 1fr;
}

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

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

.helper-row,
.helper-single {
  display: flex;
  color: var(--gg-muted);
  font-size: 0.8rem;
  justify-content: space-between;
  padding: 0 4px;
}

.helper-single {
  justify-content: flex-start;
}

.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.85rem;
  line-height: 1.12;
}

.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 {
  margin-top: 16px;
  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-text,
.warning-text {
  margin: 12px 0 0;
  color: var(--gg-text-soft);
  line-height: 1.75;
}

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

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

.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);
}

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

.loan-stat-item strong {
  display: block;
  margin-top: 10px;
  font-size: 1.15rem;
}

.macro-meta {
  display: block;
  margin-top: 6px;
  color: var(--gg-text-soft);
  font-size: 0.92rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
  color: #22170a;
  background: #ffd36a;
}

.result-badge.cut {
  background: #ffcf6d;
}

.result-badge.maintain {
  background: #73ffd4;
}

.result-badge.gain {
  background: #a5b4fc;
}

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

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

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

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

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

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

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

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

.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;
  text-transform: lowercase;
  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;
}

.helper-row,
.helper-single {
  display: none;
}
