/* Guide page (final_website_v2.html) — loaded after approved.css. */

.page--guide { overflow-x: clip; }

.guide {
  position: relative; isolation: isolate;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 10vw, 120px);
}
/* The hero's mint light, low in the upper left, so the page doesn't start in a black void. */
.guide::before {
  content: ""; position: absolute; z-index: -1;
  left: -25%; top: -10%;
  width: 90%; aspect-ratio: 2 / 1;
  background: radial-gradient(closest-side, rgba(89, 214, 160, 0.10), transparent);
  pointer-events: none;
}

/* Gradient type shared by the page title and the chapter titles, as on Home's section headings. */
.guide__head h1,
.chapter h2 {
  background: linear-gradient(180deg, #ffffff 30%, #aab5b0);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-wrap: balance;
}

.guide__head {
  display: grid; gap: 18px;
  max-width: 820px;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.guide__head .hud-label { color: var(--accent); }
.guide__head h1 {
  font-size: clamp(44px, 7.4vw, 88px);
  letter-spacing: -0.045em;
  line-height: 1;
}
.guide__lede {
  max-width: 36em;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.45;
}

.guide__layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

/* ---------- Chapter list ---------- */

.guide-toc {
  position: sticky; top: calc(var(--topbar-h) + 24px);
  max-height: calc(100vh - var(--topbar-h) - 48px);
  overflow-y: auto;
  scrollbar-width: none;
}
.guide-toc::-webkit-scrollbar { display: none; }
.guide-toc__label { margin: 0 0 12px 10px; }

.guide-toc ol { list-style: none; margin: 0; padding: 0; }
.guide-toc a { text-decoration: none; }

.guide-toc__chapter > a {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  transition: color 0.2s, background-color 0.2s;
}
.guide-toc__chapter > a:hover { color: var(--text); }
.guide-toc__chapter > a[aria-current] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.guide-toc__num { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.guide-toc__chapter > a[aria-current] .guide-toc__num { color: var(--accent); }

/* Only the chapter being read shows its steps. */
.guide-toc .guide-toc__steps {
  display: none;
  margin: 4px 0 10px 20px;
  border-left: 1px solid var(--line);
}
.guide-toc__chapter.is-open .guide-toc__steps { display: block; }
.guide-toc__steps a {
  display: block;
  margin-left: -1px;
  padding: 5px 12px;
  border-left: 1px solid transparent;
  color: var(--faint);
  font-size: 13.5px; line-height: 1.35;
  transition: color 0.2s, border-color 0.2s;
}
.guide-toc__steps a:hover { color: var(--text); }
.guide-toc__steps a[aria-current] { color: var(--accent-soft); border-left-color: var(--accent); }

/* Group labels in the list: "Start here", "In depth". */
.guide-toc__part {
  margin: 0 0 6px 10px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint);
}
.guide-toc__chapter + .guide-toc__part { margin-top: 22px; }

/* ---------- Chapters and steps ---------- */

.guide__content { min-width: 0; max-width: 820px; }

.chapter {
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--line);
}
.chapter:first-child { padding-top: 0; border-top: 0; }
.chapter:last-child { padding-bottom: 0; }

.chapter__head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 48px); }
.chapter__num {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.chapter h2 {
  font-size: clamp(34px, 4.6vw, 54px);
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.chapter__lede {
  max-width: 36em;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.5;
}

.gstep { display: grid; gap: 16px; align-content: start; }
.gstep + .gstep { margin-top: clamp(44px, 6vw, 72px); }
.gstep h3 { font-size: 22px; letter-spacing: -0.02em; }
.gstep__text { display: grid; gap: 16px; align-content: start; }

.gstep p, .gstep li { color: #c3cbc7; font-size: 16.5px; line-height: 1.6; max-width: 62ch; }
.gstep ul { margin: 0; padding-left: 1.15em; display: grid; gap: 8px; }
.gstep li::marker { color: var(--faint); }
.gstep strong { color: var(--text); font-weight: 600; }
.gstep code { font-family: var(--mono); font-size: 0.88em; color: var(--text); }

/* Names of buttons and controls, as the app writes them. */
.ui { color: var(--text); font-weight: 600; }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.45);
  color: var(--text);
  font: 500 13px/1.5 var(--font);
  text-align: center;
  vertical-align: 0.08em;
}
kbd + kbd { margin-left: 2px; }

/* Text beside a tall screenshot (the inspector). */
@media (min-width: 1100px) {
  .gstep--aside {
    grid-template-columns: minmax(0, 1fr) 240px;
    column-gap: 40px;
    align-items: start;
  }
  .gstep--aside .shot { margin-top: 44px; position: sticky; top: calc(var(--topbar-h) + 24px); }
}

/* ---------- Settings lists ---------- */

.options {
  margin: 4px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.options > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 8px 24px;
  padding: 16px 20px;
}
.options > div + div { border-top: 1px solid var(--line); }
.options dt { color: var(--text); font-size: 15.5px; font-weight: 600; line-height: 1.5; }
.options dd { margin: 0; display: grid; gap: 8px; }
.gstep .options p { font-size: 15.5px; line-height: 1.55; }

.gstep .choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices span {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px; line-height: 1.6;
}
.choices .is-default {
  border-color: rgba(89, 214, 160, 0.45);
  background: rgba(89, 214, 160, 0.1);
  color: var(--accent-soft);
}
.gstep .options__legend { color: var(--faint); font-size: 14px; }

/* Keys beside what they do, inside a step. */
.keys-inline {
  margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px 24px;
}
.keys-inline > div { display: flex; align-items: baseline; gap: 12px; }
.keys-inline dt { flex: none; min-width: 64px; }
.keys-inline dd { margin: 0; color: #c3cbc7; font-size: 15px; }

.gstep .note {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(89, 214, 160, 0.18);
  background: rgba(89, 214, 160, 0.06);
  font-size: 15px;
  max-width: none;
}
.note strong { color: var(--accent); margin-right: 10px; }

/* ---------- Screenshot slots ---------- */

.shot { margin: 8px 0 0; display: grid; gap: 12px; }

.shot__frame {
  position: relative;
  aspect-ratio: var(--ratio, 16 / 10);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.012) 14px 28px);
  overflow: hidden;
}
/* A window's traffic lights, dimmed, so the slot reads as "a Mac window goes here". */
.shot__frame::before {
  content: ""; position: absolute; left: 14px; top: 13px;
  width: 52px; height: 12px;
  background:
    radial-gradient(circle at 6px 6px, #ff5f57 0 5px, transparent 5.5px),
    radial-gradient(circle at 26px 6px, #febc2e 0 5px, transparent 5.5px),
    radial-gradient(circle at 46px 6px, #28c840 0 5px, transparent 5.5px);
  opacity: 0.35;
}
.shot__todo {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  padding: 40px 24px 24px;
  text-align: center;
}
.shot .shot__title { color: var(--text); font-size: 17px; font-weight: 600; }
.shot .shot__setup { max-width: 40ch; color: var(--muted); font-size: 14px; line-height: 1.45; }
.shot .shot__file { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* A thin toolbar crop: one line, no window chrome. */
.shot--strip .shot__frame::before { display: none; }
.shot--strip .shot__todo { padding: 8px 16px; grid-auto-flow: column; gap: 16px; align-items: baseline; }
.shot--strip .shot__file { margin: 0; }

/* The capture is in: it carries its own window edges. */
.shot.has-image .shot__frame { aspect-ratio: auto; border: 0; border-radius: 0; background: none; overflow: visible; }
.shot.has-image .shot__frame::before { display: none; }
.shot__frame img { display: block; width: 100%; height: auto; }

.shot figcaption { color: var(--faint); font-size: 14px; line-height: 1.45; }

/* ---------- Shortcuts table ---------- */

.keys { width: 100%; border-collapse: collapse; }
.keys th {
  padding: 28px 0 10px;
  text-align: left;
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.keys tbody:first-child th { padding-top: 0; }
.keys td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: #c3cbc7; font-size: 15.5px;
  vertical-align: baseline;
}
.keys td:first-child { width: 40%; padding-right: 24px; color: var(--text); }

/* ---------- Part 1: the first stack, as numbered steps ---------- */

.chapter--quick { counter-reset: quick; }
.chapter--quick .gstep { counter-increment: quick; }
.chapter--quick .gstep > h3 { display: flex; align-items: center; gap: 14px; font-size: 24px; }
.chapter--quick .gstep > h3::before {
  content: counter(quick);
  flex: none;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: 600 15px/1 var(--font);
}

.gstep p a { color: var(--text); text-underline-offset: 3px; }

/* A tall crop (the sidebar) beside a wide shot. */
.shot-pair {
  display: grid;
  grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 640px) {
  .shot-pair { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Part 2 opener ---------- */

.guide-part {
  display: grid; gap: 10px;
  padding: clamp(40px, 6vw, 64px) 0 clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line-strong);
}
.guide-part__title {
  font-size: clamp(44px, 6vw, 72px); font-weight: 600;
  letter-spacing: -0.045em; line-height: 1;
  background: linear-gradient(180deg, #ffffff 30%, #aab5b0);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.guide-part__lede {
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.5;
}
.guide-part + .chapter { padding-top: 0; border-top: 0; }


/* ---------- Narrow screens: the chapter list becomes a row of chips under the nav ---------- */

@media (max-width: 900px) {
  .guide__layout { grid-template-columns: minmax(0, 1fr); gap: 0; }

  .guide-toc {
    top: var(--topbar-h); z-index: 10;
    max-height: none; overflow: visible;
    margin: 0 calc(-1 * var(--gutter)) 40px;
    padding: 10px 0;
    background: rgba(11, 12, 12, 0.78);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border-block: 1px solid var(--line);
  }
  .guide-toc__label { display: none; }
  .guide-toc__list {
    display: flex; gap: 6px;
    padding: 0 var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .guide-toc__list::-webkit-scrollbar { display: none; }
  .guide-toc__chapter > a {
    white-space: nowrap;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
  }
  .guide-toc__chapter > a[aria-current] { border-color: rgba(89, 214, 160, 0.4); }
  .guide-toc__chapter.is-open .guide-toc__steps { display: none; }
  .guide-toc__part { display: none; }

  /* Leave room for the chip row when jumping to a chapter or step. */
  .chapter, .gstep { scroll-margin-top: 60px; }
}

@media (max-width: 640px) {
  .options > div { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .shot .shot__setup { display: none; }
  .shot__todo { padding-top: 32px; }
  .keys td:first-child { width: 46%; padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-toc a { transition: none; }
}
