/* ScreenCrate product pages and progressive product previews.
   This layer intentionally builds on styles.css so the accepted homepage stays stable. */

.site-announcement {
  min-height: 36px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.76);
  background: var(--dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font: 500 10px/1.2 var(--mono);
  letter-spacing: 0.01em;
}

.site-announcement > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--signal);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.site-announcement > span i {
  width: 5px;
  height: 5px;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(200, 243, 74, 0.12);
}

.site-announcement strong {
  font-weight: 450;
}

.site-announcement em {
  color: #fff;
  font-style: normal;
  font-weight: 600;
}

.site-announcement svg {
  width: 14px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.4;
  transition: transform 180ms var(--ease);
}

.site-announcement:hover svg {
  transform: translateX(3px);
}

.context-pack-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 17%, rgba(49, 92, 245, 0.09), transparent 25%),
    linear-gradient(180deg, var(--bone-soft) 0%, #eeebe3 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.context-pack-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(16, 22, 19, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 22, 19, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}

.context-pack-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.65fr);
  align-items: end;
  gap: 70px;
}

.context-pack-heading h2 {
  max-width: 850px;
  margin-top: 28px;
  font-family: var(--display);
  font-size: clamp(58px, 5.5vw, 82px);
  font-weight: 410;
  line-height: 0.97;
  letter-spacing: -0.052em;
}

.context-pack-heading h2 span,
.context-pack-heading h2 em {
  display: block;
}

.context-pack-heading h2 em {
  color: var(--cobalt);
  font-weight: 350;
}

.context-pack-intro {
  padding-bottom: 8px;
}

.context-pack-intro > p {
  color: #535c56;
  font-size: 15px;
  line-height: 1.72;
  letter-spacing: -0.018em;
}

.context-pack-intro > span {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #39423d;
  font: 500 8px/1.2 var(--mono);
  letter-spacing: 0.08em;
}

.context-pack-intro > span i {
  width: 7px;
  height: 7px;
  background: var(--cobalt);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(49, 92, 245, 0.1);
}

.home-context-lab {
  position: relative;
  z-index: 1;
  margin-top: 78px;
  overflow: hidden;
  color: #e9eee9;
  background: #111714;
  border: 1px solid rgba(16, 22, 19, 0.7);
  border-radius: 16px;
  box-shadow:
    0 42px 90px rgba(16, 22, 19, 0.2),
    0 3px 0 rgba(255, 255, 255, 0.08) inset;
}

