/* ============================================================
   GPANerd Design System
   Approved: Feb 2026
   Font: Outfit (Google Fonts)
   Colour: Clover green (#16A34A) primary
   ============================================================ */

/* ============================================================
   IMPORTS & TOKENS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Green scale */
  --accent:         #16A34A;   /* Clover — primary */
  --accent-bright:  #22C55E;   /* Bright — hover/highlight */
  --accent-dark:    #14532D;   /* Deep Forest — headings */
  --accent-light:   #DCFCE7;   /* Mint — borders, accents */
  --accent-whisper: #F0FDF4;   /* Whisper — page background */
  --accent-glow:    #BBF7D0;   /* Glow — dashed borders, subtle fills */

  /* Backgrounds */
  --bg:    #F0FDF4;
  --white: #FFFFFF;

  /* Text */
  --text-dark:  #14532D;
  --text-body:  #1F2937;
  --text-mid:   #4B5563;
  --text-light: #6B7280;
  --text-muted: #9CA3AF;

  /* Borders */
  --border:       #E5E7EB;
  --border-green: #DCFCE7;

  /* Error */
  --error:       #EF4444;
  --error-light: #FEE2E2;

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-pill: 50px;

  /* Font */
  --font: 'Outfit', sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(22, 163, 74, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 32px rgba(22, 163, 74, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition: 0.15s ease;
  --transition-slow: 0.25s ease;

  /* Content max-width */
  --max-width: 1100px;
  --content-width: 720px;

  /* Mobile breakpoint */
  --bp-mobile: 768px;
}

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   BASE
   ============================================================ */

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--accent-bright);
}

ul, ol {
  list-style: none;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0 0 var(--radius-md) 0;
  transition: top 0.1s;
}

.skip-link:focus {
  top: 0;
}

/* Visible focus for keyboard users */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Visually hidden (screen reader only) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

p {
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* Accent highlight on headings */
.highlight {
  color: var(--accent);
}

/* SEO content prose */
.prose h2 {
  font-size: 1.4rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--accent-light);
}

.prose h3 {
  font-size: 1.05rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--text-dark);
}

.prose p {
  margin-bottom: var(--space-4);
}

.prose ul, .prose ol {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.prose li {
  color: var(--text-mid);
  margin-bottom: var(--space-2);
  line-height: 1.65;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem var(--space-8);
  background: var(--white);
  border-bottom: 2px solid var(--accent-light);
  gap: var(--space-4);
}

.site-logo {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover {
  color: var(--text-dark);
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--white);
  flex-shrink: 0;
}

.logo-nerd {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
}

.nav-links a {
  color: var(--text-light);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.875rem;
  transition: background var(--transition) !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--accent-bright) !important;
  color: var(--white) !important;
}

/* Hamburger toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.nav-toggle:hover {
  background: var(--accent-whisper);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  text-align: center;
  padding: 3.5rem var(--space-6) 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--accent);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin-bottom: 0.85rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-mid);
  max-width: 500px;
  margin: 0 auto var(--space-8);
  line-height: 1.65;
}

/* ============================================================
   TRUST BAR
   ============================================================ */

.trust-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding: 1.75rem var(--space-6) 2.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
}

.trust-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ============================================================
   CALCULATOR CARD
   ============================================================ */

.calc-card {
  max-width: 580px;
  margin: 0 auto var(--space-8);
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  border: 2px solid var(--accent-light);
}

.calc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.calc-top h2 {
  font-size: 1.1rem;
  color: var(--text-dark);
}

/* Mode toggle (Semester / Cumulative) */
.mode-toggle {
  display: flex;
  background: var(--accent-whisper);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--accent-light);
}

.mode-toggle button {
  padding: 0.4rem 0.9rem;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
  border-radius: var(--radius-md);
}

.mode-toggle button.active {
  background: var(--accent);
  color: var(--white);
}

/* Column headers */
.calc-headers {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 32px;
  gap: var(--space-2);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: var(--space-2);
  padding: 0 0.1rem;
}

/* Course rows */
.course-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 32px;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}

/* Grade calculator rows */
.grade-row {
  display: grid;
  grid-template-columns: 2fr 0.8fr 0.8fr 32px;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}

/* Final grade calculator */
.final-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

/* Inputs & Selects */
.c-input,
.c-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: var(--font);
  font-weight: 500;
  background: #FAFBFF;
  color: var(--text-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.c-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  cursor: pointer;
}

.c-input:focus,
.c-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
  outline: none;
}

.c-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.c-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

