/* Shared typography and literal-instruction refinements. */
body { letter-spacing: normal; }
h1 { letter-spacing: -.04em; }
.home-title {
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.055em;
}
.steps h2, .manual h2, .brand, .button, .text-link { letter-spacing: -.01em; }
.manual { grid-template-columns: repeat(4, 1fr); }
.manual-step { min-height: 255px; }
.install-visual { margin: 46px 0 0; }
.install-visual img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 28px; }
.hero-art img { width: 100%; height: auto; display: block; border-radius: 28px; }
@media (max-width: 900px) { .manual { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .manual { grid-template-columns: 1fr; } }
body {
  background:
    radial-gradient(ellipse at 82% 12%, rgba(10, 132, 255, .46) 0%, transparent 34%),
    radial-gradient(ellipse at 8% 88%, rgba(0, 72, 170, .42) 0%, transparent 38%),
    linear-gradient(135deg, #000 0%, #031126 48%, #001a3d 100%);
  background-attachment: fixed;
}
.demo-browser {
  min-height: 560px;
  overflow: visible;
  background: #18181b;
}
.demo-top { gap: 11px; }
.demo-top span { width: 14px; height: 14px; opacity: 1; }
.demo-top .close { background: #ff453a; }
.demo-top .minimize { background: #ffd60a; }
.demo-top .zoom { background: #30d158; }
.demo-top strong {
  margin-left: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-text {
  left: 46px;
  top: 118px;
  width: 58%;
  color: #d4d4d8;
  font-size: 22px;
  line-height: 1.56;
}
.demo-text p { margin: 0 0 18px; }
.paper-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.paper-heading { color: #f4f4f5; font-size: 30px; font-weight: 800; }
.paper-copy { max-width: 520px; }
.select-run {
  display: inline-block;
  white-space: nowrap;
}
.word-highlight {
  display: inline;
  color: #fff;
  background: linear-gradient(90deg, rgba(10, 132, 255, .88), rgba(10, 132, 255, .88)) 0 100% / 0 100% no-repeat;
  border-radius: 3px;
  padding: 0 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: selectionGrow 3.6s ease-in-out infinite;
}
.demo-lines i { display: none; }
.demo-lines .demo-inline-explain {
  position: static;
  z-index: 3;
  margin: 0 0 0 8px;
  padding: 7px 18px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 14px;
  vertical-align: .12em;
  opacity: 0;
  transform: translateY(5px) scale(.96);
  animation: explainAppear 3.6s ease-in-out infinite;
}
.demo-lines button img { display: none; }
.demo-app-card {
  right: 42px;
  top: 36px;
  bottom: auto;
  width: 335px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0,0,0,.42);
  border-radius: 28px;
}
.demo-app-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #3f3f46;
  color: #f4f4f5;
  font-size: 15px;
  font-weight: 800;
  font-style: normal;
}
.demo-app-head b { margin-right: 8px; font-size: 18px; font-weight: 400; }
.demo-app-head em { color: #d4d4d8; font-style: normal; }
.demo-app-card blockquote {
  margin: 18px 18px 14px;
  padding: 17px;
  border: 1px solid #3f3f46;
  border-radius: 16px;
  color: #d4d4d8;
  background: #27272a;
  font-size: 16px;
  line-height: 1.45;
}
.demo-app-card p {
  margin: 0 18px 18px;
  padding: 19px;
  border-radius: 14px;
  color: #f4f4f5;
  background: #000;
  font-size: 17px;
  line-height: 1.45;
}
.demo-slider {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr 18px;
  gap: 10px;
  align-items: center;
  margin: 0 18px 16px;
  color: #0a84ff;
  font-size: 12px;
}
.demo-slider strong { grid-column: 1 / -1; color: #f4f4f5; font-size: 30px; line-height: 1.1; }
.demo-slider small { color: #d4d4d8; font-size: 18px; font-style: normal; }
.demo-slider i {
  grid-column: 2;
  display: block;
  height: 6px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0a84ff 0 35%, #4b6380 35% 100%);
}
.demo-app-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 18px 20px; }
.demo-app-actions span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 16px;
  color: white;
  background: #0a84ff;
  font-size: 13px;
  font-weight: 800;
}
.demo-app-actions span:first-child { background: #ff5a1f; border: 0; }
@media (max-width: 900px) {
  .demo-text { width: auto; left: 28px; right: 28px; }
  .demo-app-card { width: auto; }
}

@keyframes selectionGrow {
  0%, 16% { background-size: 0 100%; color: #d4d4d8; }
  48%, 82% { background-size: 100% 100%; color: #fff; }
  100% { background-size: 0 100%; color: #d4d4d8; }
}
@keyframes explainAppear {
  0%, 48% { opacity: 0; transform: translateY(5px) scale(.96); }
  58%, 82% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(5px) scale(.96); }
}

/* Current homepage demo: native text highlight, then Explain, then real app. */
.hero {
  position: relative;
  display: block;
  align-items: center;
  min-height: 720px;
}

.copy { max-width: 980px; }

.hero-title-demo { margin-bottom: 28px; }

.hero-title-demo .home-title {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0;
}

.title-word {
  display: inline-block;
  background-image: linear-gradient(rgba(63, 107, 145, .96), rgba(63, 107, 145, .96));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 0% 100%;
}

.title-line {
  display: inline-flex;
  align-items: center;
  gap: clamp(42px, 4vw, 64px);
  white-space: nowrap;
}

.title-read {
  color: #fff;
  animation: heroSelectRead 10s ease-in-out infinite;
}

.title-understand {
  color: var(--orange);
  animation: heroSelectUnderstand 10s ease-in-out infinite;
}

.title-understand .title-to { color: #fff; }

.title-understand span {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.hero-explain-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 0;
  z-index: 5;
  min-height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font: 700 17px/1 "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  box-shadow: 0 20px 50px rgba(10,132,255,.35);
  opacity: 0;
  transform: translateY(8px) scale(.94);
  animation: heroExplainAfterHighlight 10s ease-in-out infinite;
}

.hero-demo {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 24px;
  width: 390px;
  min-height: 620px;
  display: grid;
  align-items: center;
  pointer-events: none;
}

.paper-demo {
  position: relative;
  width: 100%;
  min-height: 500px;
  padding: 56px 62px;
  border: 1px solid #3f3f46;
  border-radius: 34px;
  background: #18181b;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}

.paper-kicker {
  margin: 0 0 24px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.paper-demo h2 {
  margin: 0 0 26px;
  font-size: 34px;
  line-height: 1.1;
}

.paper-text {
  position: relative;
  max-width: 640px;
  margin: 0;
  color: #e4e4e7;
  font-size: clamp(29px, 2.2vw, 42px);
  line-height: 1.38;
  font-weight: 500;
}

.native-highlight {
  color: #fff;
  background-image: linear-gradient(rgba(10, 132, 255, .9), rgba(10, 132, 255, .9));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 100%;
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
  animation: nativeSelection 6.2s ease-in-out infinite;
}

.explain-pill {
  position: absolute;
  left: min(470px, 72%);
  top: 1.55em;
  z-index: 3;
  min-height: 52px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font: 700 18px/1 -apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Helvetica Neue",Arial,sans-serif;
  box-shadow: 0 20px 50px rgba(10,132,255,.35);
  opacity: 0;
  transform: translateY(8px) scale(.94);
  animation: explainAfterHighlight 6.2s ease-in-out infinite;
}

.eli5-demo-app {
  position: relative;
  right: auto;
  top: auto;
  width: 390px;
  border: 1px solid #4a4a55;
  border-radius: 30px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(0,0,0,.58);
  opacity: 0;
  transform: translateX(28px) scale(.97);
  animation: heroAppAfterExplain 10s ease-in-out infinite;
}

.app-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 0 18px;
  border-bottom: 1px solid #2f2f35;
  background: #18181b;
  color: #f4f4f5;
}

.drag-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-titlebar strong { font-size: 17px; font-weight: 800; }
.app-titlebar em {
  margin-left: auto;
  padding: 10px 17px;
  border-radius: 999px;
  background: #2a2a2d;
  color: #f4f4f5;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
}

.app-body {
  padding: 24px 18px;
  background: linear-gradient(90deg, #232326, #1a1a1d);
}

.app-body blockquote {
  margin: 0 0 24px;
  padding: 22px;
  border: 1px solid #45454d;
  border-radius: 22px;
  color: #d4d4d8;
  background: #27272a;
  font-size: 18px;
  line-height: 1.45;
}

.answer-card {
  padding: 24px;
  border-radius: 22px;
  background: #000;
  color: #fff;
  font-size: 20px;
  line-height: 1.45;
  min-height: 190px;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.app-controls {
  border-top: 1px solid #2f2f35;
  padding: 34px 18px 20px;
  background: #000;
  color: #a1a1aa;
}

.slider-label {
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 10px 34px;
}

.slider-row {
  display: grid;
  grid-template-columns: 18px 1fr 18px;
  align-items: center;
  gap: 12px;
}

.slider-row span { color: #d4d4d8; font-size: 26px; }
.slider-row i {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0 65%, #52677f 65% 100%);
}

.slider-row i::after {
  content: "";
  position: absolute;
  left: 65%;
  top: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0a84ff;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 24px rgba(10,132,255,.32);
}

.app-controls p {
  margin: 14px 0 18px;
  text-align: center;
  font-size: 15px;
  line-height: 1.35;
}

.app-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.app-buttons button {
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--blue);
  font: 800 15px/1 -apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Helvetica Neue",Arial,sans-serif;
}

.app-buttons button:first-child { background: var(--orange); }
.app-controls small {
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: 16px;
}

@keyframes nativeSelection {
  0%, 12% { background-size: 0% 100%; }
  38%, 78% { background-size: 100% 100%; }
  100% { background-size: 0% 100%; }
}

@keyframes explainAfterHighlight {
  0%, 38% { opacity: 0; transform: translateY(8px) scale(.94); }
  45%, 78% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(8px) scale(.94); }
}

@keyframes appAfterExplain {
  0%, 50% { opacity: 0; transform: translateX(28px) scale(.97); }
  61%, 82% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(28px) scale(.97); }
}

@keyframes heroSelectRead {
  0%, 7% { background-size: 0% 100%; }
  20%, 82% { background-size: 100% 100%; }
  100% { background-size: 0% 100%; }
}

@keyframes heroSelectUnderstand {
  0%, 22% { background-size: 0% 100%; }
  42%, 82% { background-size: 100% 100%; }
  100% { background-size: 0% 100%; }
}

@keyframes heroExplainAfterHighlight {
  0%, 48% { opacity: 0; transform: translateY(8px) scale(.94); }
  56%, 64% { opacity: 1; transform: translateY(0) scale(1); }
  70%, 100% { opacity: 0; transform: translateY(8px) scale(.94); }
}

@keyframes heroAppAfterExplain {
  0%, 66% { opacity: 0; transform: translateX(28px) scale(.97); }
  70%, 98% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(28px) scale(.97); }
}

@media (max-width: 1050px) {
  .hero { min-height: 720px; }
  .hero-demo { min-height: 620px; }
}

@media (max-width: 680px) {
  .paper-demo { padding: 34px 26px; }
  .paper-text { font-size: 28px; }
  .eli5-demo-app { width: min(360px, 100%); }
  .title-line { gap: 22px; flex-wrap: wrap; }
  .hero-explain-pill { margin-left: 0; margin-top: 12px; }
  .hero { min-height: auto; }
  .hero-demo { position: relative; top: auto; right: auto; width: 100%; min-height: 620px; margin-top: 28px; }
}
