/* ==========================================
   CALVEXA — PROFESSIONAL USA DESIGN SYSTEM
   Clean • Modern • Responsive • Accessible
   FIXED: Duplicates removed, design same
========================================== */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --text: #172033;
  --heading: #101a35;
  --muted: #667085;
  --primary: #3155e7;
  --primary-hover: #2444c7;
  --secondary: #7045dc;
  --cyan: #08bfe8;
  --pink: #d946b8;
  --header: #080d29;
  --header-soft: #111a3b;
  --border: #e3e8f1;
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;
  --radius: 12px;
  --shadow: 0 3px 15px rgba(16, 26, 53, 0.045);
  --shadow-hover: 0 10px 28px rgba(16, 26, 53, 0.09);
  --gradient: linear-gradient(110deg, #3155e7, #7045dc);
  --focus: 0 0 0 3px rgba(49, 85, 231, 0.14);
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

::selection {
  color: #101a35;
  background: rgba(8, 191, 232, 0.2);
}

.section-spacing {
  margin-top: 2.5rem;
}

/* HEADER & NAVIGATION */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* FIXED: Logo - single size, no conflict */
.site-header .logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  text-decoration: none;
}

.site-header .logo img {
  display: block;
  width: 180px;
  height: 65px;
  object-fit: contain;
  object-position: left center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.site-header .logo .logo-text {
  display: none;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.main-nav>a,
.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c7d0e5;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav>a:hover,
.nav-drop-btn:hover,
.main-nav>a.active,
.nav-dropdown.open .nav-drop-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  text-decoration: none;
}

.nav-dropdown {
  position: relative;
}

.chev {
  font-size: 0.8em;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 245px;
  padding: 8px;
  background: #111a3b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.2);
  z-index: 1100;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #e5eaf5;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-dropdown-menu a span.desc {
  color: #a1aec9;
  font-size: 0.76rem;
  font-weight: 400;
}

.nav-dropdown-menu a:hover {
  color: #fff;
  background: rgba(49, 85, 231, 0.25);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 1.3rem;
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  padding: 68px 0 72px;
  color: #fff;
  text-align: center;
  background: linear-gradient(125deg, #080d29, #121d49);
}

.hero h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  max-width: 650px;
  margin: 0 auto 25px;
  color: #d0d8eb;
  font-size: 1.05rem;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary,
.btn-secondary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-secondary:hover {
  color: #fff;
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 5px 14px rgba(49, 85, 231, 0.2);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  color: var(--primary);
  background: #fff;
  border-color: #cbd5e8;
}

.btn-outline:hover {
  color: var(--primary-hover);
  background: #f1f4ff;
  border-color: var(--primary);
  text-decoration: none;
}

/* CARDS - FIXED: Only one definition now */
.calculators-section {
  padding: 55px 0;
}

.calculators-section h2,
.info-section h2 {
  margin: 0 0 28px;
  color: var(--heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  align-items: stretch;
}

.card-grid>.card {
  min-width: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 23px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(49, 85, 231, 0.35);
  box-shadow: var(--shadow-hover);
}

.card h3 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 1.12rem;
}

.card p {
  flex: 1;
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 0.94rem;
}

.info-section {
  padding: 48px 0;
  background: #fff;
  border-top: 1px solid var(--border);
}

.info-section h2 {
  text-align: left;
}

.info-section p {
  color: var(--muted);
}

/* CALCULATOR PAGE */
.calculator-page {
  min-height: 60vh;
  padding: 38px 0 60px;
}

.calculator-page h1 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.page-intro {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1rem;
}

.calc-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
  margin-bottom: 28px;
}

.calc-form,
.results-panel,
.edu-content {
  min-width: 0;
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* FORM FIELDS - FIXED: Single definition */
.form-group {
  min-width: 0;
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--heading);
  font-size: 0.91rem;
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 10px 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid #cfd7e6;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #98a2b3;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 21px;
}

.form-actions .btn {
  min-width: 115px;
}

/* PRESET BUTTONS / TABS */
.mode-tabs,
.tip-presets,
.strategy-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
}

