:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --dark: #0f172a;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--muted);
}

.nav a:hover { color: var(--text); }


.hero {
  padding: 64px 0 26px;
  background:
    linear-gradient(rgba(248, 250, 252, 0.82), rgba(248, 250, 252, 0.88)),
    url("classroom-bg.webp") center/cover no-repeat;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: #d1fae5;
  color: var(--brand-dark);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(2rem, 3.3vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 12ch;
}

.hero p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 760px;
  margin: 18px 0 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 18px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--dark);
  color: #fff;
}

.button-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 24px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.tiny-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel-soft);
  padding: 8px 10px;
  border-radius: 999px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  font-size: 1rem;
  outline: none;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.field textarea {
  resize: vertical;
  min-height: 180px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #94a3b8;
}

.result-box {
  margin-top: 16px;
  background: var(--panel-soft);
  border-radius: 20px;
  padding: 18px;
}

.result-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.result-value {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 4px;
  letter-spacing: -0.03em;
}

.section {
  padding: 24px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 8px;
}

h2 {
  font-size: clamp(1.8rem, 2.6vw, 3rem);
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.03em;
}

.section-note {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.ad-placeholder {
  background: #eef2f7;
  border: 2px dashed #cbd5e1;
  border-radius: 24px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  margin: 18px 0 10px;
}

.ad-placeholder strong {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  margin-bottom: 10px;
  color: #475569;
}

/* Clean AdSense containers */
.ad-unit {
  margin: 24px auto;
  width: 100%;
  min-height: 90px;
}

/* Sidebar ad: keep it square/card-like instead of stretched */
.sidebar-ad .ad-unit,
.sidebar-ad-unit {
  margin-top: 18px;
  width: 100%;
  max-width: 300px;
  min-height: 250px;
  max-height: 320px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

/* Bottom ad: wide horizontal area */
.bottom-ad-unit {
  margin: 32px auto;
  width: 100%;
  max-width: 980px;
  min-height: 90px;
  overflow: hidden;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.tool-badge {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 14px;
  background: var(--panel-soft);
  color: var(--muted);
}

.tool-card.study .tool-badge {
  background: #d1fae5;
  color: var(--brand-dark);
}

.tool-card h3 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.tool-card p {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 0.96rem;
}

.tool-card .button {
  margin-top: 18px;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.92rem;
  background: #fff;
  border-color: var(--line);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

.info-panel {
  padding: 28px;
}

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

.mini-box {
  background: var(--panel-soft);
  border-radius: 20px;
  padding: 18px;
}

.mini-box h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.mini-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.sidebar-ad {
  padding: 24px;
  position: sticky;
  top: 96px;
}

.sidebar-ad .mini-box .button {
  margin-top: 0;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.92rem;
  background: #fff;
  border-color: var(--line);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.guide-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.guide-card small {
  color: var(--muted);
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}

.guide-card h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.guide-card p {
  color: var(--muted);
  font-size: 0.94rem;
}

.guide-card .button {
  margin-top: 18px;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.92rem;
  background: #fff;
  border-color: var(--line);
}

.guide-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 320px;
  gap: 24px;
  align-items: start;
}

.guide-main {
  padding: 28px;
}

.guide-main h3 {
  margin-top: 24px;
  margin-bottom: 10px;
}

.guide-main p,
.guide-main li {
  line-height: 1.7;
}

.guide-main ul {
  padding-left: 20px;
}

.guide-page-section {
  padding: 28px 0 40px;
  background:
    linear-gradient(rgba(248, 250, 252, 0.72), rgba(248, 250, 252, 0.80)),
    url("classroom-bg.webp") center top / cover no-repeat;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.calc-page {
  padding: 28px 0 40px;
  background:
    linear-gradient(rgba(248, 250, 252, 0.72), rgba(248, 250, 252, 0.80)),
    url("classroom-bg.webp") center/cover no-repeat;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.calc-main {
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(5px);
}


.weighted-grid,
.gpa-grid,
.timer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.timer-panel {
  background: var(--panel-soft);
  border-radius: 24px;
  padding: 22px;
  margin-top: 18px;
}

.timer-mode {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand);
  text-align: center;
}

.timer-display {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.04em;
  margin: 12px 0 18px;
}

.timer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.helper-text {
  color: var(--muted);
  font-size: 0.94rem;
  margin-top: 10px;
}

.formula-box {
  background: var(--panel-soft);
  border-radius: 18px;
  padding: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

footer {
  border-top: 1px solid var(--line);
  background: #fff;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  padding: 28px 0 36px;
}

.footer-grid p,
.footer-grid li {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

@media (max-width: 1024px) {
  .hero-grid,
  .two-col,
  .calc-layout,
  .guide-grid,
  .guide-page-grid,
  .tool-grid,
  .footer-grid,
  .weighted-grid,
  .gpa-grid,
  .timer-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-ad,
  .section-note {
    position: static;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .nav { gap: 12px; }
  .mini-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 42px; }
}

/* Sidebar fixed-size AdSense box */
.sidebar-ad-box {
  margin-top: 24px;
  text-align: center;
  overflow: hidden;
}

.language-select {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.language-select:hover,
.language-select:focus {
  color: var(--text);
  outline: none;
  border-color: #94a3b8;
}

.tool-help-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid var(--line);
  color: var(--muted);
}

.tool-help-box h3 {
  margin: 14px 0 8px;
  color: var(--text);
  font-size: 1rem;
}

.tool-help-box h3:first-child {
  margin-top: 0;
}

.tool-help-box p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.tool-help-box ul {
  margin: 0 0 12px 18px;
  padding: 0;
}


/* Temporarily hide ad placements until AdSense is approved */
.ad-unit,
.sidebar-ad-box,
.bottom-ad-unit {
  display: none !important;
}

.school-bg-soft {
  background:
    linear-gradient(rgba(248, 250, 252, 0.86), rgba(248, 250, 252, 0.94)),
    url("classroom-bg.webp") center center / cover;
}