:root {
  --ink: #1f2937;
  --muted: #64748b;
  --quiet: #94a3b8;
  --line: #d9e2ec;
  --soft: #f5f7fb;
  --paper: #ffffff;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --dark: #0f172a;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button {
  cursor: default;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 36px;
  align-items: center;
  padding: 54px clamp(20px, 5vw, 72px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin: 0 0 14px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
}

.intro {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  color: var(--blue);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 750;
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: 122px 1fr;
  min-height: 340px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.stage-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  background: var(--dark);
  border-radius: 12px;
}

.stage-sidebar span,
.stage-sidebar b,
.stage-topbar span,
.stage-cards span,
.stage-table span {
  display: block;
  border-radius: 8px;
}

.stage-brand {
  width: 64px;
  height: 18px;
  background: #ffffff;
}

.stage-nav {
  width: 82px;
  height: 28px;
  background: #334155;
}

.stage-nav.active {
  background: var(--blue);
}

.stage-main {
  display: grid;
  grid-template-rows: 56px 82px 1fr;
  gap: 14px;
  padding: 0 0 0 16px;
}

.stage-topbar,
.stage-table {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stage-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.stage-topbar span:first-child {
  width: 40px;
  height: 30px;
  background: #e2e8f0;
}

.stage-topbar span:last-child {
  flex: 1;
  height: 26px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
}

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

.stage-cards span {
  background: var(--blue-soft);
  border: 2px solid #bfdbfe;
}

.stage-table {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.stage-table span {
  height: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.stage-label {
  position: absolute;
  padding: 6px 10px;
  color: #854d0e;
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.stage-label.one {
  left: 42px;
  top: 10px;
}

.stage-label.two {
  left: 200px;
  top: 10px;
}

.stage-label.three {
  left: 235px;
  top: 112px;
}

.stage-label.four {
  left: 230px;
  bottom: 122px;
}

main {
  padding: 28px clamp(14px, 4vw, 56px) 72px;
}

.controls-panel,
.stats-strip,
.library-section,
.compare-section,
.prompt-builder {
  max-width: 1320px;
  margin: 0 auto 26px;
}

.controls-panel {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(16px);
}

.search-wrap {
  display: grid;
  gap: 8px;
}

.search-wrap span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.search-wrap input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-row button {
  padding: 8px 11px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 750;
}

.filter-row button.active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

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

.stats-strip article {
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stats-strip strong {
  display: block;
  font-size: 26px;
}

.stats-strip span {
  color: var(--muted);
}

.library-section {
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
}

.section-heading span {
  color: var(--muted);
  font-weight: 750;
}

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

.component-card {
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.demo-frame {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.card-body {
  padding: 14px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.card-title-row h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.15;
}

.card-title-row span {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: #1d4ed8;
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.component-card p {
  min-height: 64px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.component-card code {
  display: block;
  min-height: 74px;
  padding: 10px;
  overflow-wrap: anywhere;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}

.empty-results,
.compare-section,
.prompt-builder {
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.compare-section h2,
.prompt-builder h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 36px);
}

.compare-section > div:first-child p {
  max-width: 780px;
  margin: 0 0 18px;
  color: var(--muted);
}

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

.compare-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.compare-card h3 {
  margin: 0 0 10px;
}

.compare-card p {
  color: var(--muted);
}

.bad {
  background: #fff7ed;
}

.good {
  background: #f0fdf4;
}

.bad-demo,
.good-demo {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.bad-demo span {
  padding: 8px;
  color: #7f1d1d;
  background: #fee2e2;
  border-radius: 6px;
}

.good-demo strong {
  font-size: 19px;
}

.good-demo p {
  margin: 0;
}

.good-demo button,
.demo-buttons button,
.demo-confirm button,
.demo-empty button,
.demo-error button,
.demo-success button,
.demo-signin button,
.demo-crud button,
.demo-checkout button,
.demo-onboarding button,
.demo-upload button {
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: #e2e8f0;
}

.good-demo .primary,
.demo-buttons .primary,
.demo-empty button,
.demo-success button,
.demo-signin button,
.demo-checkout button,
.demo-onboarding footer button:last-child {
  color: #ffffff;
  background: var(--blue);
}

.good-demo.center {
  place-items: center;
  text-align: center;
}

.empty-line {
  height: 22px;
}

.empty-line.short {
  width: 60%;
}

.empty-icon {
  width: 52px;
  height: 42px;
  background: var(--blue-soft);
  border-radius: 12px;
}

.prompt-builder pre {
  margin: 14px 0 0;
  padding: 18px;
  overflow: auto;
  color: #111827;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  white-space: pre-wrap;
}

/* Demo primitives */
.demo-frame * {
  box-sizing: border-box;
}

.demo-frame button,
.demo-frame input,
.demo-frame select,
.demo-frame textarea {
  font: inherit;
}

.demo-appshell,
.demo-dashboard {
  display: grid;
  grid-template-columns: 68px 1fr;
  width: 100%;
  height: 150px;
  gap: 10px;
}

.demo-appshell aside,
.demo-dashboard aside {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  background: var(--dark);
  border-radius: 10px;
}

.demo-appshell aside span,
.demo-appshell aside b,
.demo-dashboard aside {
  display: block;
}

.demo-appshell aside span {
  width: 40px;
  height: 14px;
  background: #ffffff;
  border-radius: 5px;
}

.demo-appshell aside b {
  height: 18px;
  background: #334155;
  border-radius: 5px;
}

.demo-appshell main,
.demo-dashboard {
  min-width: 0;
}

.demo-appshell main {
  display: grid;
  grid-template-rows: 34px 46px 1fr;
  gap: 8px;
}

.demo-appshell header,
.demo-appshell article,
.demo-dashboard header,
.demo-dashboard article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.demo-appshell section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.demo-appshell section i {
  background: var(--blue-soft);
  border-radius: 8px;
}

.demo-hierarchy {
  width: 100%;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-hierarchy h4,
.demo-type h4 {
  margin: 0 0 6px;
  font-size: 24px;
}

.demo-hierarchy p,
.demo-type p {
  margin: 0 0 14px;
  color: var(--muted);
}

.demo-hierarchy button {
  color: #ffffff;
  background: var(--blue);
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
}

.demo-spacing {
  display: grid;
  width: 100%;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-spacing span {
  height: 18px;
  background: var(--blue-soft);
  border-radius: 6px;
}

.demo-spacing div {
  height: 34px;
}

.demo-colorroles,
.demo-type,
.demo-buttons,
.demo-iconbuttons,
.demo-toolbar,
.demo-stepper,
.demo-pagination,
.demo-breadcrumbs,
.demo-segmented,
.demo-filters,
.demo-chips,
.demo-avatars,
.demo-focus,
.demo-contrast {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 9px;
  width: 100%;
}

.demo-colorroles span,
.demo-chips span {
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.demo-colorroles span:nth-child(1) {
  color: #1d4ed8;
  background: var(--blue-soft);
}

.demo-colorroles span:nth-child(2) {
  color: #166534;
  background: var(--green-soft);
}

.demo-colorroles span:nth-child(3) {
  color: #92400e;
  background: var(--amber-soft);
}

.demo-colorroles span:nth-child(4) {
  color: #991b1b;
  background: var(--red-soft);
}

.demo-type {
  display: grid;
  justify-items: start;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-type strong {
  font-size: 16px;
}

.demo-type small {
  color: var(--quiet);
}

.demo-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 70px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-navbar span {
  color: var(--muted);
  font-size: 12px;
}

.demo-sidebar,
.demo-split,
.demo-master,
.demo-details {
  display: grid;
  grid-template-columns: 86px 1fr;
  width: 100%;
  height: 150px;
  gap: 10px;
}

.demo-sidebar aside,
.demo-split aside,
.demo-master section,
.demo-details aside {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  background: var(--dark);
  border-radius: 10px;
}

.demo-sidebar span {
  padding: 6px;
  color: #cbd5e1;
  border-radius: 6px;
  font-size: 11px;
}

.demo-sidebar .on {
  color: #ffffff;
  background: var(--blue);
}

.demo-sidebar main,
.demo-split main,
.demo-master aside,
.demo-details main {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-hamburger {
  display: flex;
  align-items: center;
  gap: 18px;
}

.demo-hamburger button,
.demo-iconbuttons button,
.demo-toolbar button,
.demo-tooltip button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #e2e8f0;
}

.demo-hamburger i {
  display: block;
  width: 19px;
  height: 2px;
  margin: 2px 0;
  background: var(--ink);
  border-radius: 999px;
}

.demo-hamburger nav {
  display: grid;
  gap: 8px;
  width: 110px;
  padding: 12px;
  color: #ffffff;
  background: var(--dark);
  border-radius: 10px;
  font-size: 12px;
}

.demo-drawer {
  display: grid;
  place-items: center;
  width: 100%;
}

.demo-drawer section {
  width: 140px;
  height: 150px;
  overflow: hidden;
  background: #ffffff;
  border: 8px solid var(--dark);
  border-radius: 24px;
}

.demo-drawer aside {
  display: grid;
  gap: 7px;
  width: 88px;
  height: 100%;
  padding: 13px;
  color: #cbd5e1;
  background: var(--dark);
  font-size: 11px;
}

.demo-drawer strong {
  color: #ffffff;
}

.demo-phone,
.demo-mobile-safe {
  display: grid;
  grid-template-rows: 1fr 46px;
  width: 120px;
  height: 160px;
  overflow: hidden;
  background: #ffffff;
  border: 8px solid var(--dark);
  border-radius: 24px;
}

.demo-phone main,
.demo-mobile-safe main {
  background: #f8fafc;
}

.demo-phone footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.demo-tabs {
  width: 100%;
}

.demo-tabs nav {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.demo-tabs span {
  padding: 8px 0;
  color: var(--muted);
}

.demo-tabs .on {
  color: var(--blue);
  border-bottom: 3px solid var(--blue);
  font-weight: 800;
}

.demo-tabs section {
  height: 68px;
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-segmented {
  padding: 5px;
  background: #e2e8f0;
  border-radius: 999px;
}

.demo-segmented span {
  padding: 7px 12px;
  border-radius: 999px;
}

.demo-segmented .on {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.demo-pagination button,
.demo-pagination span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.demo-pagination .on {
  color: #ffffff;
  background: var(--blue);
}

.demo-stepper span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: #e2e8f0;
  border-radius: 999px;
  font-weight: 850;
}

.demo-stepper .done,
.demo-stepper .on {
  color: #ffffff;
  background: var(--blue);
}

.demo-stepper i {
  width: 38px;
  height: 3px;
  background: #cbd5e1;
}

.demo-command {
  display: grid;
  gap: 8px;
  width: min(220px, 100%);
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.demo-command input,
.demo-field input,
.demo-field select,
.demo-field textarea,
.demo-filters input,
.demo-signin input,
.demo-date input {
  width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.demo-command span {
  padding: 8px;
  background: #f8fafc;
  border-radius: 8px;
}

.demo-dashboard {
  grid-template-columns: 54px 1fr 1fr 1fr;
  grid-template-rows: 34px 48px 1fr;
}

.demo-dashboard aside {
  grid-row: 1 / 4;
}

.demo-dashboard header {
  grid-column: 2 / 5;
}

.demo-dashboard span {
  background: var(--blue-soft);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

.demo-dashboard article {
  grid-column: 2 / 5;
}

.demo-cardgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.demo-cardgrid span {
  min-height: 62px;
  background: var(--blue-soft);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}

.demo-split aside span,
.demo-master section span {
  height: 20px;
  background: #334155;
  border-radius: 6px;
}

.demo-master {
  grid-template-columns: 1fr 100px;
}

.demo-master aside,
.demo-details aside {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  background: #ffffff;
}

.demo-master b {
  height: 18px;
  background: var(--blue-soft);
  border-radius: 6px;
}

.demo-master p {
  height: 42px;
  margin: 0;
  background: #f8fafc;
  border-radius: 8px;
}

.demo-master button {
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
}

.demo-settings {
  display: grid;
  gap: 10px;
  width: 100%;
}

.demo-settings section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-settings b {
  width: 90px;
  height: 16px;
  background: #e2e8f0;
  border-radius: 6px;
}

.demo-settings i {
  width: 42px;
  height: 22px;
  background: var(--blue);
  border-radius: 999px;
}

.demo-kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.demo-kanban section {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 140px;
  padding: 9px;
  background: #eef2f7;
  border-radius: 10px;
}

.demo-kanban b {
  font-size: 12px;
}

.demo-kanban span {
  height: 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.demo-feed {
  display: grid;
  gap: 9px;
  width: 100%;
}

.demo-feed article {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: center;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-feed i {
  width: 28px;
  height: 28px;
  background: var(--blue-soft);
  border-radius: 999px;
}

.demo-feed span {
  height: 18px;
  background: #e2e8f0;
  border-radius: 6px;
}

.demo-buttons .danger,
.demo-confirm footer button:last-child {
  color: #ffffff;
  background: var(--red);
}

.demo-iconbuttons button,
.demo-toolbar button {
  font-weight: 850;
}

.demo-toolbar {
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.demo-toolbar i {
  height: 36px;
  width: 1px;
  background: var(--line);
}

.demo-fab {
  position: relative;
  width: 180px;
  height: 140px;
}

.demo-fab main {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.demo-fab button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: var(--blue);
  border: 0;
  border-radius: 999px;
  font-size: 24px;
  box-shadow: var(--shadow);
}

.demo-dropdown,
.demo-popover,
.demo-tooltip,
.demo-context {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
}

.demo-dropdown > button,
.demo-popover > button {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #e2e8f0;
}

.demo-dropdown menu,
.demo-popover section,
.demo-context menu {
  display: grid;
  gap: 4px;
  width: 140px;
  margin: 8px 0 0;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.demo-dropdown span,
.demo-popover span,
.demo-context span {
  padding: 7px;
  border-radius: 7px;
}

.demo-dropdown span:first-child,
.demo-popover span:first-child,
.demo-context span:first-child {
  background: #f1f5f9;
}

.demo-confirm,
.demo-empty,
.demo-error,
.demo-success,
.demo-alert,
.demo-field,
.demo-validation,
.demo-upload,
.demo-onboarding,
.demo-signin,
.demo-checkout,
.demo-notifications {
  display: grid;
  gap: 8px;
  width: min(220px, 100%);
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.demo-confirm p,
.demo-empty p,
.demo-error p,
.demo-success p,
.demo-alert p,
.demo-upload p,
.demo-onboarding p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.demo-confirm footer,
.demo-onboarding footer {
  display: flex;
  justify-content: end;
  gap: 8px;
}

.demo-field label,
.demo-validation label,
.demo-slider label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.demo-field textarea {
  min-height: 58px;
  resize: none;
}

.demo-field small {
  color: var(--muted);
}

.demo-checks,
.demo-radios,
.demo-toggles {
  display: grid;
  gap: 10px;
  width: 100%;
}

.demo-checks label,
.demo-radios label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-checks i,
.demo-radios i {
  width: 18px;
  height: 18px;
  background: var(--blue);
  border-radius: 5px;
}

.demo-radios i {
  border-radius: 999px;
}

.demo-toggles {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.switch {
  width: 46px;
  height: 26px;
  padding: 3px;
  background: #cbd5e1;
  border-radius: 999px;
}

.switch i {
  display: block;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 999px;
}

.switch.on {
  background: var(--blue);
}

.switch.on i {
  margin-left: 20px;
}

.demo-slider {
  display: grid;
  gap: 10px;
  width: 100%;
}

.demo-slider div {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
}

.demo-slider i {
  display: block;
  width: 58%;
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
}

.demo-date {
  display: grid;
  gap: 10px;
  width: min(210px, 100%);
}

.demo-date section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-date b {
  grid-column: 1 / -1;
}

.demo-date span {
  height: 22px;
  background: #e2e8f0;
  border-radius: 6px;
}

.demo-date .on {
  background: var(--blue);
}

.demo-upload {
  place-items: center;
  text-align: center;
  border-style: dashed;
}

.demo-upload button {
  color: #ffffff;
  background: var(--blue);
}

.demo-validation input {
  border-color: var(--red);
}

.demo-validation small {
  color: var(--red);
}

.demo-filters {
  justify-content: start;
}

.demo-filters input {
  flex: 1 1 120px;
}

.demo-filters button,
.demo-filters span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.demo-filters span {
  color: #1d4ed8;
  background: var(--blue-soft);
  font-weight: 800;
}

.demo-modal,
.demo-keymodal {
  display: grid;
  place-items: center;
  width: 100%;
  height: 150px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 12px;
}

.demo-modal section,
.demo-keymodal section {
  display: grid;
  gap: 8px;
  width: 160px;
  padding: 14px;
  background: #ffffff;
  border-radius: 10px;
}

.demo-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.demo-modal button,
.demo-keymodal button {
  border: 0;
  border-radius: 7px;
  padding: 7px;
  color: #ffffff;
  background: var(--blue);
}

.demo-tooltip button {
  color: #ffffff;
  background: var(--blue);
}

.demo-tooltip span {
  padding: 8px 10px;
  color: #ffffff;
  background: var(--dark);
  border-radius: 8px;
  font-size: 12px;
}

.demo-context section {
  width: 170px;
  height: 90px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-context menu {
  position: absolute;
  right: 18px;
  top: 44px;
}

.demo-bottomsheet {
  position: relative;
  width: 130px;
  height: 160px;
  overflow: hidden;
  background: #ffffff;
  border: 8px solid var(--dark);
  border-radius: 24px;
}

.demo-bottomsheet main {
  height: 100%;
  background: #f8fafc;
}

.demo-bottomsheet section {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.16);
}

.demo-bottomsheet i {
  justify-self: center;
  width: 34px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 999px;
}

.demo-bottomsheet button {
  border: 0;
  border-radius: 7px;
  padding: 6px;
}

.demo-lightbox {
  display: grid;
  place-items: center;
  width: 100%;
  height: 150px;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 12px;
}

.demo-lightbox section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-lightbox div {
  width: 110px;
  height: 78px;
  background: linear-gradient(135deg, #93c5fd, #c4b5fd);
  border-radius: 10px;
}

.demo-lightbox button {
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}

.demo-toast {
  display: grid;
  align-items: end;
  justify-items: end;
  width: 100%;
  height: 150px;
}

.demo-toast span {
  padding: 12px 14px;
  color: #ffffff;
  background: var(--dark);
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.demo-alert {
  color: #991b1b;
  background: var(--red-soft);
  border-color: #fecaca;
}

.demo-alert p {
  color: #991b1b;
}

.demo-skeleton {
  display: grid;
  gap: 12px;
  width: 100%;
}

.demo-skeleton span {
  height: 20px;
  background: linear-gradient(90deg, #e2e8f0, #f8fafc, #e2e8f0);
  border-radius: 999px;
}

.demo-skeleton span:nth-child(1) {
  width: 70%;
}

.demo-skeleton span:nth-child(2) {
  width: 95%;
}

.demo-skeleton span:nth-child(3) {
  width: 82%;
}

.demo-skeleton span:nth-child(4) {
  width: 56%;
}

.demo-spinner {
  display: grid;
  place-items: center;
  gap: 12px;
}

.demo-spinner span {
  width: 42px;
  height: 42px;
  border: 5px solid #dbeafe;
  border-top-color: var(--blue);
  border-radius: 999px;
}

.demo-spinner button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  background: var(--blue);
}

.demo-progress {
  display: grid;
  gap: 10px;
  width: 100%;
}

.demo-progress div {
  height: 15px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
}

.demo-progress span {
  display: block;
  width: 65%;
  height: 100%;
  background: var(--blue);
}

.demo-empty,
.demo-success {
  place-items: center;
  text-align: center;
}

.demo-empty i,
.demo-success i {
  width: 52px;
  height: 42px;
  background: var(--blue-soft);
  border-radius: 12px;
}

.demo-error {
  color: #991b1b;
  background: #fff7ed;
  border-color: #fed7aa;
}

.demo-error button {
  color: #ffffff;
  background: var(--red);
}

.demo-datatable {
  width: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-datatable header,
.demo-datatable p {
  display: grid;
  grid-template-columns: 1fr 0.8fr 0.8fr;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border-top: 1px solid #edf2f7;
  font-size: 12px;
}

.demo-datatable header {
  color: var(--muted);
  background: #f8fafc;
  border-top: 0;
  font-weight: 800;
}

.demo-datatable b {
  width: fit-content;
  padding: 3px 7px;
  color: #166534;
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 11px;
}

.demo-stat {
  width: 170px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.demo-stat strong {
  display: block;
  font-size: 34px;
}

.demo-stat span {
  color: var(--muted);
}

.demo-stat i {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 8px;
  color: #166534;
  background: var(--green-soft);
  border-radius: 999px;
  font-style: normal;
  font-weight: 800;
}

.demo-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  width: 100%;
  height: 140px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.demo-chart span {
  flex: 1;
  background: var(--blue);
  border-radius: 7px 7px 0 0;
}

.demo-chart span:nth-child(1) {
  height: 38%;
}

.demo-chart span:nth-child(2) {
  height: 64%;
}

.demo-chart span:nth-child(3) {
  height: 48%;
}

.demo-chart span:nth-child(4) {
  height: 80%;
}

.demo-chart span:nth-child(5) {
  height: 56%;
}

.demo-timeline {
  display: grid;
  gap: 12px;
  width: 100%;
}

.demo-timeline p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.demo-timeline i {
  width: 12px;
  height: 12px;
  background: var(--blue);
  border-radius: 999px;
  box-shadow: 0 0 0 5px var(--blue-soft);
}

.demo-avatars span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: -8px;
  color: #ffffff;
  background: var(--blue);
  border: 3px solid #ffffff;
  border-radius: 999px;
  font-weight: 850;
}

.demo-avatars span:first-child {
  margin-left: 0;
}

.demo-chips span {
  color: #1d4ed8;
  background: var(--blue-soft);
}

.demo-details aside {
  color: #cbd5e1;
  background: var(--dark);
}

.demo-details aside strong {
  color: #ffffff;
}

.demo-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.demo-calendar span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: #f1f5f9;
  border-radius: 7px;
  font-size: 11px;
}

.demo-calendar .on {
  color: #ffffff;
  background: var(--blue);
}

.demo-mobile-safe {
  grid-template-rows: 1fr 34px;
}

.demo-mobile-safe main {
  display: grid;
  place-items: center;
  padding: 20px 10px;
}

.demo-mobile-safe main span {
  width: 70px;
  height: 90px;
  background: var(--blue-soft);
  border-radius: 12px;
}

.demo-mobile-safe footer {
  margin: 0 14px 8px;
  background: var(--dark);
  border-radius: 999px;
}

.demo-swipe {
  display: grid;
  grid-template-columns: 70px 1fr 62px;
  align-items: center;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.demo-swipe button {
  height: 70px;
  color: #ffffff;
  border: 0;
}

.demo-swipe button:first-child {
  background: var(--amber);
}

.demo-swipe button:last-child {
  background: var(--red);
}

.demo-swipe section {
  height: 70px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.demo-pull {
  display: grid;
  gap: 10px;
  place-items: center;
  width: 150px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.demo-pull i {
  width: 26px;
  height: 26px;
  border: 4px solid #dbeafe;
  border-top-color: var(--blue);
  border-radius: 999px;
}

.demo-pull section {
  display: grid;
  gap: 8px;
  width: 100%;
}

.demo-pull span {
  height: 20px;
  background: #e2e8f0;
  border-radius: 6px;
}

.demo-responsive-table {
  display: grid;
  gap: 8px;
  width: 100%;
}

.demo-responsive-table article {
  display: grid;
  gap: 5px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
}

.demo-onboarding {
  place-items: center;
  text-align: center;
}

.demo-onboarding i {
  width: 60px;
  height: 48px;
  background: linear-gradient(135deg, #93c5fd, #c4b5fd);
  border-radius: 14px;
}

.demo-signin input:last-of-type {
  color: transparent;
}

.demo-crud {
  display: grid;
  gap: 8px;
  width: 100%;
}

.demo-crud header {
  display: flex;
  justify-content: end;
}

.demo-crud header button {
  color: #ffffff;
  background: var(--blue);
}

.demo-crud p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.demo-checkout nav {
  display: flex;
  gap: 7px;
}

.demo-checkout nav span {
  flex: 1;
  padding: 6px;
  text-align: center;
  background: #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
}

.demo-checkout nav .on {
  color: #ffffff;
  background: var(--blue);
}

.demo-checkout section {
  display: grid;
  gap: 8px;
}

.demo-notifications p {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
}

.demo-notifications b {
  width: 10px;
  height: 10px;
  background: var(--blue);
  border-radius: 999px;
}

.demo-focus button {
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.demo-focus .focused,
.demo-keymodal .focused {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  border-color: var(--blue);
}

.demo-contrast {
  display: grid;
}

.demo-contrast span {
  padding: 12px;
  border-radius: 8px;
}

.demo-contrast .bad {
  color: #cbd5e1;
  background: #e2e8f0;
}

.demo-contrast .good {
  color: #ffffff;
  background: var(--dark);
}

@media (max-width: 1200px) {
  .component-grid,
  .compare-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

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

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

@media (max-width: 640px) {
  .hero {
    padding: 34px 16px;
  }

  .hero-stage {
    grid-template-columns: 1fr;
    min-height: 260px;
  }

  .stage-sidebar,
  .stage-label {
    display: none;
  }

  .stage-main {
    padding-left: 0;
  }

  main {
    padding-inline: 10px;
  }

  .component-grid,
  .compare-grid,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .library-section {
    padding: 14px;
  }

  .section-heading {
    display: block;
  }

  .component-card p,
  .component-card code {
    min-height: auto;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0.45in;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #ffffff;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: auto;
    padding: 0;
    border-bottom: 0;
    break-after: page;
  }

  .hero-actions,
  .controls-panel,
  .stats-strip {
    display: none;
  }

  .hero-stage {
    max-width: 7.1in;
    min-height: 310px;
    margin-top: 20px;
    box-shadow: none;
  }

  main {
    padding: 0;
  }

  .library-section,
  .compare-section,
  .prompt-builder {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 0;
    box-shadow: none;
    break-before: page;
  }

  .section-heading {
    margin-bottom: 14px;
  }

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

  .component-card,
  .compare-card {
    break-inside: avoid;
    box-shadow: none;
  }

  .demo-frame {
    min-height: 150px;
    padding: 10px;
  }

  .card-body {
    padding: 12px;
  }

  .component-card p,
  .component-card code {
    min-height: auto;
  }

  .component-card code {
    font-size: 10px;
  }

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

  .prompt-builder pre {
    white-space: pre-wrap;
  }
}