.context-lab-topbar {
  min-height: 70px;
  padding: 0 18px 0 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  background: linear-gradient(180deg, #19211d, #141a17);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.context-lab-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.context-lab-title .mini-crate {
  color: #fff;
}

.context-lab-title > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.context-lab-title strong {
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-lab-title small {
  overflow: hidden;
  color: #89928d;
  font: 400 8px/1.2 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-mode-switch {
  padding: 4px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
}

.context-mode-switch button {
  min-height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8e9892;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.context-mode-switch button i {
  padding: 3px 4px;
  color: var(--signal);
  background: rgba(200, 243, 74, 0.09);
  border-radius: 3px;
  font: 500 6px/1 var(--mono);
  font-style: normal;
  letter-spacing: 0.06em;
}

.context-mode-switch button:hover {
  color: #fff;
}

.context-mode-switch button.is-active {
  color: #fff;
  background: #27302b;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.16);
}

.context-lab-grid {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(330px, 0.78fr);
}

.context-source {
  min-width: 0;
  display: grid;
  grid-template-rows: 48px 1fr 50px;
  background: #e9ece9;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.context-browser-bar {
  padding: 0 16px;
  display: grid;
  grid-template-columns: auto minmax(150px, 360px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #737c76;
  background: #f2f3f1;
  border-bottom: 1px solid rgba(16, 22, 19, 0.11);
}

.context-browser-bar .browser-dots {
  display: flex;
  gap: 5px;
}

.context-browser-bar .browser-dots i {
  width: 7px;
  height: 7px;
  background: #cbd0cc;
  border-radius: 50%;
}

.context-browser-bar .browser-dots i:first-child { background: #ef7869; }
.context-browser-bar .browser-dots i:nth-child(2) { background: #e7b957; }
.context-browser-bar .browser-dots i:nth-child(3) { background: #62b879; }

.context-browser-bar > div {
  height: 27px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(16, 22, 19, 0.1);
  border-radius: 6px;
  font: 400 7px/1 var(--mono);
}

.context-browser-bar > div i {
  width: 6px;
  height: 6px;
  background: #6e776f;
  border-radius: 50%;
}

.context-browser-bar > b {
  color: #6e776f;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.context-page {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: #121813;
  background:
    radial-gradient(circle at 68% 22%, rgba(92, 92, 239, 0.12), transparent 27%),
    #fbfaf7;
}

.context-page-header {
  height: 58px;
  padding: 0 6%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(16, 22, 19, 0.1);
}

.context-page-header > strong {
  font: 650 8px/1 var(--mono);
  letter-spacing: 0.13em;
}

.context-page-header .context-page-nav {
  display: flex;
  gap: 25px;
  color: #59615c;
  font-size: 8px;
}

.context-page-header > button {
  justify-self: end;
  min-width: 72px;
  height: 29px;
  color: #fff;
  background: var(--ink);
  border-radius: 5px;
  font-size: 7px;
}

.context-page-copy {
  padding: 46px 8% 26px;
  text-align: center;
}

.context-page-copy small {
  color: var(--cobalt);
  font: 500 7px/1 var(--mono);
  letter-spacing: 0.18em;
}

.context-page-copy h3 {
  margin-top: 13px;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 420;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.context-page-copy h3 em {
  color: #646b67;
  font-weight: 350;
}

.context-page-copy p {
  max-width: 360px;
  margin: 15px auto 0;
  color: #747b76;
  font-size: 8px;
  line-height: 1.5;
}

.context-page-cards {
  width: min(84%, 650px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 9px;
}

.context-page-cards article {
  position: relative;
  height: 150px;
  padding: 19px;
  display: flex;
  flex-direction: column;
  color: #3a423d;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(16, 22, 19, 0.13);
  border-radius: 7px;
  box-shadow: 0 13px 25px rgba(16, 22, 19, 0.05);
}

.context-page-cards article.is-selected {
  height: 180px;
  color: #fff;
  background: #17201c;
  border-color: #17201c;
  box-shadow: 0 20px 40px rgba(16, 22, 19, 0.17);
}

.context-page-cards article > span {
  position: absolute;
  left: 50%;
  top: -10px;
  padding: 5px 8px;
  color: #17201c;
  background: var(--signal);
  border-radius: 999px;
  font: 600 5px/1 var(--mono);
  letter-spacing: 0.06em;
  transform: translateX(-50%);
  white-space: nowrap;
}

.context-page-cards article small {
  color: inherit;
  font: 600 6px/1 var(--mono);
  letter-spacing: 0.1em;
  opacity: 0.72;
}

.context-page-cards article strong {
  margin: 11px 0 14px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 450;
  line-height: 1;
}

.context-page-cards article i {
  width: 76%;
  height: 3px;
  margin-top: 6px;
  display: block;
  background: currentColor;
  border-radius: 99px;
  opacity: 0.13;
}

.context-page-cards article i:nth-of-type(2) { width: 92%; }
.context-page-cards article i:nth-of-type(3) { width: 60%; }

.context-page-cards article button {
  height: 28px;
  margin-top: auto;
  color: #111714;
  background: var(--signal);
  border-radius: 4px;
  font-size: 6px;
  font-weight: 700;
}

.context-selection {
  position: absolute;
  z-index: 3;
  left: 37.4%;
  top: 233px;
  width: 25.2%;
  height: 197px;
  border: 1.5px solid var(--cobalt);
  box-shadow: 0 0 0 100vmax rgba(19, 27, 23, 0.16);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.context-selection > i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff;
  border: 1px solid var(--cobalt);
  border-radius: 50%;
}

.context-selection > i:first-child { left: -4px; top: -4px; }
.context-selection > i:nth-child(2) { right: -4px; top: -4px; }
.context-selection > i:nth-child(3) { right: -4px; bottom: -4px; }
.context-selection > i:nth-child(4) { left: -4px; bottom: -4px; }

.context-selection > b {
  position: absolute;
  left: -1px;
  top: -24px;
  padding: 6px 8px;
  color: #fff;
  background: var(--cobalt);
  border-radius: 4px 4px 4px 0;
  font: 500 6px/1 var(--mono);
  white-space: nowrap;
}

.context-cursor {
  position: absolute;
  z-index: 5;
  left: 62%;
  top: 420px;
  color: #fff;
  font-size: 25px;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 1px #000);
  transform: rotate(-10deg);
}

.context-scan {
  position: absolute;
  z-index: 4;
  left: 37.5%;
  top: 233px;
  width: 25%;
  height: 197px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 220ms ease;
}

.context-scan span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
  animation: context-scan 2.4s var(--ease) infinite;
}

.home-context-lab:not([data-context-view="visual"]) .context-scan {
  opacity: 1;
}

.home-context-lab[data-context-view="bundle"] .context-selection {
  border-color: var(--signal);
}

@keyframes context-scan {
  0%, 8% { transform: translateY(0); opacity: 0; }
  18%, 82% { opacity: 1; }
  92%, 100% { transform: translateY(196px); opacity: 0; }
}

.context-source-footer {
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #66706a;
  background: #f4f5f3;
  border-top: 1px solid rgba(16, 22, 19, 0.1);
}

.context-source-footer > span {
  display: flex;
  gap: 3px;
}

.context-source-footer kbd {
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #303833;
  background: #fff;
  border: 1px solid rgba(16, 22, 19, 0.16);
  border-bottom-width: 2px;
  border-radius: 4px;
  font: 500 7px/1 var(--mono);
}

.context-source-footer p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
}

.context-source-footer p i {
  width: 6px;
  height: 6px;
  background: #20a76e;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(32, 167, 110, 0.1);
}

.context-source-footer p b {
  font-weight: 550;
}

.context-inspector {
  min-width: 0;
  padding: 0 23px 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 100% 0, rgba(49, 92, 245, 0.12), transparent 35%),
    #121815;
}

.context-inspector-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.context-inspector-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.context-inspector-head > div > span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--cobalt);
  border-radius: 7px;
  font: 500 8px/1 var(--mono);
}

.context-inspector-head p {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.context-inspector-head p strong {
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-inspector-head p small {
  overflow: hidden;
  color: #7e8983;
  font: 400 7px/1 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-inspector-head > button {
  color: #737e78;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.home-context-output {
  display: none;
  padding-top: 25px;
  align-content: start;
}

.home-context-output.is-active {
  display: grid;
}

.home-context-output .context-output-label {
  margin-bottom: 13px;
  color: #7f8983;
  font: 500 7px/1 var(--mono);
  letter-spacing: 0.1em;
}

.home-context-output > article {
  min-height: 70px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-context-output > article:last-of-type {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.payload-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c9d5ce;
  background: #252e29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  font: 500 9px/1 var(--mono);
  font-style: normal;
}

.payload-icon.image { color: #9cb0ff; background: rgba(49, 92, 245, 0.13); }
.payload-icon.code { color: #c8f34a; background: rgba(200, 243, 74, 0.09); }
.payload-icon.token { color: #ee9d90; background: rgba(237, 92, 71, 0.09); }
.payload-icon.asset { color: #75c8b5; background: rgba(67, 180, 154, 0.1); }

.home-context-output article > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.home-context-output article strong {
  overflow: hidden;
  color: #eff3f0;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-context-output article small {
  overflow: hidden;
  color: #758079;
  font: 400 6.5px/1.3 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-context-output article > b {
  color: #6f7973;
  font: 500 6.5px/1 var(--mono);
}

.home-context-output-summary {
  margin-top: 18px;
  padding: 20px;
  display: grid;
  gap: 7px;
  color: #cfd8d2;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.home-context-output-summary strong {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 420;
}

.home-context-output-summary span {
  color: #758079;
  font-size: 8px;
}

.context-resource-uri {
  min-height: 46px;
  padding: 5px 5px 5px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #dfe6e1;
  background: #090e0c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  font: 400 7px/1 var(--mono);
}

.context-resource-uri span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-resource-uri button {
  align-self: stretch;
  padding: 0 10px;
  color: #aeb8b1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  font: 500 7px/1 var(--mono);
}

.context-tool-call {
  margin-top: 15px;
  overflow: hidden;
  background: #0a0f0d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.context-tool-call > small {
  padding: 13px 15px;
  display: block;
  color: var(--signal);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font: 500 7px/1 var(--mono);
}

.context-tool-call code {
  padding: 20px 15px 24px;
  display: block;
  color: #aab7af;
  font: 400 9px/1.8 var(--mono);
}

.context-tool-call > span {
  min-height: 43px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #93a099;
  background: rgba(255, 255, 255, 0.035);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 8px;
}

.context-tool-call > span i {
  width: 6px;
  height: 6px;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(200, 243, 74, 0.08);
}

.context-tool-call > span b {
  font-weight: 550;
}

.context-inspector-foot {
  align-self: end;
  display: grid;
  gap: 11px;
}

.context-inspector-foot > span {
  padding: 15px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #78847d;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 7px;
}

.context-inspector-foot > span i {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--signal);
  background: rgba(200, 243, 74, 0.08);
  border-radius: 50%;
  font-style: normal;
}

.context-inspector-foot > span b {
  font-weight: 500;
}

.context-inspector-foot > a {
  min-height: 45px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #101613;
  background: var(--signal);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 650;
  transition: background 180ms ease, transform 180ms var(--ease);
}

.context-inspector-foot > a:hover {
  background: #d8ff64;
  transform: translateY(-2px);
}

.context-pack-notes {
  position: relative;
  z-index: 1;
  min-height: 96px;
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}

.context-pack-notes p {
  max-width: 760px;
  color: #6b736e;
  font-size: 11px;
  line-height: 1.6;
}

.context-pack-notes p b {
  color: var(--ink);
  font-weight: 650;
}

.context-pack-notes > a {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--cobalt);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.context-pack-notes > a b {
  font-size: 14px;
}

/* Shared subpage foundation. Individual product pages compose these primitives. */
.subpage-body {
  background: var(--bone-soft);
}

.subpage-body .site-header {
  background: rgba(248, 246, 241, 0.91);
}

.nav-links a[aria-current="page"]::after {
  right: 0;
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.page-main {
  overflow: hidden;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #5f6862;
  font: 500 9px/1 var(--mono);
  letter-spacing: 0.1em;
}

.page-eyebrow i {
  width: 7px;
  height: 7px;
  background: var(--cobalt);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(49, 92, 245, 0.09);
}

.page-eyebrow .status-pill,
.status-pill {
  padding: 6px 8px;
  color: var(--ink);
  background: var(--signal);
  border-radius: 999px;
  font: 600 7px/1 var(--mono);
  letter-spacing: 0.07em;
}

.page-hero {
  position: relative;
  padding: 126px 0 92px;
}

.page-hero::before {
  content: "";
  position: absolute;
  width: min(64vw, 860px);
  height: min(64vw, 860px);
  right: -22vw;
  top: -40%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(49, 92, 245, 0.1), transparent 64%);
}

.page-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: center;
  gap: 80px;
}

.page-hero-copy h1,
.page-title {
  margin-top: 30px;
  font-family: var(--display);
  font-size: clamp(68px, 6.8vw, 100px);
  font-weight: 410;
  line-height: 0.92;
  letter-spacing: -0.058em;
}

.page-hero-copy h1 em,
.page-title em {
  color: var(--cobalt);
  font-weight: 350;
}

.page-hero-copy > p,
.page-lede {
  max-width: 650px;
  margin-top: 30px;
  color: #555f59;
  font-size: 17px;
  line-height: 1.68;
  letter-spacing: -0.022em;
}

.page-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.page-proof {
  margin: 25px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  list-style: none;
  color: #69716c;
  font-size: 10px;
}

.page-proof li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.page-proof i {
  color: var(--cobalt);
  font-style: normal;
}

.page-section {
  position: relative;
  padding: 138px 0;
  border-top: 1px solid var(--line);
}

.page-section.dark {
  color: #fff;
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.1);
}

.page-section.soft {
  background: var(--bone);
}

.page-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.48fr);
  align-items: end;
  gap: 70px;
}

.page-section-head h2 {
  margin-top: 24px;
  font-family: var(--display);
  font-size: clamp(50px, 5vw, 74px);
  font-weight: 410;
  line-height: 0.98;
  letter-spacing: -0.052em;
}

.page-section-head h2 em {
  color: var(--cobalt);
  font-weight: 350;
}

.page-section.dark .page-section-head h2 em {
  color: var(--signal);
}

.page-section-head > p,
.section-intro {
  color: #67706a;
  font-size: 14px;
  line-height: 1.7;
}

.page-section.dark .page-section-head > p,
.page-section.dark .section-intro {
  color: #919c95;
}

.subpage-grid {
  margin-top: 68px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.subpage-card {
  min-height: 330px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  background: var(--bone-soft);
}

.subpage-card > small {
  color: var(--cobalt);
  font: 500 8px/1 var(--mono);
  letter-spacing: 0.12em;
}

.subpage-card h3 {
  margin-top: 36px;
  font-family: var(--display);
  font-size: 33px;
  font-weight: 430;
  line-height: 1;
  letter-spacing: -0.04em;
}

.subpage-card p {
  margin-top: 16px;
  color: #67706a;
  font-size: 12px;
  line-height: 1.65;
}

.subpage-card > span:last-child {
  margin-top: auto;
  color: #818984;
  font: 500 8px/1.4 var(--mono);
}

.page-final-cta {
  padding: 120px 0;
  background: var(--signal);
}

.page-final-cta .shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 50px;
}

.page-final-cta h2 {
  max-width: 860px;
  font-family: var(--display);
  font-size: clamp(52px, 5.8vw, 82px);
  font-weight: 430;
  line-height: 0.95;
  letter-spacing: -0.052em;
}

.page-final-cta p {
  max-width: 550px;
  margin-top: 20px;
  color: rgba(16, 22, 19, 0.66);
  font-size: 13px;
  line-height: 1.6;
}

.page-final-cta .button-primary {
  color: #fff;
  background: var(--ink);
  white-space: nowrap;
}

.page-faq {
  max-width: 850px;
  margin: 65px auto 0;
}

.page-faq details {
  border-top: 1px solid var(--line);
}

.page-faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.page-faq summary {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
  font-weight: 620;
  cursor: pointer;
  list-style: none;
}

.page-faq summary::-webkit-details-marker { display: none; }

.page-faq summary::after {
  content: "+";
  color: var(--cobalt);
  font: 400 22px/1 var(--sans);
}

.page-faq details[open] summary::after { content: "−"; }

.page-faq details p {
  max-width: 700px;
  padding: 0 0 30px;
  color: #68716b;
  font-size: 12px;
  line-height: 1.7;
}

.beta-form {
  margin-top: 28px;
}

.beta-form label {
  margin-bottom: 8px;
  display: block;
  color: #6c746f;
  font: 500 8px/1 var(--mono);
  letter-spacing: 0.08em;
}

.beta-form > div {
  min-height: 54px;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.beta-form input {
  min-width: 0;
  padding: 0 13px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.beta-form button {
  padding: 0 18px;
  color: #fff;
  background: var(--cobalt);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 650;
}

.beta-form > p {
  margin-top: 9px;
  color: #858d88;
  font-size: 8px;
  line-height: 1.5;
}

.beta-form.is-error > div { border-color: var(--vermilion); }
.beta-form.is-error > p { color: var(--vermilion); }
.beta-form.is-success > div { border-color: #2d9c6c; }
.beta-form.is-success > p { color: #237b55; }

.not-found-page {
  min-height: 100vh;
  background: var(--dark);
}

.not-found-page .site-header {
  color: var(--ink);
}

.not-found-main {
  min-height: calc(100vh - 77px);
  display: grid;
  align-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 76% 36%, rgba(49, 92, 245, 0.22), transparent 27%),
    linear-gradient(135deg, #101613, #161d19);
}

.not-found-grid {
  padding-block: 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 90px;
}

.not-found-copy h1 {
  margin-top: 30px;
  font-family: var(--display);
  font-size: clamp(68px, 7vw, 104px);
  font-weight: 410;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.not-found-copy h1 span,
.not-found-copy h1 em {
  display: block;
}

.not-found-copy h1 em {
  color: #9ca8a1;
  font-weight: 350;
}

.not-found-copy > p {
  max-width: 570px;
  margin-top: 28px;
  color: #9aa59e;
  font-size: 15px;
  line-height: 1.65;
}

.not-found-copy .button-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.not-found-visual {
  position: relative;
  min-height: 510px;
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.25);
}

.not-found-visual > span,
.not-found-visual > b {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  font: 500 10px/1 var(--mono);
}

.not-found-visual > b {
  color: var(--signal);
  border-color: var(--signal);
}

.not-found-visual > i {
  width: 23px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.not-found-visual > div {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 178px;
  height: 128px;
  display: grid;
  place-items: center;
  background: #1d2722;
  border: 1px dashed rgba(200, 243, 74, 0.55);
  border-radius: 10px;
  transform: translate(-50%, -50%) rotate(-8deg) translateY(-122px);
}

.not-found-visual > div small {
  color: #7d8881;
  font: 500 7px/1 var(--mono);
  letter-spacing: 0.1em;
}

.not-found-visual > div strong {
  color: var(--signal);
  font-family: var(--display);
  font-size: 52px;
  font-weight: 400;
}

@media (max-width: 1180px) {
  .context-lab-grid {
    grid-template-columns: minmax(0, 1.48fr) minmax(310px, 0.72fr);
  }

  .context-page-cards {
    width: 90%;
  }

  .context-selection,
  .context-scan {
    left: 36.8%;
    width: 26.5%;
  }

  .page-hero-grid {
    gap: 48px;
  }
}

@media (max-width: 960px) {
  .site-announcement {
    min-height: 34px;
  }

  .context-pack-heading,
  .page-hero-grid,
  .page-section-head {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .context-pack-intro {
    max-width: 620px;
  }

  .context-lab-topbar {
    min-height: 116px;
    padding-block: 14px;
    grid-template-columns: 1fr;
  }

  .context-mode-switch {
    width: 100%;
  }

  .context-mode-switch button {
    flex: 1;
    justify-content: center;
  }

  .context-lab-grid {
    grid-template-columns: 1fr;
  }

  .context-source {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .context-inspector {
    min-height: 500px;
  }

  .context-pack-notes {
    padding-bottom: 28px;
    flex-direction: column;
    gap: 18px;
  }

  .page-hero {
    padding: 92px 0 78px;
  }

  .page-hero-visual {
    max-width: 720px;
  }

  .subpage-grid {
    grid-template-columns: 1fr;
  }

  .subpage-card {
    min-height: 250px;
  }

  .page-final-cta .shell {
    grid-template-columns: 1fr;
  }

  .page-final-cta .button {
    width: max-content;
  }

  .not-found-grid {
    grid-template-columns: 1fr;
  }

  .not-found-visual {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .site-announcement {
    min-height: 32px;
    padding-inline: 14px;
    gap: 8px;
    font-size: 7px;
  }

  .site-announcement > span b,
  .site-announcement em {
    display: none;
  }

  .site-announcement strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .context-pack-heading h2 {
    font-size: 49px;
  }

  .home-context-lab {
    width: calc(100% - 12px);
    margin-top: 54px;
    border-radius: 11px;
  }

  .context-lab-topbar {
    padding: 12px;
  }

  .context-lab-title small {
    max-width: 220px;
  }

  .context-mode-switch {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .context-mode-switch button {
    min-width: max-content;
    flex: 0 0 auto;
    padding-inline: 10px;
  }

  .context-source {
    grid-template-rows: 42px 1fr 48px;
  }

  .context-browser-bar {
    padding-inline: 10px;
    grid-template-columns: auto minmax(100px, 1fr) auto;
    gap: 8px;
  }

  .context-page {
    min-height: 425px;
  }

  .context-page-header {
    height: 45px;
    grid-template-columns: 1fr auto;
  }

  .context-page-header .context-page-nav {
    display: none;
  }

  .context-page-copy {
    padding: 31px 7% 18px;
  }

  .context-page-copy h3 {
    font-size: 34px;
  }

  .context-page-cards {
    width: 92%;
    gap: 4px;
  }

  .context-page-cards article {
    height: 112px;
    padding: 11px;
  }

  .context-page-cards article.is-selected {
    height: 136px;
  }

  .context-page-cards article strong {
    margin-block: 8px;
    font-size: 19px;
  }

  .context-page-cards article button {
    height: 22px;
  }

  .context-selection,
  .context-scan {
    left: 35.5%;
    top: 181px;
    width: 29%;
    height: 153px;
  }

  .context-selection > b {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .context-cursor {
    left: 63%;
    top: 321px;
  }

  @keyframes context-scan {
    0%, 8% { transform: translateY(0); opacity: 0; }
    18%, 82% { opacity: 1; }
    92%, 100% { transform: translateY(152px); opacity: 0; }
  }

  .context-source-footer {
    justify-content: flex-end;
  }

  .context-source-footer > span {
    display: none;
  }

  .context-source-footer p {
    font-size: 7px;
  }

  .context-inspector {
    min-height: 510px;
    padding-inline: 16px;
  }

  .context-pack-notes > a {
    white-space: normal;
  }

  .page-hero-copy h1,
  .page-title {
    font-size: 54px;
  }

  .page-hero-copy > p,
  .page-lede {
    font-size: 15px;
  }

  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions .button {
    width: 100%;
  }

  .page-section {
    padding: 92px 0;
  }

  .page-section-head h2 {
    font-size: 46px;
  }

  .subpage-card {
    padding: 26px;
  }

  .page-final-cta {
    padding: 88px 0;
  }

  .page-final-cta h2 {
    font-size: 48px;
  }

  .page-final-cta .button {
    width: 100%;
  }

  .beta-form > div {
    grid-template-columns: 1fr;
  }

  .beta-form input {
    min-height: 43px;
  }

  .beta-form button {
    min-height: 42px;
  }

  .not-found-copy h1 {
    font-size: 56px;
  }

  .not-found-visual {
    min-height: 320px;
    padding: 20px;
    gap: 5px;
  }

  .not-found-visual > span,
  .not-found-visual > b {
    width: 36px;
    height: 36px;
  }

  .not-found-visual > i {
    width: 12px;
  }

  .not-found-visual > div {
    width: 136px;
    height: 100px;
    transform: translate(-50%, -50%) rotate(-8deg) translateY(-88px);
  }
}
