:root {
  /* Prevent browser auto-darkening; the site's explicit dark selector opts in below. */
  color-scheme: only light;
  --bg: #ffffff;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: #ffffff;
  --text: #111827;
  --text-muted: #4b5563;
  --line: rgba(17, 24, 39, 0.12);
  --line-strong: rgba(17, 24, 39, 0.34);
  --brand: #4b5563;
  --accent: #6b7280;
  --danger: #ef4444;
  --success: #16a34a;
  --shadow: 0 18px 44px rgba(17, 24, 39, 0.1);
  --bg-grad-a: rgba(148, 163, 184, 0.16);
  --bg-grad-b: rgba(203, 213, 225, 0.18);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0c;
  --surface: rgba(24, 24, 27, 0.78);
  --surface-strong: #121214;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(212, 212, 216, 0.38);
  --brand: #d4d4d8;
  --accent: #a1a1aa;
  --danger: #ff7b7b;
  --success: #22c55e;
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.56);
  --bg-grad-a: rgba(63, 63, 70, 0.22);
  --bg-grad-b: rgba(39, 39, 42, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: "Space Grotesk", "Outfit", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, var(--bg-grad-a), transparent 35%),
    radial-gradient(circle at 90% 80%, var(--bg-grad-b), transparent 30%),
    var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.aurora {
  position: fixed;
  z-index: -1;
  width: 42rem;
  height: 42rem;
  filter: blur(80px);
  opacity: 0.22;
  pointer-events: none;
}

