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

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

.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: 24px;
}

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

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

.field-note-box {
  justify-content: flex-end;
}

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

.input-wrap input {
  width: 100%;
  min-height: 64px;
  padding: 0 16px;
  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);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  font-size: 1.05rem;
}

.input-wrap input::placeholder {
  color: rgba(205, 196, 232, 0.46);
}

.input-wrap input:focus,
.select-wrap select:focus,
.course-input:focus,
.course-select:focus {
  border-color: rgba(32, 220, 255, 0.38);
  box-shadow: 0 0 0 4px rgba(32, 220, 255, 0.08);
}

.select-wrap select,
.course-select {
  width: 100%;
  min-height: 64px;
  padding: 0 16px;
  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);
  outline: none;
  font-size: 1.05rem;
  appearance: none;
  color-scheme: dark;
}

.select-wrap select option,
.course-select option {
  background: #111626;
  color: #f3efff;
}

.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,
.toolbar-copy {
  margin: 0;
  color: var(--gg-text-soft);
  line-height: 1.7;
}

.course-builder {
  border-radius: 24px;
  padding: 20px;
  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);
}

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

.toolbar-label {
  margin-bottom: 4px;
}

.course-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(78px, 0.48fr) minmax(
      118px,
      0.62fr
    ) minmax(104px, 0.55fr) 48px;
  gap: 12px;
  align-items: center;
}

.course-grid-head {
  margin-bottom: 10px;
  padding: 0 6px;
  color: var(--gg-muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-grid-head > :nth-child(2),
.course-grid-head > :nth-child(3),
.course-grid-head > :nth-child(4) {
  text-align: center;
}

.course-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-row {
  padding: 14px;
  border-radius: 20px;
  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);
}

.course-input,
.course-select {
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 16, 30, 0.58);
  color: var(--gg-text);
  font-size: 1rem;
  outline: none;
}

.course-name {
  padding-left: 16px;
}

.course-credits,
.course-grade,
.points-pill,
.remove-course {
  text-align: center;
}

.course-credits,
.course-grade {
  padding-left: 10px;
  padding-right: 10px;
}

.course-input::placeholder {
  color: rgba(205, 196, 232, 0.46);
}

.points-pill {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0 12px;
  background: linear-gradient(
    135deg,
    rgba(127, 255, 212, 0.12),
    rgba(32, 220, 255, 0.14)
  );
  border: 1px solid rgba(32, 220, 255, 0.18);
  color: rgba(240, 236, 255, 0.95);
  font-weight: 800;
}

.remove-course {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  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: 1.35rem;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.remove-course:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 111, 174, 0.35);
  background: linear-gradient(
    180deg,
    rgba(255, 111, 174, 0.12),
    rgba(255, 53, 212, 0.08)
  );
}

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

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

.results-title {
  margin: 14px 0 0;
  font-size: 1.75rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.result-badge.elite {
  color: #061312;
  background: linear-gradient(135deg, #7fffd4, #20dcff);
}

.result-badge.strong {
  color: #17110a;
  background: linear-gradient(135deg, #ffe082, #ffb74d);
}

.result-badge.steady {
  color: #fff0f5;
  background: linear-gradient(135deg, #ff6fae, #ff35d4);
}

.result-badge.invalid {
  color: rgba(240, 236, 255, 0.94);
  background: rgba(255, 255, 255, 0.05);
}

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

.result-box {
  padding: 18px;
  border-radius: 20px;
  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);
}

.result-box-highlight {
  border-color: rgba(32, 220, 255, 0.16);
  box-shadow: 0 16px 34px rgba(5, 10, 20, 0.22);
}

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

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

.result-value-hero {
  font-size: 2rem;
  color: var(--gg-text);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .result-value-hero {
    background: linear-gradient(
      135deg,
      var(--gg-cyan) 0%,
      #8d79ff 52%,
      var(--gg-magenta) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gg-text);
  }
}

.summary-panel,
.warning-panel {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.018)
  );
}

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

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

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

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

.stack-grid {
  display: grid;
  gap: 16px;
}

.info-card,
.info-usage-card {
  height: 100%;
}

.info-card h3,
.info-usage-card h3 {
  margin: 0 0 10px;
}

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

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

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

  .course-grid,
  .course-grid-head {
    grid-template-columns: 1fr;
  }

  .course-grid-head {
    display: none;
  }

  .course-row {
    padding: 16px;
  }

  .course-row .course-grid {
    gap: 10px;
  }

  .points-pill,
  .remove-course {
    width: 100%;
  }

  .remove-course {
    height: 52px;
  }

  .course-toolbar {
    flex-direction: column;
  }
}

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

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

  .button-row > * {
    width: 100%;
  }
}

