:root {
  --bg: #f3f7fb;
  --panel: #ffffff;
  --ink: #13293d;
  --muted: #5f7488;
  --line: #d9e4ef;
  --primary: #0f62fe;
  --primary-soft: #eaf2ff;
  --success: #1f9d60;
  --warning: #c47f00;
  --danger: #c23b4d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f5f8fc 0%, #eef3f9 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.chooser-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 56px;
}

.chooser-grid,
.panel-grid.two,
.credential-grid,
.stats-grid,
.demo-card-grid,
.profile-grid {
  display: grid;
  gap: 20px;
}

.chooser-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.credential-grid,
.panel-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.stats-grid.slim {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.demo-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chooser-card,
.panel-card,
.stat-card,
.demo-note,
.demo-paper-card,
.announcement-card,
.credential-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(14, 43, 71, 0.08);
}

.chooser-card,
.panel-card,
.credential-card,
.demo-paper-card,
.announcement-card {
  padding: 24px;
}

.hero {
  margin-bottom: 24px;
  background:
    radial-gradient(circle at top right, #d8e8ff 0%, rgba(216, 232, 255, 0) 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.hero h1 {
  margin: 14px 0 12px;
  font-size: 40px;
}

.hero p {
  max-width: 860px;
  color: var(--muted);
  line-height: 1.6;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill {
  background: #e8fff1;
  color: #0f6d45;
}

.badge.success {
  background: #e7f7ee;
  color: #197147;
}

.badge.warning {
  background: #fff3d8;
  color: #8a5a00;
}

.badge.danger {
  background: #ffe5ea;
  color: #9d233c;
}

.badge.neutral {
  background: #eef2f7;
  color: #4b647c;
}

.stack {
  display: grid;
  gap: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.primary-btn,
.ghost-btn,
.inline-link {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.inline-link:hover {
  transform: translateY(-1px);
}

.primary-btn {
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(135deg, #0f62fe 0%, #0048d8 100%);
}

.ghost-btn {
  padding: 11px 14px;
  color: var(--ink);
  background: #f3f7fb;
  border: 1px solid var(--line);
}

.small-btn {
  padding: 10px 12px;
  font-size: 13px;
}

.inline-link {
  background: none;
  color: var(--primary);
  padding: 0;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  background: linear-gradient(180deg, #0e2438 0%, #173856 100%);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px 24px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffd166 0%, #ffb703 100%);
  color: #16324f;
  font-weight: 800;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
}

.brand p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-link {
  border: 0;
  text-align: left;
  color: rgba(255, 255, 255, 0.84);
  background: transparent;
  padding: 13px 14px;
  border-radius: 14px;
  cursor: pointer;
}

.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.sidebar-footer .ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.main {
  padding: 28px;
}

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

.topbar h2 {
  margin: 6px 0 8px;
  font-size: 34px;
}

.topbar p,
.eyebrow,
.muted,
.result-row p,
.announcement-card p {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
}

.user-chip {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 4px;
  min-width: 210px;
}

.user-chip span {
  color: var(--muted);
  font-size: 13px;
}

.demo-note {
  padding: 16px 18px;
  margin-bottom: 24px;
  color: #31506f;
  background: #f8fbff;
}

.stat-card {
  padding: 20px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 30px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.section-head h3 {
  margin: 0;
  font-size: 24px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: #49637d;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-list,
.demo-paper-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.metric-list li {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.subject-bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 60px;
  gap: 14px;
  align-items: center;
}

.bar-track {
  height: 12px;
  background: #edf3fb;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0f62fe 0%, #54a6ff 100%);
}

.warning-banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff4db;
  color: #845600;
  border: 1px solid #f4d082;
}

.card-stack,
.list-stack {
  display: grid;
  gap: 14px;
}

.announcement-card,
.result-row {
  border: 1px solid var(--line);
  border-radius: 16px;
}

.announcement-card.compact {
  padding: 16px;
}

.announcement-top,
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.result-row {
  padding: 16px;
  align-items: center;
}

.result-row strong,
.demo-paper-card h4 {
  display: block;
  margin-bottom: 6px;
}

.result-score {
  font-weight: 800;
  color: var(--success);
}

.result-score.pending {
  color: var(--warning);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full {
  grid-column: 1 / -1;
}

.actions-row {
  display: flex;
  gap: 12px;
}

.demo-paper-card {
  display: grid;
  gap: 12px;
}

.demo-paper-card p {
  margin: 0;
  color: var(--muted);
}

.demo-paper-card ul li {
  color: var(--muted);
  margin-bottom: 8px;
}

.profile-grid div {
  padding: 18px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.profile-grid span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 13px;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .stats-grid,
  .demo-card-grid,
  .profile-grid,
  .chooser-grid,
  .panel-grid.two,
  .credential-grid,
  .grid-form {
    grid-template-columns: 1fr;
  }
}
