/* ══════════════════════════════════════════════
   Wireless 101 — Landing Page Styles
   Shared by EN and AR landing pages
   ══════════════════════════════════════════════ */

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Subtle dot grid behind hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-text { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--amber-text);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
  animation: pulse-beacon 2.5s ease-in-out infinite;
}

@keyframes pulse-beacon {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(232, 168, 56, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(232, 168, 56, 0); }
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-text h1 em {
  font-style: normal;
  color: var(--amber-text);
  position: relative;
}

.hero-text h1 em::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--amber);
  opacity: 0.25;
  border-radius: 2px;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 460px;
  line-height: 1.75;
  margin-bottom: 2.25rem;
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* ── Hero illustration ── */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 460px;
  z-index: 1;
}

.hero-visual-orbit {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  position: absolute;
  animation: orbit-spin 60s linear infinite;
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

.hero-visual-orbit::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(232, 168, 56, 0.4);
}

.hero-visual-orbit-2 {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px dashed var(--border-light);
  position: absolute;
  animation: orbit-spin 40s linear infinite reverse;
}

.hero-visual-orbit-2::before {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 20%;
  width: 8px;
  height: 8px;
  background: var(--sage);
  border-radius: 50%;
}

.hero-visual-center {
  position: relative;
  z-index: 2;
  width: 100px;
  height: 100px;
  background: var(--ink);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 48px rgba(15, 27, 45, 0.2);
}

.hero-visual-center svg {
  width: 48px;
  height: 48px;
  stroke: var(--amber);
  fill: none;
  stroke-width: 1.8;
}

.hero-float {
  position: absolute;
  border-radius: 14px;
  z-index: 1;
}

.hero-float-1 {
  width: 56px;
  height: 56px;
  background: var(--amber);
  top: 50px;
  border-radius: 16px;
  animation: float-a 7s ease-in-out infinite;
  opacity: 0.9;
  box-shadow: 0 8px 24px rgba(232, 168, 56, 0.25);
}

.hero-float-2 {
  width: 36px;
  height: 36px;
  background: var(--sage);
  bottom: 70px;
  border-radius: 50%;
  animation: float-b 8s ease-in-out infinite;
  opacity: 0.3;
}

.hero-float-3 {
  width: 44px;
  height: 44px;
  background: var(--amber-pale);
  border: 1px solid rgba(232, 168, 56, 0.15);
  bottom: 50px;
  border-radius: 12px;
  animation: float-a 9s ease-in-out infinite reverse;
}

.hero-float-4 {
  width: 24px;
  height: 24px;
  background: var(--ink);
  top: 100px;
  border-radius: 8px;
  animation: float-b 6s ease-in-out infinite;
  opacity: 0.08;
}

@keyframes float-a {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(4deg); }
}

@keyframes float-b {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(14px) translateX(-10px); }
}

/* ── Why We Started ── */
.origin-section {
  max-width: 1060px;
  margin: 0 auto;
}

.origin-card {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.origin-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 360px;
}

.origin-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.origin-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 1rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.origin-content h3 em {
  font-style: normal;
  color: var(--amber-text);
}

.origin-quote {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--amber);
}

.origin-read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-text);
  text-decoration: none;
  transition: gap 0.3s ease;
}
.origin-read-link:hover { gap: 0.75rem; }
.origin-read-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

.origin-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.origin-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.origin-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--cream);
}

.origin-author-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.origin-author-role {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .origin-card { grid-template-columns: 1fr; }
  .origin-image { min-height: 220px; }
  .origin-content { padding: 1.5rem; }
}

/* ── Courses ── */
.courses { background: var(--paper); }

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  max-width: 1140px;
  margin: 0 auto;
}

.course-card {
  background: var(--white);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border);
}