.mode-tabs button,
.tip-presets button,
.strategy-tabs button {
  min-height: 39px;
  padding: 8px 14px;
  color: #46536b;
  background: #f4f6fb;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.mode-tabs button:hover,
.tip-presets button:hover,
.strategy-tabs button:hover {
  color: var(--primary);
  background: #eef2ff;
  border-color: var(--primary);
}

.mode-tabs button.active,
.tip-presets button.active,
.strategy-tabs button.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

/* RESULTS - FIXED: Single definition */
.results-panel h2 {
  margin: 0 0 18px;
  color: var(--heading);
  font-size: 1.3rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.result-item.highlight {
  background: #eef2ff;
  border-color: #dce4ff;
}

.result-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-value {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}

.result-item span {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 5px;
}

.result-item strong {
  display: block;
  color: var(--heading);
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.note-box {
  margin-top: 18px;
  padding: 13px 15px;
  color: #475467;
  background: #f1f5ff;
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
}

.note-box a {
  font-weight: 650;
}

.warning-box {
  margin-top: 13px;
  padding: 13px 15px;
  color: #991b1b;
  background: #fff1f2;
  border-left: 4px solid var(--danger);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
}

.error-msg {
  display: block;
  margin-top: 5px;
  color: var(--danger);
  font-size: 0.82rem;
}

.input-error {
  border-color: var(--danger) !important;
  background: #fffafa !important;
}

.result-note,
.calculator-message,
.field-hint {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: .88rem;
}

.calculator-message {
  color: var(--danger);
}

/* TABLES */
.amortization-section {
  margin-bottom: 28px;
}

.table-wrapper {
  max-width: 100%;
  max-height: 430px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.amort-table,
.bracket-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
  font-variant-numeric: tabular-nums;
}

.amort-table th,
.amort-table td,
.bracket-table th,
.bracket-table td {
  padding: 11px 13px;
  text-align: right;
  border-bottom: 1px solid #edf0f5;
  white-space: nowrap;
}

.amort-table th:first-child,
.amort-table td:first-child,
.bracket-table th:first-child,
.bracket-table td:first-child {
  text-align: left;
}

.amort-table thead,
.bracket-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #fff;
  background: var(--header-soft);
}

.amort-table tbody tr:hover,
.bracket-table tbody tr:hover {
  background: #f5f7ff;
}

/* CHARTS & PROGRESS */
.bar-chart {
  display: flex;
  width: 100%;
  height: 28px;
  overflow: hidden;
  background: #e9edf5;
  border-radius: 8px;
}

.bar-segment {
  height: 100%;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 18px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.85rem;
}

.legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 3px;
}

.progress-wrap {
  width: 100%;
  height: 12px;
  margin-top: 14px;
  overflow: hidden;
  background: #e8edf5;
  border-radius: 999px;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: var(--gradient);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.progress-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.87rem;
}

.chart-container {
  max-width: 100%;
  margin-top: 15px;
  padding: 13px;
  overflow-x: auto;
  background: #f8faff;
  border: 1px solid #edf0f6;
  border-radius: 10px;
}

.chart-container canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* DEBT LIST */
.debt-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 17px;
}

.debt-card {
  position: relative;
  padding: 16px;
  background: #f8faff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.debt-card .remove-debt {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 4px 8px;
  color: var(--danger);
  background: transparent;
  border: none;
  font-size: 1.2rem;
}

/* EDUCATIONAL CONTENT & FAQ */
.edu-content {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 24px;
  padding: 25px;
  background: #fff;
  border: 1px solid #e3e8f1;
  border-radius: 12px;
  box-shadow: var(--shadow);
  line-height: 1.75;
}

.edu-content h2 {
  margin: 0 0 14px;
  color: var(--heading);
  font-size: 1.4rem;
  line-height: 1.4;
}

.edu-content h3 {
  margin: 23px 0 8px;
  color: #263b75;
  font-size: 1.05rem;
  line-height: 1.45;
}

.edu-content p,
.edu-content li {
  color: #596579;
}

.edu-content ul,
.edu-content ol {
  padding-left: 23px;
}

.edu-content li {
  margin-bottom: 6px;
}

.edu-content a {
  font-weight: 650;
}

.edu-content img,
.edu-content table {
  max-width: 100%;
}

.edu-content table {
  display: block;
  overflow-x: auto;
}

