/* ========================================================
   roger. Component Workshop — Design System CSS
   ======================================================== */

/* --- Tokens --- */
:root {
  /* Colours */
  --orange:     #FC4C07;
  --orange-90:  #FC5E20;
  --orange-80:  #FD7039;
  --orange-70:  #FD8251;
  --orange-60:  #FD946A;
  --orange-50:  #FEA683;
  --orange-40:  #FEB79C;
  --orange-30:  #FEC9B5;
  --orange-20:  #FEDBCD;
  --orange-10:  #FFEDE6;

  --ink:        #1E1E1E;
  --ink-90:     #343434;
  --ink-80:     #4B4B4B;
  --ink-70:     #626262;
  --ink-60:     #787878;
  --ink-50:     #8F8F8F;
  --ink-40:     #A5A5A5;
  --ink-30:     #BCBCBC;
  --ink-20:     #D2D2D2;
  --ink-10:     #E9E9E9;

  --blue:       #33A6CD;
  --blue-90:    #47AFD2;
  --blue-80:    #5CB8D7;
  --blue-70:    #70C1DC;
  --blue-60:    #85CAE1;
  --blue-50:    #99D3E6;
  --blue-40:    #ADDBEB;
  --blue-30:    #C2E4F0;
  --blue-20:    #D6EDF5;
  --blue-10:    #EBF6FA;

  --white:      #FFFFFF;
  --success:    #2ECC71;
  --success-bg: #E8F8F0;

  /* Semantic */
  --bg:         var(--white);
  --surface:    var(--white);
  --text:       var(--ink);
  --text-secondary: var(--ink-60);
  --border:     var(--ink-10);
  --card-shadow: 0 1px 3px rgba(30,30,30,.06), 0 4px 12px rgba(30,30,30,.04);

  /* Typography */
  --ff-display: 'Bevan', serif;
  --ff-body:    'Nunito Sans', sans-serif;
  --fs-base:    16px;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-base: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 9999px;
}

/* --- Dark mode --- */
[data-theme="dark"] {
  --bg:         #111111;
  --surface:    var(--ink);
  --text:       #F0F0F0;
  --text-secondary: var(--ink-40);
  --border:     var(--ink-80);
  --card-shadow: 0 1px 3px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
  --success-bg: #1a3d2a;
}

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

html {
  font-size: var(--fs-base);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* --- Logo --- */
.logo {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1;
  letter-spacing: 0;
}
.logo--small { font-size: 1.125rem; }
.logo__dot { color: var(--orange); }

/* --- Topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar__brand { display: flex; align-items: baseline; gap: var(--sp-sm); }
.topbar__subtitle {
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
}
.topbar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
}
.topbar__toggle:hover { background: var(--ink-10); }
[data-theme="dark"] .topbar__toggle:hover { background: var(--ink-80); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* --- Nav Tabs --- */
.nav-tabs {
  position: sticky;
  top: 53px;
  z-index: 99;
  display: flex;
  gap: var(--sp-xs);
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  flex-shrink: 0;
  padding: var(--sp-sm) var(--sp-base);
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  font-family: var(--ff-body);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.nav-tab:hover { background: var(--ink-10); color: var(--text); }
[data-theme="dark"] .nav-tab:hover { background: var(--ink-80); }
.nav-tab.active {
  background: var(--orange);
  color: var(--white);
}

/* --- Content --- */
.content {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--sp-lg);
}

/* --- Section --- */
.section { display: block; }
.section.hidden { display: none; }
.section__title {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  margin-bottom: var(--sp-xs);
}
.section__desc {
  color: var(--text-secondary);
  margin-bottom: var(--sp-lg);
  font-size: .875rem;
}

/* --- Card --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-lg);
  box-shadow: var(--card-shadow);
}
.card__header {
  padding: var(--sp-base) var(--sp-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.card__header .tag { flex-shrink: 0; }
.card__title {
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 600;
}
.card__body { padding: var(--sp-lg); }
.card__body--flush { padding: 0; }

/* --- Tag / Pill --- */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--orange);
  color: var(--white);
  font-family: var(--ff-body);
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.6;
}

.pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: var(--ink-10);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
[data-theme="dark"] .pill { background: var(--ink-80); color: var(--white); }
.pill--orange { background: var(--orange); color: var(--white); }
.pill--blue { background: var(--blue-20); color: var(--blue); }
[data-theme="dark"] .pill--blue { background: rgba(51,166,205,.2); }
.pill--ink { background: var(--ink); color: var(--white); }
.pill--success { background: var(--success-bg); color: var(--success); }
.pill--outline { background: transparent; border: 1px solid var(--ink-20); color: var(--text-secondary); }
[data-theme="dark"] .pill--outline { border-color: var(--ink-60); }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--orange);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
}
.badge--blue { background: var(--blue); }
.badge--ink { background: var(--ink); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px 20px;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn--primary {
  background: var(--orange);
  color: var(--white);
}
.btn--primary:hover { background: var(--orange-90); }
.btn--primary:active { transform: scale(.97); }
.btn--primary:disabled,
.btn--primary[disabled] {
  background: var(--ink-20);
  color: var(--ink-50);
  cursor: not-allowed;
}
[data-theme="dark"] .btn--primary:disabled { background: var(--ink-70); color: var(--ink-40); }

.btn--secondary {
  background: var(--ink-10);
  color: var(--text);
}
[data-theme="dark"] .btn--secondary { background: var(--ink-80); }
.btn--secondary:hover { background: var(--ink-20); }
[data-theme="dark"] .btn--secondary:hover { background: var(--ink-70); }

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn--ghost:hover { background: var(--ink-10); color: var(--text); }
[data-theme="dark"] .btn--ghost:hover { background: var(--ink-80); }

.btn--blue {
  background: var(--blue-10);
  color: var(--blue);
}
[data-theme="dark"] .btn--blue { background: rgba(51,166,205,.15); }
.btn--blue:hover { background: var(--blue-20); }

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--ink-20);
  color: var(--text);
}
[data-theme="dark"] .btn--outline { border-color: var(--ink-60); }
.btn--outline:hover { border-color: var(--orange); color: var(--orange); }

.btn--icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: var(--r-sm);
}
.btn--icon-only.btn--primary { border-radius: var(--r-sm); }

.btn--small { font-size: .8125rem; padding: 6px 14px; }
.btn--large { font-size: 1.0625rem; padding: 14px 28px; border-radius: var(--r-md); }

/* --- Colour Ramps --- */
.color-group { margin-bottom: var(--sp-xl); }
.color-group:last-child { margin-bottom: 0; }
.color-group__label { font-weight: 600; margin-bottom: 2px; }
.color-group__desc { font-size: .8125rem; color: var(--text-secondary); margin-bottom: var(--sp-md); }

.color-ramp {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: var(--sp-sm);
}
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.swatch::before {
  content: '';
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  background: var(--sw);
}
.swatch--border::before { border: 1px solid var(--ink-10); }
.swatch span { font-size: .625rem; font-weight: 600; color: var(--text-secondary); }
.swatch code { font-size: .5625rem; color: var(--text-secondary); background: none; padding: 0; }

/* --- Type Specimen --- */
.type-specimen { display: flex; flex-direction: column; gap: var(--sp-lg); }
.type-row { display: flex; flex-direction: column; gap: var(--sp-xs); border-bottom: 1px solid var(--border); padding-bottom: var(--sp-lg); }
.type-row:last-child { border-bottom: none; padding-bottom: 0; }
.type-label { font-size: .6875rem; color: var(--text-secondary); letter-spacing: .02em; }