.aurora-top {
  top: -16rem;
  right: -10rem;
  background: radial-gradient(circle, #9ca3af, transparent 60%);
}

.aurora-bottom {
  bottom: -18rem;
  left: -8rem;
  background: radial-gradient(circle, #a1a1aa, transparent 60%);
  animation-delay: -8s;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(120%);
  transition: background-color 250ms ease, border-color 250ms ease;
}

.site-header.scrolled {
  background: color-mix(in oklab, var(--surface) 82%, transparent);
  border-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.72rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-label {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 100%;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.nav-links a[aria-current="page"]::after,
.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  cursor: pointer;
}

.theme-toggle-track {
  width: 2.3rem;
  height: 1.25rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--brand) 55%, #999);
  display: flex;
  align-items: center;
  padding: 0.12rem;
}

.theme-toggle-thumb {
  width: 0.96rem;
  height: 0.96rem;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
  transition: transform 220ms ease;
}

:root[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(1.03rem);
}

.theme-toggle-label {
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-trigger {
  white-space: nowrap;
}

.auth-user {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0.85rem;
  padding: 0.34rem 0.42rem 0.34rem 0.64rem;
}

#authWelcome {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.page-shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 0.8rem 0 4rem;
}

.hero {
  padding: 2.3rem 0 1.8rem;
  display: grid;
  gap: 0.9rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.12;
}

.hero-text {
  margin: 0;
  color: var(--text-muted);
  max-width: 74ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-brand-visual {
  width: min(760px, 100%);
  height: clamp(220px, 32vw, 340px);
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 94%, transparent);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.hero-brand-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.08);
  pointer-events: none;
}

.content-section {
  margin-top: 2rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0.3rem 0 0;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  font-family: "Outfit", sans-serif;
}

.section-copy {
  margin: 0;
  max-width: 48ch;
  color: var(--text-muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.toolbar label {
  display: grid;
  gap: 0.28rem;
}

.field-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

input,
select,
textarea {
  min-height: 2.55rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font: inherit;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--brand) 65%, white);
  outline-offset: 2px;
}

textarea {
  min-height: 5.6rem;
  resize: vertical;
}

.btn {
  border: 0;
  border-radius: 0.85rem;
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.btn-primary {
  background: linear-gradient(120deg, #111827, #374151);
  color: #f9fafb;
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .btn-primary {
  background: linear-gradient(120deg, #3f3f46, #27272a);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  color: var(--text);
  backdrop-filter: blur(10px) saturate(112%);
}

.btn-compact {
  padding: 0.45rem 0.7rem;
  border-radius: 0.65rem;
  font-size: 0.78rem;
}

.btn.wide {
  width: 100%;
}

.featured-blog-card {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  backdrop-filter: blur(16px) saturate(115%);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 1rem;
  min-height: 260px;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.featured-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.featured-blog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.topic-pill,
.meta-pill,
.level-pill,
.rating-pill,
.meta-badge {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.topic-pill,
.level-pill {
  color: var(--brand);
  background: color-mix(in oklab, var(--brand) 15%, transparent);
}

.meta-pill,
.meta-badge {
  color: var(--text-muted);
  background: color-mix(in oklab, var(--surface) 92%, transparent);
}

.rating-pill {
  color: var(--text-muted);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
}

.featured-blog-card h3 {
  margin: 0.7rem 0 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.featured-preview {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.featured-rich-content {
  margin-top: 0.92rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
}

.featured-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.featured-media-shell {
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  backdrop-filter: blur(14px);
}

.featured-media-image,
.featured-media-video {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.featured-meta {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.options-title {
  margin: 0 0 0.65rem;
  font-family: "Outfit", sans-serif;
}

.blog-option-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.85rem;
}

.blog-option {
  grid-column: span 4;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.82rem;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px) saturate(112%);
  box-shadow: var(--shadow);
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.blog-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.blog-option.active {
  border-color: color-mix(in oklab, var(--brand) 65%, white);
}

.blog-option h4 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 1.03rem;
  line-height: 1.24;
}

.blog-option p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.blog-option .meta-row {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.split-promo {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.split-promo article {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.95rem;
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px) saturate(112%);
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.split-promo article:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.split-promo h3 {
  margin: 0.45rem 0 0;
  font-family: "Outfit", sans-serif;
}

.split-promo p {
  color: var(--text-muted);
}

.quiet-coming-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  border: 1px dashed var(--line);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: color-mix(in oklab, var(--surface) 94%, transparent);
  max-width: 52ch;
}

.practice-launch-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 1.2rem;
  background: color-mix(in oklab, var(--surface) 82%, transparent);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.practice-launch-note h2 {
  margin: 0.3rem 0 0;
  font-family: "Outfit", sans-serif;
}

.practice-launch-note p:not(.eyebrow) {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
}

.systems-map {
  margin-top: 2.2rem;
}

.systems-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.92fr);
  gap: 1rem;
  align-items: stretch;
}

.workflow-panel,
.loop-panel {
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.58);
  background: color-mix(in oklab, var(--surface) 78%, transparent);
  backdrop-filter: blur(20px) saturate(116%);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .workflow-panel,
:root[data-theme="dark"] .loop-panel {
  background: rgba(18, 18, 19, 0.64);
}

.workflow-panel {
  padding: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.workflow-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  min-height: 6.3rem;
  padding: 0.95rem;
  border: 1px solid color-mix(in oklab, var(--line) 76%, transparent);
  border-radius: 0.88rem;
  background: rgba(255, 255, 255, 0.5);
  background: color-mix(in oklab, var(--surface-strong) 58%, transparent);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.workflow-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--text-muted) 48%, var(--line));
  background: color-mix(in oklab, var(--surface-strong) 76%, transparent);
}

.workflow-index {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--text-muted);
  background: color-mix(in oklab, var(--surface) 72%, transparent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.workflow-card h3,
.loop-panel h3 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  line-height: 1.2;
}

.workflow-card h3 {
  font-size: 1.05rem;
}

.workflow-card p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.loop-panel {
  padding: 1rem;
  display: grid;
  align-content: center;
  gap: 0.9rem;
  overflow: hidden;
  position: relative;
}

.loop-panel::before {
  content: "";
  position: absolute;
  inset: -34% auto auto 38%;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 68%);
  pointer-events: none;
}

.panel-kicker {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loop-panel h3 {
  max-width: 14ch;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.loop-diagram {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.42rem;
  margin: 0.25rem 0;
}

.loop-node {
  min-height: 5.45rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 0.85rem;
  display: grid;
  align-content: center;
  gap: 0.28rem;
  background: color-mix(in oklab, var(--surface-strong) 70%, transparent);
}

.loop-node-core {
  outline: 1px solid color-mix(in oklab, var(--text) 24%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--surface) 70%, transparent);
}

.loop-node strong {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
}

.loop-node span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.loop-rail {
  width: 1px;
  height: 1.25rem;
  margin-left: 1.2rem;
  background: var(--line-strong);
  position: relative;
}

.loop-rail::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.08rem;
  width: 0.42rem;
  height: 0.42rem;
  border-bottom: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: translateX(-50%) rotate(45deg);
}

.loop-copy {
  margin: 0;
  color: var(--text-muted);
  max-width: 46ch;
  font-size: 0.9rem;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem;
}

.card {
  grid-column: span 4;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.95rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.72rem;
  opacity: 1;
  transform: translateY(0);
}

.card h3 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 1.16rem;
  line-height: 1.2;
}

.card-description {
  margin: 0;
  color: var(--text-muted);
}

.rich-content {
  color: var(--text);
}

.rich-content > *:first-child {
  margin-top: 0;
}

.rich-content > *:last-child {
  margin-bottom: 0;
}

.rich-content p,
.rich-content ul,
.rich-content ol,
.rich-content blockquote,
.rich-content pre {
  margin: 0.62rem 0;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  margin: 0.85rem 0 0.5rem;
  font-family: "Outfit", sans-serif;
  line-height: 1.2;
}

.rich-content h1 {
  font-size: clamp(1.36rem, 2vw, 1.8rem);
}

.rich-content h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.52rem);
}

.rich-content h3 {
  font-size: clamp(1.08rem, 1.5vw, 1.32rem);
}

.rich-content ul,
.rich-content ol {
  padding-left: 1.25rem;
}

.rich-content li + li {
  margin-top: 0.35rem;
}

.rich-content blockquote {
  border-left: 3px solid color-mix(in oklab, var(--brand) 62%, transparent);
  padding-left: 0.75rem;
  color: var(--text-muted);
}

.rich-content a {
  color: var(--brand);
  text-decoration-thickness: 1.5px;
}

.rich-content code {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  padding: 0.12rem 0.32rem;
  border-radius: 0.38rem;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
}

.rich-content pre {
  overflow-x: auto;
  padding: 0.74rem 0.85rem;
  border-radius: 0.78rem;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
}

.rich-content pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

.reader-panel {
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.reader-breadcrumb {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.reader-hero-meta {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.reader-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.reader-media-item {
  border: 1px solid var(--line);
  border-radius: 0.82rem;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  display: grid;
}

.reader-media-item img,
.reader-media-item video {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.reader-media-item > .btn {
  margin: 0.8rem;
}

.reader-section-title {
  margin: 0;
  font-family: "Outfit", sans-serif;
}

.reader-fallback {
  margin: 0;
  color: var(--text-muted);
}

.card-media-shell {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface) 92%, transparent);
}

.card-media-image,
.card-media-video {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

.card-topline,
.card-footer,
.course-meta,
.launch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 1rem;
  padding: 1.5rem;
  color: var(--text-muted);
  background: color-mix(in oklab, var(--surface) 92%, transparent);
}

.launch-roadmap {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 1rem;
  margin-bottom: 0.9rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.launch-roadmap h2,
.launch-roadmap h3 {
  margin: 0;
  font-family: "Outfit", sans-serif;
}

.launch-roadmap p {
  margin: 0.62rem 0 0;
  color: var(--text-muted);
}

.launch-cta {
  margin-top: 0.8rem;
}

.coming-soon-shell {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.coming-soon-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 18px,
    color-mix(in oklab, var(--brand) 14%, transparent) 18px 20px
  );
  opacity: 0.35;
  pointer-events: none;
}

.coming-soon-banner {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  color: #fff;
  margin-bottom: 0.8rem;
}

.problem-list {
  display: grid;
  gap: 0.6rem;
  position: relative;
}

.problem-item {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: color-mix(in oklab, var(--surface) 96%, transparent);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.problem-item h3 {
  margin: 0;
  font-size: 1rem;
}

.problem-item p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.difficulty {
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-weight: 700;
  border: 1px solid var(--line);
}

.difficulty.beginner {
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
}

.difficulty.junior {
  color: var(--success);
}

.difficulty.intermediate {
  color: #f59e0b;
}

.difficulty.advanced {
  color: var(--danger);
}

.difficulty.expert {
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 42%, transparent);
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
}

.admin-gate {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.auth-lock-mode .site-header,
.auth-lock-mode .hero,
.auth-lock-mode .admin-overview,
.auth-lock-mode .admin-builder-grid {
  display: none !important;
}

.auth-lock-mode .page-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
}

.auth-lock-mode .content-section {
  margin: 0;
  width: 100%;
  display: grid;
  place-items: center;
}

.auth-lock-mode .admin-gate {
  width: min(400px, 92vw);
  min-height: 190px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 1.2rem;
}

.auth-lock-mode .admin-gate h2 {
  margin: 0;
}

.admin-gate h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 1.25rem;
}

.admin-gate p {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.admin-kpi {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  gap: 0.25rem;
}

.admin-kpi p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.admin-kpi strong {
  font-family: "Outfit", sans-serif;
  font-size: 1.9rem;
  line-height: 1.1;
}

.admin-kpi span {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.admin-builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  gap: 0.95rem;
  align-content: start;
}

.admin-card-wide {
  grid-column: 1 / -1;
}

.admin-card-header h2 {
  margin: 0.35rem 0 0;
  font-family: "Outfit", sans-serif;
  font-size: 1.45rem;
  line-height: 1.15;
}

.admin-form {
  display: grid;
  gap: 0.78rem;
}

.admin-form label {
  display: grid;
  gap: 0.3rem;
}

.admin-two-col {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  padding: 0 0.75rem;
}

.admin-checkbox input {
  min-height: auto;
  width: 1rem;
  height: 1rem;
}

.admin-checkbox span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.admin-markdown-label {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.65rem;
  background: color-mix(in oklab, var(--surface) 95%, transparent);
}

.admin-markdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin-markdown-preview {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--surface) 91%, transparent);
  padding: 0.8rem;
  min-height: 7rem;
}

.admin-upload-stack {
  border: 1px dashed var(--line);
  border-radius: 0.8rem;
  padding: 0.62rem;
  background: color-mix(in oklab, var(--surface) 95%, transparent);
}

.admin-upload-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.admin-upload-controls input[type="file"] {
  min-height: auto;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.42rem 0.55rem;
  background: color-mix(in oklab, var(--surface) 94%, transparent);
}

.admin-upload-controls .btn {
  white-space: nowrap;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-list {
  display: grid;
  gap: 0.7rem;
}

.admin-list-row {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: color-mix(in oklab, var(--surface) 95%, transparent);
  padding: 0.82rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.admin-list-main h3 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 1.07rem;
}

.admin-list-main p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.89rem;
}

.admin-row-meta {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: flex-end;
}

.status-pill {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.status-pill.published {
  color: var(--success);
  background: color-mix(in oklab, var(--success) 14%, transparent);
}

.status-pill.draft {
  color: var(--brand);
  background: color-mix(in oklab, var(--brand) 15%, transparent);
}

.status-pill.archived {
  color: var(--text-muted);
  background: color-mix(in oklab, var(--surface) 90%, transparent);
}

.role-pill {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.role-pill.admin,
.role-pill.editor,
.role-pill.course_manager {
  color: var(--success);
  background: color-mix(in oklab, var(--success) 13%, transparent);
}

body.admin-shell {
  --brand: #6b7280;
  --accent: #9ca3af;
  --line: rgba(15, 23, 42, 0.14);
  --shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] body.admin-shell {
  --bg: #0c0c0d;
  --surface: rgba(22, 22, 24, 0.94);
  --surface-strong: #141416;
  --text: #f5f5f7;
  --text-muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #d4d4d8;
  --accent: #a1a1aa;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  --bg-grad-a: rgba(24, 24, 27, 0.42);
  --bg-grad-b: rgba(39, 39, 42, 0.36);
}

body.admin-shell .aurora {
  opacity: 0.08;
}

body.admin-shell .aurora-top {
  background: radial-gradient(circle, #6b7280, transparent 64%);
}

body.admin-shell .aurora-bottom {
  background: radial-gradient(circle, #52525b, transparent 64%);
}

body.admin-shell .site-header {
  border-bottom-color: var(--line);
}

body.admin-shell .site-header.scrolled {
  background: color-mix(in oklab, var(--surface-strong) 95%, transparent);
}

body.admin-shell .brand-icon {
  border-radius: 0.58rem;
}

body.admin-shell .hero h1,
body.admin-shell .hero h2 {
  letter-spacing: -0.02em;
}

body.admin-shell .eyebrow {
  color: var(--text-muted);
}

body.admin-shell .btn-primary {
  background: linear-gradient(180deg, #f3f4f6, #e5e7eb);
  color: #111827;
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.16);
}

:root[data-theme="dark"] body.admin-shell .btn-primary {
  background: linear-gradient(180deg, #3f3f46, #27272a);
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

body.admin-shell .btn-secondary,
body.admin-shell .theme-toggle,
body.admin-shell .auth-user {
  background: color-mix(in oklab, var(--surface-strong) 96%, transparent);
}

body.admin-shell .admin-kpi,
body.admin-shell .admin-card,
body.admin-shell .admin-gate,
body.admin-shell .admin-list,
body.admin-shell .admin-list-row,
body.admin-shell input,
body.admin-shell select,
body.admin-shell textarea {
  border-radius: 0.75rem;
  box-shadow: none;
}

body.admin-shell .admin-kpi,
body.admin-shell .admin-card,
body.admin-shell .admin-gate {
  background: color-mix(in oklab, var(--surface-strong) 94%, transparent);
  border-color: var(--line);
}

body.admin-shell .admin-list-row {
  background: color-mix(in oklab, var(--surface-strong) 96%, transparent);
}

body.admin-shell .topic-pill,
body.admin-shell .meta-pill,
body.admin-shell .level-pill,
body.admin-shell .rating-pill,
body.admin-shell .meta-badge,
body.admin-shell .status-pill,
body.admin-shell .role-pill {
  color: var(--text-muted);
  border-color: var(--line);
  background: transparent;
}

.role-pill.student {
  color: var(--text-muted);
  background: color-mix(in oklab, var(--surface) 90%, transparent);
}

.auth-dialog {
  width: min(500px, 94vw);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 0;
  background: transparent;
}

.auth-dialog::backdrop {
  backdrop-filter: blur(6px);
  background: rgba(2, 7, 18, 0.45);
}

.auth-panel {
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 1.1rem;
  padding: 1.15rem;
  display: grid;
  gap: 0.85rem;
  position: relative;
}

.auth-panel h2 {
  margin: 0 0 0.1rem;
  font-family: "Outfit", sans-serif;
  letter-spacing: 0.01em;
}

.auth-note {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.7rem;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  color: var(--text-muted);
  font-size: 0.86rem;
}

.auth-panel label {
  display: grid;
  gap: 0.35rem;
}

.auth-panel input {
  min-height: 2.75rem;
}

.auth-panel .btn.wide {
  min-height: 2.75rem;
}

.close-dialog {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 0.55rem;
  width: 1.9rem;
  height: 1.9rem;
  cursor: pointer;
}

.auth-switch-copy {
  margin: 0.15rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.form-feedback {
  min-height: 1.35rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-feedback.success {
  color: var(--success);
}

.form-feedback.error {
  color: var(--danger);
}

.auth-assist {
  display: flex;
  align-items: center;
}

.runtime-error-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(820px, calc(100vw - 2rem));
  border: 1px solid color-mix(in oklab, var(--danger) 62%, transparent);
  background: color-mix(in oklab, var(--surface-strong) 90%, var(--danger) 10%);
  color: var(--text);
  border-radius: 0.8rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.84rem;
  box-shadow: var(--shadow);
}

/* C practice workspace */
.practice-page {
  min-width: 320px;
}

.practice-shell {
  width: min(1920px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.practice-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: 2rem;
  align-items: end;
  padding: 1.4rem 0 1.5rem;
}

.practice-intro h1 {
  max-width: 18ch;
  margin: 0.35rem 0 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 4vw, 4.15rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.practice-intro > p {
  max-width: 58ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.execution-context {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  backdrop-filter: blur(22px) saturate(110%);
  box-shadow: var(--shadow);
}

.execution-context-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(18rem, 1.15fr);
  gap: 1rem;
  align-items: end;
}

.execution-context-heading h2 {
  max-width: 24ch;
  margin: 0.25rem 0 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  letter-spacing: -0.025em;
}

.execution-context-heading > p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.execution-models {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.7rem;
  align-items: stretch;
  margin-top: 0.9rem;
}

.execution-models article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--surface-strong) 66%, transparent);
}

.execution-models article > strong {
  font-size: 0.85rem;
}

.execution-models article > small {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.execution-models article > p {
  grid-column: 1 / -1;
  margin: 0.3rem 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.context-kicker {
  grid-column: 1 / -1;
  width: fit-content;
  margin-bottom: 0.3rem;
  padding: 0.18rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.execution-model-divider {
  align-self: center;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
}

.abi-comparison {
  margin-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.abi-comparison summary {
  padding: 0.7rem 0.1rem 0;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
}

.abi-table {
  margin-top: 0.7rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.abi-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  min-height: 2.15rem;
  align-items: center;
}

.abi-row + .abi-row {
  border-top: 1px solid var(--line);
}

.abi-row > * {
  padding: 0.42rem 0.6rem;
  font-size: 0.72rem;
}

.abi-row > * + * {
  border-left: 1px solid var(--line);
}

.abi-header {
  color: var(--text-muted);
  background: color-mix(in oklab, var(--surface-strong) 76%, transparent);
  font-weight: 750;
}

.abi-row .matching::after {
  content: " same";
  color: var(--success);
  font-size: 0.6rem;
}

.abi-row .different::after {
  content: " differs";
  color: #f59e0b;
  font-size: 0.6rem;
}

.abi-comparison > p {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.abi-reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.55rem;
}

.abi-reference-links a {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
  text-underline-offset: 0.18rem;
}

.practice-workspace {
  --catalog-width: 17rem;
  --workbench-height: max(42rem, calc(100dvh - 6.3rem));
  display: grid;
  grid-template-columns: clamp(14rem, var(--catalog-width), 28rem) 0.75rem minmax(0, 1fr);
  gap: 0;
  align-items: start;
  transition: grid-template-columns 260ms cubic-bezier(0.2, 0.8, 0.2, 1), gap 260ms ease;
}

.practice-workspace.catalog-collapsed {
  grid-template-columns: 0 0 minmax(0, 1fr);
}

.problem-catalog,
.problem-panel,
.code-studio {
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  backdrop-filter: blur(22px) saturate(110%);
  box-shadow: var(--shadow);
}

.problem-catalog {
  grid-column: 1;
  height: var(--workbench-height);
  border-radius: 1rem;
  padding: 0.8rem;
  position: sticky;
  top: 5.3rem;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  transition: opacity 180ms ease, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0s;
}

.catalog-resizer {
  grid-column: 2;
}

.problem-studio {
  grid-column: 3;
}

.catalog-collapsed .problem-catalog {
  visibility: hidden;
  opacity: 0;
  transform: translateX(-0.75rem);
  pointer-events: none;
  transition: opacity 150ms ease, transform 220ms ease, visibility 0s linear 220ms;
}

.workspace-panel-heading,
.problem-title-row,
.editor-toolbar,
.console-heading,
.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.workspace-panel-heading {
  padding: 0.3rem 0.2rem 0.8rem;
}

.problem-progress {
  margin: 0 0.15rem 0.8rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: color-mix(in oklab, var(--surface-strong) 62%, transparent);
}

.problem-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.problem-progress-copy strong {
  color: var(--text);
  font-size: 0.7rem;
}

.problem-progress-track {
  height: 0.28rem;
  margin-top: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in oklab, var(--text) 10%, transparent);
}

.problem-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
  transition: width 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.problem-filters {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin: 0 0.15rem 0.8rem;
}

.problem-filters label,
.problem-filters span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.problem-filters span {
  font-variant-numeric: tabular-nums;
}

.problem-filters select {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 2rem 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
}

.problem-filters select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--text) 42%, transparent);
  outline-offset: 2px;
}

.problem-filter-empty {
  padding: 1.2rem 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 0.75rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-align: center;
}

.workspace-panel-heading h2,
.problem-title-row h2 {
  margin: 0.18rem 0 0;
  font-family: "Outfit", sans-serif;
}

.workspace-panel-heading h2 {
  font-size: 1rem;
}

.panel-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.language-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.65rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  background: color-mix(in oklab, var(--surface-strong) 72%, transparent);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.practice-problem-list {
  display: grid;
  gap: 0.4rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
  scrollbar-gutter: stable;
}

.practice-problem-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  padding: 0.72rem 0.65rem;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.practice-problem-row:hover,
.practice-problem-row.active {
  border-color: var(--line);
  background: color-mix(in oklab, var(--surface-strong) 78%, transparent);
}

.problem-number {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.problem-row-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.simulator-mini-badge,
.simulator-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in oklab, var(--surface-strong) 82%, transparent);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.simulator-mini-badge {
  min-height: 1.25rem;
  padding: 0.15rem 0.34rem;
  font-size: 0.55rem;
}

.simulator-chip {
  min-height: 1.65rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.65rem;
}

.completion-check,
.problem-completed-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #052e16;
  background: #4ade80;
  font-weight: 900;
}

.completion-check {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  font-size: 0.78rem;
  box-shadow: 0 0 0 3px color-mix(in oklab, #4ade80 16%, transparent);
}

.practice-problem-row.completed {
  border-color: color-mix(in oklab, var(--success) 35%, var(--line));
}

.problem-completed-label {
  min-height: 1.65rem;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.practice-problem-row strong,
.practice-problem-row small {
  display: block;
}

.practice-problem-row strong {
  font-size: 0.82rem;
  line-height: 1.25;
}

.practice-problem-row small {
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.catalog-note {
  margin: 0.8rem 0.2rem 0.15rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.problem-studio {
  --problem-width: 44%;
  min-width: 0;
  height: var(--workbench-height);
  display: grid;
  grid-template-columns: minmax(20rem, var(--problem-width)) 0.75rem minmax(24rem, 1fr);
  gap: 0;
  align-items: stretch;
}

.problem-panel {
  grid-column: 1;
}

.studio-resizer {
  grid-column: 2;
  align-self: stretch;
}

.code-studio {
  grid-column: 3;
}

.workspace-resizer {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text-muted);
  background: transparent;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

.workspace-resizer::before {
  content: "";
  position: absolute;
  inset-block: 0.75rem;
  left: 50%;
  width: 1px;
  border-radius: 999px;
  background: var(--line);
  transform: translateX(-50%);
  transition: width 140ms ease, background 140ms ease;
}

.workspace-resizer span {
  position: relative;
  width: 0.25rem;
  height: 2.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 36%, transparent);
  opacity: 0;
  transform: scaleY(0.75);
  transition: opacity 140ms ease, transform 160ms ease;
}

.workspace-resizer:hover::before,
.workspace-resizer:focus-visible::before,
.workspace-resizer.is-resizing::before {
  width: 3px;
  background: color-mix(in srgb, var(--text) 52%, transparent);
}

.workspace-resizer:hover span,
.workspace-resizer:focus-visible span,
.workspace-resizer.is-resizing span {
  opacity: 1;
  transform: scaleY(1);
}

.workspace-resizer:focus-visible {
  border-radius: 0.45rem;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--text) 38%, transparent);
}

.catalog-collapsed .catalog-resizer {
  visibility: hidden;
  pointer-events: none;
}

body.practice-is-resizing,
body.practice-is-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.problem-panel,
.code-studio {
  border-radius: 1rem;
  min-width: 0;
  overflow: hidden;
}

.problem-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.problem-tabs {
  display: flex;
  align-items: center;
  min-height: 3.35rem;
  padding: 0 0.45rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface-strong) 78%, transparent);
}

.problem-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 3.35rem;
  padding: 0 0.65rem;
  border: 0;
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.problem-tabs button::after {
  content: "";
  position: absolute;
  right: 0.65rem;
  bottom: -1px;
  left: 0.65rem;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 180ms ease;
}

.problem-tabs button:hover,
.problem-tabs button.active {
  color: var(--text);
}

.problem-tabs button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.problem-tabs button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -4px;
  border-radius: 0.55rem;
}

.problem-tabs svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.solution-lock-mark {
  padding: 0.13rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.problem-tabs button.unlocked .solution-lock-mark {
  color: var(--text);
}

.problem-brief {
  min-height: 0;
  padding: clamp(1.15rem, 1.6vw, 1.65rem);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.problem-title-row {
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.problem-title-row h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.problem-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.problem-copy {
  padding: 0.85rem 0 0.25rem;
}

.problem-copy p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  line-height: 1.62;
  font-size: 0.92rem;
}

.problem-simulator-card {
  position: relative;
  margin: 0.25rem 0 0.85rem;
  overflow: hidden;
  border: 1px solid var(--text);
  border-radius: 0.9rem;
  padding: 0.9rem;
  color: var(--bg);
  background: var(--text);
}

.problem-simulator-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 34%;
  height: 100%;
  opacity: 0.13;
  background-image:
    linear-gradient(90deg, transparent 48%, currentColor 49%, currentColor 51%, transparent 52%),
    linear-gradient(transparent 48%, currentColor 49%, currentColor 51%, transparent 52%);
  background-size: 18px 18px;
  pointer-events: none;
}

.simulator-card-heading,
.simulator-card-grid {
  position: relative;
  z-index: 1;
}

.simulator-card-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.simulator-core-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid color-mix(in srgb, var(--bg) 42%, transparent);
  border-radius: 0.55rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 800;
}

.problem-simulator-card .panel-label,
.simulator-card-grid span {
  color: color-mix(in srgb, var(--bg) 64%, transparent);
}

.simulator-card-heading strong {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.85rem;
}

.simulator-card-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.simulator-card-grid > div {
  border-top: 1px solid color-mix(in srgb, var(--bg) 28%, transparent);
  padding-top: 0.6rem;
}

.simulator-card-grid span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.simulator-card-grid p,
.simulator-card-grid ul {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  line-height: 1.5;
}

.simulator-card-grid ul {
  display: grid;
  gap: 0.2rem;
  padding-left: 1rem;
}

.problem-platform-note {
  margin: 0.2rem 0 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: color-mix(in oklab, var(--surface-strong) 70%, transparent);
}

.platform-note-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.platform-note-heading > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 800;
}

.platform-note-heading strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.76rem;
}

.problem-platform-note ul {
  display: grid;
  gap: 0.35rem;
  margin: 0.6rem 0 0;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.example-grid {
  display: grid;
  gap: 0.65rem;
}

.problem-example {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.75rem;
  background: color-mix(in oklab, var(--surface-strong) 66%, transparent);
}

.problem-example h3,
.constraint-list h3 {
  margin: 0 0 0.55rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.88rem;
}

.problem-example div {
  display: grid;
  grid-template-columns: 3.7rem minmax(0, 1fr);
  gap: 0.5rem;
  margin-top: 0.35rem;
  align-items: center;
}

.problem-example div > span {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.problem-example code,
.constraint-list code {
  font-family: "IBM Plex Mono", monospace;
}

.problem-example code {
  min-width: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.problem-guidance {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: color-mix(in oklab, var(--surface-strong) 72%, transparent);
}

.guidance-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.guidance-heading h3 {
  margin: 0.22rem 0 0;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
}

.guidance-count {
  flex: 0 0 auto;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.guidance-meter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  margin: 0.7rem 0;
}

.guidance-meter span {
  height: 0.22rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--text) 10%, transparent);
}

.guidance-meter span.revealed {
  background: var(--text);
}

.guidance-intro {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.hint-list {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
}

.hint-list li {
  padding: 0.65rem;
  border-left: 2px solid var(--text);
  border-radius: 0 0.55rem 0.55rem 0;
  background: color-mix(in oklab, var(--bg) 62%, transparent);
}

.hint-list li > span,
.explanation-badge {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hint-list p,
.guidance-explanation p {
  margin: 0.28rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.guidance-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.4rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  color: var(--text);
  background: color-mix(in oklab, var(--surface) 76%, transparent);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
}

.guidance-btn:hover {
  border-color: color-mix(in oklab, var(--text) 30%, var(--line));
  background: var(--surface);
}

.problem-view-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.25rem;
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--text);
  background: color-mix(in oklab, var(--surface-strong) 72%, transparent);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.problem-view-cta:hover {
  border-color: color-mix(in oklab, var(--text) 28%, var(--line));
  background: var(--surface-strong);
}

.hints-page {
  padding-top: 1.25rem;
}

.guidance-heading-large h3 {
  max-width: 20ch;
  margin-top: 0.3rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.guidance-heading-large p:last-child {
  max-width: 52ch;
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.hints-page .guidance-meter {
  gap: 0.5rem;
  margin: 1.2rem 0;
}

.hints-page .guidance-meter span {
  height: 0.3rem;
}

.hint-list-spacious {
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hint-list-spacious li {
  min-height: 7rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--text);
  border-radius: 0.75rem;
}

.hint-list-spacious p {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.65;
}

.guidance-empty {
  display: grid;
  place-items: center;
  min-height: 14rem;
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.guidance-empty span,
.solution-lock-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.guidance-empty p {
  max-width: 32ch;
  margin: 0;
  line-height: 1.6;
}

.guidance-btn-large {
  min-height: 3.25rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
}

.solution-lock {
  display: flex;
  min-height: 28rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.solution-lock .panel-label {
  margin-top: 1.1rem;
}

.solution-lock h3 {
  max-width: 21ch;
  margin: 0.45rem 0 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.solution-lock > p:not(.panel-label) {
  max-width: 46ch;
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.solution-lock .problem-view-cta {
  width: min(100%, 18rem);
}

.editorial-intro {
  padding: 1rem 0 1.1rem;
  border-bottom: 1px solid var(--line);
}

.editorial-intro > p:last-child {
  max-width: 54ch;
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.problem-editorial {
  padding: 0.65rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.68;
}

.problem-editorial strong,
.problem-editorial h1,
.problem-editorial h2,
.problem-editorial h3,
.problem-editorial h4 {
  color: var(--text);
}

.problem-editorial h2,
.problem-editorial h3 {
  margin-top: 1.65rem;
  letter-spacing: -0.02em;
}

.problem-editorial pre {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  color: #e4e4e7;
  background: #0c0c0d;
  border-color: rgba(255, 255, 255, 0.12);
}

.problem-editorial pre code {
  display: block;
  width: max-content;
  min-width: 100%;
  white-space: pre;
  font-size: 0.75rem;
  line-height: 1.65;
}

.guidance-explanation {
  padding-top: 0.1rem;
}

.guidance-explanation pre {
  max-width: 100%;
  margin: 0.7rem 0 0;
  padding: 0.7rem;
  overflow-x: auto;
  border-radius: 0.6rem;
  color: #e4e4e7;
  background: #0c0c0d;
}

.guidance-explanation code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.55;
}

.problem-example code {
  padding: 0.38rem 0.48rem;
  border-radius: 0.4rem;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  font-size: 0.78rem;
}

.problem-example p {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.constraint-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
}

.constraint-list code {
  width: fit-content;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.workspace-loading {
  color: var(--text-muted);
}

.code-studio {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #0c0c0d;
  color: #f4f4f5;
  border-color: rgba(255, 255, 255, 0.12);
}

.code-workspace-body {
  --editor-height: 58%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(15rem, var(--editor-height)) auto 1.15rem minmax(10rem, 1fr);
  overflow: hidden;
}

.editor-toolbar {
  min-height: 3.35rem;
  padding: 0.55rem 0.7rem 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #121214;
}

.editor-file,
.editor-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.editor-file {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.editor-catalog-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0.28rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.45rem;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 0.66rem;
  cursor: pointer;
}

.editor-catalog-toggle:hover,
.editor-catalog-toggle:focus-visible {
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.09);
}

.editor-catalog-toggle:focus-visible {
  outline: 2px solid #f4f4f5;
  outline-offset: 2px;
}

.editor-catalog-toggle svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.editor-catalog-toggle.is-collapsed svg {
  transform: scaleX(-1);
}

.editor-status-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #a1a1aa;
}

.host-harness-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.18rem 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.035);
  font-family: "Outfit", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-btn {
  min-height: 2.15rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.55rem;
  padding: 0.38rem 0.65rem;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.editor-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.editor-btn-submit {
  color: #111;
  background: #f4f4f5;
  border-color: #f4f4f5;
}

.editor-btn-submit:hover:not(:disabled) {
  color: #000;
  background: #fff;
}

.editor-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.code-editor-shell {
  grid-row: 1;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  height: auto;
  min-height: 0;
  background: #0c0c0d;
}

.editor-console-resizer {
  grid-row: 3;
  z-index: 8;
  min-height: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #121214;
  cursor: row-resize;
}

.editor-console-resizer::before {
  inset: auto 0.75rem;
  top: 50%;
  width: auto;
  height: 1px;
  transform: translateY(-50%);
}

.editor-console-resizer span {
  width: 3.2rem;
  height: 0.25rem;
  background: #71717a;
  opacity: 0.72;
  transform: scaleX(0.75);
}

.editor-console-resizer:hover::before,
.editor-console-resizer:focus-visible::before,
.editor-console-resizer.is-resizing::before {
  width: auto;
  height: 3px;
}

.editor-console-resizer:hover span,
.editor-console-resizer:focus-visible span,
.editor-console-resizer.is-resizing span {
  transform: scaleX(1);
}

body.practice-is-resizing-vertical,
body.practice-is-resizing-vertical * {
  cursor: row-resize !important;
}

.code-editor-layer {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.line-numbers,
.code-highlight,
.code-editor,
.console-input,
.console-output {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.65;
  tab-size: 4;
}

.code-highlight,
.code-editor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0.9rem 1rem;
  white-space: pre;
  overflow: auto;
}

.code-highlight {
  z-index: 0;
  color: #e4e4e7;
  background: transparent;
  pointer-events: none;
  scrollbar-width: none;
}

.code-highlight::-webkit-scrollbar {
  display: none;
}

.line-numbers {
  height: 100%;
  margin: 0;
  padding: 0.9rem 0.7rem;
  overflow: hidden;
  color: #52525b;
  background: #101012;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  text-align: right;
  user-select: none;
}

.code-editor {
  z-index: 1;
  resize: none;
  outline: 0;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: transparent;
  caret-color: #fff;
}

.code-editor::selection {
  background: rgba(212, 212, 216, 0.26);
}

.syntax-keyword { color: #ffb86c; }
.syntax-type { color: #8bd5ca; }
.syntax-string { color: #a6da95; }
.syntax-number { color: #f5a97f; }
.syntax-comment { color: #737386; font-style: italic; }
.syntax-preprocessor { color: #eed49f; }
.syntax-constant { color: #f0c6c6; }
.syntax-function { color: #cad3f5; }

@media (forced-colors: active) {
  .code-highlight {
    display: none;
  }

  .code-editor {
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }
}

.submission-verdict {
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 5rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  animation: submission-verdict-in 300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.submission-verdict.accepted {
  color: #dcfce7;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.06));
  border-color: rgba(74, 222, 128, 0.28);
}

.submission-verdict.failed {
  color: #ffe4e6;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.18), rgba(244, 63, 94, 0.05));
  border-color: rgba(251, 113, 133, 0.25);
}

.submission-verdict-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  color: #052e16;
  background: #4ade80;
  font-size: 1.65rem;
  font-weight: 900;
  box-shadow: 0 0 0 0.4rem rgba(74, 222, 128, 0.1);
}

.submission-verdict.failed .submission-verdict-icon {
  color: #4c0519;
  background: #fb7185;
  box-shadow: 0 0 0 0.4rem rgba(251, 113, 133, 0.1);
}

.submission-verdict-copy {
  display: grid;
  gap: 0.16rem;
}

.submission-verdict-copy strong {
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
}

.submission-verdict-copy small {
  color: currentColor;
  opacity: 0.78;
  font-size: 0.75rem;
}

@keyframes submission-verdict-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .submission-verdict {
    animation: none;
  }

  .problem-progress-track span {
    transition: none;
  }
}

.console-grid {
  grid-row: 4;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.console-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
  background: #101012;
}

.console-panel + .console-panel {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.console-title,
.console-heading {
  min-height: 2.6rem;
  padding: 0.65rem 0.75rem;
  color: #d4d4d8;
  font-size: 0.72rem;
  font-weight: 700;
}

.console-title small {
  margin-left: 0.25rem;
  color: #71717a;
  font-weight: 500;
}

.console-input,
.console-output {
  width: 100%;
  min-height: 0;
  height: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  padding: 0.7rem 0.75rem;
  color: #d4d4d8;
  background: #0c0c0d;
  resize: none;
  overflow: auto;
  white-space: pre-wrap;
}

.console-input:focus {
  outline: 1px solid rgba(255, 255, 255, 0.22);
  outline-offset: -1px;
}

.run-status {
  border-radius: 999px;
  padding: 0.23rem 0.5rem;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.65rem;
  font-weight: 700;
}

.run-status.running {
  color: #facc15;
}

.run-status.success {
  color: #4ade80;
}

.run-status.error {
  color: #fb7185;
}

.editor-footer {
  justify-content: flex-start;
  flex-wrap: wrap;
  min-height: 2.6rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #71717a;
  background: #121214;
  font-size: 0.66rem;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 650ms ease, transform 650ms ease;
}

:root.js-reveal .reveal {
  opacity: 1;
  transform: translateY(0);
}

:root.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .blog-option,
  .card {
    grid-column: span 6;
  }

  .systems-map-layout {
    grid-template-columns: 1fr;
  }

  .loop-panel {
    align-content: start;
  }

  .practice-workspace {
    grid-template-columns: 1fr;
    gap: 0.75rem 0;
  }

  .practice-workspace.catalog-collapsed {
    grid-template-columns: 1fr;
  }

  .problem-catalog,
  .problem-studio {
    grid-column: 1;
  }

  .catalog-resizer {
    display: none;
  }

  .problem-catalog {
    position: static;
    height: auto;
    display: block;
  }

  .catalog-collapsed .problem-catalog {
    display: none;
  }

  .practice-problem-list {
    max-height: 28rem;
  }

  .problem-studio {
    grid-template-columns: minmax(20rem, var(--problem-width)) 0.75rem minmax(24rem, 1fr);
  }
}

@media (max-width: 860px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 0.6rem;
  }

  .nav-links {
    grid-column: 1 / -1;
    overflow-x: auto;
    padding-bottom: 0.12rem;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .execution-context-heading,
  .execution-models {
    grid-template-columns: 1fr;
  }

  .execution-model-divider {
    justify-self: center;
  }

  .section-heading {
    display: grid;
    gap: 0.45rem;
  }

  .reader-media-grid {
    grid-template-columns: 1fr;
  }

  .split-promo {
    grid-template-columns: 1fr;
  }

  .admin-overview,
  .admin-builder-grid,
  .admin-two-col {
    grid-template-columns: 1fr;
  }

  .admin-gate {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-list-row {
    flex-direction: column;
  }

  .inline-actions {
    justify-content: flex-start;
  }

  .practice-intro,
  .problem-studio {
    grid-template-columns: 1fr;
  }

  .problem-studio {
    height: auto;
    gap: 0.75rem;
  }

  .problem-panel,
  .code-studio {
    grid-column: 1;
  }

  .studio-resizer {
    display: none;
  }

  .problem-panel {
    position: static;
    height: auto;
    min-height: 40rem;
  }

  .code-studio {
    height: var(--workbench-height);
  }

  .problem-brief {
    max-height: 48rem;
  }
}

@media (max-width: 680px) {
  .blog-option,
  .card {
    grid-column: 1 / -1;
  }

  .workflow-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .workflow-index {
    width: 2rem;
    height: 2rem;
  }

  .problem-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-switch-copy {
    flex-wrap: wrap;
  }

  .admin-upload-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .practice-launch-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .practice-shell {
    width: min(100% - 1rem, 1920px);
    padding-top: 1rem;
  }

  .practice-intro {
    gap: 0.9rem;
    padding-top: 0.5rem;
  }

  .practice-intro h1 {
    font-size: clamp(2.1rem, 12vw, 3.15rem);
  }

  .problem-title-row,
  .editor-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-actions {
    width: 100%;
  }

  .editor-btn {
    flex: 1;
  }

  .problem-tabs {
    overflow-x: auto;
  }

  .problem-tabs button {
    flex: 0 0 auto;
  }

  .code-editor-shell {
    height: 24rem;
  }

  .code-studio {
    height: auto;
  }

  .code-workspace-body {
    display: block;
    overflow: visible;
  }

  .editor-console-resizer {
    display: none;
  }

  .console-grid {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .console-input,
  .console-output {
    min-height: 10rem;
  }

  .console-panel + .console-panel {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* 2026 product redesign: restrained public editorial system and neutral admin workspace. */
body.public-site {
  --bg: #ffffff;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --text: #141416;
  --text-muted: #5f6066;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.18);
  --brand: #141416;
  --accent: #3f4045;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.065);
  background: var(--bg);
  letter-spacing: -0.012em;
}

:root[data-theme="dark"] body.public-site {
  --bg: #000000;
  --surface: rgba(28, 28, 30, 0.72);
  --surface-strong: #1c1c1e;
  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --brand: #f5f5f7;
  --accent: #d2d2d7;
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.56);
}

body.public-site .aurora {
  opacity: 0.025;
  filter: blur(140px);
}

:root[data-theme="dark"] body.public-site .aurora {
  opacity: 0.08;
}

body.public-site .site-header {
  top: 12px;
  width: min(1180px, calc(100% - 24px));
  min-height: 58px;
  margin: 12px auto 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}

:root[data-theme="dark"] body.public-site .site-header {
  background: rgba(20, 20, 22, 0.92);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.38);
}

body.public-site .site-header.scrolled {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.985);
}

:root[data-theme="dark"] body.public-site .site-header.scrolled {
  background: rgba(20, 20, 22, 0.96);
}

body.public-site .brand {
  min-width: 240px;
  gap: 0.65rem;
}

body.public-site .brand-icon {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
}

body.public-site .brand-label {
  font-size: 0.92rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body.public-site .brand-subtitle {
  margin-top: 0.15rem;
  font-size: 0.68rem;
}

body.public-site .nav-links {
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 999px;
}

body.public-site .nav-links a {
  padding: 0.48rem 0.8rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 180ms ease, background-color 180ms ease;
}

body.public-site .nav-links a::after {
  display: none;
}

body.public-site .nav-links a:hover,
body.public-site .nav-links a:focus-visible {
  color: var(--text);
}

body.public-site .nav-links a[aria-current="page"] {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

body.public-site .header-actions {
  min-width: 240px;
  justify-content: flex-end;
}

body.public-site .theme-toggle,
body.public-site .auth-user,
body.public-site .btn {
  border-radius: 999px;
}

body.public-site .theme-toggle {
  height: 38px;
  padding-right: 0.6rem;
  background: transparent;
}

body.public-site .theme-toggle-track {
  width: 2rem;
  height: 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #d1d1d6;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.public-site .theme-toggle-thumb {
  width: 0.84rem;
  height: 0.84rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] body.public-site .theme-toggle-track {
  border-color: rgba(255, 255, 255, 0.2);
  background: #3a3a3c;
}

:root[data-theme="dark"] body.public-site .theme-toggle-thumb {
  transform: translateX(0.9rem);
}

body.public-site .btn {
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
}

body.public-site .btn-primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

body.public-site .btn-primary:hover {
  background: color-mix(in srgb, var(--text) 84%, transparent);
}

body.public-site .btn-secondary {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  color: var(--text);
}

.modern-shell {
  width: min(1180px, calc(100% - 40px));
  padding: 4.5rem 0 7rem;
}

.modern-hero {
  min-height: 610px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(4rem, 9vw, 8rem) 0;
}

.modern-hero-copy {
  max-width: 960px;
}

.modern-hero h1,
.modern-statement h2,
.editorial-heading h2,
.archive-heading h2,
.learning-feature h2,
.learning-roadmap h2,
.editorial-cta h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.modern-hero h1 {
  max-width: 900px;
  font-size: clamp(3.7rem, 7.5vw, 6.8rem);
  font-weight: 700;
}

.modern-lead {
  max-width: 690px;
  margin: 2rem 0 0;
  color: var(--text-muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
  letter-spacing: -0.025em;
}

body.public-site .eyebrow {
  margin-bottom: 1.1rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
}

.modern-statement {
  padding: clamp(6rem, 12vw, 11rem) 0;
  border-top: 1px solid var(--line);
}

.modern-statement h2 {
  max-width: 1050px;
  font-size: clamp(3rem, 6vw, 6rem);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle-card {
  min-height: 340px;
  padding: 3rem 2.5rem 3rem 0;
}

.principle-card + .principle-card {
  padding-left: 2.5rem;
  border-left: 1px solid var(--line);
}

.principle-card span,
.roadmap-grid article > span {
  display: block;
  margin-bottom: 5rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.principle-card h3,
.roadmap-grid h3 {
  margin: 0 0 0.8rem;
  font-family: "Outfit", sans-serif;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.principle-card p,
.roadmap-grid p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.platform-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 7rem 0 1rem;
}

.platform-card {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2rem, 4vw, 3.5rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--surface-strong);
  color: var(--text);
  text-decoration: none;
  transition: transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 350ms ease;
}

.platform-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.12);
}

.platform-card-dark {
  background: #101010;
  color: #f5f5f7;
}

.platform-card h2 {
  max-width: 540px;
  margin: 0 0 2.2rem;
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.platform-card > span {
  font-weight: 650;
}

.blogs-hero {
  min-height: 560px;
}

.editorial-section {
  padding: clamp(5rem, 10vw, 8rem) 0;
  border-top: 1px solid var(--line);
}

.editorial-heading,
.archive-heading,
.learning-roadmap .section-heading,
.editorial-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 4rem;
  align-items: end;
}

.editorial-heading h2,
.archive-heading h2,
.learning-roadmap h2,
.editorial-cta h2 {
  font-size: clamp(2.7rem, 5vw, 5rem);
}

.editorial-heading > p,
.editorial-cta p {
  max-width: 460px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.08rem;
}

body.public-site .featured-blog-card {
  margin-top: 3.5rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--surface-strong);
  box-shadow: none;
}

body.public-site .featured-blog-card:hover {
  transform: none;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.09);
}

body.public-site .featured-blog-card h3 {
  max-width: 920px;
  margin: 1.6rem 0 1rem;
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

body.public-site .featured-preview {
  max-width: 780px;
  color: var(--text-muted);
  font-size: 1.12rem;
}

body.public-site .featured-media-shell {
  max-height: 520px;
  overflow: hidden;
  margin: 1.5rem 0 2.5rem;
  border-radius: 24px;
}

body.public-site .featured-media-image {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
}

.archive-heading {
  align-items: end;
  margin-bottom: 3rem;
}

.editorial-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.editorial-toolbar input,
.editorial-toolbar select {
  min-height: 46px;
  border-radius: 999px;
  background: var(--surface-strong);
}

body.public-site .blog-option-grid {
  gap: 1rem;
}

body.public-site .blog-option {
  min-height: 260px;
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-strong);
  text-align: left;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

body.public-site .blog-option:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.08);
}

body.public-site .blog-option h4 {
  font-size: 1.4rem;
  letter-spacing: -0.035em;
}

.editorial-cta {
  margin-top: 1rem;
  padding: clamp(4rem, 8vw, 7rem);
  border-radius: 40px;
  background: #101010;
  color: #f5f5f7;
}

.editorial-cta p {
  color: #a1a1a6;
}

.text-link {
  display: inline-block;
  margin-top: 1.6rem;
  color: inherit;
  font-weight: 650;
  text-decoration: none;
}

.text-link span {
  display: inline-block;
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translateX(4px);
}

.learning-hero {
  min-height: 560px;
  grid-template-columns: 1fr;
}

.learning-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1.1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
  padding: clamp(4rem, 9vw, 8rem);
  border-radius: 44px;
  background: #101010;
  color: #f5f5f7;
}

.learning-feature h2 {
  font-size: clamp(3rem, 5vw, 5rem);
}

.learning-feature-copy > p:not(.eyebrow) {
  margin: 1.8rem 0;
  color: #a1a1a6;
  font-size: 1.08rem;
}

.learning-feature .btn-primary {
  border-color: #f5f5f7;
  background: #f5f5f7;
  color: #101010;
}

.learning-feature .btn-secondary {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
}

.code-window {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: #050505;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-window-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #636366;
}

.code-window-bar span {
  margin-left: auto;
  color: #8e8e93;
  font-size: 0.72rem;
}

.code-window pre {
  min-height: 280px;
  margin: 0;
  padding: 2rem;
  color: #d2d2d7;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(0.75rem, 1.25vw, 0.95rem);
  line-height: 1.8;
  white-space: pre-wrap;
}

.code-window pre span {
  color: #ffffff;
  font-weight: 700;
}

.code-window-result {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #8e8e93;
  font-size: 0.78rem;
}

.code-window-result strong {
  color: #f5f5f7;
}

.learning-roadmap {
  padding: clamp(7rem, 12vw, 11rem) 0;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.roadmap-grid article {
  min-height: 330px;
  padding: 2.5rem 2rem;
}

.roadmap-grid article + article {
  border-left: 1px solid var(--line);
}

.private-learning-note {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface-strong);
}

.private-learning-note h2 {
  max-width: 750px;
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.private-learning-note p:not(.eyebrow) {
  max-width: 650px;
  color: var(--text-muted);
}

.private-learning-note > span {
  flex: 0 0 auto;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

body.public-site.blog-reader-page .page-shell {
  width: min(1000px, calc(100% - 40px));
  padding-top: 5rem;
}

body.public-site.blog-reader-page .hero {
  padding: clamp(4rem, 8vw, 7rem) 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.public-site.blog-reader-page .hero h1 {
  max-width: 900px;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  letter-spacing: -0.055em;
}

body.public-site.blog-reader-page .content-section {
  border: 0;
  background: transparent;
}

body.public-site.blog-reader-page .reader-panel {
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface-strong);
}

body.public-site.practice-page .practice-shell {
  padding-top: 5rem;
}

body.public-site.practice-page .practice-intro h1 {
  letter-spacing: -0.055em;
}

body.public-site.practice-page .practice-workspace {
  border-color: var(--line);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.15);
}

body.public-site .auth-dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
}

body.public-site .auth-panel {
  border-color: var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface-strong) 98.5%, transparent);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.28);
}

/* Admin keeps the same brand but uses a denser, neutral operations language. */
body.admin-shell.admin-app {
  --admin-bg: #ffffff;
  --admin-panel: #ffffff;
  --admin-raised: #fbfbfc;
  --admin-text: #18181a;
  --admin-muted: #626268;
  --admin-line: rgba(0, 0, 0, 0.09);
  --bg: var(--admin-bg);
  --surface: rgba(255, 255, 255, 0.97);
  --surface-strong: var(--admin-panel);
  --text: var(--admin-text);
  --text-muted: var(--admin-muted);
  --line: var(--admin-line);
  background: var(--admin-bg);
  letter-spacing: -0.01em;
}

:root[data-theme="dark"] body.admin-shell.admin-app {
  --admin-bg: #0a0a0b;
  --admin-panel: #151516;
  --admin-raised: #1c1c1e;
  --admin-text: #f5f5f7;
  --admin-muted: #98989d;
  --admin-line: rgba(255, 255, 255, 0.12);
  --bg: var(--admin-bg);
  --surface: rgba(21, 21, 22, 0.82);
  --surface-strong: var(--admin-panel);
  --text: var(--admin-text);
  --text-muted: var(--admin-muted);
  --line: var(--admin-line);
}

body.admin-shell.admin-app .aurora {
  display: none;
}

body.admin-shell.admin-app .site-header {
  top: 12px;
  width: min(1420px, calc(100% - 24px));
  min-height: 64px;
  margin: 12px auto 0;
  padding: 9px 11px;
  border: 1px solid var(--admin-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.05);
  backdrop-filter: saturate(160%) blur(24px);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
}

body.admin-shell.admin-app .site-header.scrolled {
  border-color: var(--admin-line);
  background: color-mix(in srgb, var(--admin-panel) 92%, transparent);
}

:root[data-theme="dark"] body.admin-shell.admin-app .site-header,
:root[data-theme="dark"] body.admin-shell.admin-app .site-header.scrolled {
  background: rgba(21, 21, 22, 0.94);
}

body.admin-shell.admin-app .brand {
  min-width: 230px;
}

body.admin-shell.admin-app .brand-icon {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
}

body.admin-shell.admin-app .brand-label {
  font-size: 0.9rem;
}

body.admin-shell.admin-app .brand-subtitle {
  font-size: 0.68rem;
}

body.admin-shell.admin-app .nav-links {
  gap: 0.2rem;
  padding: 0.22rem;
  border-radius: 12px;
  background: var(--admin-raised);
}

body.admin-shell.admin-app .nav-links a {
  padding: 0.52rem 0.82rem;
  border-radius: 9px;
  color: var(--admin-muted);
  font-size: 0.78rem;
}

body.admin-shell.admin-app .nav-links a::after {
  display: none;
}

body.admin-shell.admin-app .nav-links a[aria-current="page"] {
  color: var(--admin-text);
  background: var(--admin-panel);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

body.admin-shell.admin-app .header-actions {
  min-width: 230px;
  justify-content: flex-end;
}

body.admin-shell.admin-app .theme-toggle,
body.admin-shell.admin-app .auth-user,
body.admin-shell.admin-app .btn {
  border-radius: 10px;
}

body.admin-shell.admin-app > .page-shell {
  width: min(1380px, calc(100% - 40px));
  padding: 4.5rem 0 7rem;
}

body.admin-shell.admin-app .hero {
  min-height: auto;
  padding: 3.5rem 0 4rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-shell.admin-app .hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

body.admin-shell.admin-app .hero-text {
  max-width: 700px;
  margin-top: 1.4rem;
  font-size: 1.02rem;
}

body.admin-shell.admin-app .eyebrow {
  color: var(--admin-muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

body.admin-shell.admin-app .content-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-shell.admin-app .admin-overview {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

body.admin-shell.admin-app .admin-kpi,
body.admin-shell.admin-app .admin-card,
body.admin-shell.admin-app .admin-gate {
  border: 1px solid var(--admin-line);
  border-radius: 20px;
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell.admin-app .admin-kpi {
  min-height: 170px;
  padding: 1.6rem;
}

body.admin-shell.admin-app .admin-kpi strong {
  font-size: 3rem;
  letter-spacing: -0.06em;
}

body.admin-shell.admin-app .admin-builder-grid {
  gap: 0.8rem;
  padding-top: 0;
}

body.admin-shell.admin-app .admin-card {
  padding: clamp(1.3rem, 2.5vw, 2rem);
}

body.admin-shell.admin-app .admin-card h2 {
  letter-spacing: -0.035em;
}

body.admin-shell.admin-app .btn-primary {
  border-color: var(--admin-text);
  background: var(--admin-text);
  color: var(--admin-bg);
}

body.admin-shell.admin-app .btn-secondary,
body.admin-shell.admin-app .theme-toggle,
body.admin-shell.admin-app .auth-user {
  border-color: var(--admin-line);
  background: var(--admin-raised);
  color: var(--admin-text);
}

body.admin-shell.admin-app input,
body.admin-shell.admin-app select,
body.admin-shell.admin-app textarea {
  border-color: var(--admin-line);
  border-radius: 11px;
  background: var(--admin-raised);
}

body.admin-shell.admin-app input:focus,
body.admin-shell.admin-app select:focus,
body.admin-shell.admin-app textarea:focus {
  border-color: var(--admin-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--admin-text) 10%, transparent);
}

body.admin-shell.admin-app .admin-list {
  gap: 0.55rem;
}

body.admin-shell.admin-app .admin-list-row {
  border-color: var(--admin-line);
  border-radius: 13px;
  background: var(--admin-raised);
}

body.admin-shell.admin-app .admin-markdown-preview {
  border-color: var(--admin-line);
  border-radius: 11px;
  background: var(--admin-raised);
}

@media (max-width: 1080px) {
  body.public-site .brand,
  body.public-site .header-actions,
  body.admin-shell.admin-app .brand,
  body.admin-shell.admin-app .header-actions {
    min-width: 0;
  }

  body.public-site .brand-subtitle,
  body.admin-shell.admin-app .brand-subtitle,
  body.public-site .theme-toggle-label,
  body.admin-shell.admin-app .theme-toggle-label {
    display: none;
  }

  .modern-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .learning-feature {
    grid-template-columns: 1fr;
  }

  .roadmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .roadmap-grid article:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .roadmap-grid article:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  body.public-site .site-header,
  body.admin-shell.admin-app .site-header {
    position: relative;
    top: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    border-radius: 22px;
  }

  body.public-site .nav-links,
  body.admin-shell.admin-app .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    order: 3;
    width: 100%;
  }

  body.public-site .header-actions,
  body.admin-shell.admin-app .header-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }

  body.public-site .auth-user span,
  body.admin-shell.admin-app .auth-user span {
    display: none;
  }

  .modern-shell,
  body.admin-shell.admin-app > .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 2rem;
  }

  .modern-hero {
    padding: 4rem 0;
  }

  .modern-hero h1 {
    font-size: clamp(3.1rem, 13vw, 5rem);
  }

  .principle-grid,
  .platform-split,
  .editorial-heading,
  .archive-heading,
  .learning-roadmap .section-heading,
  .editorial-cta {
    grid-template-columns: 1fr;
  }

  .principle-card {
    min-height: auto;
    padding: 2.5rem 0;
  }

  .principle-card + .principle-card {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .principle-card span,
  .roadmap-grid article > span {
    margin-bottom: 3rem;
  }

  .platform-card {
    min-height: 390px;
  }

  .editorial-heading,
  .archive-heading,
  .editorial-cta {
    gap: 2rem;
  }

  .editorial-toolbar {
    grid-template-columns: 1fr;
  }

  .private-learning-note {
    align-items: flex-start;
    flex-direction: column;
  }

  body.admin-shell.admin-app .admin-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  body.public-site .site-header,
  body.admin-shell.admin-app .site-header {
    width: calc(100% - 16px);
    margin-top: 8px;
    padding: 8px;
  }

  body.public-site .brand-label,
  body.admin-shell.admin-app .brand-label {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.public-site .theme-toggle,
  body.admin-shell.admin-app .theme-toggle {
    padding-right: 0.35rem;
  }

  body.public-site .nav-links a,
  body.admin-shell.admin-app .nav-links a {
    flex: 1;
    padding-inline: 0.35rem;
    text-align: center;
  }

  body.public-site .admin-subdomain-btn {
    display: none;
  }

  .modern-hero {
    padding: 3.5rem 0;
  }

  .modern-hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }

  .platform-split,
  .learning-roadmap {
    padding-top: 4rem;
  }

  .platform-card,
  .editorial-cta,
  .learning-feature {
    padding: 2rem;
    border-radius: 28px;
  }

  .learning-feature {
    gap: 2.5rem;
  }

  .code-window pre {
    min-height: 230px;
    padding: 1.25rem;
  }

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

  .roadmap-grid article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .roadmap-grid article {
    min-height: 260px;
  }

  body.public-site .featured-blog-card {
    border-radius: 26px;
  }
}

/* Practice problem authoring studio */
body.admin-shell.admin-app .problem-admin-shell {
  width: min(100% - 48px, 1600px);
}

.problem-admin-hero {
  max-width: 980px;
}

.problem-admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.34fr) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

body.admin-shell.admin-app .problem-library-panel {
  position: sticky;
  top: 108px;
  max-height: calc(100vh - 132px);
  overflow: hidden;
  padding: 1.25rem;
}

.problem-library-actions,
.problem-library-count {
  margin: 0;
}

.problem-library-count {
  color: var(--admin-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.problem-toolbar {
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.problem-toolbar label:first-child {
  grid-column: 1 / -1;
}

.problem-manage-list {
  max-height: calc(100vh - 430px);
  overflow: auto;
  padding-right: 0.3rem;
  scrollbar-width: thin;
}

.problem-list-item {
  width: 100%;
  border: 1px solid var(--admin-line);
  border-radius: 13px;
  background: var(--admin-raised);
  color: var(--admin-text);
  padding: 0.85rem;
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.problem-list-item:hover,
.problem-list-item.active {
  border-color: color-mix(in srgb, var(--admin-text) 45%, var(--admin-line));
  background: color-mix(in srgb, var(--admin-text) 5%, var(--admin-raised));
}

.problem-list-item:hover {
  transform: translateY(-1px);
}

.problem-list-number {
  color: var(--admin-muted);
  font: 600 0.72rem/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
}

.problem-list-copy {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.problem-list-copy strong,
.problem-list-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.problem-list-copy strong {
  font: 600 0.9rem/1.25 "Outfit", sans-serif;
}

.problem-list-copy small {
  color: var(--admin-muted);
  font-size: 0.74rem;
}

.problem-list-state {
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  padding: 0.3rem 0.45rem;
  color: var(--admin-muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.problem-list-state.published {
  color: var(--admin-text);
}

.problem-editor-panel {
  min-width: 0;
}

.problem-editor-heading,
.problem-form-section,
.problem-safety-note {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.problem-editor-heading h2,
.problem-form-section h3 {
  margin: 0.25rem 0 0;
  font-family: "Outfit", sans-serif;
}

.problem-source-meta {
  display: grid;
  justify-items: end;
  gap: 0.4rem;
  color: var(--admin-muted);
  font-size: 0.74rem;
}

.problem-safety-note {
  border: 1px solid var(--admin-line);
  border-radius: 13px;
  background: var(--admin-raised);
  padding: 0.9rem 1rem;
}

.problem-safety-note strong {
  white-space: nowrap;
  font-size: 0.8rem;
}

.problem-safety-note span,
.problem-private-copy,
.field-note {
  color: var(--admin-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.problem-form {
  gap: 1rem;
}

.problem-form-section {
  margin-top: 1.3rem;
  border-top: 1px solid var(--admin-line);
  padding-top: 1.5rem;
}

.problem-form-section > span {
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  padding: 0.36rem 0.55rem;
  color: var(--admin-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.problem-form-section.private > span {
  color: var(--admin-text);
}

.problem-private-copy {
  margin: -0.35rem 0 0;
}

.admin-code-control {
  gap: 0.4rem !important;
}

body.admin-shell.admin-app .admin-code-control textarea,
body.admin-shell.admin-app .admin-json-editor,
body.admin-shell.admin-app .admin-code-input {
  tab-size: 4;
  font: 500 0.82rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre;
  overflow: auto;
}

body.admin-shell.admin-app .admin-code-control textarea {
  min-height: 32rem;
  background: var(--admin-code-bg, #101113);
  color: var(--admin-code-text, #f1f1f3);
  caret-color: currentColor;
}

html[data-theme="light"] body.admin-shell.admin-app {
  --admin-code-bg: #161719;
  --admin-code-text: #f5f5f7;
}

html[data-theme="dark"] body.admin-shell.admin-app {
  --admin-code-bg: #050506;
  --admin-code-text: #f5f5f7;
}

.compact-limits {
  gap: 0.55rem;
}

.problem-editor-actions {
  position: sticky;
  bottom: 1rem;
  z-index: 4;
  border: 1px solid var(--admin-line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--admin-panel) 88%, transparent);
  box-shadow: 0 12px 35px color-mix(in srgb, #000 14%, transparent);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  padding: 0.75rem;
}

@media (max-width: 1100px) {
  .problem-admin-layout {
    grid-template-columns: 1fr;
  }
  body.admin-shell.admin-app .problem-library-panel {
    position: static;
    max-height: none;
  }
  .problem-manage-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 34rem;
  }
}

@media (max-width: 700px) {
  body.admin-shell.admin-app .problem-admin-shell {
    width: min(100% - 20px, 1600px);
  }
  .problem-manage-list,
  .problem-form .admin-two-col,
  .problem-toolbar {
    grid-template-columns: 1fr;
  }
  .problem-toolbar label:first-child {
    grid-column: auto;
  }
  .problem-editor-heading,
  .problem-form-section,
  .problem-safety-note {
    flex-direction: column;
  }
  .problem-source-meta {
    justify-items: start;
  }
  body.admin-shell.admin-app .admin-code-control textarea {
    min-height: 24rem;
  }
}