.faq-section h3 {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.faq-section h3:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.edu-content .faq-section {
  display: block;
  width: 100%;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e3e8f1;
}

.edu-content .faq-section h2 {
  margin: 0 0 20px;
  color: #101a35;
  font-size: 1.45rem;
  line-height: 1.4;
}

.edu-content .faq-section h3 {
  margin: 0;
  padding: 15px 18px 8px;
  color: #172033;
  font-size: 1rem;
  line-height: 1.5;
}

.edu-content .faq-section p {
  margin: 0;
  padding: 0 18px 16px;
  color: #667085;
  font-size: 0.94rem;
  line-height: 1.7;
}

.edu-content .faq-section .faq-item {
  margin-bottom: 12px;
  overflow: hidden;
  background: #f8faff;
  border: 1px solid #e3e8f1;
  border-radius: 10px;
}

.edu-content .faq-section .faq-item h3 {
  padding: 15px 18px 7px;
}

.edu-content .faq-section .faq-item p {
  padding: 0 18px 16px;
}

.edu-content .faq-section details {
  margin-bottom: 10px;
  padding: 0;
  background: #f8faff;
  border: 1px solid #e3e8f1;
  border-radius: 10px;
}

.edu-content .faq-section summary {
  padding: 15px 18px;
  color: #172033;
  font-weight: 700;
  cursor: pointer;
  list-style-position: inside;
}

.edu-content .faq-section details p {
  padding: 0 18px 16px;
}

.edu-content .faq-section details[open] {
  border-color: #3155e7;
  background: #fff;
}

/* FOOTER */
.site-footer {
  padding: 28px 0;
  color: #b9c4db;
  background: var(--header);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.89rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 19px;
}

.footer-nav a {
  color: #cbd5e8;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #fff;
}

/* CALCULATOR SEARCH */
.calculator-search {
  width: 100%;
  max-width: 700px;
  margin: 28px auto 0;
  position: relative;
}

.calculator-search form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  padding: 7px 10px;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.calculator-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 13px 12px;
  font-size: 16px;
  color: #1e293b;
  background: transparent;
}

.calculator-search input::placeholder {
  color: #94a3b8;
}

#clear-calculator-search {
  border: none;
  background: #f1f5f9;
  color: #475569;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 14px;
}

#clear-calculator-search:hover {
  background: #e2e8f0;
}

.calculator-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.calculator-search-results.active {
  display: block;
}

.search-result-item {
  display: block;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
  color: #1e293b;
}

.search-result-item:hover,
.search-result-item:focus {
  background: #f1f5f9;
  outline: none;
}

.search-result-item strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: #0f172a;
}

.search-result-item span {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

/* EDUCATION SECTION */
.education-section {
  padding: 55px 0;
  background: #f5f7fb;
}

.education-section>.container>h2 {
  color: var(--heading);
  margin: 0 0 12px;
}

.education-section>.container>p {
  max-width: 850px;
  color: var(--muted);
  margin: 0 0 26px;
  line-height: 1.7;
}

.calculator-group-title {
  margin: 34px 0 16px;
  color: var(--heading);
  font-size: 1.25rem;
}

.education-section .card-grid {
  margin-bottom: 25px;
}

.education-section .card {
  height: 100%;
}

.breadcrumb {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: .9rem;
}

.breadcrumb a {
  color: var(--primary);
}

.calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.weighted-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

/* SCIENTIFIC */
.scientific-calculator>label,
.scientific-mode label {
  display: block;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 7px;
}

.scientific-calculator #sci-display {
  width: 100%;
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 1.15rem;
  background: #fff;
  color: var(--heading);
}

.scientific-mode {
  margin: 14px 0;
}

.scientific-mode select {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.scientific-keys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.scientific-keys button {
  min-height: 43px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8faff;
  color: var(--heading);
  font-weight: 700;
}

.scientific-keys button:hover {
  background: #e9efff;
}

.scientific-keys .sci-clear {
  background: #fff1f2;
  color: #be123c;
}

.scientific-keys .sci-equals {
  grid-column: span 2;
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

#avg-values {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
}

/* TRUST PAGES */
.trust-main {
  padding: 55px 0 75px;
}

.trust-wrap {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
}

.trust-hero,
.trust-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  box-shadow: var(--shadow, 0 5px 20px rgba(15, 23, 42, 0.05));
}

.trust-hero {
  padding: 38px;
  margin-bottom: 24px;
}

