/* Features: sticky sheet index + one sheet per feature */

.page-features .page-hero__bg { object-position: 50% 30%; opacity: .5; }
.page-features { --fx-top: 100px; }

.fx { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.fx-section { padding-top: clamp(56px, 7vw, 96px); }

/* ---- Sheet index (sticky jump list) ---- */
.sheet-index { position: sticky; top: var(--fx-top); background: var(--paper); border: 1.5px solid var(--text); }
.sheet-index__title { display: flex; justify-content: space-between; margin: 0; padding: 9px 14px; font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-inv); background: var(--ink); }
.sheet-index ol { margin: 0; padding: 0; list-style: none; }
.sheet-index li + li { border-top: 1px solid var(--line-strong); }
.sheet-index a {
  position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: 1px 8px; align-items: baseline;
  padding: 11px 14px 12px; text-decoration: none; transition: background .15s;
}
.sheet-index a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transition: background .15s; }
.sheet-index a:hover { background: var(--paper-2); }
.sheet-index a:hover .sheet-index__name, .sheet-index a[aria-current] .sheet-index__name { color: var(--crimson); }
.sheet-index a[aria-current] { background: var(--white); }
.sheet-index a[aria-current]::before { background: var(--crimson); }
.sheet-index__no { grid-row: span 2; font-family: var(--mono); font-size: .72rem; color: var(--text-2); }
.sheet-index__name { font-weight: 700; font-size: .98rem; line-height: 1.2; transition: color .15s; }
.sheet-index__cmd { font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; color: var(--text-2); }

/* ---- Feature sheet ---- */
.fx__main { min-width: 0; }
.fx-item { position: relative; padding-top: 26px; margin-bottom: clamp(72px, 9vw, 120px); border-top: 1.5px solid var(--text); }
.fx-item:last-child { margin-bottom: 0; }
.fx-item__head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 26px; }
.fx-item__no { flex: none; font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .1em; color: var(--crimson); }
.fx-item__copy { max-width: 66ch; }
.fx-item__copy .lead { max-width: 62ch; color: var(--text); }
.fx-item__copy .lead kbd { font-size: .8em; }
.fx-item__fig { margin: clamp(28px, 4vw, 44px) 0 0; }
.fx-item__fig--narrow .window { max-width: 760px; }
.fx-item__fig--small .window { max-width: 640px; }
.fx-item__fig + .fx-item__fig { margin-top: clamp(32px, 4vw, 48px); }

/* Bullet list: ruled rows with a dimension tick */
.fx-list { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.fx-list li { position: relative; padding: 12px 0 12px 28px; border-bottom: 1px solid var(--line); color: var(--text-2); line-height: 1.5; }
.fx-list li::before { content: ""; position: absolute; left: 0; top: calc(12px + .75em); width: 14px; height: 1px; background: var(--crimson); }
.fx-list li::after { content: ""; position: absolute; left: 14px; top: calc(12px + .75em - 3px); width: 1px; height: 7px; background: var(--crimson); }
.fx-list strong { color: var(--text); }
.fx-list kbd { font-size: .8em; }

/* Move and copy: copy beside a tall screenshot */
.fx-item__cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.fx-item__cols .fx-item__fig { margin-top: 0; }
.fx-steps { margin: 26px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); counter-reset: step; }
.fx-steps li { display: grid; gap: 4px; padding: 16px 0 6px 40px; border-bottom: 1px solid var(--line); position: relative; counter-increment: step; }
.fx-steps li::before { content: "0" counter(step); position: absolute; left: 0; top: 18px; font-family: var(--mono); font-size: .72rem; color: var(--crimson); }
.fx-steps__label { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text); font-weight: 500; }
.fx-steps p { margin: 0 0 10px; color: var(--text-2); line-height: 1.8; }
.fx-steps kbd { font-size: .8em; margin-block: 1px; }

/* And more: command-reference list */
.refs { margin: 0; padding: 0; list-style: none; border-top: 1.5px solid var(--text); max-width: none; }
.refs li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) minmax(8rem, auto); gap: 4px 18px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line-strong); }
.refs__no { font-family: var(--mono); font-size: .72rem; color: var(--text-2); }
.refs__text { color: var(--text); }
.refs__cmd { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.refs__cmd kbd { font-size: .74rem; }
.refs li:hover { background: rgba(3, 50, 75, .035); }

@media (max-width: 1100px) {
  .fx-item__cols { grid-template-columns: 1fr; }
  .fx-item__cols .fx-item__fig { margin-top: 28px; }
}

/* Index becomes a sticky horizontal strip */
@media (max-width: 960px) {
  html { scroll-padding-top: 150px; }
  .fx { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sheet-index {
    top: calc(var(--bar-height) + 1px); z-index: 40; margin: 0 calc(-1 * var(--gutter)) 36px; border-width: 1px 0; background: rgba(243, 241, 236, .96); backdrop-filter: blur(10px);
  }
  .sheet-index__title { display: none; }
  .sheet-index ol { display: flex; overflow-x: auto; scrollbar-width: none; padding-inline: var(--gutter) 0; }
  .sheet-index ol::-webkit-scrollbar { display: none; }
  .sheet-index li { flex: none; }
  .sheet-index li + li { border-top: 0; border-left: 1px solid var(--line); }
  .sheet-index a { grid-template-columns: auto; gap: 0; padding: 9px 16px 10px; white-space: nowrap; }
  .sheet-index a::before { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 3px; }
  .sheet-index__no { grid-row: auto; font-size: .64rem; }
  .sheet-index__name { font-size: .9rem; }
  .sheet-index__cmd { display: none; }
}
@media (max-width: 640px) {
  .refs li { grid-template-columns: 2.8rem minmax(0, 1fr); }
  .refs__cmd { grid-column: 2; justify-content: flex-start; }
  .refs__cmd:empty { display: none; }
  .fx-item__head { flex-wrap: wrap; gap: 6px 14px; }
}

#more .fx-item__copy { max-width: none; }

.page-hero .eyebrow::before { background: var(--crimson-hi); }
