/* ── Index-specific overrides ── */
:root { --radius: 12px; }

/* ── Hero with animated aurora ── */
.hero {
  padding: 5.5rem 1.5rem 3rem;
}
.hero::before {
  background:
    radial-gradient(ellipse 70% 55% at 25% 35%, rgba(110,184,215,0.13), transparent),
    radial-gradient(ellipse 55% 60% at 75% 45%, rgba(155,142,196,0.10), transparent),
    radial-gradient(ellipse 45% 45% at 50% 85%, rgba(122,191,142,0.08), transparent);
  animation: aurora 14s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translateX(-3%) scale(1);    opacity: 0.9; }
  50%  { transform: translateX(2%)  scale(1.06); opacity: 1; }
  100% { transform: translateX(4%)  scale(1.02); opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
}
.hero h1 .sub {
  display: block;
  font-size: 0.3em;
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.6rem;
}
.hero .rune-line {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  letter-spacing: 0.7em;
}
.hero .hero-desc {
  max-width: 560px;
  margin: 1.5rem auto 0;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  position: relative;
}

/* ── Section nav chips ── */
.hero-nav {
  position: relative;
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.hero-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  background: rgba(24,27,37,0.6);
  transition: all 0.2s;
}
.hero-nav a:hover {
  color: #fff;
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}
.hero-nav a .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot-ice   { background: var(--accent-ice); }
.dot-green { background: var(--accent-green); }

/* ── Container ── */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ── Section headers ── */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  margin-top: 3rem;
  scroll-margin-top: 2rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}
.section-head .is-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.section-head .line {
  flex: 1;
  height: 1px;
  background: var(--border);
  align-self: center;
}

/* ── Resource Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}

.res-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.res-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 34px rgba(0,0,0,0.35);
}
.res-card .card-icon {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  width: fit-content;
  color: var(--text-muted);
  transition: color 0.25s, border-color 0.25s;
}
.res-card:hover .card-icon { color: var(--text); }
.res-card h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.3rem;
}
.res-card .card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}
.res-card .card-tag {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  width: fit-content;
}
.tag-cheatsheet { background: rgba(110,184,215,0.12); color: var(--accent-ice); }
.tag-app       { background: rgba(122,191,142,0.12); color: var(--accent-green); }
.tag-grammar   { background: rgba(196,169,106,0.12); color: var(--accent-gold); }
.tag-vocab     { background: rgba(155,142,196,0.12); color: var(--accent-purple); }
.tag-reading   { background: rgba(212,123,94,0.12); color: var(--accent-fire); }

/* Accent stripe on the left */
.res-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  transition: opacity 0.25s;
  opacity: 0;
}
.res-card:hover::before { opacity: 1; }
.res-card.accent-ice::before    { background: var(--accent-ice); }
.res-card.accent-green::before  { background: var(--accent-green); }
.res-card.accent-gold::before   { background: var(--accent-gold); }
.res-card.accent-purple::before { background: var(--accent-purple); }
.res-card.accent-fire::before   { background: var(--accent-fire); }
.res-card.accent-ice:hover .card-icon    { border-color: rgba(110,184,215,0.4); }
.res-card.accent-green:hover .card-icon  { border-color: rgba(122,191,142,0.4); }
.res-card.accent-gold:hover .card-icon   { border-color: rgba(196,169,106,0.4); }
.res-card.accent-purple:hover .card-icon { border-color: rgba(155,142,196,0.4); }
.res-card.accent-fire:hover .card-icon   { border-color: rgba(212,123,94,0.4); }

/* ── Footer override ── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero { padding: 4rem 1rem 2.5rem; }
  .container { padding: 0 0.75rem 2rem; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ── "Today" block (logged-in users) ── */
.today-section { margin: 0.5rem 0 2.5rem; }
.today-card {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.8rem;
}
.today-ring { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.today-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.today-ring-bg { fill: none; stroke: var(--border); stroke-width: 8; }
.today-ring-fill {
  fill: none;
  stroke: var(--accent-ice);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.today-ring-fill.done { stroke: var(--accent-green); }
.today-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
}
.today-done { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--text); }
.today-of { font-size: 0.68rem; color: var(--text-dim); }
.today-goal {
  display: inline-block;
  color: var(--accent-gold);
  cursor: pointer;
  border-bottom: 1px dashed var(--accent-gold);
  font-size: 0.82rem;
  padding: 0.15rem 0.3rem;
  margin: -0.15rem -0.3rem;
}
.today-goal:focus-visible { outline: 2px solid var(--accent-ice); border-radius: 4px; }
.today-goal-input {
  width: 3.4rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  font-size: 0.72rem;
  padding: 0.1rem 0.3rem;
}
.today-info { flex: 1; min-width: 0; }
.today-info h2 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.today-counts { display: flex; gap: 1.4rem; flex-wrap: wrap; color: var(--text-muted); font-size: 0.88rem; }
.today-count .tc-num { font-family: var(--mono); font-weight: 700; }
.today-count .tc-num.due { color: var(--accent-fire); }
.today-count .tc-num.new { color: var(--accent-ice); }
.today-count .tc-num.set { color: var(--accent-gold); }
.today-actions { margin-top: 0.9rem; }
.today-btn {
  display: inline-block;
  background: var(--accent-green);
  color: var(--bg);
  padding: 0.55rem 1.3rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.15s;
}
.today-btn:hover { opacity: 0.88; }
.today-note { margin-top: 0.7rem; font-size: 0.82rem; color: var(--accent-gold); }
@media (max-width: 600px) {
  .today-card { flex-direction: column; text-align: center; gap: 1rem; }
  .today-counts { justify-content: center; }
}

/* ── Per-trainer daily progress bars in the Today block ── */
.today-drills {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 440px;
}
.drill-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; }
.drill-name { width: 100px; color: var(--text-muted); white-space: nowrap; }
.drill-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.drill-bar-fill {
  display: block;
  height: 100%;
  background: var(--accent-ice);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.drill-bar-fill.done { background: var(--accent-green); }
.drill-count { font-family: var(--mono); color: var(--text-dim); min-width: 3.6rem; text-align: right; }
.drill-goal { color: var(--accent-gold); cursor: pointer; border-bottom: 1px dashed rgba(196,169,106,0.6); }
.drill-goal:focus-visible { outline: 2px solid var(--accent-ice); border-radius: 3px; }
@media (max-width: 600px) {
  .today-drills { margin-left: auto; margin-right: auto; width: 100%; }
  .drill-name { width: 86px; font-size: 0.75rem; }
}
