/* Inner pages: the guide (Cursor docs layout: contents column and a reading column), the download page
   (platform cards listing every installer) and the 404 page (a large mark beside a short message). */

/* ---------- Page head ---------- */

.pagehead { padding: 3.75rem 0 2.5rem; }
.pagehead-eyebrow { margin-bottom: 0.5rem; color: var(--muted); font-size: 0.9375rem; }
.pagehead h1 { font-size: var(--text-section); line-height: 1.2; }
.pagehead-lead { max-width: 44rem; margin-top: 1rem; color: var(--muted); }
.pagehead .actions { margin-top: 1.5rem; }

/* ---------- Guide: contents and reading column ---------- */

.doc { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 44rem); gap: 0 5rem; padding-bottom: var(--section-y); }
.toc { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; font-size: 0.9375rem; }
.toc-title { margin-bottom: 0.6rem; color: var(--muted); font-size: var(--text-xs); letter-spacing: 0.04em; }
.toc > ol { scroll-target-group: auto; }
.toc ol { display: grid; gap: 0.1rem; list-style: none; }
.toc ol ol { margin: 0.1rem 0 0.35rem; padding-left: 0.85rem; border-left: 1px solid var(--line); font-size: var(--text-sm); }
.toc a { display: block; padding: 0.25rem 0; color: var(--ink); text-decoration: none; }
.toc ol ol a { color: var(--muted); }
.toc a:is(:target-current, .target-current) { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.25em; }
@media (hover: hover) {
  .toc a:hover { color: var(--brand); }
}

.prose { line-height: 1.65; }
.prose p, .prose li { text-wrap: pretty; }
.prose > * + *, .prose section > * + * { margin-top: 1rem; }
.prose section + section { margin-top: 3.5rem; }
.prose h2 { font-size: var(--text-title); line-height: 1.3; }
.prose h3 { margin-top: 2rem; font-size: var(--text-lg); line-height: 1.4; }
.prose ol, .prose ul { display: grid; gap: 0.5rem; padding-left: 1.4rem; }
.prose li::marker { color: var(--muted); }
.prose code { padding: 0.05em 0.35em; border-radius: var(--radius); background: var(--chip); color: var(--ink); overflow-wrap: anywhere; }
.prose blockquote { padding-left: 1rem; border-left: 2px solid var(--line-strong); color: var(--muted); }
.note { padding: 0.8rem 1rem; border-radius: var(--radius); background: var(--card); color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.note-label { margin-right: 0.6em; color: var(--ink); font-weight: 600; }
.shot { margin-block: 1.75rem; padding: 2rem; border-radius: var(--radius); background: var(--backdrop); }
.shot img { margin-inline: auto; border-radius: 8px; box-shadow: var(--shadow-window); }
.shot figcaption { margin-top: 1.25rem; color: var(--muted); font-size: var(--text-sm); text-align: center; }
.prose-block { padding-block: 1rem; }
.prose-block > * { max-width: 100%; }

/* ---------- Download ---------- */

.download-head { padding-bottom: 3rem; }
.recommend { display: grid; justify-items: start; gap: 0.75rem; margin-top: 1.75rem; }
/* The release line arrives from the GitHub API after first paint; its height is reserved so nothing moves. */
.recommend-meta { min-height: 3.4em; color: var(--muted); font-size: var(--text-sm); line-height: 1.7; }
.recommend-meta > span { display: block; }

.platforms { padding-bottom: 1.5rem; }
.platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.platform { padding: 1.25rem 1.25rem 0.5rem; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px transparent; transition: box-shadow var(--transition); }
.platform[data-recommended] { box-shadow: inset 0 0 0 1px rgb(var(--brand-rgb) / 0.45); }
.platform h3 { font-size: var(--text-base); font-weight: 600; }
.platform p { margin-top: 0.35rem; color: var(--muted); font-size: var(--text-sm); }
/* Hidden, not removed: every card keeps the badge's space, so marking the recommended one moves nothing. */
.badge { display: inline-block; margin-left: 0.4em; padding: 0 0.55em; border-radius: var(--radius-pill); background: var(--brand-tint); color: var(--brand); font-size: var(--text-xs); font-weight: 400; vertical-align: 0.1em; visibility: hidden; }
.platform[data-recommended] .badge { visibility: visible; }
.asset-links { margin-top: 1rem; list-style: none; }
.asset-links a { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 0.9375rem; text-decoration: none; }
@media (hover: hover) {
  .asset-links a:hover { color: var(--brand); }
}
.asset-name { flex: 1; }
/* Sizes arrive from the GitHub API after first paint; reserving their width keeps the rows still. */
.asset-size { min-width: 4.5em; color: var(--muted); font-size: var(--text-xs); text-align: right; }
.asset-size:empty { display: none; }

/* ---------- 404 ---------- */

.notfound { padding: 7rem 0 8.4rem; }
.notfound-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 3rem; }
.notfound-mark { color: rgb(38 37 30 / 0.16); font: 600 clamp(8rem, 22vw, 18rem)/1 var(--font-sans); text-align: center; }
.notfound-text { max-width: 26rem; }
.notfound h1 { font-size: var(--text-hero); line-height: 1.25; }
.notfound-text > p { margin-top: 0.5rem; color: var(--muted); }
.notfound .actions { margin-top: 1.5rem; }
.tex-log { margin-top: 2rem; color: var(--muted); font-size: var(--text-xs); overflow-wrap: anywhere; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; margin-bottom: 2rem; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--card); }
  .platform-grid { grid-template-columns: minmax(0, 1fr); }
  .notfound-inner { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .notfound-mark { text-align: left; }
}

@media (max-width: 600px) {
  .pagehead { padding-top: 2.5rem; }
  .shot { padding: 1rem; }
  /* On phones the release line can wrap, so three lines are reserved for it. */
  .recommend-meta { min-height: 5.1em; }
  .notfound { padding-top: 3rem; }
}
