:root {
  --bg-0: #f8f6ef;
  --bg-1: #ebe4d7;
  --ink: #1f2a2a;
  --ink-soft: #45514f;
  --brand: #0d5c63;
  --brand-2: #9c6644;
  --ok: #2b9348;
  --bad: #bc4749;
  --panel: rgba(255, 255, 255, 0.86);
  --border: rgba(31, 42, 42, 0.12);
  --shadow: 0 16px 40px rgba(31, 42, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #f5efe3, transparent 45%),
    radial-gradient(circle at 90% 15%, #e5dfce, transparent 40%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  font-family: "Space Grotesk", sans-serif;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  z-index: -1;
  filter: blur(2px);
}

.shape-a {
  width: 320px;
  height: 320px;
  top: -90px;
  right: -60px;
  background: rgba(13, 92, 99, 0.14);
}

.shape-b {
  width: 260px;
  height: 260px;
  bottom: -80px;
  left: -50px;
  background: rgba(156, 102, 68, 0.12);
}

.hero {
  padding: 3.4rem 0 1.4rem;
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
  margin: 0;
}

h1 {
  margin: 0.6rem 0 1rem;
  line-height: 1.08;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  max-width: 14ch;
}

.hero-copy {
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 70ch;
  margin-bottom: 1.1rem;
}

.hero-actions,
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72rem 1.05rem;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand), #0b7f8c);
  color: #fff;
  box-shadow: 0 10px 24px rgba(13, 92, 99, 0.24);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--border);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, 1fr);
  padding-bottom: 2.5rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1rem 1rem 1.15rem;
  backdrop-filter: blur(6px);
}

.stats-panel {
  grid-column: span 4;
}

.plan-panel {
  grid-column: span 8;
}

.quiz-panel,
.concept-panel {
  grid-column: span 6;
}

.weak-panel {
  grid-column: span 12;
}

h2 {
  margin: 0;
  font-size: 1.08rem;
}

h3 {
  margin-top: 0.95rem;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

.muted {
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.stats-row {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 1rem 0 0.6rem;
}

.label {
  margin: 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}

.value {
  margin: 0.1rem 0 0;
  font-weight: 700;
  font-size: 1.3rem;
}

.meter-wrap {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: rgba(31, 42, 42, 0.12);
  overflow: hidden;
}

.meter {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  transition: width 0.4s ease;
}

.focus-line {
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
}

.plan-list {
  max-height: 240px;
  overflow: auto;
  margin-top: 0.7rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.4rem;
}

.plan-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.6rem;
  padding: 0.48rem 0.2rem;
  border-bottom: 1px dashed rgba(31, 42, 42, 0.08);
}

.plan-day {
  font-family: "IBM Plex Mono", monospace;
  color: var(--brand);
}

.question-box {
  margin-top: 0.9rem;
  font-size: 1.14rem;
  font-weight: 500;
}

.options-box {
  display: grid;
  gap: 0.45rem;
  margin: 0.95rem 0;
}

.option {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
  font: inherit;
}

.option:hover {
  border-color: rgba(13, 92, 99, 0.42);
}

.option.selected {
  border-color: var(--brand);
  transform: translateX(2px);
}

.feedback-box {
  margin-top: 0.8rem;
  border-radius: 13px;
  padding: 0.85rem;
  border: 1px solid var(--border);
}

.feedback-box.ok {
  border-color: rgba(43, 147, 72, 0.34);
  background: rgba(43, 147, 72, 0.08);
}

.feedback-box.bad {
  border-color: rgba(188, 71, 73, 0.34);
  background: rgba(188, 71, 73, 0.08);
}

.hidden {
  display: none;
}

.concept-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.55rem;
}

.code-block {
  margin: 0;
  padding: 0.8rem;
  border-radius: 12px;
  background: #1f2a2a;
  color: #e8f1f2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
  white-space: pre-wrap;
}

.pitfall-list {
  margin: 0;
  padding-left: 1.08rem;
}

.weak-topics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.weak-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem;
}

.weak-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(31, 42, 42, 0.1);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
}

.footer {
  padding-bottom: 2rem;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .stats-panel,
  .plan-panel,
  .quiz-panel,
  .concept-panel,
  .weak-panel {
    grid-column: span 12;
  }

  .plan-list {
    max-height: 300px;
  }
}
