:root {
  color-scheme: light;
  --paper: #eff5f7;
  --ink: #142029;
  --muted: #64727e;
  --card: #ffffff;
  --line: #d7e2e7;
  --blue: #2563eb;
  --cyan: #0891b2;
  --green: #16835c;
  --amber: #b16b18;
  --red: #b13f37;
  --violet: #6d5bd0;
  --dark: #121a24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(8, 145, 178, 0.06) 34%, transparent 62%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, Avenir, "Avenir Next", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.topbar a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 64px;
}

.hero,
.summary-grid article,
.architecture,
.tree-section,
.api-section,
.validation,
.fit-limits article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 18px 46px rgba(20, 32, 41, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 30px;
  align-items: center;
  padding: clamp(28px, 5vw, 54px);
}

.hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

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

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 790px;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 5.6vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

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

p,
li,
.check-row span,
.phone small {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.58;
}

.lead {
  max-width: 700px;
  font-size: 1.13rem;
}

.proof-note {
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  background: #eaf1ff;
  color: #214c97;
  font-weight: 850;
  line-height: 1.42;
}

.device-stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(20, 32, 41, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 26, 36, 0.96), rgba(18, 26, 36, 0.9)),
    var(--dark);
}

.phone {
  min-width: 0;
  min-height: 490px;
  padding: 14px;
  border: 8px solid #080d14;
  border-radius: 28px;
  background: #f8fbff;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.28);
}

.phone.provider {
  min-height: 530px;
}

.phone.support {
  min-height: 460px;
}

.phone-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  color: #172233;
  font-size: 0.78rem;
  font-weight: 900;
}

.screen-title {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
}

.screen-title small,
.provider-card span,
.job span,
.sync-strip,
.metric-grid span {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.screen-title strong {
  color: var(--ink);
  font-size: 1.34rem;
  line-height: 1.05;
}

.search-pill,
.provider-card,
.job,
.sync-strip,
.metric-grid article {
  border: 1px solid #dce7ee;
  border-radius: 8px;
  background: #fff;
}

.search-pill {
  padding: 12px;
  color: #51606c;
  font-weight: 800;
}

.provider-card,
.job {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 13px;
}

.provider-card strong,
.job strong {
  color: var(--ink);
  line-height: 1.12;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 16px;
}

.timeline span {
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf1;
  color: #6d7c88;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 7px 6px;
  text-align: center;
  white-space: nowrap;
}

.timeline .done {
  background: #dff7ed;
  color: var(--green);
}

.timeline .active {
  background: #e8efff;
  color: var(--blue);
}

.job.urgent {
  border-left: 6px solid var(--red);
}

.job.warn {
  border-left: 6px solid var(--amber);
}

.sync-strip {
  margin-top: 14px;
  padding: 11px;
  background: #edf7fb;
  color: var(--cyan);
}

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

.metric-grid article {
  padding: 12px;
}

.metric-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.8rem;
}

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

.summary-grid article,
.architecture,
.tree-section,
.api-section,
.validation,
.fit-limits article {
  padding: clamp(22px, 3.5vw, 34px);
}

.tag {
  display: inline-flex;
  margin-bottom: 16px;
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: var(--blue);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tag.problem {
  background: var(--red);
}

.tag.stack {
  background: var(--violet);
}

.tag.proof {
  background: var(--green);
}

.architecture,
.tree-section,
.api-section,
.validation,
.fit-limits {
  margin-top: 18px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.architecture-grid,
.pattern-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

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

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

.architecture-grid article,
.pattern-grid article {
  min-width: 0;
  padding: 20px;
  background: #fff;
}

.architecture-grid span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--cyan);
  font-weight: 900;
}

.tree-shell {
  overflow: auto;
  border-radius: 8px;
  background: #101820;
}

pre {
  margin: 0;
  min-width: 720px;
  padding: 24px;
  color: #e5f6fb;
  font: 0.95rem/1.62 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.check-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.check-row {
  display: grid;
  grid-template-columns: 0.55fr 1fr 1fr;
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.check-row:last-child {
  border-bottom: 0;
}

.check-row span {
  min-width: 0;
  padding: 15px;
  background: #fff;
}

.check-row.head span {
  color: var(--ink);
  font-weight: 900;
}

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

.fit-limits ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2rem;
}

@media (max-width: 1060px) {
  .hero,
  .summary-grid,
  .architecture-grid,
  .pattern-grid,
  .fit-limits {
    grid-template-columns: 1fr;
  }

  .device-stage {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    overflow-x: auto;
  }

  .phone {
    min-height: 440px;
  }
}

@media (max-width: 680px) {
  .topbar {
    flex-direction: column;
    gap: 6px;
  }

  main,
  .topbar {
    width: min(100% - 28px, 1200px);
  }

  .hero {
    padding: 22px;
  }

  .device-stage {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .phone,
  .phone.provider,
  .phone.support {
    min-height: auto;
  }

  .check-row {
    grid-template-columns: 1fr;
  }

  pre {
    min-width: 620px;
  }
}