.trust-eyebrow {
  color: var(--primary, #2563eb);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 13px;
}

.trust-hero h1 {
  color: var(--heading, #0f172a);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.2;
  margin: 12px 0;
}

.trust-hero p,
.trust-card p,
.trust-card li {
  color: var(--text, #475569);
  line-height: 1.8;
}

.trust-card {
  padding: 28px 32px;
  margin-bottom: 20px;
}

.trust-card h2 {
  color: var(--heading, #0f172a);
  font-size: 22px;
  margin: 0 0 14px;
}

.trust-card ul {
  padding-left: 22px;
}

.trust-card a {
  color: var(--primary, #2563eb);
  text-decoration: underline;
}

.trust-updated {
  color: #64748b;
  font-size: 14px;
  margin-top: 24px;
}

.trust-footer {
  padding: 24px 0;
}

/* GPA / CGPA / GRADE - kept as-is, design same */
.gpa-page {
  max-width: 1100px;
  width: 92%;
  margin: 50px auto;
}

.gpa-intro {
  text-align: center;
  margin-bottom: 35px;
}

.gpa-intro h1 {
  font-size: 36px;
  color: #0b1f33;
  margin-bottom: 12px;
}

.gpa-intro p {
  max-width: 650px;
  margin: 0 auto;
  color: #64748b;
  line-height: 1.7;
}

.gpa-calculator {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 25px;
  align-items: start;
}

.gpa-form,
.gpa-result {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.05);
}

.gpa-form h2,
.gpa-result h2 {
  color: #0b1f33;
  font-size: 21px;
  margin-bottom: 22px;
}

.course-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 35px;
  gap: 12px;
  align-items: end;
  padding: 15px 0;
  border-bottom: 1px solid #e2e8f0;
}

.remove-course {
  width: 35px;
  height: 42px;
  border: none;
  border-radius: 7px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 22px;
  cursor: pointer;
}

.add-course-btn {
  margin-top: 18px;
  padding: 10px 15px;
  border: 1px solid #2563eb;
  border-radius: 7px;
  background: #fff;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
}

.gpa-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.calculate-btn,
.reset-btn {
  min-height: 45px;
  padding: 0 20px;
  border: none;
  border-radius: 7px;
  font-weight: 600;
  cursor: pointer;
}

.calculate-btn {
  flex: 1;
  background: #2563eb;
  color: #fff;
}

.reset-btn {
  background: #e2e8f0;
  color: #334155;
}

.calculate-btn:hover {
  background: #1d4ed8;
}

.reset-btn:hover {
  background: #cbd5e1;
}

.gpa-error {
  color: #dc2626;
  font-size: 14px;
  margin-top: 12px;
}

.gpa-score {
  text-align: center;
  padding: 25px 10px;
  border-radius: 12px;
  background: #eff6ff;
}

.gpa-score span {
  display: block;
  font-size: 48px;
  font-weight: 700;
  color: #2563eb;
}

.gpa-score small {
  color: #475569;
  font-size: 14px;
}

.gpa-summary {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.gpa-summary div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.gpa-summary span {
  color: #64748b;
  font-size: 14px;
}

.gpa-summary strong {
  color: #0f172a;
}

.gpa-note {
  margin-top: 20px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.gpa-info {
  margin-top: 35px;
  padding: 25px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  line-height: 1.7;
}

.gpa-info h2,
.gpa-info h3 {
  color: #0b1f33;
  margin-bottom: 12px;
}

.gpa-info p {
  color: #475569;
  margin-bottom: 15px;
}

/* CGPA */
.cgpa-page {
  color: #1e293b;
  padding-bottom: 60px;
}

.cgpa-container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.cgpa-hero {
  background: #f1f5f9;
  padding: 45px 0;
  margin-bottom: 35px;
}

.cgpa-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 14px;
  margin-bottom: 18px;
  color: #64748b;
}

.cgpa-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.cgpa-breadcrumb a:hover {
  text-decoration: underline;
}

.cgpa-hero h1 {
  font-size: clamp(30px, 5vw, 42px);
  color: #0f172a;
  margin: 0 0 12px;
}

.cgpa-hero p {
  max-width: 650px;
  line-height: 1.7;
  color: #475569;
  margin: 0;
}

.cgpa-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 35px;
}

.cgpa-calculator-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.05);
}

.cgpa-card-heading {
  margin-bottom: 28px;
}

.cgpa-card-heading h2 {
  font-size: 25px;
  color: #0f172a;
  margin: 0 0 8px;
}

.cgpa-card-heading p {
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

.cgpa-previous-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 30px;
}

.cgpa-previous-section h3,
.cgpa-courses-section h3 {
  font-size: 19px;
  color: #0f172a;
  margin: 0 0 18px;
}

.cgpa-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.cgpa-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cgpa-field label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.cgpa-field input,
.cgpa-course-row input,
.cgpa-course-row select {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 15px;
  color: #0f172a;
  background: #fff;
  outline: none;
}

.cgpa-field input:focus,
.cgpa-course-row input:focus,
.cgpa-course-row select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cgpa-field small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.cgpa-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.cgpa-section-heading h3 {
  margin-bottom: 5px;
}

.cgpa-section-heading p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.cgpa-add-btn {
  background: #eaf2ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 10px 15px;
  border-radius: 7px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cgpa-add-btn:hover {
  background: #dbeafe;
}

.cgpa-course-header,
.cgpa-course-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 75px;
  align-items: center;
  gap: 12px;
}

.cgpa-course-header {
  padding: 12px 10px;
  background: #f1f5f9;
  border-radius: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.cgpa-course-row {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.cgpa-remove-btn {
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 6px;
  padding: 10px 8px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}

.cgpa-remove-btn:hover {
  background: #fecaca;
}

.cgpa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cgpa-calculate-btn,
.cgpa-reset-btn {
  border: none;
  border-radius: 7px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.cgpa-calculate-btn {
  background: #2563eb;
  color: #fff;
}

.cgpa-calculate-btn:hover {
  background: #1d4ed8;
}

.cgpa-reset-btn {
  background: #e2e8f0;
  color: #334155;
}

.cgpa-reset-btn:hover {
  background: #cbd5e1;
}

.cgpa-error {
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 7px;
  padding: 0;
  margin-top: 18px;
  font-size: 14px;
}

.cgpa-error:not(:empty) {
  padding: 12px;
}

.cgpa-results {
  margin-top: 30px;
  padding: 25px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.cgpa-results h3 {
  margin: 0 0 20px;
  color: #0f172a;
  font-size: 21px;
}

.cgpa-result-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  padding: 25px 15px;
  border-radius: 10px;
}

.cgpa-result-main span {
  color: #475569;
  font-weight: 600;
}

.cgpa-result-main strong {
  color: #1d4ed8;
  font-size: 48px;
  margin: 8px 0;
}

.cgpa-result-main small {
  color: #64748b;
}

.cgpa-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.cgpa-result-item {
  background: #fff;
  border-radius: 8px;
  padding: 18px 12px;
  text-align: center;
}

.cgpa-result-item span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 8px;
}

.cgpa-result-item strong {
  font-size: 20px;
  color: #0f172a;
}

.cgpa-result-note {
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
  margin: 18px 0 0;
}

.cgpa-content {
  max-width: 850px;
  line-height: 1.8;
}

.cgpa-content h2 {
  color: #0f172a;
  font-size: 23px;
  margin: 28px 0 12px;
}

.cgpa-content p,
.cgpa-content li {
  color: #475569;
}

.cgpa-content ol {
  padding-left: 22px;
}

.cgpa-formula {
  background: #f1f5f9;
  border-left: 4px solid #2563eb;
  border-radius: 5px;
  padding: 16px;
  margin: 18px 0;
  font-weight: 700;
  color: #1e293b;
}

.cgpa-faq details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 16px;
  background: #fff;
}

.cgpa-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #1e293b;
}

.cgpa-faq details p {
  margin-bottom: 0;
  font-size: 14px;
}

/* GRADE */
.grade-page {
  color: #1e293b;
  padding-bottom: 60px;
}

.grade-container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.grade-hero {
  background: #f1f5f9;
  padding: 45px 0;
  margin-bottom: 35px;
}

.grade-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 14px;
  margin-bottom: 18px;
  color: #64748b;
}

