/* Tutor grade hub — flagship product surface (grades 7/8/9) */
:root {
  --tgh-ink: #071411;
  --tgh-forest: #0f2f28;
  --tgh-leaf: #1faa7a;
  --tgh-leaf-2: #35d0a0;
  --tgh-sand: #e8f3ee;
  --tgh-paper: rgba(232, 243, 238, 0.92);
  --tgh-muted: rgba(232, 243, 238, 0.62);
  --tgh-line: rgba(232, 243, 238, 0.14);
  --tgh-glow: rgba(31, 170, 122, 0.28);
  --tgh-warm: #f0c27a;
  --tgh-radius: 18px;
  --tgh-max: 920px;
  --tgh-font: "Vazirmatn", Tahoma, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--tgh-ink);
  color: var(--tgh-sand);
  font-family: var(--tgh-font);
  -webkit-font-smoothing: antialiased;
}

body.tgh {
  position: relative;
  overflow-x: hidden;
}

.tgh-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(31, 170, 122, 0.28), transparent 55%),
    radial-gradient(900px 600px at -10% 30%, rgba(240, 194, 122, 0.12), transparent 50%),
    radial-gradient(800px 500px at 50% 110%, rgba(15, 47, 40, 0.9), transparent 55%),
    linear-gradient(165deg, #081915 0%, #0b1c18 42%, #071411 100%);
}
.tgh-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
}

.tgh-top,
.tgh-main,
.tgh-foot {
  position: relative;
  z-index: 1;
}

.tgh-top {
  max-width: var(--tgh-max);
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tgh-brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tgh-brand-mark {
  font-size: clamp(1.55rem, 4.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(120deg, #fff 10%, var(--tgh-leaf-2) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tgh-brand-sub {
  font-size: 0.78rem;
  color: var(--tgh-muted);
  font-weight: 600;
}

.tgh-grades {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tgh-grade-link {
  text-decoration: none;
  color: var(--tgh-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.tgh-grade-link:hover {
  color: var(--tgh-sand);
  border-color: var(--tgh-line);
  background: rgba(255,255,255,0.04);
}
.tgh-grade-link.is-current {
  color: var(--tgh-ink);
  background: var(--tgh-leaf-2);
  border-color: transparent;
}

.tgh-main {
  max-width: var(--tgh-max);
  margin: 0 auto;
  padding: 12px 20px 48px;
}

.tgh-hero {
  padding: 28px 0 18px;
  animation: tgh-rise .7s ease both;
}
.tgh-kicker {
  margin: 0 0 10px;
  color: var(--tgh-warm);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.tgh-title {
  margin: 0;
  font-size: clamp(2.4rem, 9vw, 4.2rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.tgh-lead {
  margin: 14px 0 0;
  max-width: 28ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--tgh-muted);
  font-weight: 500;
}

.tgh-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.tgh-quick-btn {
  appearance: none;
  text-decoration: none;
  color: var(--tgh-ink);
  background: linear-gradient(135deg, var(--tgh-leaf-2), var(--tgh-leaf));
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 44px;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px var(--tgh-glow);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.tgh-quick-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 34px var(--tgh-glow);
}
.tgh-quick-btn:active { transform: translateY(0) scale(0.98); }
.tgh-quick-btn.is-warming {
  background: rgba(255,255,255,0.08);
  color: var(--tgh-sand);
  box-shadow: none;
  border: 1px solid var(--tgh-line);
}

.tgh-progress {
  margin: 16px 0 0;
  font-size: 0.84rem;
  color: var(--tgh-muted);
  max-width: 46ch;
  line-height: 1.6;
}

.tgh-subjects {
  margin-top: 28px;
}
.tgh-subjects-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.tgh-subjects-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}
.tgh-subjects-head span {
  color: var(--tgh-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.tgh-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.tgh-tile {
  --tgh-delay: 0s;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--tgh-radius);
  border: 1px solid var(--tgh-line);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  backdrop-filter: blur(8px);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
  animation: tgh-rise .65s ease both;
  animation-delay: var(--tgh-delay);
}
.tgh-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(53, 208, 160, 0.35);
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  background:
    linear-gradient(145deg, rgba(53, 208, 160, 0.12), rgba(255,255,255,0.03));
}
.tgh-tile:active { transform: scale(0.985); }
.tgh-tile.is-warming {
  opacity: 0.92;
}

.tgh-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--tgh-leaf-2);
  background: rgba(31, 170, 122, 0.12);
  border: 1px solid rgba(53, 208, 160, 0.18);
}
.tgh-tile-icon svg { width: 22px; height: 22px; }

.tgh-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.tgh-tile-label {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tgh-tile-meta {
  font-size: 0.78rem;
  color: var(--tgh-muted);
  font-weight: 600;
}
.tgh-tile.is-warming .tgh-tile-meta {
  color: var(--tgh-warm);
}

.tgh-tile-go {
  font-size: 1.4rem;
  color: var(--tgh-muted);
  line-height: 1;
  transition: transform .18s ease, color .18s ease;
}
.tgh-tile:hover .tgh-tile-go {
  color: var(--tgh-leaf-2);
  transform: translateX(-3px);
}

.tgh-foot {
  max-width: var(--tgh-max);
  margin: 0 auto;
  padding: 8px 20px calc(28px + env(safe-area-inset-bottom));
  color: var(--tgh-muted);
  font-size: 0.78rem;
}
.tgh-foot p { margin: 0; }

@keyframes tgh-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 720px) {
  .tgh-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tgh-hero {
    padding-top: 40px;
  }
  .tgh-lead {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tgh-hero,
  .tgh-tile,
  .tgh-quick-btn,
  .tgh-tile-go {
    animation: none !important;
    transition: none !important;
  }
}
