body[data-style="a"] {
  --ink: #1e272e;
  --muted: #667085;
  --line: #d8dee4;
  --panel: #ffffff;
  --page: #f5f7f9;
  --nav: #23313f;
  --nav-2: #2f4050;
  --teal: #17766b;
  --green: #2f855a;
  --amber: #a15c15;
  --rose: #8a3d55;
  --blue: #2d5b87;
  --purple: #695c9f;
  --soft-teal: #e8f4f2;
  --soft-amber: #fff3df;
  --soft-rose: #f8eaf0;
  --soft-blue: #eaf1f8;
  --shadow: 0 12px 24px rgba(35, 49, 63, 0.10);
}

body[data-style="b"] {
  --ink: #2e2a26;
  --muted: #756d65;
  --line: #e3d7ca;
  --panel: #fffdf9;
  --page: #f7f3ec;
  --nav: #40524b;
  --nav-2: #52675f;
  --teal: #4d8b78;
  --green: #5b8f62;
  --amber: #b57928;
  --rose: #a65868;
  --blue: #527699;
  --purple: #806f9a;
  --soft-teal: #e8f3ef;
  --soft-amber: #fff0da;
  --soft-rose: #f8e9ea;
  --soft-blue: #e9eef5;
  --shadow: 0 12px 22px rgba(70, 56, 42, 0.11);
}

body[data-style="c"] {
  --ink: #17212b;
  --muted: #5c6773;
  --line: #c8d1da;
  --panel: #ffffff;
  --page: #eef3f6;
  --nav: #182635;
  --nav-2: #26394c;
  --teal: #127c7a;
  --green: #287352;
  --amber: #b26316;
  --rose: #9c3d52;
  --blue: #1f6794;
  --purple: #5f5a96;
  --soft-teal: #dff2f1;
  --soft-amber: #fff0d8;
  --soft-rose: #f8e2e7;
  --soft-blue: #e1eef6;
  --shadow: 0 8px 16px rgba(24, 38, 53, 0.13);
}

body[data-style="d"] {
  --ink: #20242a;
  --muted: #68707c;
  --line: #dde2e8;
  --panel: #ffffff;
  --page: #f4f6fa;
  --nav: #263044;
  --nav-2: #344057;
  --teal: #1d7d77;
  --green: #37805a;
  --amber: #a66d1f;
  --rose: #90506b;
  --blue: #336fa0;
  --purple: #6960a8;
  --soft-teal: #e3f3f1;
  --soft-amber: #fff2df;
  --soft-rose: #f4e8ee;
  --soft-blue: #e8f0f8;
  --shadow: 0 16px 34px rgba(38, 48, 68, 0.10);
}

.style-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.style-current {
  color: var(--muted);
  font-size: 12px;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-buttons {
  display: flex;
  gap: 4px;
}

.style-chip {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
}

.style-chip.active {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.bakeoff-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.bakeoff-banner h2 {
  margin: 3px 0 0;
  font-size: 18px;
}

.bakeoff-banner p {
  margin: 5px 0 0;
  color: var(--muted);
}

.option-card.active {
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal), var(--shadow);
}

.compact-card {
  border: 1px solid var(--line);
  text-align: left;
  min-height: 116px;
}

.family-hero,
.relationship-grid,
.desk-grid,
.campus-board {
  display: grid;
  gap: 14px;
}

.family-hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: stretch;
}

.family-hero h2,
.campus-lead h2 {
  margin: 4px 0 6px;
  font-size: 28px;
  line-height: 1.14;
}

.family-hero p,
.campus-lead p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.family-profile-card,
.journey-card,
.story-card,
.lane-card,
.os-tile,
.metric-ribbon button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.family-profile-card {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 16px;
  background: #fffaf3;
}

.family-profile-card strong,
.journey-card strong,
.story-card strong,
.lane-card strong,
.os-tile strong,
.metric-ribbon strong {
  display: block;
  font-size: 18px;
}

.family-profile-card span,
.journey-card span,
.story-card span,
.lane-card span,
.os-tile small,
.metric-ribbon small {
  color: var(--muted);
  line-height: 1.4;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.journey-grid.single-column {
  grid-template-columns: 1fr;
}

.journey-card,
.story-card,
.lane-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.relationship-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}

.story-list {
  display: grid;
  gap: 10px;
}

.parent-family-mobile {
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  align-items: start;
}