.grade-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.grade-breadcrumb a:hover {
  text-decoration: underline;
}

.grade-hero h1 {
  font-size: clamp(30px, 5vw, 42px);
  color: #0f172a;
  margin: 0 0 12px;
}

.grade-hero p {
  max-width: 650px;
  line-height: 1.7;
  color: #475569;
  margin: 0;
}

.grade-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 35px;
}

.grade-calculator-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.05);
}

.grade-card-heading {
  margin-bottom: 28px;
}

.grade-card-heading h2 {
  font-size: 25px;
  color: #0f172a;
  margin: 0 0 8px;
}

.grade-card-heading p {
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

.grade-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grade-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grade-field label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.grade-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 15px;
  color: #0f172a;
  background: #fff;
  outline: none;
}

.grade-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.grade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

.grade-calculate-btn,
.grade-reset-btn {
  border: none;
  border-radius: 7px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.grade-calculate-btn {
  background: #2563eb;
  color: #fff;
}

.grade-calculate-btn:hover {
  background: #1d4ed8;
}

.grade-reset-btn {
  background: #e2e8f0;
  color: #334155;
}

.grade-reset-btn:hover {
  background: #cbd5e1;
}

.grade-error {
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 7px;
  margin-top: 18px;
  font-size: 14px;
}

.grade-error:not(:empty) {
  padding: 12px;
}

.grade-results {
  margin-top: 30px;
  padding: 25px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.grade-results h3 {
  margin: 0 0 20px;
  color: #0f172a;
  font-size: 21px;
}

.grade-result-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  padding: 25px 15px;
  border-radius: 10px;
}

.grade-result-main span {
  color: #475569;
  font-weight: 600;
}

.grade-result-main strong {
  color: #1d4ed8;
  font-size: 55px;
  margin: 8px 0;
}

.grade-result-main small {
  color: #64748b;
}

.grade-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.grade-result-item {
  background: #fff;
  border-radius: 8px;
  padding: 18px 12px;
  text-align: center;
}

.grade-result-item span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 8px;
}