/* Remove course button */
.c-remove {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--error-light);
  color: var(--error);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
  line-height: 1;
}

.c-remove:hover {
  background: #FECACA;
}

/* Add course button */
.add-course {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--accent-whisper);
  border: 2px dashed var(--accent-glow);
  border-radius: var(--radius-md);
  padding: 0.65rem var(--space-4);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  margin-top: var(--space-2);
  width: 100%;
  transition: border-color var(--transition), background var(--transition);
}

.add-course:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* Cumulative fields */
.cumulative-fields {
  background: var(--accent-whisper);
  border: 2px solid var(--accent-light);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.cumulative-fields.visible {
  display: grid;
}

/* Result bar */
.result-bar {
  margin-top: var(--space-6);
  padding: 1.35rem var(--space-6);
  background: var(--accent);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.result-bar::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -8%;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.result-bar::after {
  content: '';
  position: absolute;
  bottom: -25%;
  left: -5%;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.result-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: var(--space-1);
  position: relative;
  z-index: 1;
}

.result-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.result-note {
  font-size: 0.875rem;
  opacity: 0.95;
  margin-top: var(--space-2);
  font-weight: 500;
  position: relative;
  z-index: 1;
  line-height: 1.5;
}

.result-credits {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: var(--space-1);
  position: relative;
  z-index: 1;
}

/* Empty state */
.result-bar--empty {
  background: var(--accent-whisper);
  border: 2px dashed var(--accent-glow);
}

.result-bar--empty .result-label {
  color: var(--text-muted);
}

.result-bar--empty .result-number {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  opacity: 1;
}

/* ============================================================
   TOOL GRID (Homepage + Bottom CTA)
   ============================================================ */

.tools-section {
  background: var(--white);
  padding: var(--space-12) var(--space-6);
  border-top: 2px solid var(--accent-light);
}

.tools-section h2 {
  text-align: center;
  margin-bottom: var(--space-2);
}

.tools-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: var(--space-8);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  max-width: 760px;
  margin: 0 auto;
}

.tool-card {
  background: var(--accent-whisper);
  border: 2px solid var(--accent-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color var(--transition-slow), box-shadow var(--transition-slow), transform var(--transition);
  display: block;
}

.tool-card:hover {
  border-color: var(--accent-bright);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  color: inherit;
}

.tool-emoji {
  font-size: 1.75rem;
  margin-bottom: var(--space-3);
  display: block;
}

.tool-card h3 {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: var(--space-1);
}

.tool-card p {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   ENCOURAGEMENT SECTION
   ============================================================ */

.encourage-section {
  padding: var(--space-12) var(--space-6);
  text-align: center;
  background: var(--bg);
  border-top: 2px solid var(--accent-light);
}

.encourage-section .emoji-big {
  font-size: 2.5rem;
  margin-bottom: var(--space-3);
  display: block;
}

.encourage-section h2 {
  margin-bottom: var(--space-2);
}

.encourage-section p {
  max-width: 520px;
  margin: 0 auto var(--space-6);
  line-height: 1.7;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  text-decoration: none;
  line-height: 1;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-pill);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-bright);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: calc(0.75rem - 2px) calc(2rem - 2px);
}

.btn-outline:hover {
  background: var(--accent-whisper);
  border-color: var(--accent-bright);
  color: var(--accent-bright);
}

.btn-sm {
  font-size: 0.875rem;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-md);
}

/* ============================================================
   CALCULATOR PAGE LAYOUT
   ============================================================ */

/* Full-width calculator pages */
.page-calc {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-10) var(--space-6);
}

.page-calc h1 {
  text-align: center;
  margin-bottom: var(--space-3);
}

.calc-intro {
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto var(--space-8);
  line-height: 1.65;
}

/* SEO content section (below calculator) */
.seo-content {
  max-width: var(--content-width);
  margin: var(--space-16) auto 0;
  padding-top: var(--space-12);
  border-top: 2px solid var(--accent-light);
}

/* Reference table */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--accent-light);
}

.ref-table th {
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ref-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-mid);
  border-bottom: 1px solid var(--accent-light);
}

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

.ref-table tr:nth-child(even) td {
  background: var(--accent-whisper);
}

/* ============================================================
   FAQ SECTION
   ============================================================ */

.faq-section {
  max-width: var(--content-width);
  margin: var(--space-12) auto 0;
  padding-top: var(--space-8);
  border-top: 2px solid var(--accent-light);
}

.faq-section > h2 {
  margin-bottom: var(--space-6);
}

.faq-item {
  border: 2px solid var(--accent-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
  background: var(--white);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--accent-whisper);
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--transition);
  line-height: 1;
}

