/* /read/ — the student app's page (2.0.0, 2026-11-19; lib/pages/read.js). Loaded after rectoly.css on
   that page only (READ_CSS_VERSION in lib/pages/read.js: raise it with any change here), so the rest of
   the site's pages and their CSS_VERSION are untouched. Its rules win over rectoly.css's .hero and
   .hero-read by coming later. */
/* lib/pages/read.js: the hero with the vertical 2.0.0 video (or the language's own screen in a phone
   frame), the problem the video opens with, the term in five scenes, the price and what is often a
   subscription elsewhere, trust, getting started. */
.hero-read { grid-template-columns: 1.2fr 0.8fr; padding-bottom: 96px; }
.hero-read .hero-content { max-width: 580px; }
.hero-read h1 { font-size: clamp(38px, 4.6vw, 56px); line-height: 1.1; }
.hero-read p { max-width: 520px; margin-bottom: 24px; }
.hero-read .hero-note { font-size: 14px; line-height: 1.6; margin-bottom: 0; }
/* The page's section headings: two short lines, not the shared 1.65. */
.read-scenes .features-header h2,
.read-trust .features-header h2,
.read-start .features-header h2,
#pricing .pricing-inner h2 { line-height: 1.15; }
#downloads .hero-actions { margin-top: 28px; }
.read-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.read-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px 6px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-hover);
  background: rgba(255,255,255,0.03);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.read-chips li::before {
  content: '';
  width: 14px; height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 7.2L5.8 10L11 4' stroke='%237d92b0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* The video is the frame: 9:16, its own pale-green ground, rounded like a phone held upright. */
.read-hero-clip {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 9 / 16;
  border-radius: 32px;
  overflow: hidden;
  background: #e9f2ec;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 30px 90px rgba(0,0,0,0.55), 0 0 80px var(--accent-glow);
}
.read-hero-clip img,
.read-hero-clip video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* An App Store screen (1320×2868, shown 540 wide) in a plain phone frame. */
.read-phone {
  width: 100%;
  max-width: 280px;
  padding: 9px;
  border-radius: 40px;
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 25px 70px rgba(0,0,0,0.5), 0 0 50px var(--accent-glow);
}
.read-phone img { display: block; width: 100%; height: auto; border-radius: 31px; background: #fff; }
.hero-read .read-phone { max-width: 300px; }

/* The problem: three piles, lost before the exam, then the answer. */
.read-problem {
  padding: 120px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  text-align: center;
}
.read-problem-inner { max-width: 820px; margin: 0 auto; }
.read-problem-line {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #fff;
}
p.read-problem-line { font-family: 'Space Grotesk', system-ui, sans-serif; }
.read-problem-line--lost { color: var(--warm); }
.read-piles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 48px auto;
}
.read-pile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: start;
  box-shadow: 6px 6px 0 -1px var(--bg-card), 6px 6px 0 0 var(--border), 12px 12px 0 -1px var(--bg-card), 12px 12px 0 0 var(--border);
}
.read-pile:nth-child(1) { transform: rotate(-1.6deg); }
.read-pile:nth-child(2) { transform: rotate(1deg); }
.read-pile:nth-child(3) { transform: rotate(-0.6deg); }
.read-pile-label { font-size: 14px; color: var(--text-muted); }
.read-pile-count { font-size: 15px; color: var(--text-muted); }
.read-pile-count b {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #fff;
  margin-inline-end: 4px;
}
.read-answer { margin-top: 88px; }
.read-answer img { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.45); }
.read-answer h2 {
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 20%, var(--accent-bright) 70%, var(--warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.read-answer p { font-size: 17px; line-height: 1.75; color: var(--text-muted); max-width: 580px; margin: 0 auto; }

/* The term in five scenes. */
.read-scenes { max-width: 1140px; }
.read-flow {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 8px;
  margin: -24px 0 40px;
}
.read-flow li { display: inline-flex; align-items: center; gap: 8px; }
.read-flow li + li::before { content: '→'; color: var(--text-dim); font-size: 14px; }
[dir="rtl"] .read-flow li + li::before { content: '←'; }
.read-flow a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 100px;
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
[dir="rtl"] .read-flow a { padding: 6px 6px 6px 14px; }
.read-flow a:hover { border-color: var(--accent-bright); background: var(--accent-glow); }
.read-flow-num,
.read-scene-kicker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent-bright);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}
.read-scene {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 72px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 72px;
}
.read-scene--flip { grid-template-columns: 1fr 280px; }
.read-scene--flip .read-scene-media { order: 2; }
.read-scene-media { display: flex; justify-content: center; }
.read-scene-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--warm);
}
.read-scene-kicker span { background: var(--warm-dim); color: var(--warm); }
.read-scene-body h3 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 28px;
}
.read-items {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 36px;
}
.read-item:only-child { grid-column: 1 / -1; }
.read-item {
  padding-top: 16px;
  border-top: 1px solid var(--border-hover);
  scroll-margin-top: 96px;
}
.read-anchor { display: block; height: 0; scroll-margin-top: 96px; }
.read-item h4 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 6px;
}
.read-item p { font-size: 15px; line-height: 1.7; color: var(--text-muted); }
.read-steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.read-steps li {
  counter-increment: step;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  color: var(--text);
}
[dir="rtl"] .read-steps li { padding: 10px 10px 10px 16px; }
.read-steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(229,72,77,0.18);
  color: #ff8f93;
  font-size: 12px;
  font-weight: 700;
}
.read-new {
  display: inline-block;
  padding: 2px 8px;
  margin-inline-start: 6px;
  border-radius: 100px;
  background: var(--warm-dim);
  color: var(--warm);
  font-size: 11px;
  font-weight: 700;
  vertical-align: 2px;
}