.parent-family-mobile .family-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(230px, 0.68fr) minmax(0, 1.32fr);
  align-items: start;
}

.parent-family-mobile .family-hero h2 {
  font-size: 30px;
  line-height: 1.08;
}

.parent-family-mobile .family-profile-card {
  align-content: start;
  min-height: 0;
  box-shadow: none;
}

.parent-family-mobile > .story-list {
  grid-column: 1;
}

.parent-family-mobile > .panel:not(.family-hero) {
  grid-column: 2;
}

.story-card {
  background: #fffdf9;
}

.story-card.active,
.lane-card.active {
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal), var(--shadow);
}

.desk-command,
.workspace-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  min-width: 0;
}

.desk-command {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.desk-command button,
.workspace-tabs button {
  min-height: 34px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 700;
}

.desk-command button.active,
.workspace-tabs button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.desk-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.72fr);
}

.desk-main .data-table {
  font-size: 13px;
}

.metric-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.metric-ribbon button {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
}

.campus-board {
  grid-template-columns: minmax(300px, 1.2fr) repeat(2, minmax(170px, 0.65fr));
}

.campus-lead {
  min-height: 190px;
}

.os-tile {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding: 16px;
  border-top: 4px solid var(--teal);
}

.os-tile[data-tone="blue"] {
  border-top-color: var(--blue);
}

.os-tile[data-tone="amber"] {
  border-top-color: var(--amber);
}

.os-tile[data-tone="rose"] {
  border-top-color: var(--rose);
}

.role-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.single-column {
  grid-template-columns: 1fr;
}

body[data-style="b"] .panel,
body[data-style="b"] .stat-card,
body[data-style="b"] .route-card,
body[data-style="b"] .detail-card,
body[data-style="b"] .child-card {
  border-radius: 8px;
}

body[data-style="b"] .app-shell {
  display: grid;
  grid-template-columns: minmax(220px, 248px) minmax(0, 1fr);
}

body[data-style="b"] .sidebar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 100vh;
  max-height: 100vh;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 16px 12px;
  overflow-x: hidden;
  overflow-y: auto;
}

body[data-style="b"] .brand {
  flex: 0 0 auto;
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 4px 12px;
}

body[data-style="b"] .role-picker {
  flex: 0 0 auto;
}

body[data-style="b"] .main-nav {
  display: grid;
  flex: 0 1 auto;
  grid-auto-flow: row;
  gap: 5px;
  min-width: 0;
  overflow: visible;
}

body[data-style="b"] .nav-link {
  min-width: 0;
  min-height: 40px;
  width: 100%;
  white-space: normal;
  line-height: 1.2;
}

body[data-style="b"] .sidebar-note {
  display: block;
}

body[data-style="b"] .topbar {
  position: sticky;
  top: 0;
  min-height: 70px;
  align-items: center;
}

body[data-style="b"] .content {
  padding: 24px;
}

body[data-style="b"] .stat-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

body[data-style="b"] .stat-card {
  min-height: 132px;
  padding: 18px;
}

body[data-style="b"] .stat-card strong {
  font-size: 31px;
}

body[data-style="b"] .queue-item,
body[data-style="b"] .activity-item,
body[data-style="b"] .check-item {
  background: #fffaf3;
}

body[data-style="b"] .route-card {
  min-height: 190px;
}

@media (max-width: 760px) {
  body[data-style="b"] .app-shell {
    display: block;
    grid-template-columns: none;
  }

  body[data-style="b"] .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 300px);
    height: auto;
    max-height: none;
    z-index: 8;
    transform: translateX(-102%);
    transition: transform 160ms ease;
  }

  body[data-style="b"].nav-open .sidebar {
    transform: translateX(0);
  }

  body[data-style="b"] .topbar {
    min-height: auto;
    align-items: flex-start;
  }
}

body[data-style="b"] .soft-stats .stat-card {
  text-align: left;
}

body[data-style="c"] .panel,
body[data-style="c"] .stat-card,
body[data-style="c"] .route-card,
body[data-style="c"] .detail-card,
body[data-style="c"] .child-card {
  border-radius: 4px;
}

body[data-style="c"] .app-shell {
  grid-template-columns: 92px minmax(0, 1fr);
}

body[data-style="c"] .sidebar {
  padding: 10px 8px;
  gap: 10px;
}

body[data-style="c"] .brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0 0 10px;
}

body[data-style="c"] .brand strong,
body[data-style="c"] .brand span,
body[data-style="c"] .role-picker span,
body[data-style="c"] .role-picker,
body[data-style="c"] .sidebar-note {
  display: none;
}