.faq-question[aria-expanded="true"]::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding: 0 var(--space-5) var(--space-4);
  border-top: 1px solid var(--accent-light);
}

.faq-answer.open {
  display: block;
}

.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   CROSS-LINKS / RELATED TOOLS
   ============================================================ */

.cross-links {
  background: var(--accent-whisper);
  border: 2px solid var(--accent-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-8) 0;
}

.cross-links p {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: var(--space-2);
}

.cross-links p:last-child {
  margin-bottom: 0;
}

.cross-links a {
  font-weight: 600;
}

/* ============================================================
   DISCLAIMER
   ============================================================ */

.disclaimer {
  background: var(--accent-whisper);
  border-left: 4px solid var(--accent-glow);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-6) 0;
}

.disclaimer p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */

.breadcrumb {
  padding: var(--space-3) 0;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb li + li::before {
  content: '/';
  color: var(--text-muted);
  opacity: 0.5;
}

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

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb [aria-current="page"] {
  color: var(--text-mid);
  font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--accent-dark);
  color: var(--accent-glow);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-bottom: var(--space-5);
}

.footer-links a {
  color: var(--accent-light);
  font-weight: 500;
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  font-size: 0.75rem;
  opacity: 0.6;
  color: var(--accent-bright);
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */

.legal-page {
  max-width: var(--content-width);
  margin: var(--space-12) auto;
  padding: 0 var(--space-6);
}

.legal-page h1 {
  margin-bottom: var(--space-3);
}

.legal-page .last-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 2px solid var(--accent-light);
}

/* ============================================================
   404 PAGE
   ============================================================ */

.error-page {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  max-width: 480px;
  margin: 0 auto;
}

.error-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: var(--space-4);
}

.error-page h1 {
  margin-bottom: var(--space-3);
}

.error-page p {
  margin-bottom: var(--space-8);
}

/* ============================================================
   MOBILE — 768px and below
   ============================================================ */

@media (max-width: 768px) {
  /* Nav */
  .site-nav {
    padding: 0.75rem var(--space-5);
    flex-wrap: wrap;
    position: relative;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
    width: 100%;
    padding: var(--space-3) 0 var(--space-4);
    border-top: 1px solid var(--accent-light);
    margin-top: var(--space-2);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: var(--space-2) 0;
    font-size: 1rem;
    width: 100%;
  }

  .nav-cta {
    display: inline-block;
    margin-top: var(--space-2);
  }

  /* Hero */
  .hero {
    padding: 2.5rem var(--space-5) 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Calculator card */
  .calc-card {
    margin: 0 0 var(--space-8);
    padding: 1.25rem var(--space-5);
    border-radius: var(--radius-lg);
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  /* Mobile: course row loses name field to full width */
  .calc-headers {
    display: none;
  }

  .course-row {
    grid-template-columns: 1fr 1fr 32px;
    row-gap: var(--space-2);
  }

  .course-row .c-input:first-child {
    grid-column: 1 / -1;
  }

  .grade-row {
    grid-template-columns: 1fr 1fr 32px;
  }

  .grade-row .c-input:first-child {
    grid-column: 1 / -1;
  }

  .final-row {
    grid-template-columns: 1fr;
  }

  .cumulative-fields {
    grid-template-columns: 1fr 1fr;
  }

  .result-number {
    font-size: 2.5rem;
  }

  /* Trust bar */
  .trust-bar {
    gap: var(--space-4);
  }

  /* Tools grid */
  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Tools section padding */
  .tools-section {
    padding: var(--space-8) var(--space-5);
  }

  /* Page padding */
  .page-calc {
    padding: var(--space-8) 0;
  }

  .page-calc h1,
  .calc-intro {
    padding: 0 var(--space-5);
  }

  .seo-content {
    padding: var(--space-8) var(--space-5) 0;
    margin-top: var(--space-10);
  }

  .faq-section {
    padding: var(--space-6) var(--space-5) 0;
  }

  .legal-page {
    margin: var(--space-8) auto;
  }
}

@media (max-width: 400px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   AD ZONE PLACEHOLDERS
   (Shown in dev, hidden when Mediavine loads)
   ============================================================ */

.ad-zone {
  display: none; /* Hidden until Mediavine is active */
  /* Uncomment below to visualize during development */
  /*
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: var(--space-6) 0;
  */
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  .site-nav,
  .site-footer,
  .trust-bar,
  .tools-section,
  .encourage-section,
  .nav-cta,
  .ad-zone {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}