.display        { font-family: var(--ff-display); font-size: 3.0625rem; line-height: 1.115; }
.h1-sample      { font-family: var(--ff-display); font-size: 3.0625rem; line-height: 1.143; }
.h2-sample      { font-family: var(--ff-body); font-weight: 600; font-size: 2.4375rem; line-height: 1.231; }
.h3-sample      { font-family: var(--ff-body); font-weight: 600; font-size: 1.9375rem; line-height: 1.29; }
.h4-sample      { font-family: var(--ff-body); font-weight: 600; font-size: 1.5625rem; line-height: 1.28; }
.h5-sample      { font-family: var(--ff-body); font-weight: 600; font-size: 1.25rem; line-height: 1.4; }
.eyebrow-sample { font-family: var(--ff-body); font-weight: 500; font-size: 1rem; line-height: 1.5; letter-spacing: .01em; }
.body-l-sample  { font-family: var(--ff-body); font-weight: 400; font-size: 1.25rem; line-height: 1.5; }
.body-sample    { font-family: var(--ff-body); font-weight: 400; font-size: 1rem; line-height: 1.5; }
.body-s-sample  { font-family: var(--ff-body); font-weight: 400; font-size: .875rem; line-height: 1.43; }
.button-sample  { font-family: var(--ff-body); font-weight: 600; font-size: 1rem; line-height: 1; letter-spacing: .01em; }
.tag-sample     { font-family: var(--ff-body); font-weight: 500; font-size: .75rem; line-height: 1.33; letter-spacing: .08em; text-transform: uppercase; }
.caption-sample { font-family: var(--ff-body); font-weight: 400; font-size: .75rem; line-height: 1.33; letter-spacing: .02em; }
.quote-sample   { font-family: var(--ff-body); font-weight: 200; font-size: 1.9375rem; line-height: 1.355; }
.eyebrow        { font-family: var(--ff-body); font-weight: 500; font-size: .75rem; line-height: 1.33; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.body-s         { font-size: .875rem; }

/* Mobile type scale down */
@media (max-width: 600px) {
  .display, .h1-sample { font-size: 2rem; }
  .h2-sample { font-size: 1.75rem; }
  .h3-sample, .quote-sample { font-size: 1.5rem; }
}

/* --- Spacing Demo --- */
.spacing-demo { display: flex; flex-wrap: wrap; gap: var(--sp-lg); align-items: flex-end; }
.spacing-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.spacing-block {
  width: var(--sp);
  height: var(--sp);
  background: var(--orange-20);
  border: 1.5px solid var(--orange);
  border-radius: 3px;
}
.spacing-item code { font-size: .6875rem; }
.spacing-item .body-s { font-size: .625rem; color: var(--text-secondary); }

.radius-demo { display: flex; flex-wrap: wrap; gap: var(--sp-base); margin-top: var(--sp-md); }
.radius-item {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-10);
  border: 1.5px solid var(--orange);
  font-size: .6875rem;
  font-weight: 600;
  color: var(--orange);
}

/* --- Component Row --- */
.component-row { display: flex; flex-wrap: wrap; gap: var(--sp-md); align-items: center; }

/* --- Inputs --- */
.input-stack { display: flex; flex-direction: column; gap: var(--sp-lg); }
.input-group { display: flex; flex-direction: column; gap: var(--sp-xs); }
.input-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
}
.input {
  padding: 10px 14px;
  border: 1.5px solid var(--ink-20);
  border-radius: var(--r-sm);
  font-family: var(--ff-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s;
  outline: none;
  width: 100%;
}
[data-theme="dark"] .input { border-color: var(--ink-60); }
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-10); }
[data-theme="dark"] .input:focus { box-shadow: 0 0 0 3px rgba(252,76,7,.15); }
.input[readonly] { background: var(--ink-10); color: var(--text-secondary); }
[data-theme="dark"] .input[readonly] { background: var(--ink-80); }
.input--textarea { resize: vertical; min-height: 80px; }
.input--select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23787878' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input-hint { font-size: .75rem; color: var(--text-secondary); }

.input-with-mic { display: flex; gap: var(--sp-sm); }
.input-with-mic .input { flex: 1; }

/* --- Toggle --- */
.toggle-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  cursor: pointer;
  font-size: .9375rem;
}
.toggle { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  background: var(--ink-20);
  border-radius: var(--r-pill);
  transition: background .2s;
}
[data-theme="dark"] .toggle__track { background: var(--ink-70); }
.toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s;
}
.toggle:checked + .toggle__track { background: var(--orange); }
.toggle:checked + .toggle__track::after { transform: translateX(20px); }