html.theme-light body .course-builder,
html.light-theme body .course-builder,
html.light body .course-builder,
html[data-theme="light"] body .course-builder,
body.theme-light .course-builder,
body.light-theme .course-builder,
body.light .course-builder,
body[data-theme="light"] .course-builder {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(246, 249, 255, 0.95)
  );
  border-color: rgba(111, 129, 170, 0.18);
  box-shadow:
    0 12px 28px rgba(66, 84, 122, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

html.theme-light body .course-grid-head,
html.light-theme body .course-grid-head,
html.light body .course-grid-head,
html[data-theme="light"] body .course-grid-head,
body.theme-light .course-grid-head,
body.light-theme .course-grid-head,
body.light .course-grid-head,
body[data-theme="light"] .course-grid-head,
html.theme-light body .toolbar-label,
html.light-theme body .toolbar-label,
html.light body .toolbar-label,
html[data-theme="light"] body .toolbar-label,
body.theme-light .toolbar-label,
body.light-theme .toolbar-label,
body.light .toolbar-label,
body[data-theme="light"] .toolbar-label {
  color: #5b6e90;
}

html.theme-light body .course-row,
html.light-theme body .course-row,
html.light body .course-row,
html[data-theme="light"] body .course-row,
body.theme-light .course-row,
body.light-theme .course-row,
body.light .course-row,
body[data-theme="light"] .course-row {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.99),
    rgba(245, 248, 255, 0.95)
  );
  border-color: rgba(111, 129, 170, 0.18);
  box-shadow: 0 10px 24px rgba(66, 84, 122, 0.07);
}

html.theme-light body .course-input,
html.theme-light body .course-select,
html.light-theme body .course-input,
html.light-theme body .course-select,
html.light body .course-input,
html.light body .course-select,
html[data-theme="light"] body .course-input,
html[data-theme="light"] body .course-select,
body.theme-light .course-input,
body.theme-light .course-select,
body.light-theme .course-input,
body.light-theme .course-select,
body.light .course-input,
body.light .course-select,
body[data-theme="light"] .course-input,
body[data-theme="light"] .course-select {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.99),
    rgba(243, 247, 255, 0.96)
  );
  border-color: rgba(111, 129, 170, 0.18);
  color: #24314d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

html.theme-light body .course-input::placeholder,
html.light-theme body .course-input::placeholder,
html.light body .course-input::placeholder,
html[data-theme="light"] body .course-input::placeholder,
body.theme-light .course-input::placeholder,
body.light-theme .course-input::placeholder,
body.light .course-input::placeholder,
body[data-theme="light"] .course-input::placeholder {
  color: #7a8bab;
}

html.theme-light body .course-select,
html.light-theme body .course-select,
html.light body .course-select,
html[data-theme="light"] body .course-select,
body.theme-light .course-select,
body.light-theme .course-select,
body.light .course-select,
body[data-theme="light"] .course-select {
  color-scheme: light;
}

html.theme-light body .course-select option,
html.light-theme body .course-select option,
html.light body .course-select option,
html[data-theme="light"] body .course-select option,
body.theme-light .course-select option,
body.light-theme .course-select option,
body.light .course-select option,
body[data-theme="light"] .course-select option {
  background: #ffffff;
  color: #24314d;
}

html.theme-light body .points-pill,
html.light-theme body .points-pill,
html.light body .points-pill,
html[data-theme="light"] body .points-pill,
body.theme-light .points-pill,
body.light-theme .points-pill,
body.light .points-pill,
body[data-theme="light"] .points-pill {
  background: linear-gradient(
    135deg,
    rgba(32, 220, 255, 0.12),
    rgba(127, 121, 255, 0.12)
  );
  border-color: rgba(55, 191, 236, 0.24);
  color: #24314d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html.theme-light body .remove-course,
html.light-theme body .remove-course,
html.light body .remove-course,
html[data-theme="light"] body .remove-course,
body.theme-light .remove-course,
body.light-theme .remove-course,
body.light .remove-course,
body[data-theme="light"] .remove-course {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(244, 247, 255, 0.94)
  );
  border-color: rgba(111, 129, 170, 0.18);
  color: #24314d;
}

html.theme-light body .remove-course:hover,
html.light-theme body .remove-course:hover,
html.light body .remove-course:hover,
html[data-theme="light"] body .remove-course:hover,
body.theme-light .remove-course:hover,
body.light-theme .remove-course:hover,
body.light .remove-course:hover,
body[data-theme="light"] .remove-course:hover {
  border-color: rgba(255, 111, 174, 0.28);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 1),
    rgba(255, 241, 248, 0.96)
  );
}

html.theme-light body .mini-info-label,
html.light-theme body .mini-info-label,
html.light body .mini-info-label,
html[data-theme="light"] body .mini-info-label,
body.theme-light .mini-info-label,
body.light-theme .mini-info-label,
body.light .mini-info-label,
body[data-theme="light"] .mini-info-label {
  color: #08b8e8;
}

html.theme-light body .toolbar-copy,
html.light-theme body .toolbar-copy,
html.light body .toolbar-copy,
html[data-theme="light"] body .toolbar-copy,
body.theme-light .toolbar-copy,
body.light-theme .toolbar-copy,
body.light .toolbar-copy,
body[data-theme="light"] .toolbar-copy {
  color: #5e6f8f;
}