.course-header {
  padding: 1.75rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.course-header::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.course-header.ink { background: var(--ink); color: var(--cream); }
.course-header.amber { background: linear-gradient(135deg, var(--amber), #d4911a); color: var(--ink); }
.course-header.green { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.course-header.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #fff; }
.course-header.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
.course-header.cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); color: #fff; }
.course-header.rose { background: linear-gradient(135deg, #e11d48, #be123c); color: #fff; }

.green-dot { background: #10b981; }
.purple-dot { background: #8b5cf6; }
.blue-dot { background: #3b82f6; }
.cyan-dot { background: #06b6d4; }
.rose-dot { background: #e11d48; }

.course-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.course-code {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.course-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  background: rgba(255,255,255,0.15);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.course-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.course-body { padding: 1.75rem 2rem; }

.course-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.course-meta-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.02em;
}

.course-meta-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-tertiary);
  fill: none;
  stroke-width: 2;
}

.course-topics-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.course-topic {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.course-topic-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.course-footer {
  padding: 1rem 2rem;
  border-top: 1px solid var(--border-light);
}

.course-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap 0.3s;
}

.course-cta-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.course-cta-arrow svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink);
  fill: none;
  transition: transform 0.3s;
}

.course-cta:hover .course-cta-arrow {
  background: var(--ink);
}

.course-cta:hover .course-cta-arrow svg {
  stroke: var(--cream);
  transform: translateX(2px);
}

/* ── How It Works ── */
.how-section { max-width: 1000px; margin: 0 auto; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 56px;
  right: 56px;
  height: 1px;
  border-top: 1.5px dashed var(--border);
}

.step-item {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 0.75rem;
}

.step-num {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 6px 20px rgba(232, 168, 56, 0.25);
  transition: transform 0.3s, box-shadow 0.3s;
}

.step-item:hover .step-num {
  transform: translateY(-4px) rotate(-3deg);
  box-shadow: 0 10px 28px rgba(232, 168, 56, 0.35);
}

.step-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.step-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Vision ── */
.vision { background: var(--paper); }

.vision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1060px;
  margin: 0 auto;
}

.vision-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 2rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.35s;
  position: relative;
  overflow: hidden;
}

.vision-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--amber);
  opacity: 0;
  transition: opacity 0.3s;
}

.vision-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.vision-card:hover::before { opacity: 1; }

.vision-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.vision-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
  fill: none;
}

.vision-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.vision-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.vision-icon.bg-amber { background: var(--amber-pale); }
.vision-icon.bg-green { background: rgba(16,185,129,0.1); }
.vision-icon.bg-purple { background: rgba(139,92,246,0.1); }
.vision-icon.bg-blue { background: rgba(59,130,246,0.1); }
.vision-icon.bg-ink { background: rgba(15,27,45,0.06); }

.vision-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.6rem 1.25rem;
  background: var(--ink);
  color: var(--cream);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.vision-ai-badge svg {
  width: 16px;
  height: 16px;
  stroke: var(--amber);
  fill: none;
  stroke-width: 2;
}

/* ── CTA Banner ── */
.cta-section { padding: 5rem 2rem; text-align: center; }

.cta-box {
  max-width: 720px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: var(--r-xl);
  padding: 4rem 3rem;
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: rgba(232, 168, 56, 0.1);
  border-radius: 50%;
}

.cta-box::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
}

.cta-box h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  letter-spacing: -0.02em;
}

.cta-box p {
  color: var(--text-on-dark-muted);
  margin-bottom: 2rem;
  max-width: 420px;
  margin-inline: auto;
  position: relative;
  line-height: 1.7;
}

/* Lang switch */
.lang-switch { display: flex; align-items: center; gap: 0.25rem; }
.lang-switch a { font-size: 0.8rem; font-weight: 600; color: var(--text-tertiary); text-decoration: none; padding: 0.3rem 0.6rem; border-radius: 6px; transition: all 0.2s; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { background: var(--amber-pale); color: var(--amber-text); }
.lang-switch a::after { display: none !important; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 7rem 2rem 3rem;
    gap: 2rem;
  }
  .hero-text p { margin-inline: auto; }
  .hero-buttons { justify-content: center; }
  .hero-eyebrow { justify-content: center; }
  .hero-visual { height: 300px; }
}

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

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: start;
  }

  .steps-grid::before { display: none; }

  .step-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 1rem;
    text-align: start;
    align-items: start;
    padding: 0;
  }

  .step-num { margin: 0; }

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

/* ==========================================================================
   DESK — the world-themed "desktop" hero on the landing pages
   --------------------------------------------------------------------------
   Paired with worlds.css (tokens + world background + theme picker) and
   desk.js (course switcher + tabs). Every rule is scoped under .desk because
   .btn-primary (theme.css) and .step-num / .step-title / .step-desc
   (landing.css, above) already exist and must not be disturbed.

   Tokens come from worlds.css: --w-accent, --w-win-bg, --w-win-radius,
   --w-win-border, --w-win-shadow, --w-rail-bg, --w-panel-border,
   --w-btn-radius, --w-cta-shadow, --w-band, --w-accent-text.
   ========================================================================== */

