/* ═══════════════════════════════════════════════════════════════
   Wallabee Design System
   Source of truth for ldante.com — tokens, components, patterns,
   and the Wallabee documentation mode.
   Load this before any application CSS.
═══════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --bg:           rgb(38,38,38);
  --bg-darker:    rgb(31,31,31);
  --pink:         rgb(249,149,172);
  --magenta:      rgb(191,48,120);
  --white:        rgb(255,255,255);
  --white-dim:    rgba(255,255,255,0.55);
  --font-display: 'Cal Sans', sans-serif;
  --font-body:    'Golos Text', sans-serif;
  --font-ui:      'Inter', system-ui, sans-serif;
}

/* ── Base ── */
body { -webkit-font-smoothing: antialiased; font-family: var(--font-ui); }


/* ═══════════════════════════════════════════════════════════════
   INTERACTIVE COMPONENTS
═══════════════════════════════════════════════════════════════ */

/* ── Role button ── */
.role-btn {
  padding: clamp(12px,1.5vw,20px) clamp(24px,3vw,40px);
  background: var(--pink);
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.5vw, 3.125rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bg-darker);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.role-btn:hover  { background: rgb(248,124,155); transform: translateY(-3px) scale(1.02); }
.role-btn:active { transform: scale(0.97); }

/* ── Input field (gate pattern) ── */
.gate-input-row {
  display: flex;
  align-items: stretch;
  height: clamp(64px, 8vw, 100px);
  width: 100%;
  max-width: 546px;
}
.gate-pw-input {
  flex: 1;
  background: var(--bg-darker);
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 0 clamp(20px,3vw,40px);
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 3vw, 3.125rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--white);
  outline: none;
  caret-color: var(--pink);
  transition: background 0.2s ease;
}
.gate-pw-input::placeholder { color: rgba(255,255,255,0.3); }
.gate-pw-input:focus { background: rgb(45,45,45); }
.gate-go-btn {
  background: var(--pink);
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 0 clamp(20px,3vw,40px);
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 3vw, 3.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bg-darker);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
}
.gate-go-btn:hover  { background: rgb(248,124,155); transform: scale(1.03); }
.gate-go-btn:active { transform: scale(0.97); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-10px); }
  40%      { transform: translateX(10px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}
.gate-input-row.shake { animation: shake 0.45s ease; }


/* ═══════════════════════════════════════════════════════════════
   CASE STUDY CONTENT COMPONENTS
   Dark (site default). Restored to light by .ds-shell.ds-light.
═══════════════════════════════════════════════════════════════ */

.cd-company { font-family: var(--font-ui); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 10px; }
.cd-headline { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.8rem); font-weight: 400; color: var(--white); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 28px; }
.cd-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 32px; }
.cd-chips span { font-family: var(--font-ui); font-size: 0.75rem; font-weight: 500; color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.07); border-radius: 100px; padding: 4px 10px; }
.cd-metrics { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 44px; }
.cd-metric { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; padding: 18px 24px 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: none; min-width: 120px; }
.cd-metric-value { font-family: var(--font-display); font-size: clamp(1.8rem, 2.6vw, 2.8rem); font-weight: 400; color: var(--white); letter-spacing: -0.03em; line-height: 1; }
.cd-metric-label { font-family: var(--font-ui); font-size: 0.7rem; font-weight: 500; color: rgba(255,255,255,0.45); letter-spacing: 0.02em; line-height: 1.35; }
.cd-intro { font-family: var(--font-body); font-size: clamp(1rem, 1.2vw, 1.15rem); color: rgba(255,255,255,0.72); line-height: 1.6; margin-bottom: 32px; max-width: 54em; }
.cd-block { margin-top: 56px; padding-top: 48px; border-top: 1px solid rgba(255,255,255,0.07); }
.cd-h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 400; color: var(--white); letter-spacing: -0.01em; margin-bottom: 16px; }
.cd-h3 { font-family: var(--font-ui); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin: 24px 0 8px; }
.cd-body { font-family: var(--font-body); font-size: clamp(0.92rem,1vw,1rem); color: rgba(255,255,255,0.68); line-height: 1.65; max-width: 60em; margin-bottom: 10px; }
.cd-screenshot-wrap { margin: 14px 0 40px; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.06); }
.cd-screenshot-wrap img { width: 100%; display: block; height: auto; }
.cd-screenshots-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.cd-screenshot-frame { border-radius: 10px; background: rgba(255,255,255,0.04); padding: 8px 8px 0; box-shadow: none; overflow: hidden; }
.cd-screenshot-frame img { width: 100%; height: auto; border-radius: 4px 4px 0 0; display: block; }
.cd-screenshot-frame span { font-family: var(--font-ui); font-size: 0.65rem; font-weight: 500; letter-spacing: 0.04em; color: rgba(255,255,255,0.28); padding: 0 12px 10px; display: block; }
.cd-hero-img-wrap { width: calc(100% + 120px); margin-left: -60px; margin-top: 48px; margin-bottom: 48px; }
.cd-hero-img { width: 100%; display: block; height: auto; }
.cd-list { list-style: none; padding: 0; margin: 8px 0 10px; display: flex; flex-direction: column; gap: 7px; }
.cd-list li { font-family: var(--font-body); font-size: clamp(0.9rem,1vw,1rem); color: rgba(255,255,255,0.68); line-height: 1.55; padding-left: 16px; position: relative; }
.cd-list li::before { content: '→'; position: absolute; left: 0; color: rgba(255,255,255,0.22); font-size: 0.7rem; top: 1px; }
.cd-reframe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 20px; }
.cd-reframe-from, .cd-reframe-to { padding: 18px 20px; border-radius: 10px; font-family: var(--font-body); font-size: clamp(0.88rem,1vw,0.96rem); line-height: 1.5; }
.cd-reframe-from { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); color: rgba(255,255,255,0.35); }
.cd-reframe-to   { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);  color: var(--white); }
.cd-reframe-label { display: block; font-family: var(--font-ui); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 7px; opacity: 0.35; }
.cd-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.cd-haiku { margin-top: 40px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.07); display: flex; flex-direction: column; gap: 2px; }
.cd-haiku p { font-family: var(--font-body); font-size: clamp(0.9rem,1vw,1rem); color: rgba(255,255,255,0.28); line-height: 1.8; margin: 0; }
.cd-closer { border-top: 1.5px solid rgba(255,255,255,0.08); padding-top: 32px; margin-top: 8px; }
.cd-closer .cd-body { font-size: clamp(1rem,1.2vw,1.1rem); color: rgba(255,255,255,0.45); font-style: italic; }
.cd-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; margin: 32px 0; }
.cd-video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.cd-screenshot { width: 100%; display: block; height: auto; border-radius: 8px; margin: 16px 0; }