/* --- Checkbox --- */
.check-group { display: flex; flex-direction: column; gap: var(--sp-sm); }
.check-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  cursor: pointer;
  font-size: .9375rem;
}
.check, .radio { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--ink-30);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.check:checked + .check__box {
  background: var(--orange);
  border-color: var(--orange);
}
.check:checked + .check__box::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.radio__dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--ink-30);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.radio:checked + .radio__dot {
  border-color: var(--orange);
}
.radio:checked + .radio__dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
}

/* --- Progress --- */
.progress-stack { display: flex; flex-direction: column; gap: var(--sp-lg); }
.progress-header { display: flex; justify-content: space-between; font-size: .8125rem; font-weight: 600; margin-bottom: var(--sp-xs); }
.progress-bar {
  height: 8px;
  background: var(--ink-10);
  border-radius: var(--r-pill);
  overflow: hidden;
}
[data-theme="dark"] .progress-bar { background: var(--ink-70); }
.progress-bar__fill {
  height: 100%;
  background: var(--orange);
  border-radius: var(--r-pill);
  transition: width .4s ease;
}
.progress-bar--blue .progress-bar__fill { background: var(--blue); }
.progress-bar--success .progress-bar__fill { background: var(--success); }

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--ink-10);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Exercise Card --- */
.exercise-card {
  background: var(--surface);
  border-radius: var(--r-md);
}
.exercise-card__top {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}
.exercise-card__count { margin-left: auto; font-size: .8125rem; color: var(--text-secondary); font-weight: 600; }

.exercise-card__prompt { margin-bottom: var(--sp-lg); }
.exercise-card__speaker { display: flex; align-items: center; gap: var(--sp-sm); margin-bottom: var(--sp-sm); font-size: .8125rem; font-weight: 600; }
.exercise-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .04em;
}
[data-theme="dark"] .exercise-card__avatar { background: var(--ink-70); }

.radio-bubble {
  background: var(--ink-10);
  border-radius: var(--r-md);
  padding: var(--sp-base) var(--sp-lg);
  position: relative;
  border-left: 3px solid var(--orange);
}
[data-theme="dark"] .radio-bubble { background: var(--ink-80); }
.radio-bubble p { font-size: .9375rem; line-height: 1.5; font-style: italic; }

.radio-wave {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 14px;
  display: flex;
  gap: 2px;
  align-items: flex-end;
}
.radio-wave::before,
.radio-wave::after {
  content: '';
  flex: 1;
  background: var(--orange-50);
  border-radius: 1px;
  animation: wave 1s ease-in-out infinite alternate;
}
.radio-wave::before { height: 60%; animation-delay: .1s; }
.radio-wave::after { height: 100%; animation-delay: .3s; }
@keyframes wave { from { height: 30%; } to { height: 100%; } }

.exercise-card__input { margin-bottom: var(--sp-lg); }
.exercise-card__actions { display: flex; justify-content: flex-end; gap: var(--sp-sm); }

/* --- Feedback Card --- */
.feedback-card {
  display: flex;
  gap: var(--sp-base);
  padding: var(--sp-base) var(--sp-lg);
  border-radius: var(--r-md);
  border-left: 4px solid;
}
.feedback-card--correct { background: var(--success-bg); border-color: var(--success); }
.feedback-card--correct .feedback-card__icon { color: var(--success); }
.feedback-card--partial { background: var(--orange-10); border-color: var(--orange); }
.feedback-card--partial .feedback-card__icon { color: var(--orange); }
.feedback-card--wrong { background: #fde8e8; border-color: #e74c3c; }
[data-theme="dark"] .feedback-card--wrong { background: #3d1a1a; }
.feedback-card--wrong .feedback-card__icon { color: #e74c3c; }

.feedback-card__icon { flex-shrink: 0; padding-top: 2px; }
.feedback-card__content h4 { font-size: .9375rem; font-weight: 700; margin-bottom: 4px; }
.feedback-card__content p { font-size: .875rem; line-height: 1.5; }
.feedback-card__correction {
  margin-top: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: rgba(255,255,255,.5);
  border-radius: var(--r-sm);
}
[data-theme="dark"] .feedback-card__correction { background: rgba(0,0,0,.2); }
.feedback-card__correction code { font-size: .8125rem; }

/* --- Module Grid --- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-base); }

.module-card {
  padding: var(--sp-base);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: box-shadow .15s;
}
.module-card:hover { box-shadow: var(--card-shadow); }
.module-card--locked { opacity: .5; }
.module-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-sm); }
.module-card__progress { font-size: .8125rem; font-weight: 700; color: var(--orange); }
.module-card h4 { font-size: .9375rem; font-weight: 600; }
.module-card .body-s { color: var(--text-secondary); margin-top: 2px; }

/* --- Stat Row --- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: var(--sp-md); }
.stat-card { text-align: center; padding: var(--sp-base); }
.stat-card--compact { padding: var(--sp-sm); }
.stat-card__value { display: block; font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat-card__value--orange { color: var(--orange); }
.stat-card__value--blue { color: var(--blue); }
.stat-card__label { font-size: .6875rem; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; display: block; }

/* --- App Header Demo --- */
.app-header-demo { padding: var(--sp-sm); background: var(--bg); }
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-sm) var(--sp-base);
}
.app-header__center { display: flex; align-items: center; gap: var(--sp-sm); }
.app-header__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--orange-10);
  color: var(--orange);
  font-family: var(--ff-body);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Bottom Nav Demo --- */