.desk {
  /* --nav-h is the REAL navbar height, not a guess: theme.css gives .navbar
     padding 1.25rem top and bottom and .nav-logo img height 80px, so
     80 + 20 + 20 = 120px = 7.5rem. It is redeclared at each breakpoint where the
     logo shrinks, and both the rail offset and this padding derive from it — the
     mobile rail used to hardcode top:3.6rem (57.6px) and therefore sat 62px on
     top of the logo. */
  --nav-h: 7.5rem;
  position: relative;
  min-height: 100vh;
  padding: 6.5rem 6.4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── icon rails ─────────────────────────────────────────────────────────── */
.desk .rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.3rem;
  background: var(--w-rail-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
}
.desk .rail--left { inset-inline-start: 0.55rem; }
.desk .rail--right { inset-inline-end: 0.55rem; }

.desk .rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  width: 74px;
  padding: 0.6rem 0.25rem;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  border-radius: 10px;
  font-family: inherit;
  transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.desk .rail-item:hover { background: rgba(255, 255, 255, 0.72); transform: translateY(-2px); }
.desk .rail-item.is-active { background: var(--w-accent); color: var(--ink); }
.desk .rail-item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.desk .ic { width: 25px; height: 25px; flex: none; }
.desk .rail-label {
  font-size: 0.63rem;
  line-height: 1.15;
  text-align: center;
  font-weight: 600;
  max-width: 70px;
}

/* ── window ─────────────────────────────────────────────────────────────── */
.desk .win {
  width: 100%;
  max-width: 1140px;
  background: var(--w-win-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: var(--w-win-border);
  border-radius: var(--w-win-radius);
  box-shadow: var(--w-win-shadow);
  overflow: hidden;
}
.desk .win-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.95rem;
  border-bottom: 1px solid rgba(15, 27, 45, 0.12);
}
.desk .dots { display: flex; gap: 0.4rem; }
.desk .dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(15, 27, 45, 0.22); }
.desk .win-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: rgba(15, 27, 45, 0.62);
}
.desk .win-btns { display: flex; gap: 0.55rem; color: rgba(15, 27, 45, 0.45); }
.desk .win-btns svg { width: 14px; height: 14px; }
.desk .win-body { padding: 2.7rem 3.1rem 2.2rem; }

/* ── hero panes (the course switcher's targets) ─────────────────────────── */
.desk .desk-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.6rem;
  align-items: start;
}
.desk .hero-pane[hidden] { display: none; }
.desk .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--w-accent-text);
  margin-bottom: 0.9rem;
}
.desk .hero-pane h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 3.05rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}
.desk .hero-pane p {
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(15, 27, 45, 0.82);
  margin: 0 0 1.5rem;
  max-width: 33rem;
}

/* Marker highlight on the emphasised phrase that already exists in both
   headlines (EN <em>Signal Processing</em> / AR <em>معالجة الإشارات</em>) —
   no new markup and nothing to translate. */
.desk .hero-pane h1 em {
  font-style: normal;
  background: linear-gradient(104deg,
    transparent 0.5%,
    color-mix(in srgb, var(--w-accent) 42%, transparent) 0.9%,
    color-mix(in srgb, var(--w-accent) 42%, transparent) 97%,
    transparent 99%);
  padding: 0.06em 0.22em;
  border-radius: 0.22em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Hand-drawn circle, used on the setup card's heading. */
.desk .circled { position: relative; white-space: nowrap; }
.desk .circled::after {
  content: "";
  position: absolute;
  inset: -0.3em -0.42em;
  background: no-repeat center / 100% 100%
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M104 5C55 2 8 12 6 30c-2 19 52 26 99 24 43-2 91-9 89-27C192 10 148 3 104 5' fill='none' stroke='%23926311' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  pointer-events: none;
}

.desk .btn-row { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.desk .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.78rem 1.35rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--w-btn-radius);
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.desk .btn-primary { background: var(--w-accent); color: var(--ink); box-shadow: var(--w-cta-shadow); }
.desk .btn:hover { transform: translateY(-2px); }
.desk .btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.desk .topics { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.45rem; }
.desk .topics li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: rgba(15, 27, 45, 0.85);
}
.desk .tdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--w-accent);
  margin-top: 0.45rem;
  flex: none;
}
.desk .meta {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin: 0 0 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: rgba(15, 27, 45, 0.6);
}

/* ── setup card ─────────────────────────────────────────────────────────── */
.desk .setup {
  background: #fff;
  border: var(--w-win-border);
  border-radius: var(--w-win-radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--w-cta-shadow);
}
.desk .setup h2 { font-family: var(--font-display); font-size: 1.06rem; margin: 0 0 1rem; }
.desk .setup ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.desk .setup li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.87rem;
  line-height: 1.45;
  color: rgba(15, 27, 45, 0.85);
}
.desk .ic-check { width: 17px; height: 17px; flex: none; margin-top: 0.12rem; color: var(--w-band); }

