/* ==========================================================================
   CGPAConvert - Production Stylesheet (HTML5 / CSS3 / Vanilla JS)
   Design System: Modern Academic SaaS (Blue, White & Subtle Purple Palette)
   ========================================================================== */

:root {
  /* Light Mode Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-elevated: #ffffff;
  --bg-subtle: #eff6ff;
  --bg-accent-soft: #f5f3ff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  /* Brand Colors (Blue & Subtle Purple) */
  --brand-blue: #2563eb;
  --brand-blue-hover: #1d4ed8;
  --brand-indigo: #4f46e5;
  --brand-purple: #7c3aed;
  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  --hero-gradient: radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.06) 45%, transparent 75%);
  
  /* Semantic Colors */
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --success-border: #a7f3d0;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --warning-border: #fde68a;
  --error-bg: #fef2f2;
  --error-text: #b91c1c;
  --error-border: #fecaca;

  /* Shadows & Radius */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(37, 99, 235, 0.10), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0b1120;
  --bg-secondary: #111827;
  --bg-elevated: #1e293b;
  --bg-subtle: rgba(37, 99, 235, 0.14);
  --bg-accent-soft: rgba(124, 58, 237, 0.14);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --border-focus: #60a5fa;
  
  --brand-blue: #3b82f6;
  --brand-blue-hover: #60a5fa;
  --brand-indigo: #6366f1;
  --brand-purple: #8b5cf6;
  --hero-gradient: radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.12) 45%, transparent 75%);

  --success-bg: rgba(16, 185, 129, 0.15);
  --success-text: #6ee7b7;
  --success-border: rgba(16, 185, 129, 0.35);
  --warning-bg: rgba(245, 158, 11, 0.14);
  --warning-text: #fcd34d;
  --warning-border: rgba(245, 158, 11, 0.35);
  --error-bg: rgba(239, 68, 68, 0.15);
  --error-text: #fca5a5;
  --error-border: rgba(239, 68, 68, 0.35);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand-purple);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Focus Accessibility */
:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--brand-blue);
  color: #ffffff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Sticky Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition), border-color var(--transition);
}

[data-theme="dark"] .site-header {
  background-color: rgba(17, 24, 39, 0.88);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-logo:hover {
  color: var(--text-primary);
}

.brand-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.brand-badge {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.35rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
  background: transparent;
  border: none;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-blue);
  background-color: var(--bg-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle-btn,
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle-btn:hover,
.mobile-menu-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background-color: var(--bg-subtle);
}

.mobile-menu-btn {
  display: none;
}

/* Breadcrumbs */
.breadcrumb-bar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 0;
  font-size: 0.875rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-list li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-list a {
  color: var(--text-secondary);
  font-weight: 500;
}

.breadcrumb-list a:hover {
  color: var(--brand-blue);
}

/* Hero Section */
.hero-section {
  background-image: var(--hero-gradient);
  padding: 3.25rem 0 4rem;
  border-bottom: 1px solid var(--border-color);
}

.hero-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.25rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background-color: var(--bg-subtle);
  color: var(--brand-blue);
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero-title {
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

/* Calculator Card */
.calculator-card {
  max-width: 780px;
  margin: 0 auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
}

.calculator-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--brand-gradient);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-hint {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.form-control:hover {
  border-color: var(--text-muted);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-blue);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-control.input-error {
  border-color: #ef4444;
  background-color: var(--error-bg);
}

.hidden-field {
  display: none !important;
}

/* Quick Preset Chips */
.quick-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.preset-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.preset-chip {
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.preset-chip:hover {
  background-color: var(--bg-subtle);
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

/* Error & Notice Banner */
.alert-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1rem;
}

.alert-error {
  background-color: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.alert-warning {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.alert-success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-size: 0.975rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  flex: 1 1 200px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.36);
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* Result Display Panel */
.result-panel {
  margin-top: 1.75rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--bg-accent-soft) 100%);
  border: 1px solid rgba(79, 70, 229, 0.22);
  transition: all var(--transition);
}

.result-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-color);
}

.result-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-indigo);
}

.result-value {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}

.detail-item {
  background-color: var(--bg-secondary);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.detail-item-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-item-val {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.2rem;
  word-break: break-word;
}

.institution-note {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  border-left: 4px solid var(--brand-purple);
}

/* Content Sections */
.content-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.content-section:nth-child(even) {
  background-color: var(--bg-secondary);
}

.section-header {
  margin-bottom: 2rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-blue);
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.prose p {
  margin-bottom: 1.1rem;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.75rem 0 0.65rem;
}

.prose ul, .prose ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text-secondary);
}

.prose li {
  margin-bottom: 0.5rem;
}

/* Formula Cards */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.formula-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.formula-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.formula-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background-color: var(--bg-subtle);
  color: var(--brand-blue);
  margin-bottom: 0.75rem;
}

.formula-math {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-primary);
  border: 1px dashed var(--border-focus);
  border-radius: var(--radius-sm);
  color: var(--brand-indigo);
  margin: 0.85rem 0;
}

/* Conversion Table */
.table-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-secondary);
}

.conversion-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.conversion-table th,
.conversion-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.conversion-table th {
  background-color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.conversion-table tbody tr:hover {
  background-color: var(--bg-subtle);
}

.conversion-table tbody tr:last-child td {
  border-bottom: none;
}

/* Step Cards & Benefits Grid */
.steps-grid,
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.step-card,
.benefit-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.benefit-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background-color: var(--bg-subtle);
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.faq-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item.open {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

.faq-trigger {
  width: 100%;
  text-align: left;
  padding: 1.15rem 1.35rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}

.faq-trigger:hover {
  color: var(--brand-blue);
}

.faq-icon {
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--brand-blue);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  display: none;
  padding: 0 1.35rem 1.25rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.faq-item.open .faq-content {
  display: block;
}

/* Inner Page Header & Cards */
.page-hero {
  background-image: var(--hero-gradient);
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.page-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  margin: 2.5rem 0;
}

/* Social Media Handles */
.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.15rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-btn:hover {
  background: var(--brand-gradient);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.social-handles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.social-handle-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all var(--transition);
}

.social-handle-card:hover {
  border-color: var(--brand-blue);
  background-color: var(--bg-subtle);
  transform: translateY(-2px);
}

.social-handle-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-handle-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.social-handle-platform {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.social-handle-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a,
.footer-links button {
  color: var(--text-secondary);
  font-size: 0.925rem;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--brand-blue);
}

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-md);
  }

  .nav-menu.mobile-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .calc-grid {
    grid-template-columns: 1fr;
  }

  .calculator-card,
  .page-card {
    padding: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