/* ── Case study document patterns ── */
.cs-section { margin: 3rem 0; }
.cs-section-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.cs-section-num { font-family: var(--font-ui); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: rgba(255,255,255,0.3); flex-shrink: 0; }
.cs-section-title { font-family: var(--font-ui); font-size: 20px; font-weight: 500; color: var(--white); }
.cs-section--plain { margin-top: 2rem; }
.cs-section--plain:first-child { margin-top: 1rem; }
.cs-callout { background: rgba(255,255,255,0.04); border-left: 2px solid rgba(255,255,255,0.15); border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.cs-callout-label { font-family: var(--font-ui); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
.cs-callout .cd-body { font-size: 14px; margin-bottom: 0; }
.cs-callout--problem { background: rgba(234,88,12,0.1); border-left-color: #ea580c; }
.cs-pull-quote { margin: 2rem 0; padding: 28px 32px; border-left: 3px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.02); border-radius: 0 8px 8px 0; }
.cs-pull-quote-text { font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; line-height: 1.5; color: var(--white); letter-spacing: -0.01em; margin-bottom: 12px; }
.cs-pull-quote-attr { font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.4); letter-spacing: 0.02em; }
.cs-pull-quote-attr strong { color: rgba(255,255,255,0.65); font-weight: 600; }
.cs-outcome-row { display: flex; gap: 20px; align-items: flex-start; padding: 1.25rem 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.cs-outcome-row:last-child { border-bottom: none; }
.cs-outcome-num { font-family: var(--font-display); font-size: clamp(1.6rem,2.5vw,2.2rem); font-weight: 400; color: var(--white); width: 160px; flex-shrink: 0; text-align: right; letter-spacing: -0.02em; line-height: 1; padding-top: 2px; }
.cs-od-title { font-family: var(--font-ui); font-size: 14px; font-weight: 500; color: var(--white); margin-bottom: 4px; }
.cs-od-body { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.65; }
.cs-reflection { border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 1.5rem; background: rgba(255,255,255,0.03); margin-top: 2rem; }
.cs-reflection-title { font-family: var(--font-ui); font-size: 15px; font-weight: 500; color: var(--white); margin-bottom: 0.75rem; }
.cs-meta-row { display: flex; gap: 2rem; flex-wrap: wrap; margin: 2rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.07); }
.cs-meta-label { font-family: var(--font-ui); font-size: 12px; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.cs-meta-val { font-family: var(--font-ui); font-size: 14px; color: var(--white); font-weight: 500; }
.cs-tradeoff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 1.5rem 0; }
.cs-tradeoff-card { border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 1rem 1.25rem; background: rgba(255,255,255,0.03); }
.cs-tradeoff-card.chosen { border-color: rgba(37,99,235,0.25); background: #eff6ff; }
.cs-tc-label, .cs-tradeoff-label { font-family: var(--font-ui); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255,255,255,0.45); margin-bottom: 6px; }
.cs-tradeoff-card.chosen .cs-tc-label,
.cs-tradeoff-card.chosen .cs-tradeoff-label { color: #2563eb; }
.cs-tc-title, .cs-tradeoff-title { font-family: var(--font-ui); font-size: 14px; font-weight: 500; color: var(--white); margin-bottom: 6px; }
.cs-tradeoff-card.chosen .cs-tc-title,
.cs-tradeoff-card.chosen .cs-tradeoff-title { color: #1d4ed8; }
.cs-tc-body, .cs-tradeoff-body { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.6; }
.cs-chosen-badge { display: inline-block; background: #dbeafe; color: #2563eb; font-size: 12px; font-weight: 500; padding: 2px 7px; border-radius: 6px; margin-left: 6px; border: 1px solid rgba(37,99,235,0.2); vertical-align: middle; }
@media (max-width: 680px) {
  .cs-tradeoff-grid { grid-template-columns: 1fr; }
  .cs-outcome-num { width: 100px; font-size: 1.5rem; }
  .cd-screenshots-row, .cd-two-col, .cd-reframe { grid-template-columns: 1fr; }
}

/* ── Structural patterns ── */
.workflow-block { border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; overflow: hidden; margin: 1.5rem 0; }
.workflow-row { display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.07); }
.workflow-row:last-child { border-bottom: none; }
.workflow-step { font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.45); width: 160px; flex-shrink: 0; padding: 0.75rem 1rem; background: rgba(255,255,255,0.03); border-right: 1px solid rgba(255,255,255,0.07); align-self: stretch; display: flex; align-items: center; justify-content: flex-end; text-align: right; }
.workflow-body { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.6; padding: 0.75rem 1rem; flex: 1; }
.workflow-tag { font-family: var(--font-ui); font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 6px; margin-left: auto; margin-right: 1rem; white-space: nowrap; flex-shrink: 0; }
.tag-gone { background: rgba(190,18,60,0.15); color: #fca5a5; border: 1px solid rgba(190,18,60,0.25); }
.tag-kept { background: rgba(22,163,74,0.15); color: #86efac; border: 1px solid rgba(22,163,74,0.25); }
.finding-block { border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; overflow: hidden; margin: 1.5rem 0; }
.finding-row { display: flex; border-bottom: 1px solid rgba(255,255,255,0.07); }
.finding-row:last-child { border-bottom: none; }
.finding-tag { font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.45); width: 160px; flex-shrink: 0; padding: 0.75rem 1rem; background: rgba(255,255,255,0.03); border-right: 1px solid rgba(255,255,255,0.07); display: flex; align-items: flex-start; justify-content: flex-end; text-align: right; line-height: 1.4; }
.finding-body { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.6; padding: 0.75rem 1rem; }
.finding-block--padded { border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 1.25rem; margin: 1.25rem 0; }
.finding-block--padded .finding-row { border: none; border-bottom: 1px solid rgba(255,255,255,0.07); padding: 0.75rem 0; gap: 12px; align-items: flex-start; }
.finding-block--padded .finding-row:first-child { padding-top: 0; }
.finding-block--padded .finding-row:last-child { border-bottom: none; padding-bottom: 0; }
.finding-block--padded .finding-tag { background: none; border: none; padding: 0; padding-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; width: 160px; flex-shrink: 0; justify-content: flex-end; text-align: right; }
.finding-block--padded .finding-body { padding: 0; }
.sprint-block { border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; overflow: hidden; margin: 1.5rem 0; }
.sprint-row { display: flex; border-bottom: 1px solid rgba(255,255,255,0.07); }
.sprint-row:last-child { border-bottom: none; }
.sprint-label { font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.45); width: 160px; flex-shrink: 0; padding: 0.75rem 1rem; background: rgba(255,255,255,0.03); border-right: 1px solid rgba(255,255,255,0.07); display: flex; align-items: flex-start; justify-content: flex-end; text-align: right; }
.sprint-body { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.6; padding: 0.75rem 1rem; }
.alumni-row { display: flex; gap: 12px; margin: 1.5rem 0; flex-wrap: wrap; }
.alumni-card { border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 0.875rem 1rem; background: rgba(255,255,255,0.04); flex: 1; min-width: 140px; }
.alumni-co { font-family: var(--font-ui); font-size: 14px; font-weight: 500; color: var(--white); margin-bottom: 3px; }
.alumni-role { font-family: var(--font-body); font-size: 12px; color: rgba(255,255,255,0.5); }
@media (max-width: 680px) {
  .workflow-step { width: 100px; }
  .workflow-tag { display: none; }
  .finding-tag { width: 100px; }
  .sprint-label { width: 100px; }
  .finding-block--padded .finding-tag { width: 100px; }
}

/* ── Content entry animation ── */
@keyframes fadeUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }
.content-entering > * { animation: fadeUp 0.38s cubic-bezier(0.22,1,0.36,1) both; }
.content-entering > *:nth-child(1) { animation-delay: 0.05s; }
.content-entering > *:nth-child(2) { animation-delay: 0.1s; }
.content-entering > *:nth-child(3) { animation-delay: 0.15s; }
.content-entering > *:nth-child(4) { animation-delay: 0.2s; }
.content-entering > *:nth-child(n+5) { animation-delay: 0.25s; }


/* ═══════════════════════════════════════════════════════════════
   WALLABEE — Documentation mode (?p=designsystems)
═══════════════════════════════════════════════════════════════ */
.ds-shell {
  position: fixed; inset: 0; display: flex;
  background: var(--bg); z-index: 200;
  font-family: var(--font-ui);
  /* Type sample tokens — used by inline styles in TYPE_ROWS so CSS can override them */
  --ds-fg:       var(--white);
  --ds-fg-muted: rgba(255,255,255,0.80);
  --ds-fg-dim:   rgba(255,255,255,0.65);
}
.ds-sidebar {
  width: 216px; min-width: 216px; height: 100%; overflow-y: auto;
  background: var(--bg-darker);
  border-right: 1px solid rgba(255,255,255,0.07);
  padding: 28px 0 48px; flex-shrink: 0;
}
.ds-wordmark {
  padding: 0 20px 28px;
  font-family: var(--font-display); font-size: 0.9rem;
  color: var(--pink); letter-spacing: 0;
}
.ds-nav-group { margin-bottom: 20px; }
.ds-nav-label {
  display: block; padding: 0 20px 6px;
  font-size: 0.625rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}
.ds-nav-link {
  display: block; padding: 5px 20px;
  font-size: 0.8125rem; color: rgba(255,255,255,0.5);
  text-decoration: none; cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.ds-nav-link:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.ds-nav-link.ds-active { color: var(--white); }
.ds-main {
  flex: 1; overflow-y: auto; height: 100%;
  padding: 52px 64px 100px; scroll-behavior: smooth;
}
.ds-section { max-width: 680px; margin-bottom: 80px; scroll-margin-top: 32px; }
.ds-eyebrow {
  font-size: 0.625rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--pink); margin-bottom: 8px;
}
.ds-section-title {
  font-family: var(--font-display); font-size: 1.75rem;
  color: var(--white); margin-bottom: 14px; line-height: 1.1;
}
.ds-section-body {
  font-size: 0.9375rem; line-height: 1.7;
  color: rgba(255,255,255,0.55); margin-bottom: 24px;
}
.ds-divider {
  border: none; border-top: 1px solid rgba(255,255,255,0.07);
  margin: 0 0 80px; max-width: 680px;
}
.ds-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.ds-swatch { border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.07); }
.ds-swatch-chip { height: 64px; }
.ds-swatch-info { padding: 8px 10px; background: rgba(255,255,255,0.04); }
.ds-swatch-name { font-size: 0.75rem; font-weight: 500; color: var(--white); margin-bottom: 3px; }
.ds-swatch-token {
  font-family: 'Courier New', monospace; font-size: 0.625rem;
  color: var(--pink); display: block; margin-bottom: 1px;
}
.ds-swatch-value { font-family: 'Courier New', monospace; font-size: 0.625rem; color: rgba(255,255,255,0.3); }
.ds-type-row {
  display: flex; align-items: flex-start; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ds-type-meta { width: 140px; flex-shrink: 0; padding-top: 4px; }
.ds-type-role {
  font-size: 0.625rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--pink); margin-bottom: 5px;
}
.ds-type-spec {
  font-family: 'Courier New', monospace; font-size: 0.625rem;
  color: rgba(255,255,255,0.32); line-height: 1.6;
}
.ds-canvas {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 28px 24px; margin-bottom: 8px;
}
.ds-canvas-label {
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.2); margin-top: 4px;
}
.ds-spec-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; margin-top: 16px; }
.ds-spec-table th {
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255,255,255,0.28);
  padding: 6px 12px 6px 0; text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ds-spec-table td {
  padding: 8px 12px 8px 0; color: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: top;
}
.ds-spec-table td:first-child { color: var(--white); font-weight: 500; width: 160px; }
.ds-spec-table code { font-family: 'Courier New', monospace; font-size: 0.75rem; color: var(--pink); }
.ds-inline-code { font-family: 'Courier New', monospace; font-size: 0.85em; color: var(--pink); }
.ds-sky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.ds-sky-swatch { border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.07); }
.ds-sky-chip { height: 72px; }
.ds-sky-info { padding: 7px 9px; background: rgba(255,255,255,0.04); }
.ds-sky-name { font-size: 0.6875rem; font-weight: 500; color: var(--white); margin-bottom: 2px; }
.ds-sky-slug { font-family: 'Courier New', monospace; font-size: 0.5625rem; color: rgba(255,255,255,0.3); }
.ds-fl { display: inline-block; }
.ds-fl-sp { display: inline-block; width: 0.45em; }
.ds-entry-badge { display: inline-block; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink); margin-bottom: 8px; }
.ds-entry-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--white); margin-bottom: 8px; line-height: 1.1; letter-spacing: -0.02em; }
.ds-entry-body { font-size: 0.875rem; color: rgba(255,255,255,0.55); line-height: 1.6; margin-bottom: 8px; }
.ds-entry-meta { font-size: 0.75rem; color: rgba(255,255,255,0.3); }
.ds-replay-btn {
  margin-top: 10px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 6px 14px;
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 500;
  color: rgba(255,255,255,0.65); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ds-replay-btn:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.ds-content-item {
  padding: 28px 40px;
  border-top: 1px solid rgba(255,255,255,0.07);
  transition: background 0.15s;
}
.ds-content-item:hover { background: rgba(255,255,255,0.03); }
.ds-content-item--link { cursor: pointer; }
.ds-content-item--link:hover .ds-item-title { color: rgba(255,255,255,0.75); }
.ds-content-item--link:hover .ds-item-eyebrow { opacity: 0.85; }
.ds-item-eyebrow {
  font-family: var(--font-ui); font-size: 0.625rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink); margin-bottom: 6px;
}
.ds-item-title {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 400;
  letter-spacing: -0.02em; color: var(--white); line-height: 1.2; margin-bottom: 4px;
}
.ds-item-company { font-family: var(--font-ui); font-size: 0.8125rem; color: rgba(255,255,255,0.45); margin-bottom: 10px; }
.ds-item-dek { font-family: var(--font-body); font-size: 0.875rem; color: rgba(255,255,255,0.5); line-height: 1.55; max-width: 560px; }
.ds-item-metrics { font-family: var(--font-ui); font-size: 0.75rem; color: rgba(255,255,255,0.3); letter-spacing: 0.03em; margin-top: 4px; }
.ds-sidebar-foot {
  padding: 16px 0 0;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.ds-mode-toggle {
  display: flex; align-items: center; gap: 8px;
  margin: 0 20px;
  padding: 7px 12px;
  width: calc(100% - 40px);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 500;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}
.ds-mode-toggle:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.ds-mode-toggle-icon { font-size: 0.9rem; line-height: 1; }


/* ── Principles ── */
.ds-principle-lede {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  margin-bottom: 28px;
  max-width: 520px;
}
.ds-principle-chain {
  padding-left: 20px;
  border-left: 2px solid rgba(255,255,255,0.1);
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ds-principle-chain p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}
.ds-principle-chain p:nth-child(1) { color: rgba(255,255,255,0.35); }
.ds-principle-chain p:nth-child(2) { color: rgba(255,255,255,0.52); }
.ds-principle-chain p:nth-child(3) { color: rgba(255,255,255,0.68); }
.ds-principle-resolution {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ds-principle-resolution p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  margin: 0;
}
.ds-principle-resolution p:first-child {
  color: var(--white);
  font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════════
   WALLABEE LIGHT MODE — .ds-shell.ds-light
   Applied by the mode toggle button in the DS sidebar.
   All text values verified WCAG 2.1 AA (≥ 4.5:1 normal text, ≥ 3:1 large).

   Verified contrast ratios (against respective backgrounds):
     #1a1a1a  18.5:1  on #f4f4f5 / #e8e8ea — headings, primary
     #3c3c3c  10.0:1  on #f4f4f5 / 9.0:1 on #e8e8ea — strong secondary
     #4e4e4e   7.5:1  on #f4f4f5 — body copy
     #5e5e5e   4.7:1  on #f4f4f5 / 5.3:1 on #e8e8ea — labels, captions
     #6b6b6b   4.9:1  on #f4f4f5 — minimum (weakest chain line only)
     #b5194e   6.0:1  on #f4f4f5 / 5.4:1 on #e8e8ea — accessible brand accent
═══════════════════════════════════════════════════════════════ */

/* Override --pink: pastel rgb(249,149,172) has 1.9:1 on light bg — fails.
   Deep rose #b5194e gives 6.0:1 on main, 5.4:1 on sidebar.
   This single token override fixes eyebrows, wordmark, code, inline-code,
   type roles, entry badges, and swatch tokens without touching each rule. */
.ds-shell.ds-light {
  background: #f4f4f5;
  color: #1a1a1a;          /* cascade dark text to any unstyled children */
  --pink: #b5194e;
  /* Type sample tokens — override the white defaults for light bg */
  --ds-fg:       #1a1a1a;
  --ds-fg-muted: #4e4e4e;
  --ds-fg-dim:   #5e5e5e;
}

/* ── Sidebar (#e8e8ea) ── */
.ds-shell.ds-light .ds-sidebar { background: #e8e8ea; border-right-color: rgba(0,0,0,0.12); }
.ds-shell.ds-light .ds-sidebar-foot { border-top-color: rgba(0,0,0,0.12); }
/* Nav labels 10px uppercase — #5e5e5e gives 5.3:1 on #e8e8ea ✓ */
.ds-shell.ds-light .ds-nav-label { color: #5e5e5e; }
/* Nav links 13px — #3c3c3c gives 9.0:1 on #e8e8ea ✓ */
.ds-shell.ds-light .ds-nav-link { color: #3c3c3c; }
.ds-shell.ds-light .ds-nav-link:hover { color: #1a1a1a; background: rgba(0,0,0,0.06); }
.ds-shell.ds-light .ds-nav-link.ds-active { color: #1a1a1a; }
/* Mode toggle rendered on rgba(0,0,0,0.06) ≈ #d9d9db — #3c3c3c gives 8.6:1 ✓ */
.ds-shell.ds-light .ds-mode-toggle { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.14); color: #3c3c3c; }
.ds-shell.ds-light .ds-mode-toggle:hover { background: rgba(0,0,0,0.10); color: #1a1a1a; }

/* ── Main area (#f4f4f5) ── */
.ds-shell.ds-light .ds-main { background: #f4f4f5; }
/* Section titles — #1a1a1a: 18.5:1 ✓ */
.ds-shell.ds-light .ds-section-title { color: #1a1a1a; }
/* Section body — #4e4e4e: 7.5:1 ✓ */
.ds-shell.ds-light .ds-section-body { color: #4e4e4e; }
.ds-shell.ds-light .ds-divider { border-top-color: rgba(0,0,0,0.10); }

/* ── Color swatches ── */
.ds-shell.ds-light .ds-swatch { border-color: rgba(0,0,0,0.12); }
.ds-shell.ds-light .ds-swatch-info { background: rgba(0,0,0,0.05); }
/* Swatch name — #1a1a1a ✓ */
.ds-shell.ds-light .ds-swatch-name { color: #1a1a1a; }
/* Monospace token/value — #5e5e5e: 4.7:1 ✓ */
.ds-shell.ds-light .ds-swatch-value { color: #5e5e5e; }

/* ── Typography table ── */
.ds-shell.ds-light .ds-type-row { border-bottom-color: rgba(0,0,0,0.09); }
/* Monospace spec text — #5e5e5e: 4.7:1 ✓ */
.ds-shell.ds-light .ds-type-spec { color: #5e5e5e; }

/* ── Canvas ── */
.ds-shell.ds-light .ds-canvas { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.10); }
/* Canvas label 10px uppercase on canvas (≈#ecedee) — #5e5e5e: 5.5:1 ✓ */
.ds-shell.ds-light .ds-canvas-label { color: #5e5e5e; }

/* ── Spec table (inside canvas ≈#ecedee) ── */
/* Headers 10px uppercase — #5e5e5e: 5.5:1 ✓ */
.ds-shell.ds-light .ds-spec-table th { color: #5e5e5e; border-bottom-color: rgba(0,0,0,0.10); }
/* Cells — #4e4e4e: 7.5:1 ✓; first-child (property name) full dark ✓ */
.ds-shell.ds-light .ds-spec-table td { color: #4e4e4e; border-bottom-color: rgba(0,0,0,0.06); }
.ds-shell.ds-light .ds-spec-table td:first-child { color: #1a1a1a; }

/* ── Sky phase grid ── */
.ds-shell.ds-light .ds-sky-swatch { border-color: rgba(0,0,0,0.10); }
.ds-shell.ds-light .ds-sky-info { background: rgba(0,0,0,0.05); }
/* Sky name inherits dark from shell base — add explicit override for safety */
.ds-shell.ds-light .ds-sky-name { color: #1a1a1a; }
/* Sky slug monospace — #5e5e5e: 4.7:1 ✓ */
.ds-shell.ds-light .ds-sky-slug { color: #5e5e5e; }

/* ── Letter motion ── */
.ds-shell.ds-light .ds-fl { color: #1a1a1a; }

/* ── Entry demo ── */
.ds-shell.ds-light .ds-entry-title { color: #1a1a1a; }
/* Entry body — #4e4e4e: 7.5:1 ✓ */
.ds-shell.ds-light .ds-entry-body { color: #4e4e4e; }
/* Entry meta 12px — #5e5e5e: 4.7:1 ✓ */
.ds-shell.ds-light .ds-entry-meta { color: #5e5e5e; }

/* Replay button on canvas (≈#ecedee) — #3c3c3c gives 8.6:1 ✓ */
.ds-shell.ds-light .ds-replay-btn { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.12); color: #3c3c3c; }
.ds-shell.ds-light .ds-replay-btn:hover { background: rgba(0,0,0,0.10); color: #1a1a1a; }

/* ── Content items ── */
.ds-shell.ds-light .ds-content-item { border-top-color: rgba(0,0,0,0.09); }
.ds-shell.ds-light .ds-content-item:hover { background: rgba(0,0,0,0.03); }
.ds-shell.ds-light .ds-item-title { color: #1a1a1a; }
/* Company + dek — #4e4e4e: 7.5:1 ✓ */
.ds-shell.ds-light .ds-item-company { color: #4e4e4e; }
.ds-shell.ds-light .ds-item-dek { color: #4e4e4e; }
/* Metrics 12px — #5e5e5e: 4.7:1 ✓ */
.ds-shell.ds-light .ds-item-metrics { color: #5e5e5e; }

/* ── Pattern components — restore light appearance ── */
.ds-shell.ds-light .cd-metric { background: #fff; border-color: rgba(31,31,31,0.10); box-shadow: 0 1px 6px rgba(0,0,0,0.05); }
.ds-shell.ds-light .cd-metric-value { color: #1a1a1a; }
/* Metric label on white card — #5e5e5e: 6.5:1 on white ✓ */
.ds-shell.ds-light .cd-metric-label { color: #5e5e5e; }
.ds-shell.ds-light .cs-callout { background: rgba(31,31,31,0.04); border-left-color: rgba(31,31,31,0.20); }
/* Callout label 12px uppercase — #5e5e5e: 4.7:1 ✓ */
.ds-shell.ds-light .cs-callout-label { color: #5e5e5e; }
/* cd-body (used inside callouts and standalone) — #4e4e4e: 7.5:1 ✓ */
.ds-shell.ds-light .cs-callout .cd-body,
.ds-shell.ds-light .cd-body { color: #4e4e4e; }
.ds-shell.ds-light .cs-callout--problem { background: #fff7ed; border-left-color: #ea580c; }
.ds-shell.ds-light .cs-pull-quote { background: rgba(31,31,31,0.03); border-left-color: #1a1a1a; }
.ds-shell.ds-light .cs-pull-quote-text { color: #1a1a1a; }
/* Pull quote attribution — #5e5e5e: 4.7:1 ✓ */
.ds-shell.ds-light .cs-pull-quote-attr { color: #5e5e5e; }
.ds-shell.ds-light .cs-pull-quote-attr strong { color: #3c3c3c; }
/* Reframe from (intentionally muted) — #5e5e5e: 4.7:1 ✓ */
.ds-shell.ds-light .cd-reframe-from { background: rgba(31,31,31,0.04); border-color: rgba(31,31,31,0.10); color: #5e5e5e; }
.ds-shell.ds-light .cd-reframe-to { background: rgba(31,31,31,0.06); border-color: rgba(31,31,31,0.15); color: #1a1a1a; }
/* Reframe label: remove opacity trick, use solid color */
.ds-shell.ds-light .cd-reframe-label { opacity: 1; color: #5e5e5e; }

/* ── Principles — staggered hierarchy, all WCAG compliant ── */
/* Lede — #4e4e4e: 7.5:1 ✓ */
.ds-shell.ds-light .ds-principle-lede { color: #4e4e4e; }
.ds-shell.ds-light .ds-principle-chain { border-left-color: rgba(0,0,0,0.15); }
/* Chain: dimmest → brightest, 4.9:1 → 6.8:1 → 10:1 — hierarchy preserved, all pass ✓ */
.ds-shell.ds-light .ds-principle-chain p:nth-child(1) { color: #6b6b6b; }
.ds-shell.ds-light .ds-principle-chain p:nth-child(2) { color: #555555; }
.ds-shell.ds-light .ds-principle-chain p:nth-child(3) { color: #3c3c3c; }
/* Resolution — #4e4e4e: 7.5:1 ✓; pivot line full dark */
.ds-shell.ds-light .ds-principle-resolution p { color: #4e4e4e; }
.ds-shell.ds-light .ds-principle-resolution p:first-child { color: #1a1a1a; }

/* Light mode topbar */
.ds-shell.ds-light .ds-topbar {
  background: #e8e8ea;
  border-bottom-color: rgba(0,0,0,0.12);
}
.ds-shell.ds-light .ds-topbar-btn { color: #3c3c3c; }
.ds-shell.ds-light .ds-topbar-btn:hover { color: #1a1a1a; background: rgba(0,0,0,0.07); }
.ds-shell.ds-light .ds-sidebar-close { color: #5e5e5e; }
.ds-shell.ds-light .ds-sidebar-close:hover { color: #1a1a1a; background: rgba(0,0,0,0.07); }
.ds-shell.ds-light .ds-drawer-backdrop { background: rgba(0,0,0,0.35); }


/* ═══════════════════════════════════════════════════════════════
   WALLABEE MOBILE — ≤ 680px
   Sidebar collapses to a slide-over drawer.
   A top bar replaces the desktop wordmark + provides the menu trigger.
═══════════════════════════════════════════════════════════════ */

/* ── Topbar (mobile-only) ── */
.ds-topbar {
  display: none; /* hidden on desktop */
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 52px;
  flex-shrink: 0;
  background: var(--bg-darker);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ds-topbar-wordmark {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--pink);
}
.ds-topbar-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.55);
  font-size: 1.25rem; line-height: 1; cursor: pointer;
  padding: 8px; border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}
.ds-topbar-btn:hover { color: var(--white); background: rgba(255,255,255,0.07); }

/* ── Sidebar close button (mobile-only, lives inside the drawer) ── */
.ds-sidebar-close {
  display: none;
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  background: none; border: none;
  color: rgba(255,255,255,0.45);
  font-size: 1rem; cursor: pointer;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}
.ds-sidebar-close:hover { color: var(--white); background: rgba(255,255,255,0.07); }

/* ── Drawer backdrop ── */
.ds-drawer-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 301;
}
.ds-drawer-backdrop.ds-open { display: block; }

@media (max-width: 680px) {
  /* Shell stacks: topbar on top, main below — sidebar is a fixed overlay */
  .ds-shell { flex-direction: column; }

  /* Show topbar; hide the desktop wordmark that lives inside the sidebar */
  .ds-topbar { display: flex; }
  .ds-wordmark { display: none; }

  /* Sidebar becomes a fixed slide-over drawer */
  .ds-sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: min(280px, 85vw);
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
    z-index: 302;
    padding-top: 52px; /* clear the close button row */
  }
  .ds-sidebar.ds-open { transform: translateX(0); }

  /* Show the close button when sidebar is a drawer */
  .ds-sidebar-close { display: flex; }

  /* Main content — full width, tighter padding */
  .ds-main { padding: 28px 20px 80px; }

  /* Section rhythm */
  .ds-section { margin-bottom: 56px; }
  .ds-section-title { font-size: 1.375rem; }
  .ds-divider { margin-bottom: 56px; }

  /* Type samples — stack spec above the live sample */
  .ds-type-row { flex-direction: column; gap: 10px; }
  .ds-type-meta { width: auto; }

  /* Content list items — lose the horizontal padding (they're full-bleed on mobile) */
  .ds-content-item { padding: 20px 0; }

  /* Spec table first column — drop fixed width so it auto-sizes */
  .ds-spec-table td:first-child { width: auto; min-width: 90px; }
}