.grade-result-item strong {
  font-size: 20px;
  color: #0f172a;
}

.grade-content {
  max-width: 850px;
  line-height: 1.8;
}

.grade-content h2 {
  color: #0f172a;
  font-size: 23px;
  margin: 28px 0 12px;
}

.grade-content p,
.grade-content li {
  color: #475569;
}

.grade-content ol {
  padding-left: 22px;
}

.grade-formula {
  background: #f1f5f9;
  border-left: 4px solid #2563eb;
  border-radius: 5px;
  padding: 16px;
  margin: 18px 0;
  font-weight: 700;
  color: #1e293b;
}

.grade-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.grade-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  min-width: 400px;
}

.grade-table th,
.grade-table td {
  padding: 13px 15px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.grade-table th {
  background: #f1f5f9;
  color: #0f172a;
}

.grade-table td {
  color: #475569;
}

.grade-faq details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 16px;
  background: #fff;
}

.grade-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #1e293b;
}

.grade-faq details p {
  margin-bottom: 0;
  font-size: 14px;
}

/* ACCESSIBILITY */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(8, 191, 232, 0.5);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* RESPONSIVE */
@media (max-width: 1050px) {
  .header-inner {
    gap: 10px;
  }

  .main-nav>a,
  .nav-drop-btn {
    padding: 9px 8px;
    font-size: 0.82rem;
  }
}

@media (max-width: 960px) {
  .header-inner {
    min-height: 68px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 68px);
    padding: 12px 20px 18px;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--header);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.18);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav>a,
  .nav-drop-btn {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 12px 13px;
    text-align: left;
    font-size: 0.92rem;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    min-width: 0;
    margin: 4px 0 7px;
    background: var(--header-soft);
    box-shadow: none;
  }
}

@media (max-width: 800px) {
  .gpa-calculator {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding: 52px 0 58px;
  }

  .calculators-section {
    padding: 42px 0;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }

  .calc-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .calculator-page {
    padding: 30px 0 45px;
  }

  .calc-form,
  .results-panel,
  .edu-content {
    padding: 21px;
  }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header .logo img {
    width: 145px;
    height: 52px;
  }

  .edu-content {
    padding: 20px;
  }
}

@media (max-width: 700px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .weighted-row {
    grid-template-columns: 1fr 1fr;
  }

  .calc-layout {
    grid-template-columns: 1fr;
  }

  .cgpa-calculator-card,
  .grade-calculator-card {
    padding: 20px 15px;
  }

  .cgpa-input-grid,
  .grade-input-grid {
    grid-template-columns: 1fr;
  }

  .cgpa-course-header {
    display: none;
  }

  .cgpa-course-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px 0;
  }

  .cgpa-course-row input:first-child {
    grid-column: 1 / -1;
  }

  .cgpa-course-row .cgpa-remove-btn {
    grid-column: 1 / -1;
  }

  .cgpa-section-heading {
    align-items: flex-start;
  }

  .cgpa-result-grid,
  .grade-result-grid {
    grid-template-columns: 1fr;
  }

  .cgpa-actions,
  .grade-actions {
    flex-direction: column;
  }

  .cgpa-calculate-btn,
  .cgpa-reset-btn,
  .grade-calculate-btn,
  .grade-reset-btn {
    width: 100%;
  }

  .cgpa-hero,
  .grade-hero {
    padding: 30px 0;
  }
}

