:root {
  --ink: #18221e;
  --muted: #66736f;
  --line: #dce8e1;
  --paper: #f5faf7;
  --white: #fff;
  --jade: #0d735b;
  --jade-dark: #064a3b;
  --gold: #bc8425;
  --shadow: 0 22px 60px rgba(12, 52, 41, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f7fbf8, #edf7f1 52%, #fff6e9);
}

a,
button {
  font: inherit;
}

.demo-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
}

.demo-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  background: #0d261f;
  color: white;
}

.demo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  margin-bottom: 34px;
}

.demo-brand span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--gold);
}

.demo-sidebar nav {
  display: grid;
  gap: 10px;
}

.demo-sidebar button,
.back-link {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-align: left;
  padding: 0 14px;
}

.demo-sidebar button.active {
  color: #0d261f;
  background: #f5f1df;
}

.back-link {
  display: flex;
  align-items: center;
  margin-top: 28px;
  text-decoration: none;
}

.demo-main {
  padding: 32px;
}

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

.demo-topbar p {
  margin: 0 0 6px;
  color: var(--jade);
  font-weight: 800;
}

.demo-topbar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
}

.demo-topbar a,
.panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--jade-dark);
  text-decoration: none;
  cursor: pointer;
}

.demo-view {
  display: none;
}

.demo-view.active {
  display: block;
}

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

.metric-grid article,
.panel,
.role-grid article,
.ticket-grid article {
  padding: 22px;
  border: 1px solid rgba(13, 115, 91, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.metric-grid span,
.ticket-grid span,
.role-grid span,
.panel p,
.table-list span,
.table-list em {
  color: var(--muted);
}

.metric-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 32px;
}

.metric-grid em,
.ticket-grid em,
.table-list em {
  font-style: normal;
}

.panel {
  margin-top: 18px;
}

.panel.wide {
  width: 100%;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.advice-list,
.table-list {
  display: grid;
  gap: 12px;
}

.advice-list article,
.table-list div,
.report-block p {
  padding: 16px;
  border-radius: 14px;
  background: #f3f8f5;
}

.advice-list span,
.table-list span,
.table-list em {
  display: block;
  margin-top: 6px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.form-card {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.form-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.form-card input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
}

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

.result-card article {
  padding: 16px;
  border-radius: 14px;
  background: #f8f4e8;
}

.result-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.ticket-grid article strong,
.role-grid article strong {
  display: block;
  margin: 8px 0;
}

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

  .demo-sidebar {
    position: static;
    height: auto;
  }

  .demo-sidebar nav,
  .metric-grid,
  .role-grid,
  .ticket-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .demo-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
