/* =========================================
   STEMBridge Tools — Global Stylesheet
   Color Palette: Forest Green · White · Amber Yellow
   ========================================= */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap");

/* ---- CSS Variables ---- */
:root {
  /* Brand greens */
  --green-900: #0a2e12;
  --green-800: #0d3b1a; /* darkest — header bg */
  --green-700: #145a27; /* forest — hero bg, footer */
  --green-600: #1a7032; /* primary buttons */
  --green-500: #218a3d;
  --green-400: #2ead55;
  --green-200: #bbf7d0;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;

  /* Accent yellow */
  --yellow-500: #f59e0b;
  --yellow-400: #fbbf24;
  --yellow-300: #fcd34d;
  --yellow-100: #fef3c7;
  --yellow-50: #fffbeb;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic */
  --primary: var(--green-600);
  --primary-dark: var(--green-700);
  --primary-hover: var(--green-500);
  --primary-light: var(--green-50);
  --accent: var(--yellow-500);
  --accent-light: var(--yellow-50);

  /* UI */
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
  --font-body: "DM Sans", sans-serif;
  --font-mono: "DM Mono", monospace;
  --max-w: 1160px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--green-500);
}
ul {
  list-style: none;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 72px 0;
}
.section--gray {
  background: var(--gray-50);
}
.section--green {
  background: var(--green-50);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--green-800);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  white-space: nowrap;
  text-decoration: none;
}
.nav-logo:hover {
  color: var(--yellow-300);
}
.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Nav links row */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links > li {
  position: relative;
}
.nav-links > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 7px 13px;
  border-radius: 8px;
  transition:
    background var(--transition),
    color var(--transition);
  white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li > a.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}
.nav-links > li > a .caret {
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform var(--transition);
}
.nav-links > li:hover > a .caret {
  transform: rotate(180deg);
}

/* CTA button in nav */
.nav-cta {
  background: var(--yellow-500) !important;
  color: var(--gray-900) !important;
  font-weight: 700 !important;
  border-radius: 8px;
  padding: 7px 16px !important;
}
.nav-cta:hover {
  background: var(--yellow-400) !important;
  color: var(--gray-900) !important;
}

/* ---- Dropdown ---- */
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 300;
}
.nav-links > li:hover .nav-dropdown {
  display: block;
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  transition:
    background var(--transition),
    color var(--transition);
}
.nav-dropdown a:hover {
  background: var(--green-50);
  color: var(--primary);
}
.nav-dropdown a .dd-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.dd-icon--green {
  background: var(--green-100);
}
.dd-icon--yellow {
  background: var(--yellow-100);
}
.dd-icon--teal {
  background: #ccfbf1;
}
.nav-dropdown .dd-label {
  flex: 1;
}
.nav-dropdown .dd-sub {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 400;
  display: block;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--green-900);
  padding: 10px 20px 18px;
  gap: 2px;
}
.nav-mobile.open {
  display: flex;
}
.nav-mobile a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background var(--transition);
  font-size: 0.92rem;
}
.nav-mobile a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav-mobile .mobile-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 10px 12px 4px;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-body);
  text-decoration: none;
}
.btn-primary {
  background: var(--yellow-500);
  color: var(--gray-900);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}
.btn-primary:hover {
  background: var(--yellow-400);
  color: var(--gray-900);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.38);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.45);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
  color: var(--white);
  transform: translateY(-1px);
}
.btn-outline {
  background: var(--white);
  color: var(--gray-800);
  border: 1.5px solid var(--gray-200);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  background: linear-gradient(
    150deg,
    var(--green-800) 0%,
    var(--green-700) 60%,
    var(--green-600) 100%
  );
  padding: 92px 0 84px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--yellow-300);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 15px;
  border-radius: 99px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 span {
  color: var(--yellow-400);
}
.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* =========================================
   SECTION HEADERS
   ========================================= */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  background: var(--green-100);
  padding: 4px 12px;
  border-radius: 99px;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 14px;
}
.section-header p {
  font-size: 1rem;
  color: var(--gray-600);
}

/* =========================================
   TOOL CARDS (HOME)
   ========================================= */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.tool-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  color: inherit;
}
.tool-card .card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.card-icon--green {
  background: var(--green-100);
}
.card-icon--yellow {
  background: var(--yellow-100);
}
.card-icon--teal {
  background: #ccfbf1;
}
.card-icon--light {
  background: var(--gray-100);
}

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}
.tool-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}
.tool-card .card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

/* =========================================
   FEATURES GRID
   ========================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.feature-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.feature-item:hover {
  border-color: var(--green-200);
  box-shadow: var(--shadow);
}
.feature-item .fi-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}
.feature-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--gray-900);
}
.feature-item p {
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* =========================================
   STATS STRIP
   ========================================= */
.stats-strip {
  background: var(--yellow-500);
  padding: 44px 0;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.stat-item {
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}
.stat-item:last-child {
  border-right: none;
}
.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-900);
  display: block;
  line-height: 1.2;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--green-800);
  margin-top: 4px;
  display: block;
  font-weight: 500;
}

/* =========================================
   HOW IT WORKS
   ========================================= */