@media (max-width: 640px) {
  .trust-main {
    padding: 28px 0 45px;
  }

  .trust-hero {
    padding: 25px 22px;
  }

  .trust-card {
    padding: 22px;
  }

  .trust-card h2 {
    font-size: 20px;
  }
}

@media (max-width: 600px) {
  .gpa-page {
    margin: 30px auto;
  }

  .gpa-intro h1 {
    font-size: 29px;
  }

  .gpa-form,
  .gpa-result {
    padding: 18px;
  }

  .course-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .remove-course {
    width: 100%;
  }

  .gpa-actions {
    flex-direction: column;
  }

  .calculator-search {
    margin-top: 20px;
  }

  .calculator-search form {
    gap: 5px;
    padding: 5px;
  }

  .calculator-search input {
    font-size: 14px;
    padding: 11px 8px;
  }

  #clear-calculator-search {
    padding: 8px;
    font-size: 13px;
  }

  .education-section {
    padding: 35px 0;
  }

  .calculator-group-title {
    font-size: 19px;
  }
}

@media (max-width: 520px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .card-grid>.card {
    padding: 18px;
  }

  .calc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .edu-content {
    padding: 16px;
  }

  .edu-content .faq-section h2 {
    font-size: 1.25rem;
  }

  .edu-content .faq-section h3 {
    padding: 13px 12px 7px;
    font-size: 0.94rem;
  }

  .edu-content .faq-section p {
    padding: 0 12px 14px;
    font-size: 0.9rem;
  }

  .edu-content .faq-section .faq-item h3 {
    padding: 13px 12px 7px;
  }

  .edu-content .faq-section .faq-item p {
    padding: 0 12px 14px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .header-inner {
    min-height: 62px;
  }

  .site-header .logo img {
    width: 145px;
    height: 52px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .main-nav {
    max-height: calc(100vh - 62px);
    padding: 10px 15px 16px;
  }

  .hero {
    padding: 42px 0 47px;
  }

  .hero h1 {
    font-size: 1.95rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .calculators-section {
    padding: 35px 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .card {
    padding: 19px;
  }

  .calculator-page {
    padding: 25px 0 38px;
  }

  .calculator-page h1 {
    font-size: 1.75rem;
  }

  .page-intro {
    font-size: 0.94rem;
  }

  .calc-form,
  .results-panel,
  .edu-content {
    padding: 16px;
    border-radius: 10px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .mode-tabs,
  .tip-presets,
  .strategy-tabs {
    gap: 7px;
  }

  .mode-tabs button,
  .tip-presets button,
  .strategy-tabs button {
    flex: 1 1 auto;
    min-width: 58px;
    padding: 8px 10px;
    font-size: 0.81rem;
  }

  .result-item {
    gap: 8px;
    padding: 11px 9px;
  }

  .result-label {
    font-size: 0.82rem;
  }

  .result-value {
    font-size: 0.9rem;
  }

  .edu-content h2 {
    font-size: 1.23rem;
  }

  .edu-content h3 {
    font-size: 0.99rem;
  }

  .table-wrapper {
    max-height: 350px;
  }

  .footer-nav {
    gap: 10px 15px;
  }
}

@media (max-width: 420px) {
  .weighted-row {
    grid-template-columns: 1fr;
  }

  .scientific-keys {
    gap: 6px;
  }

  .scientific-keys button {
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .site-header .logo img {
    width: 125px;
    height: 45px;
  }

  .calc-form,
  .results-panel,
  .edu-content {
    padding: 13px;
  }

  .result-item {
    flex-wrap: wrap;
  }

  .tip-presets button,
  .mode-tabs button,
  .strategy-tabs button {
    min-width: 52px;
    padding: 7px 8px;
    font-size: 0.77rem;
  }

  .edu-content {
    padding: 13px;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.scientific-keys button {
  min-height: 43px;
}
/* ==========================================
   CALVEXA — MOBILE FRIENDLY FIX
   Paste at END of styles.css - Design Same
========================================== */

/* FIX 1: GPA / CGPA Course Row - Mobile pe tootna band */
@media (max-width: 600px) {
  .course-row {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 16px 12px;
    background: #f8faff;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
  }
  .course-row .form-group {
    margin-bottom: 0;
  }
  .remove-course {
    width: 100% !important;
    height: 44px !important;
    font-size: 14px;
  }
  /* Delete button pe text dikhane ke liye */
  .remove-course::after {
    content: " Remove";
    font-size: 14px;
    font-weight: 600;
  }

  .cgpa-course-row {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 14px 10px;
    background: #f8faff;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  .cgpa-course-row input,
  .cgpa-course-row select {
    min-height: 44px;
  }
  .cgpa-remove-btn {
    width: 100%;
    min-height: 44px;
  }
}

/* FIX 2: Table - Mobile pe katna band, scroll ka hint milega */
.table-wrapper,
.grade-table-wrapper {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.table-wrapper::after {
  content: "";
  display: block;
  height: 4px;
}
/* Table ke neeche halki si shadow taake user ko pata chale aage bhi hai */
.amort-table th,
.amort-table td,
.bracket-table th,
.bracket-table td {
  min-width: 90px;
}
.amort-table th:first-child,
.amort-table td:first-child {
  min-width: 60px;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}
.amort-table thead th:first-child {
  background: var(--header-soft);
  color: #fff;
}

/* FIX 3: Scientific + Preset Buttons - Ungli se dabana aasan */
@media (max-width: 480px) {
  .scientific-keys {
    gap: 8px;
  }
  .scientific-keys button {
    min-height: 48px !important;
    font-size: 16px;
  }
  .mode-tabs button,
  .tip-presets button,
  .strategy-tabs button {
    min-height: 44px !important;
    min-width: 64px;
    font-size: 14px;
  }
  /* Form ke saare input bhi 44px, taake zoom na ho iPhone pe */
  .form-group input,
  .form-group select,
  .form-group textarea,
  .cgpa-field input,
  .grade-field input {
    min-height: 44px;
    font-size: 16px !important;
  }
  /* Card ke button poori width */
  .card .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* ==========================================
   CALVEXA — MOBILE FRIENDLY FIX
   Paste at END of styles.css - Design Same
========================================== */

/* FIX 1: GPA / CGPA Course Row - Mobile pe tootna band */
@media (max-width: 600px) {
  .course-row {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 16px 12px;
    background: #f8faff;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
  }
  .course-row .form-group {
    margin-bottom: 0;
  }
  .remove-course {
    width: 100% !important;
    height: 44px !important;
    font-size: 14px;
  }
  /* Delete button pe text dikhane ke liye */
  .remove-course::after {
    content: " Remove";
    font-size: 14px;
    font-weight: 600;
  }

  .cgpa-course-row {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 14px 10px;
    background: #f8faff;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  .cgpa-course-row input,
  .cgpa-course-row select {
    min-height: 44px;
  }
  .cgpa-remove-btn {
    width: 100%;
    min-height: 44px;
  }
}

/* FIX 2: Table - Mobile pe katna band, scroll ka hint milega */
.table-wrapper,
.grade-table-wrapper {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.table-wrapper::after {
  content: "";
  display: block;
  height: 4px;
}
/* Table ke neeche halki si shadow taake user ko pata chale aage bhi hai */
.amort-table th,
.amort-table td,
.bracket-table th,
.bracket-table td {
  min-width: 90px;
}
.amort-table th:first-child,
.amort-table td:first-child {
  min-width: 60px;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}
.amort-table thead th:first-child {
  background: var(--header-soft);
  color: #fff;
}

/* FIX 3: Scientific + Preset Buttons - Ungli se dabana aasan */
@media (max-width: 480px) {
  .scientific-keys {
    gap: 8px;
  }
  .scientific-keys button {
    min-height: 48px !important;
    font-size: 16px;
  }
  .mode-tabs button,
  .tip-presets button,
  .strategy-tabs button {
    min-height: 44px !important;
    min-width: 64px;
    font-size: 14px;
  }
  /* Form ke saare input bhi 44px, taake zoom na ho iPhone pe */
  .form-group input,
  .form-group select,
  .form-group textarea,
  .cgpa-field input,
  .grade-field input {
    min-height: 44px;
    font-size: 16px !important;
  }
  /* Card ke button poori width */
  .card .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* FIX 4: Extra Small Mobile 360px - Logo + Search */
@media (max-width: 360px) {
  .site-header .logo img {
    width: 125px !important;
    height: 45px !important;
  }
  .calculator-search form {
    flex-direction: column;
    align-items: stretch;
  }
  #clear-calculator-search {
    width: 100%;
    min-height: 40px;
  }
}