/* ── tabs ───────────────────────────────────────────────────────────────── */
.desk .demo { margin-top: 2.4rem; }
.desk .tablist { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.desk .tab {
  border: 0;
  background: rgba(15, 27, 45, 0.07);
  color: rgba(15, 27, 45, 0.72);
  cursor: pointer;
  padding: 0.7rem 1.1rem;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  border-radius: var(--w-win-radius) var(--w-win-radius) 0 0;
  transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.desk .tab:hover { background: rgba(15, 27, 45, 0.13); }
.desk .tab.is-active { background: var(--w-accent); color: var(--ink); }
.desk .tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.desk .tabframe { border: var(--w-panel-border); background: #fff; padding: 1.7rem 1.8rem; }
.desk .tabpanel { display: none; gap: 1.1rem; align-items: flex-start; }
.desk .tabpanel.is-active { display: flex; }
.desk .tabpanel[hidden] { display: none; }
.desk .tabpanel h3 { font-family: var(--font-display); margin: 0 0 0.35rem; font-size: 1.02rem; }
.desk .tabpanel p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: rgba(15, 27, 45, 0.8); }
.desk .step-num {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  margin: 0;
  background: var(--w-band);
  color: #f4f1eb;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-radius: var(--w-win-radius);
}

/* ── responsive: the rails become strips ────────────────────────────────── */
@media (max-width: 1180px) {
  .desk { padding: 6.5rem 5.6rem 3rem; }
  .desk .rail-item { width: 62px; }
  .desk .rail-label { font-size: 0.58rem; max-width: 58px; }
}

@media (max-width: 900px) {
  /* The rails become horizontal strips: courses under the navbar, language at the
     foot. Top padding clears navbar + strip; bottom clears the foot strip plus the
     iOS home-indicator inset. */
  .desk {
    padding: calc(var(--nav-h) + 4.2rem) 0.8rem
             calc(4.6rem + env(safe-area-inset-bottom, 0px));
    align-items: flex-start;
  }
  .desk .rail {
    position: fixed;
    top: auto;
    transform: none;
    flex-direction: row;
    inset-inline: 0;
    border-radius: 0;
    gap: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.3rem;
  }
  .desk .rail::-webkit-scrollbar { display: none; }
  /* Sits BELOW the navbar rather than under it. z-index 40 vs the navbar's 1000
     means the navbar would win the paint anyway, so an overlap here does not just
     look wrong, it makes the first course tile unclickable. */
  .desk .rail--left { top: calc(var(--nav-h) + 0.3rem); bottom: auto; }
  .desk .rail--right {
    bottom: 0;
    top: auto;
    padding-bottom: calc(0.3rem + env(safe-area-inset-bottom, 0px));
  }
  .desk .rail-item { width: auto; min-width: 68px; padding: 0.45rem 0.5rem; }
  /* In the row layout a two-word label ("Learning Path", "Lin. Algebra") wrapped
     to a second line that the strip had no height for, so it was clipped by the
     viewport edge. Let items size to their text and scroll instead. */
  .desk .rail-label { white-space: nowrap; max-width: none; }
  .desk .win-body { padding: 1.5rem 1.15rem; }
  .desk .desk-hero { grid-template-columns: 1fr; gap: 1.7rem; }
  .desk .tabpanel.is-active { flex-direction: column; }
}

/* Phones. theme.css drops the logo to 52px here (see its 768px block), so the
   navbar is 52 + 20 + 20 = 92px = 5.75rem and every derived offset follows. */
@media (max-width: 768px) {
  .desk { --nav-h: 5.75rem; }
}

@media (max-width: 480px) {
  .desk { padding-inline: 0.5rem; }
  .desk .rail-item { min-width: 58px; padding: 0.4rem 0.4rem; gap: 0.2rem; }
  .desk .ic { width: 21px; height: 21px; }
  .desk .rail-label { font-size: 0.56rem; }
  .desk .win-body { padding: 1.15rem 0.9rem; }
}

/* ── reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .desk .rail-item,
  .desk .btn,
  .desk .tab { transition-duration: 0.01ms !important; }
  .desk .rail-item:hover,
  .desk .btn:hover { transform: none; }
  /* Scoped to the desktop layout ON PURPOSE. This block sits after the 900px
     block, so an unscoped rule re-applied translateY(-50%) to a rail that the
     mobile layout had set to transform:none — shunting both strips up by half
     their own height for anyone on a phone with reduced motion on. */
  @media (min-width: 901px) {
    .desk .rail { transform: translateY(-50%); }
  }
}