body[data-style="c"] .brand-mark {
  width: 44px;
  height: 44px;
}

body[data-style="c"] .role-picker select {
  min-height: 32px;
  padding: 0 4px;
  font-size: 11px;
}

body[data-style="c"] .nav-link {
  justify-content: center;
  min-height: 42px;
  padding: 7px;
}

body[data-style="c"] .nav-link span:not(.nav-token) {
  display: none;
}

body[data-style="c"] .nav-token {
  width: 30px;
  height: 30px;
}

body[data-style="c"] .content {
  padding: 14px;
}

body[data-style="c"] .stat-card {
  min-height: 96px;
  gap: 5px;
}

body[data-style="c"] .data-table,
body[data-style="c"] .queue-item,
body[data-style="c"] .activity-item,
body[data-style="c"] .check-item {
  font-size: 13px;
}

body[data-style="c"] .queue-item,
body[data-style="c"] .activity-item,
body[data-style="c"] .check-item {
  border-radius: 4px;
  background: #f9fbfc;
}

body[data-style="c"] .data-table th,
body[data-style="c"] .data-table td {
  padding: 7px 6px;
}

body[data-style="d"] .app-shell {
  grid-template-columns: 132px minmax(0, 1fr);
}

body[data-style="d"] .sidebar {
  padding: 16px 10px;
  align-items: stretch;
}

body[data-style="d"] .brand {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 0 0 12px;
}

body[data-style="d"] .brand strong {
  font-size: 13px;
}

body[data-style="d"] .brand span,
body[data-style="d"] .role-picker span,
body[data-style="d"] .role-picker,
body[data-style="d"] .sidebar-note span {
  display: none;
}

body[data-style="d"] .role-picker select {
  min-height: 34px;
  padding: 0 6px;
  font-size: 12px;
}

body[data-style="d"] .nav-link {
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-height: 58px;
  text-align: center;
  font-size: 11px;
}

body[data-style="d"] .nav-token {
  width: 28px;
  height: 28px;
}

body[data-style="d"] .content {
  padding: 24px;
}

body[data-style="d"] .panel,
body[data-style="d"] .stat-card,
body[data-style="d"] .route-card,
body[data-style="d"] .detail-card,
body[data-style="d"] .child-card {
  border-radius: 8px;
}

body[data-style="d"] .dashboard-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.9fr);
}

body[data-style="d"] .stat-card {
  min-height: 124px;
  padding: 17px;
}

@media (max-width: 760px) {
  .style-switcher {
    width: 100%;
    justify-content: flex-start;
  }

  .style-current {
    display: none;
  }

  .bakeoff-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .family-hero,
  .relationship-grid,
  .desk-grid,
  .campus-board,
  .role-lanes,
  .journey-grid,
  .metric-ribbon {
    grid-template-columns: 1fr;
  }

  .family-hero h2,
  .campus-lead h2 {
    font-size: 22px;
  }

  body[data-style="b"] .sidebar,
  body[data-style="c"] .sidebar,
  body[data-style="d"] .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 300px);
    height: 100vh;
    max-height: none;
    flex-direction: column;
    align-items: stretch;
    overflow: auto;
    transform: translateX(-102%);
  }

  body.nav-open[data-style="b"] .sidebar,
  body.nav-open[data-style="c"] .sidebar,
  body.nav-open[data-style="d"] .sidebar {
    transform: translateX(0);
  }

  body[data-style="b"] .brand {
    min-width: 0;
  }

  body[data-style="b"] .main-nav {
    display: grid;
    min-width: 0;
  }

  body[data-style="b"] .content {
    padding: 12px;
    overflow-x: hidden;
  }

  body[data-style="b"] .route-shell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-style="b"] .route-shell > * {
    min-width: 0;
    max-width: 100%;
  }

  .parent-family-mobile {
    grid-template-columns: minmax(0, 1fr);
  }

  .parent-family-mobile .family-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .parent-family-mobile > .story-list,
  .parent-family-mobile > .panel:not(.family-hero) {
    grid-column: 1;
  }

  body[data-style="b"] .bakeoff-banner {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body[data-style="b"] .family-hero {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-style="b"] .relationship-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-style="b"] .journey-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-style="b"] .stat-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-style="b"] .family-profile-card .primary-button {
    width: 100%;
    min-width: 0;
  }
}
