:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-muted: #eef2f3;
  --ink: #172126;
  --muted: #63727c;
  --line: #d9e1e5;
  --brand: #e85d2a;
  --brand-strong: #bd4318;
  --accent: #e85d2a;
  --danger: #b42318;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 280px 1fr;
}

.rail {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #172126;
  color: #f7fbfa;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
}

.brand-subtitle {
  color: #a9bab5;
  font-size: 12px;
}

.app-nav {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.nav-group {
  display: grid;
  gap: 2px;
}

.nav-sub-links {
  display: grid;
  gap: 2px;
  padding: 0 8px 8px 18px;
}

.nav-sub-link {
  border-radius: 6px;
  color: #cbd5d1;
  font-size: 13px;
  padding: 6px 8px;
  text-decoration: none;
}

.nav-sub-link:hover,
.nav-sub-link:focus-visible {
  background: rgb(255 255 255 / 8%);
  color: #ffffff;
  outline: none;
}

.nav-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 10px 12px;
  color: #f7fbfa;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgb(255 255 255 / 10%);
  outline: none;
}

.rail-footer {
  margin-top: auto;
  padding: 14px;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.primary-button,
.secondary-button,
.link-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  background: var(--brand);
  color: white;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--brand-strong);
}

.secondary-button,
.link-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.rail .secondary-button {
  width: 100%;
  background: transparent;
  color: white;
  border-color: rgb(255 255 255 / 24%);
}

.panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.panel h2,
.app-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.app-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.app-card.locked {
  background: var(--surface-muted);
}

.app-card.degraded {
  border-color: var(--danger);
}

.app-card p {
  margin: 0;
}

.nav-list,
.deep-link-list,
.entitlement-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.nav-list a,
.deep-link-list a {
  color: var(--brand-strong);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: #dcebe7;
  color: #174f44;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.warning {
  color: var(--danger);
  font-weight: 700;
}

.session-ready {
  color: var(--brand-strong);
  font-weight: 700;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

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

  .rail {
    min-height: auto;
  }

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