:root {
  --ink: #14161d;
  --muted: #5c6470;
  --line: #d9ddd9;
  --paper: #fffdf7;
  --wash: #eef4ef;
  --surface: #ffffff;
  --teal: #00756f;
  --coral: #e85d4f;
  --lime: #a9ca3a;
  --blue: #285caa;
  --gold: #e7aa2f;
  --violet: #6f55c6;
  --shadow: 0 18px 50px rgba(20, 22, 29, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 117, 111, 0.08), rgba(232, 93, 79, 0.06)),
    var(--wash);
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.year-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 22px;
  overflow: auto;
  background: #111719;
  color: #f5f6f0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--lime);
  border-radius: 8px;
  background: #192326;
  color: var(--lime);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: #cfd6d0;
}

.year-list {
  display: grid;
  gap: 10px;
}

.year-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  width: 100%;
  padding: 10px;
  color: #f5f6f0;
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.year-button:hover,
.year-button:focus-visible {
  border-color: rgba(169, 202, 58, 0.8);
  outline: none;
}

.year-button[aria-current="true"] {
  color: #101414;
  background: var(--lime);
  border-color: var(--lime);
}

.year-index {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(20, 22, 29, 0.18);
  font-weight: 850;
}

.year-name {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 760;
}

.year-line {
  display: block;
  margin-top: 2px;
  color: currentColor;
  opacity: 0.72;
  font-size: 0.82rem;
}

.paper-kit {
  margin-top: auto;
  padding: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.paper-kit h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.paper-kit ul,
.support-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.workspace {
  min-width: 0;
  padding: 22px;
}

.hero-stage {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #1b1f20;
  box-shadow: var(--shadow);
}

.hero-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stage::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(17, 23, 25, 0.84), rgba(17, 23, 25, 0.35) 54%, rgba(17, 23, 25, 0.06)),
    linear-gradient(0deg, rgba(17, 23, 25, 0.44), transparent 46%);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 270px;
  max-width: 720px;
  padding: 28px;
  color: #fffdf7;
}

.eyebrow,
.section-kicker,
.step-count {
  margin: 0;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-overlay .eyebrow {
  color: var(--lime);
}

.hero-overlay h1 {
  margin: 8px 0 18px;
  font-size: 3.25rem;
  line-height: 1;
}

.hero-actions,
.coach-controls,
.coach-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button,
.control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-weight: 780;
}

.ghost-button {
  color: #fffdf7;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.22);
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.58fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.technique-section,
.coach-panel {
  min-width: 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(20, 22, 29, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(20, 22, 29, 0.08);
}

.section-head,
.coach-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.section-head h2,
.coach-head h2 {
  margin: 6px 0 0;
  font-size: 1.6rem;
  line-height: 1.12;
}

.count-pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  color: #26302f;
  background: #eef2e9;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 760;
}

.count-pill {
  white-space: nowrap;
}

.tag {
  max-width: 100%;
  justify-content: flex-start;
  overflow-wrap: anywhere;
}

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

.technique-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: 232px;
  width: 100%;
  padding: 16px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--card-accent, var(--teal));
  border-radius: var(--radius);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.technique-card:hover,
.technique-card:focus-visible {
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 14px 28px rgba(20, 22, 29, 0.11);
}

.technique-card.is-active {
  border-color: var(--card-accent, var(--teal));
  box-shadow: 0 14px 30px rgba(20, 22, 29, 0.13);
}

.card-top {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.method-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #101414;
  background: color-mix(in srgb, var(--card-accent, var(--teal)) 28%, white);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.minutes {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  white-space: nowrap;
}

.technique-card h3 {
  margin: 0 0 8px;
  font-size: 1.16rem;
  line-height: 1.18;
}

.technique-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.card-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.group-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.arrow-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f4f6f2;
  font-weight: 850;
}

.coach-panel {
  position: sticky;
  top: 22px;
}

.timer-face {
  display: grid;
  place-items: center;
  min-width: 92px;
  height: 54px;
  padding: 0 12px;
  color: #fffdf7;
  background: var(--ink);
  border-radius: var(--radius);
  font-size: 1.35rem;
  font-weight: 850;
}

.coach-tags {
  margin-top: 14px;
}

.tag:nth-child(2n) {
  background: #fff0eb;
}

.tag:nth-child(3n) {
  background: #eef4ff;
}

.step-meter {
  height: 10px;
  margin: 18px 0;
  overflow: hidden;
  background: #e8ece8;
  border-radius: 999px;
}

.step-meter-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--lime), var(--coral));
  transition: width 180ms ease;
}

.coach-step {
  padding: 18px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.coach-step h3 {
  margin: 8px 0 8px;
  font-size: 1.28rem;
}

.coach-step p {
  margin: 0;
  color: #303642;
  line-height: 1.55;
}

.paper-prompt {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px;
  background: #edf7f4;
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  color: #213432;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.support-grid > div {
  min-width: 0;
  padding: 14px;
  background: #f6f8f5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.support-grid h3 {
  margin: 0 0 8px;
  font-size: 0.94rem;
}

.support-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.step-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mini-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mini-step.is-current {
  border-color: var(--teal);
  background: #edf7f4;
}

.mini-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e8ece8;
  font-weight: 850;
}

.mini-title {
  overflow-wrap: anywhere;
  font-weight: 760;
}

.mini-time {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
  white-space: nowrap;
}

.coach-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.control-button {
  min-width: 0;
  color: var(--ink);
  background: #f2f4ef;
  border: 1px solid var(--line);
}

.control-button:hover,
.control-button:focus-visible {
  outline: none;
  border-color: var(--teal);
}

.control-button.primary {
  color: #fffdf7;
  background: var(--teal);
  border-color: var(--teal);
}

.control-button.secondary {
  background: #ffffff;
}

.is-running #timerToggle {
  color: #fffdf7;
  background: var(--coral);
  border-color: var(--coral);
}

.focus-mode .year-rail,
.focus-mode .hero-stage,
.focus-mode .technique-section {
  display: none;
}

.focus-mode .app-shell,
.focus-mode .planner-grid {
  display: block;
}

.focus-mode .workspace {
  max-width: 980px;
  margin: 0 auto;
}

.focus-mode .coach-panel {
  position: static;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .planner-grid {
    grid-template-columns: 1fr;
  }

  .coach-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .year-rail {
    position: static;
    height: auto;
    padding: 14px;
  }

  .year-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .paper-kit {
    display: none;
  }

  .workspace {
    padding: 14px;
  }

  .hero-stage,
  .hero-overlay {
    min-height: 230px;
  }

  .hero-overlay h1 {
    font-size: 2.35rem;
  }

  .technique-grid {
    grid-template-columns: 1fr;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .year-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head,
  .coach-head {
    display: grid;
  }

  .count-pill,
  .timer-face {
    justify-self: start;
  }

  .coach-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-step {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .mini-time {
    grid-column: 2;
  }
}