.bottom-nav-demo { padding: 0; background: var(--bg); }
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: var(--sp-sm) 0 calc(var(--sp-sm) + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--ink-40);
  font-family: var(--ff-body);
  font-size: .625rem;
  font-weight: 600;
  cursor: pointer;
  padding: var(--sp-xs) var(--sp-sm);
  transition: color .15s;
}
.bottom-nav__item--active { color: var(--orange); }
.bottom-nav__cta {
  color: var(--orange);
  position: relative;
}
.bottom-nav__cta::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange-10);
  z-index: -1;
}
[data-theme="dark"] .bottom-nav__cta::before { background: rgba(252,76,7,.15); }

/* --- Session Summary --- */
.session-summary { display: flex; gap: var(--sp-xl); align-items: center; flex-wrap: wrap; }
.session-summary__score { flex-shrink: 0; }
.score-ring { position: relative; width: 120px; height: 120px; }
.score-ring svg { width: 100%; height: 100%; }
.score-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-ring__value { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.score-ring__sub { font-size: .625rem; color: var(--text-secondary); margin-top: 4px; }
.session-summary__details { flex: 1; min-width: 200px; }
.session-summary__details h3 { font-size: 1.25rem; font-weight: 700; }
.session-summary__stats { display: flex; gap: var(--sp-lg); }
.session-summary__stats div { display: flex; flex-direction: column; gap: 2px; }
.session-summary__stats .body-s { color: var(--text-secondary); }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-lg);
}
.empty-state__icon { margin-bottom: var(--sp-base); }
.empty-state h4 { font-size: 1.125rem; font-weight: 700; margin-bottom: var(--sp-xs); }
.empty-state .body-s { color: var(--text-secondary); max-width: 280px; margin: 0 auto; }

/* --- Phone Frame --- */
.phone-frame {
  max-width: 390px;
  margin: var(--sp-lg) auto;
  border-radius: 36px;
  border: 6px solid var(--ink-90);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.15);
  background: var(--bg);
}
[data-theme="dark"] .phone-frame { border-color: var(--ink-70); }
.phone-screen {
  display: flex;
  flex-direction: column;
  min-height: 700px;
  overflow: hidden;
}
.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-sm) var(--sp-lg);
  font-size: .75rem;
  font-weight: 600;
}

/* --- Figma Images --- */
.figma-img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Utilities --- */
code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .8125em;
  background: var(--ink-10);
  padding: 1px 5px;
  border-radius: 3px;
}
[data-theme="dark"] code { background: var(--ink-80); }

/* --- Responsive --- */
@media (max-width: 600px) {
  .content { padding: var(--sp-base); }
  .card__body { padding: var(--sp-base); }
  .card__header { padding: var(--sp-sm) var(--sp-base); }
  .module-grid { grid-template-columns: 1fr; }
  .session-summary { flex-direction: column; text-align: center; }
  .session-summary__stats { justify-content: center; }
  .stat-card__value { font-size: 1.5rem; }
}
