:root {
  color-scheme: light;
  --ink: #18212a;
  --muted: #586574;
  --line: #d7dee8;
  --paper: #ffffff;
  --soft: #f5f7fa;
  --blue: #1f5bff;
  --green: #0f766e;
  --gold: #b7791f;
  --red: #b42318;
  --shadow: 0 14px 36px rgba(24, 33, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 0.76rem;
}

.topbar nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.94rem;
}

.topbar nav a {
  text-decoration: none;
}

.topbar nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 800;
}

main {
  display: grid;
  gap: 34px;
  padding: clamp(24px, 5vw, 64px);
}

.intro,
.plugin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.6fr);
  gap: 28px;
  align-items: end;
}

.tracker-intro h1,
.plugin-hero h1 {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
span,
small,
strong {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 8px 0;
  font-size: 1.12rem;
  letter-spacing: 0;
}

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

.status-panel,
.plugin-card,
.sample-form,
.builder-panel,
.callout,
.screen,
.event-card,
.tray-panel,
.manifest,
.tracker-table,
.progress-strip article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 20px;
}

.status-label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-label.ready {
  color: var(--green);
}

.status-label.danger {
  color: var(--red);
}

.status-panel strong {
  display: block;
  font-size: 1.28rem;
}

.status-panel p {
  margin: 10px 0 0;
  color: var(--muted);
}

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

.progress-strip article {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.metric {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 1.45rem;
  font-weight: 900;
}

.progress-strip p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.section {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.section-heading {
  display: grid;
  gap: 4px;
}

.tracker-table {
  display: grid;
  overflow: hidden;
}

.tracker-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.05fr) minmax(130px, 0.55fr) minmax(220px, 1.35fr) minmax(70px, 0.25fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.tracker-row:first-child {
  border-top: 0;
}

.tracker-head {
  color: var(--muted);
  background: #fbfcfe;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tracker-row small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.tracker-row a {
  color: var(--blue);
  font-weight: 850;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.status.local {
  color: var(--green);
  background: #e9f7f3;
}

.status.planned {
  color: var(--gold);
  background: #fff8e8;
}

.callout-grid,
.plugin-grid,
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.callout,
.plugin-card,
.event-card {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.callout p,
.plugin-card p,
.plugin-card ul,
.event-card p,
.event-card small {
  margin: 0;
  color: var(--muted);
}

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

.plugin-key {
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 850;
}

.plugin-card.active .plugin-key {
  color: var(--green);
}

.plugin-card.warning .plugin-key {
  color: var(--gold);
}

.plugin-card ul {
  display: grid;
  gap: 4px;
  padding-left: 18px;
}

.two-column {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: center;
}

.two-column.reverse {
  grid-template-columns: minmax(320px, 1fr) minmax(0, 0.85fr);
}

.sample-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0 14px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: #fff;
  background: var(--blue);
}

.button.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.screen,
.tray-panel,
.manifest {
  overflow: hidden;
}

.screen-bar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #fbfcfe;
  font-weight: 850;
}

.flow-list {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.flow-list span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.flow-list strong {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.event-card span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--green);
  background: #e9f7f3;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.event-card.muted {
  opacity: 0.74;
}

.tray-panel {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.tray-item,
.tray-total {
  display: grid;
  grid-template-columns: minmax(90px, 0.4fr) minmax(120px, 0.7fr) minmax(150px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tray-total {
  grid-template-columns: minmax(90px, 0.4fr) minmax(120px, 1fr);
  color: #fff;
  background: var(--ink);
}

.tray-item span,
.tray-total span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tray-total span {
  color: rgba(255, 255, 255, 0.74);
}

.tray-item small {
  color: var(--muted);
}

.builder-panel {
  overflow: hidden;
}

.builder-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.builder-toolbar span {
  margin-right: auto;
  font-weight: 850;
}

.builder-toolbar button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.builder-canvas {
  min-height: 260px;
  padding: 26px;
  background:
    linear-gradient(90deg, rgba(31, 91, 255, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(15, 118, 110, 0.09), transparent 42%),
    #ffffff;
}

.canvas-section {
  min-height: 190px;
  border: 1px dashed #8fa1b8;
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
}

.canvas-tag {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.manifest {
  padding: 20px;
  background: #101820;
}

.manifest code {
  display: block;
  white-space: pre-wrap;
  color: #d9f99d;
  font-size: 0.93rem;
}

code {
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .intro,
  .plugin-hero,
  .two-column,
  .two-column.reverse {
    grid-template-columns: 1fr;
  }

  .progress-strip,
  .callout-grid,
  .plugin-grid,
  .plugin-grid.compact,
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracker-row,
  .tracker-head {
    grid-template-columns: 1fr;
  }

  .tracker-head {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    padding: 22px;
  }

  .progress-strip,
  .callout-grid,
  .plugin-grid,
  .plugin-grid.compact,
  .event-grid {
    grid-template-columns: 1fr;
  }

  .progress-strip article,
  .builder-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .builder-toolbar span {
    margin-right: 0;
  }

  .tray-item,
  .tray-total {
    grid-template-columns: 1fr;
  }
}
