/* Large fonts, high contrast, big touch targets. */

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

:root {
  --navy: #1b3a5c;
  --accent: #2e7d5b;
  --bg: #f5f1e8;
  --card: #ffffff;
  --text: #1a1a1a;
}

html { font-size: 22px; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app-header {
  background: var(--navy);
  color: #fff;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

#app-header h1 { font-size: 1.4rem; }

#reset-btn {
  font-size: 1rem;
  padding: 0.5rem 0.9rem;
  border: 2px solid #fff;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

#tabs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem;
}

/* ── Tabs ── */
.tab {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
}

.tab.open { flex: 1; }

.tab-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.2rem 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  min-height: 96px;
}

.tab-number {
  flex-shrink: 0;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-title { flex: 1; }

.tab-status { font-size: 1.3rem; }

.tab-body {
  display: none;
  padding: 0 1rem 1.2rem;
  font-size: 1.15rem;
}

.tab.open .tab-body { display: block; }

.tip {
  background: #fff8d6;
  border-left: 6px solid #e6c200;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* ── Checklist ── */
.check-list { list-style: none; }

.check-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0.4rem;
  border-bottom: 1px solid #eee;
  font-size: 1.3rem;
  cursor: pointer;
}

.check-list input[type="checkbox"] {
  width: 2.2rem;
  height: 2.2rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.check-list li.done span { text-decoration: line-through; color: #777; }

/* ── Exercises ── */
.exercise {
  border: 2px solid #ddd;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #fafafa;
}

.exercise.done { border-color: var(--accent); background: #eef7f1; }

.exercise h3 { font-size: 1.4rem; margin-bottom: 0.4rem; }

.exercise .figure {
  max-width: 320px;
  margin: 0.6rem auto;
  display: block;
}

.exercise p { margin-bottom: 0.8rem; line-height: 1.4; }

/* ── Buttons ── */
.big-btn {
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0.9rem 1.6rem;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  min-height: 64px;
}

.big-btn.secondary { background: var(--navy); }

.big-btn:disabled { background: #aaa; cursor: default; }

.big-btn.done-btn.done { background: #888; }

/* ── Brain ── */
.brain-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.brain-controls label {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.brain-controls select {
  font-size: 1.2rem;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  border: 2px solid var(--navy);
  background: #fff;
  min-height: 56px;
}

.brain-card {
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 14px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}

#brain-question {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.5;
  min-height: 3.5rem;
}

.brain-answer {
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 700;
  margin-top: 0.8rem;
}

.brain-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 1rem;
}

.choice-btn {
  font-size: 1.3rem;
  font-weight: 600;
  padding: 1rem;
  min-height: 72px;
  border: 3px solid var(--navy);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.choice-btn:disabled { cursor: default; }

.choice-btn.correct {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.choice-btn.wrong {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

.adv-explain {
  font-size: 1.05rem;
  color: #444;
  background: #eef4f9;
  border-radius: 10px;
  padding: 0.8rem;
  margin-top: 0.8rem;
  line-height: 1.5;
}

.brain-buttons {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

@media (min-width: 700px) {
  #tabs { max-width: 720px; margin: 0 auto; width: 100%; }
}