.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 48px;
  counter-reset: step-counter;
}
.step-box {
  text-align: center;
  padding: 28px 20px;
  counter-increment: step-counter;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
.step-box::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50%;
  margin: 0 auto 16px;
}
.step-box h4 {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--gray-900);
}
.step-box p {
  font-size: 0.87rem;
  color: var(--gray-600);
}

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.testimonial-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.tc-stars {
  color: var(--yellow-500);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.tc-quote {
  font-size: 0.92rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 16px;
}
.tc-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.tc-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-900);
}
.tc-role {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* =========================================
   TOOL PAGE LAYOUT
   ========================================= */
.tool-hero {
  background: linear-gradient(
    150deg,
    var(--green-800) 0%,
    var(--green-700) 100%
  );
  padding: 60px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tool-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.tool-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  color: var(--yellow-300);
  margin-bottom: 18px;
}
.tool-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.tool-hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 540px;
  margin: 0 auto;
}

/* Tool workspace */
.tool-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 48px;
  align-items: start;
}
.tool-panel {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tool-panel-header {
  background: var(--green-800);
  border-bottom: none;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tool-panel-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-yellow {
  background: var(--yellow-400);
}
.dot-green {
  background: var(--green-400);
}

.tool-panel-body {
  padding: 24px;
}

/* Form elements */
textarea,
input[type="text"],
select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--gray-800);
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  resize: vertical;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  outline: none;
}
textarea:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 112, 50, 0.12);
  background: #fff;
}
textarea {
  min-height: 140px;
}
label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-700);
  display: block;
  margin-bottom: 8px;
}

/* Solve button */
.btn-solve {
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(
    135deg,
    var(--green-600) 0%,
    var(--green-700) 100%
  );
  color: #fff;
  padding: 14px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(26, 112, 50, 0.28);
  font-family: var(--font-body);
}
.btn-solve:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(26, 112, 50, 0.36);
  background: linear-gradient(
    135deg,
    var(--green-500) 0%,
    var(--green-600) 100%
  );
}

/* Output */
.output-placeholder {
  color: var(--gray-400);
  font-style: italic;
  font-size: 0.92rem;
}
.output-step {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.output-step:last-child {
  margin-bottom: 0;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
}
.step-row {
  display: flex;
  align-items: flex-start;
}
.step-content {
  flex: 1;
  font-size: 0.9rem;
  color: var(--gray-800);
}
.step-title {
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 3px;
  font-size: 0.88rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-100);
  color: var(--green-700);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.97rem;
  margin-bottom: 16px;
  border: 1px solid var(--green-200);
}
.error-badge {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.examples-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.example-chip {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 14px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-700);
}
.example-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--green-50);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Info blocks */
.info-block {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.info-block.tip {
  background: var(--green-50);
  border: 1px solid var(--green-200);
}
.info-block.note {
  background: var(--yellow-50);
  border: 1px solid var(--yellow-300);
}
.info-block.warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.info-block .ib-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.info-block p {
  font-size: 0.88rem;
  color: var(--gray-700);
  margin: 0;
  line-height: 1.6;
}

/* =========================================
   AD PLACEHOLDER
   ========================================= */
.ad-slot {
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 32px 0;
}
.ad-slot-leaderboard {
  min-height: 90px;
}
.ad-slot-rectangle {
  min-height: 250px;
}

/* =========================================
   RELATED TOOLS
   ========================================= */
.related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateX(3px);
  color: inherit;
}
.related-card .rc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.related-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--gray-900);
}
.related-card p {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* =========================================
   PAGE HERO (About / Contact / Privacy)
   ========================================= */
.page-hero {
  background: linear-gradient(
    150deg,
    var(--green-800) 0%,
    var(--green-700) 100%
  );
  padding: 64px 0 56px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
  margin: 0 auto;
}

/* =========================================
   PROSE (About / Privacy)
   ========================================= */
.prose {
  max-width: 720px;
  margin: 0 auto;
}
.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 36px 0 12px;
  padding-top: 36px;
  border-top: 1px solid var(--gray-200);
}
.prose h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}
.prose h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--gray-900);
}
.prose p {
  font-size: 0.97rem;
  color: var(--gray-700);
  margin-bottom: 14px;
  line-height: 1.75;
}
.prose ul {
  padding-left: 20px;
  margin-bottom: 14px;
}
.prose ul li {
  list-style: disc;
  font-size: 0.95rem;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.prose a {
  color: var(--primary);
  text-decoration: underline;
}

/* =========================================
   CONTACT PAGE
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
  margin-top: 48px;
}
.contact-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.contact-info p {
  font-size: 0.92rem;
  color: var(--gray-600);
  margin-bottom: 24px;
}
.ci-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--gray-700);
}
.ci-icon {
  width: 36px;
  height: 36px;
  background: var(--green-100);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.form-group {
  margin-bottom: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-success {
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-700);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-weight: 600;
  display: none;
  margin-bottom: 16px;
}
.form-success.show {
  display: block;
}

/* =========================================
   CTA SECTION
   ========================================= */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--green-700) 0%,
    var(--green-800) 100%
  );
  padding: 72px 0;
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--white);
  margin-bottom: 12px;
}
.cta-section p {
  color: rgba(255, 255, 255, 0.76);
  max-width: 480px;
  margin: 0 auto 28px;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.55);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .nav-logo {
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 260px;
  color: rgba(255, 255, 255, 0.55);
}
.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}
.footer-col ul li {
  margin-bottom: 9px;
}
.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}
.footer-col ul li a:hover {
  color: var(--white);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a {
  color: rgba(255, 255, 255, 0.45);
}
.footer-bottom a:hover {
  color: #fff;
}

/* =========================================
   PHYSICS SELECT GROUP
   ========================================= */
.physics-select-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .tool-workspace {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 16px 0;
  }
  .stat-item:nth-child(2n) {
  }
  .physics-select-group {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .section {
    padding: 48px 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr;
  }
  .stat-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  .hero {
    padding: 60px 0 56px;
  }
}

.tc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
