.site-shell {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: 48px;
}

.brand,
.navlinks a {
  text-decoration: none;
  font-weight: 750;
}

.brand {
  color: var(--ink);
}

.navlinks {
  display: flex;
  gap: var(--space-md);
  color: var(--ink-secondary);
  font-size: 14px;
}

.hero {
  padding: 16px 0 36px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-pressed);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--ink-secondary);
  font-size: 18px;
}

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

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 760;
  text-decoration: none;
}

.primary-link {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-1);
}

.secondary-link {
  border: 1px solid var(--separator);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-secondary);
}

.principles,
.page-grid,
.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.principles article,
.rule-grid article {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(232, 224, 214, 0.9);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.principles span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.principles h2,
.section-head h2,
.rule-grid h3 {
  margin: 6px 0 8px;
  letter-spacing: 0;
}

.principles h2 {
  font-size: 18px;
}

.principles p,
.rule-grid p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 14px;
}

.page-review,
.implementation-map,
.blueprint-section {
  margin-top: 54px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: 30px;
}

.section-head p:not(.eyebrow) {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--ink-secondary);
  font-size: 15px;
}

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

.review-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(232, 224, 214, 0.92);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.review-embed {
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: 26px;
  background: #0f0e0d;
  box-shadow: var(--shadow-1);
}

.review-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.review-copy {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.review-copy span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.review-copy strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.review-copy em {
  display: block;
  margin-top: 4px;
  color: var(--accent-pressed);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.review-copy p {
  margin: 4px 0 0;
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--separator);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
}

.rule-grid article h3 {
  font-size: 17px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.page-title {
  margin-bottom: 26px;
}

.page-title h1 {
  font-size: clamp(32px, 5vw, 54px);
}

.mock-data {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(201, 149, 106, 0.16);
  color: var(--accent-pressed);
  font-size: 12px;
  font-weight: 800;
}

.companion-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(92, 61, 30, 0.08);
}

.companion-avatar {
  position: relative;
  width: 42px;
  height: 42px;
}

.companion-figure {
  position: absolute;
  inset: 0;
  border-radius: 17px 17px 19px 19px;
  background: linear-gradient(145deg, #f6d0a9 0 58%, #d8a477 59% 100%);
  box-shadow: 0 8px 18px rgba(92, 61, 30, 0.14);
}

.companion-figure::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 4px;
  height: 17px;
  border-radius: 15px 15px 9px 9px;
  background: #6c4c3d;
}

.companion-figure::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 3px;
  border-radius: 999px;
  background: rgba(90, 54, 41, 0.54);
}

.companion-figure span {
  position: absolute;
  left: 11px;
  top: 22px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #3d2b24;
  box-shadow: 16px 0 0 #3d2b24;
}

.companion-copy {
  min-width: 0;
}

.companion-copy strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.companion-copy span {
  display: block;
  margin-top: 3px;
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.stage .companion-card,
.companion-card.dark {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

.stage .companion-avatar,
.companion-card.dark .companion-avatar {
  filter: saturate(0.92) brightness(1.06);
}

.stage .companion-copy strong,
.companion-card.dark .companion-copy strong {
  color: rgba(255, 255, 255, 0.92);
}

.stage .companion-copy span,
.companion-card.dark .companion-copy span {
  color: rgba(255, 255, 255, 0.62);
}

.app-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.app-button.secondary {
  border: 1px solid var(--separator);
  background: var(--card);
  color: var(--ink-secondary);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(240, 235, 227, 0.92);
}

.segmented span {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 14px;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 760;
}

.segmented .active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(92, 61, 30, 0.10);
}

.embed-mode,
.embed-mode body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}

.embed-mode .site-shell {
  width: 100vw;
  padding: 0;
}

.embed-mode .back-link,
.embed-mode .page-title,
.embed-mode .phone-note {
  display: none;
}

.embed-mode .blueprint-canvas {
  display: block;
}

.embed-mode .phone-frame {
  width: 100vw;
  max-width: none;
  padding: calc(100vw * 10 / 390);
  border-radius: calc(100vw * 44 / 390);
  margin: 0;
  box-shadow: none;
}

.embed-mode .phone-screen {
  border-radius: calc(100vw * 34 / 390);
}

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

  .principles,
  .rule-grid {
    grid-template-columns: 1fr;
  }

  .review-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .review-card {
    padding: 14px;
  }
}
