:root {
  --ink: #131b2e;
  --muted: #3f4850;
  --outline: #707881;
  --outline-soft: #bfc7d2;
  --paper: #f8fafc;
  --card: #ffffff;
  --primary: #0284c7;
  --primary-deep: #006194;
  --primary-soft: #e0f2fe;
  --secondary: #059669;
  --secondary-soft: #d1fae5;
  --amber: #f59e0b;
  --locked: #94a3b8;
  --learning: #0284c7;
  --shadow-1: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 16px -2px rgba(15, 23, 42, 0.03);
  --shadow-2: 0 4px 12px -1px rgba(2, 132, 199, 0.12), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --radius-card: 0.95rem;
  --radius-btn: 0.65rem;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --top-h: 4.1rem;
}

* { box-sizing: border-box; }

html { font-size: 15px; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, #dbeafe 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, #d1fae5 0%, transparent 50%),
    linear-gradient(180deg, #f8fafc, #eef2ff 55%, #f8fafc);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  flex-wrap: wrap;
  flex-shrink: 0;
  min-height: var(--top-h);
}

.brand-block,
.top-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.top-left {
  gap: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.brand-logo img {
  display: block;
  height: 3.6rem;
  width: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  color: var(--primary-deep);
  background: var(--primary-soft);
  flex-shrink: 0;
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tagline {
  font-size: 0.78rem;
  color: var(--muted);
}

.subject-pill {
  position: relative;
  flex-shrink: 0;
  margin-left: 1.25rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primary-deep);
  background: var(--primary-soft);
}

.subject-pill::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: color-mix(in srgb, var(--outline-soft) 90%, transparent);
}

.top-left .tagline {
  margin-left: 0.55rem;
}

.top-nav {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.nav-item {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
}

.nav-item.active,
.nav-item[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
}

.me-main {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0.75rem 1.1rem 2.5rem;
  flex: 1;
}

.me-head h1 {
  margin: 0 0 0.25rem;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.error {
  margin: 0.75rem 0 0;
  color: #ba1a1a;
  font-weight: 600;
}

.me-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1.15rem;
}

.me-block {
  background: var(--card);
  border: 1px solid rgba(191, 199, 210, 0.55);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
  padding: 1rem 1.05rem 1.1rem;
}

.me-block h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.path-block { grid-column: 1 / -1; }

.path-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.35rem;
  position: relative;
}

.path-track::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, var(--secondary), var(--primary-soft));
  opacity: 0.55;
}

.path-node {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.45rem 0.35rem 0.2rem;
  position: relative;
  z-index: 1;
}

.path-node .glyph {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  background: #fff;
  border: 2px solid var(--outline-soft);
  color: var(--locked);
  flex-shrink: 0;
}

.path-node[data-status="mastered"] .glyph {
  border-color: var(--secondary);
  color: var(--secondary);
  background: var(--secondary-soft);
}

.path-node[data-status="learning"] .glyph {
  border-color: var(--learning);
  color: var(--learning);
  background: var(--primary-soft);
}

.path-node[data-status="review_due"] .glyph {
  border-color: var(--amber);
  color: #b45309;
  background: #fffbeb;
}

.path-node.current {
  background: var(--primary-soft);
  border-radius: 0.55rem;
}

.path-node .title {
  font-weight: 650;
  font-size: 0.92rem;
}

.path-node.current .title::after {
  content: " · nyt";
  font-weight: 600;
  color: var(--primary-deep);
  font-size: 0.78rem;
}

.legend {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.skill-name {
  margin: -0.35rem 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 750;
}

.segment-track {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0.15rem;
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  position: relative;
}

.segment-track::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0.95rem;
  height: 3px;
  background: var(--outline-soft);
  border-radius: 99px;
  z-index: 0;
}

.seg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.seg-dot {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 2px solid var(--outline-soft);
  background: #fff;
}

.seg[data-state="ACHIEVED"] .seg-dot {
  background: var(--secondary);
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px var(--secondary-soft);
}

.seg[data-state="IN_PROGRESS"] .seg-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.seg-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.seg[data-state="ACHIEVED"] .seg-label,
.seg[data-state="IN_PROGRESS"] .seg-label {
  color: var(--ink);
}

.segment-count {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.goal-box {
  margin-top: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, var(--primary-soft), #f0fdf4);
  border: 1px solid rgba(2, 132, 199, 0.15);
}

.goal-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-deep);
}

.goal-label {
  margin: 0.2rem 0 0;
  font-weight: 750;
  font-size: 0.98rem;
}

.goal-hint {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.vs-cards,
.breakthrough-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.vs-card,
.break-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.65rem;
  background: var(--paper);
  border: 1px solid rgba(191, 199, 210, 0.45);
}

.vs-card[data-tone="up"] {
  background: var(--secondary-soft);
  border-color: rgba(5, 150, 105, 0.25);
}

.vs-icon,
.break-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  background: #fff;
  color: var(--primary-deep);
  flex-shrink: 0;
}

.vs-card[data-tone="up"] .vs-icon {
  color: var(--secondary);
  background: #fff;
}

.vs-title,
.break-label {
  margin: 0;
  font-weight: 750;
  font-size: 0.9rem;
}

.vs-detail,
.break-msg {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.break-skill {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-deep);
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.lab-summary {
  margin: 0 0 0.65rem;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.92rem;
}

.lab-stage-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.lab-stage-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--outline-soft);
  background: var(--paper);
  font-size: 0.88rem;
  font-weight: 600;
}

.lab-stage-list li[data-ok="true"] {
  border-color: var(--secondary);
  background: var(--secondary-soft);
}

.lab-stage-list li[data-ok="false"] {
  border-color: #f0b4b4;
  background: #fce8e8;
}

.lab-stage-list .lab-stage-meta {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.78rem;
}

.lab-link {
  font-weight: 700;
  color: var(--primary-deep);
  text-decoration: none;
  font-size: 0.9rem;
}

.lab-link:hover {
  text-decoration: underline;
}

.me-cta {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-btn);
  background: var(--primary);
  color: #fff;
  font-weight: 750;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow-2);
}

.cta:hover {
  background: var(--primary-deep);
}

.cta-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 28rem;
}

@media (max-width: 720px) {
  .me-grid {
    grid-template-columns: 1fr;
  }

  .me-head h1 {
    font-size: 1.4rem;
  }

  .top-nav {
    width: 100%;
  }
}