/* The price card: the heading's two short sentences close together, and space between the stacked
   full-width buttons. */
.price-card .btn-block + .btn-block { margin-top: 10px; }

/* What is often a subscription elsewhere, under the price card. */
.read-compare {
  max-width: 760px;
  margin: 64px auto 0;
  padding: 40px 44px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-raised);
}
.read-compare h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fff;
  text-align: center;
  margin-bottom: 10px;
}
.read-compare > p { font-size: 15px; line-height: 1.7; color: var(--text-muted); text-align: center; max-width: 560px; margin: 0 auto 24px; }
.read-compare-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.read-compare-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text);
}
.read-compare-mark {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-bright);
  white-space: nowrap;
}
.read-compare-mark::before { content: '✓'; font-size: 13px; }

/* Trust. */
.read-trust {
  padding: 120px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}
.read-trust-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.read-trust-tile {
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.read-trust-tile h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: #fff; margin-bottom: 8px; }
.read-trust-tile p { font-size: 14.5px; line-height: 1.7; color: var(--text-muted); }

/* Getting started. */
.read-sources { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.read-source {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-raised);
}
.read-source .feature-icon { margin-bottom: 18px; }
.read-source h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; color: #fff; margin-bottom: 8px; }
.read-source p { font-size: 14.5px; line-height: 1.7; color: var(--text-muted); }
.read-start-more { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.read-start-note {
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-hover);
  scroll-margin-top: 96px;
}
.read-start-note h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: #fff; margin-bottom: 8px; }
.read-start-note p { font-size: 15px; line-height: 1.7; color: var(--text-muted); }

@media (max-width: 960px) {
  .read-sources { grid-template-columns: 1fr 1fr; }
  .read-scene, .read-scene--flip { gap: 48px; grid-template-columns: 240px 1fr; }
  .read-scene--flip { grid-template-columns: 1fr 240px; }
  .read-items { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  /* The words and buttons first, the video under them: a 9:16 clip at the top would push the
     buttons off the first screen. */
  .hero-read { grid-template-columns: 1fr; padding-bottom: 72px; }
  .hero-read .hero-visual { order: 0; }
  .hero-read .read-chips { justify-content: center; }
  /* On a phone the hero offers the phone's own store; Windows and Linux wait in #downloads. */
  .hero-read .hero-actions a[href*="os=win"],
  .hero-read .hero-actions a[href*="os=linux"] { display: none; }
  .read-hero-clip { width: min(300px, 78vw); }
  .hero-read .read-phone { max-width: min(260px, 70vw); }
  .read-problem, .read-trust { padding: 80px 20px; }
  .read-piles { grid-template-columns: 1fr; gap: 18px; max-width: 340px; margin: 36px auto; }
  .read-pile { flex-direction: row; align-items: baseline; justify-content: space-between; padding: 18px 22px; }
  .read-pile-count b { font-size: 36px; }
  .read-answer { margin-top: 64px; }
  .read-flow { margin: -32px 0 16px; }
  .read-flow li + li::before { display: none; }
  .read-scene, .read-scene--flip { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .read-scene--flip .read-scene-media { order: 0; }
  .read-phone { max-width: min(210px, 58vw); padding: 7px; border-radius: 32px; }
  .read-phone img { border-radius: 25px; }
  .read-compare { padding: 28px 20px; margin-top: 48px; }
  .read-compare-list { grid-template-columns: 1fr; }
  .read-sources, .read-start-more { grid-template-columns: 1fr; }
  .read-start-note { padding: 24px; }
}
