/* Content of the twelve sections */
.sheet-body section { display: grid; gap: 16px; max-width: 68ch; }
.sheet-body section + section { margin-top: 72px; }           /* no-JS page: sections in sequence */
.js .sheet-body section + section { margin-top: 0; }
.sheet-body section > h2 { margin-bottom: 4px; }
.sheet-body h3 { margin-top: 20px; }
.sheet-body ul, .sheet-body ol { padding-left: 1.2em; display: grid; gap: 6px; }
.sheet-body li::marker { color: var(--text-muted); }
.lead { font-size: 18px; }
.note { border-left: 2px solid var(--border-light); padding: 2px 0 2px 16px; font-size: 15px; }

pre {
  overflow-x: auto; background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 16px 18px; font-size: 13px; line-height: 1.6; color: var(--text-primary);
}

/* Download rows */
.platforms { list-style: none; padding: 0 !important; gap: 0 !important; border-top: 1px solid var(--border-color); }
.platforms li { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.platforms b { display: block; color: var(--text-primary); font-weight: 600; }
.platforms small { color: var(--text-muted); font-size: 13px; }

/* Overview: a strip of real figures in mono, then one large figure */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-block: 8px; }
.specs div { padding: 14px 16px; min-width: 0; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.specs dt { font: 500 20px/1.2 var(--font-mono); letter-spacing: -0.02em; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.specs dd { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }
.spot, .shot { display: grid; gap: 8px; margin-block: 8px; }
.spot img, .shot img { border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-secondary); }
.shot img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; }
.spot figcaption { font-size: 13px; color: var(--text-secondary); }

/* Feature groups: two columns where the sheet is wide enough */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 32px; }
.features > div { min-width: 0; padding-top: 16px; border-top: 1px solid var(--border-color); }
.features dt { color: var(--text-primary); font-weight: 600; }
.features dd { color: var(--text-secondary); margin-top: 4px; }

/* Quick start: numbered steps on a thin vertical line */
ol.steps { list-style: none; padding: 0 !important; gap: 0 !important; counter-reset: step; position: relative; }
ol.steps::before { content: ''; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 1px; background: var(--border-light); }
ol.steps li { counter-increment: step; position: relative; padding: 4px 0 16px 44px; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 2px; width: 27px; height: 27px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-card); border: 1px solid var(--border-light);
  font: 500 12px/1 var(--font-mono); color: var(--text-primary);
}

/* Release notes: a timeline */
.timeline { display: grid; border-left: 1px solid var(--border-light); padding-left: 24px; margin-left: 4px; }
.timeline > .release, .timeline > details { position: relative; }
.timeline > .release::before, .timeline > details::before {
  content: ''; position: absolute; left: -29px; top: 18px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border-light);
}
.timeline > .release::before { background: var(--accent-signature); border-color: var(--accent-signature); top: 8px; }
.timeline > .release { padding-bottom: 16px; }
details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.35s var(--ease-out), content-visibility 0.35s allow-discrete; }
details[open]::details-content { block-size: auto; }

/* "Next" link at the end of every section */
.next { justify-self: start; margin-top: 24px; font-size: 14px; color: var(--accent-signature); text-decoration: none; }

/* Gallery: one dominant image, the others around it */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gallery figure:first-child { grid-column: 1 / -1; }
.gallery figure:first-child img { aspect-ratio: 16 / 9; }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { display: grid; gap: 8px; align-content: start; min-width: 0; }
.gallery button { border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-secondary); cursor: zoom-in; padding: 0; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.gallery figcaption { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* Equations */
math { font-size: 1.05em; }
math[display="block"] { margin: 8px 0; overflow-x: auto; }
.refs { font-size: 14px; }

/* Release notes */
.release { display: grid; gap: 10px; }
details { border-top: 1px solid var(--border-color); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--border-color); }
summary { cursor: pointer; color: var(--text-primary); font-weight: 500; }
details[open] summary { margin-bottom: 10px; }

/* Citation */
.copy-row { display: flex; justify-content: flex-end; }

/* About: a plain flow (not a grid) so the photo can float beside the text */
.about > * + * { margin-top: 14px; }
.about > h3 { margin-top: 28px; }
.nowrap { white-space: nowrap; }
.about-photo { width: 100%; max-width: 280px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); }
@media (min-width: 761px) { .about-photo { float: right; width: 42%; margin: 0 0 16px 24px; } }
.contact { list-style: none; padding: 0 !important; }

/* Partner project link (SOLIS) in About me; the logo is dark ink on transparent, lightened at night */
.partner { display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; text-decoration: none; color: var(--text-secondary);
  border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-secondary); font-size: 13px;
  transition: border-color 0.2s var(--ease-snap); }
.partner b { color: var(--text-primary); font-weight: 600; }
.partner img { width: 48px; height: 48px; }
:root[data-theme="dark"] .partner img { filter: invert(1) brightness(0.92); }
@media (hover: hover) and (pointer: fine) { .partner:hover { border-color: var(--accent-signature); } }
