:root {
  --brand: #86bc25;
  --brand-dark: #5b8e1c;
  --brand-muted: #e4efd1;
  --ink: #111111;
  --ink-light: #505750;
  --ink-muted: #6f776f;
  --border: #e0e5dd;
  --border-strong: #c6cdc0;
  --bg: #ffffff;
  --bg-quiet: #f6f9f3;
  --bg-soft: #fbfdf8;
  --card: #ffffff;
  --shadow-soft: 0 18px 60px rgba(16, 22, 16, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --transition: 0.25s ease;
  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", SFMono-Regular, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand-dark);
}

a:hover,
a:focus {
  color: var(--brand);
}

a.btn,
a.btn:hover,
a.btn:focus,
a.btn:visited {
  color: #0e160a;
}

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.45s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.masthead {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(
      circle at 10% 10%,
      rgba(134, 188, 37, 0.12),
      transparent 125%
    ),
    var(--bg);
}

.masthead-content {
  width: min(1100px, 92%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.masthead h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(2.2rem, 1.8rem + 2vw, 3.2rem);
}

.masthead p {
  margin: 0;
  color: var(--ink-light);
  max-width: 68ch;
}

.phase-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.phase-pill {
  padding: 0.7rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  min-width: 140px;
  transition: border-color var(--transition), color var(--transition);
}

.phase-pill span {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.phase-pill strong {
  font-size: 1rem;
}

.phase-pill.is-active {
  border-color: var(--brand);
  background: var(--bg-quiet);
}

.phase-pill.is-complete {
  border-color: var(--brand);
  background: var(--brand);
  color: #0e160a;
}

.phase-pill.is-complete span,
.phase-pill.is-complete strong {
  color: #0e160a;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 4rem 4rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
}

.sticky-tracker {
  position: sticky;
  top: 2rem;
  height: fit-content;
  padding: 1.75rem 1.25rem;
  background: linear-gradient(145deg, var(--bg) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 10px 20px -5px rgba(134, 188, 37, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: opacity 0.3s ease;
}

.tracker-title {
  margin: 0 0 1.25rem 0;
  padding: 0 0.25rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand-dark);
  border-bottom: 2px solid var(--brand-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tracker-title::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

.tracker-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  padding-left: 0;
}

/* Vertical connecting line */
.tracker-list::before {
  content: "";
  position: absolute;
  left: calc(0.75rem + 18px);
  top: 42px;
  bottom: 42px;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--brand-muted) 0%,
    var(--border) 50%,
    var(--brand-muted) 100%
  );
  border-radius: 2px;
  z-index: 0;
}

.tracker-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0.75rem;
  text-decoration: none;
  color: var(--ink-muted);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.tracker-item:hover {
  color: var(--ink);
  background: rgba(134, 188, 37, 0.08);
  transform: translateX(2px);
}

.tracker-item.is-active {
  color: var(--brand-dark);
  background: rgba(134, 188, 37, 0.1);
}

.tracker-item.is-active .tracker-label {
  font-weight: 600;
}

.tracker-item.is-active .tracker-num {
  background: var(--bg);
  border-color: var(--brand);
  color: var(--brand-dark);
  box-shadow: 0 2px 8px rgba(134, 188, 37, 0.4);
  transform: scale(1.05);
}

.tracker-item.is-complete {
  color: var(--ink-light);
}

.tracker-item.is-complete .tracker-num {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 3px rgba(134, 188, 37, 0.3);
}

.tracker-item.is-complete .tracker-num::after {
  content: "✓";
  font-size: 0.75rem;
  font-weight: 700;
}

.tracker-item.is-complete .tracker-num span {
  display: none;
}

.tracker-num {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tracker-label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  transition: all 0.2s ease;
}

.content-area {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Hide tracker on smaller screens */
@media (max-width: 1024px) {
  main {
    grid-template-columns: 1fr;
  }

  .sticky-tracker {
    display: none;
  }
}

.phase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.phase-head {
  display: grid;
  gap: 1rem;
}

.phase-label {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  margin: 0 0 0.6rem;
}

.phase-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.phase-head p {
  margin: 0;
  color: var(--ink-light);
}

.success-panel {
  margin-top: 2rem;
}

#phase-4 {
  margin-top: 1.5rem;
}

.phase-note {
  background: var(--bg-quiet);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  color: var(--ink-light);
}

.mini-stepper {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mini-step {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: visible;
  background: var(--bg-soft);
}

.mini-step.is-open {
  border-color: var(--border);
  background: var(--bg-quiet);
}

.mini-step.is-complete .mini-step-toggle {
  background: var(--bg-quiet);
  opacity: 0.85;
}

.mini-step-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem 1.5rem;
  border: none;
  background: var(--bg-soft);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.mini-step.is-open .mini-step-toggle {
  background: var(--bg-quiet);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.mini-step-toggle:hover {
  background: var(--bg-quiet);
}

.mini-step-toggle strong {
  display: block;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.step-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  display: grid;
  place-items: center;
  font-weight: 600;
}

.step-status {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.mini-step-body {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.complete-step {
  margin-top: 1rem;
  width: 100%;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #0e160a;
  padding: 0.85rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
}

.complete-check {
  margin-top: 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.complete-check::after {
  content: "";
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.complete-check:has(.complete-checkbox:checked) {
  border-color: var(--brand);
  background: var(--bg);
}

.complete-check:has(.complete-checkbox:checked)::after {
  content: "Completed";
  opacity: 1;
}

.complete-check:has(.complete-checkbox:checked) span {
  color: var(--ink);
}

.complete-check:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.complete-checkbox {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--brand);
}

.complete-check span {
  color: var(--ink);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.step-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.step-header .step-title {
  font-size: 1.2rem;
  margin: 0;
  color: var(--ink);
  text-align: left;
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  display: grid;
  place-items: center;
  font-weight: 600;
}

.step-title {
  margin: 0;
}

.section-header h3,
.section-header h4 {
  margin: 0;
}

.os-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.25rem;
  background: var(--bg);
}

.os-tab {
  border: none;
  background: transparent;
  padding: 0.35rem 1.1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}

.os-tab.active {
  background: var(--brand);
  color: #ffffff;
}

.os-panel {
  display: none;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  position: relative; /* Added for sticky screenshot functionality */
}

.os-panel.active {
  display: grid;
}

.os-panel:last-of-type {
  border-bottom: none;
}

.media-col {
  position: relative;
}

.media-sticky {
  position: sticky;
  top: 4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 0.75rem;
}

.check-accordion .media-sticky {
  top: 5.5rem;
}

.media-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 280 / 220;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-caption {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
}

.media-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.6rem;
}

.media-controls button {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--brand-dark);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
    color var(--transition);
}

.media-controls button:hover,
.media-controls button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--bg-quiet);
}

.media-controls .dots {
  display: none;
}

.media-controls .image-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-light);
  white-space: nowrap;
  text-align: center;
}

.instructions-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.instructions-col > h4 {
  margin: 0 0 0.75rem;
}

.steps,
.desc-steps {
  margin: 0 0 1.25rem 1.5rem;
  padding: 0;
}

.steps li,
.desc-steps li {
  margin-bottom: 0.85rem;
}

.callout {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem 1.15rem;
  border: 1px solid var(--border);
  background: var(--bg-quiet);
  font-size: 0.95rem;
  color: var(--ink-light);
  margin-bottom: 0.85rem;
}

.callout.info {
  border-color: #bcd5a0;
  background: #f7fbf0;
  margin-top: 1.5rem;
}

.callout.warn {
  border-color: #f0c26a;
  background: #fff9ee;
  margin-top: 1.5rem;
}

.callout.tip {
  border-color: #c9e6c2;
  background: #f5fbf3;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.btn,
.primary-cta {
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.9rem 1.6rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  background: var(--brand);
  color: #0e160a;
  transition: filter var(--transition), transform var(--transition);
}

.btn:visited,
.primary-cta:visited {
  color: #0e160a;
}

.primary-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:hover,
.primary-cta:hover {
  filter: brightness(1.05);
  color: #0e160a;
}

#phaseOneConfirm,
#manualFinishBtn {
  width: 100%;
  margin-top: 1.5rem;
  font-size: 1.05rem;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: 0 12px 25px rgba(16, 22, 16, 0.08);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition), color var(--transition);
}

#phaseOneConfirm:hover:not(:disabled),
#manualFinishBtn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--brand);
  color: var(--brand-dark);
  box-shadow: 0 16px 34px rgba(16, 22, 16, 0.12);
}

#phaseOneConfirm:disabled,
#manualFinishBtn:disabled {
  filter: grayscale(0.15);
  box-shadow: none;
  background: var(--bg-quiet);
}

#phaseOneConfirm::before,
#manualFinishBtn::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(51, 61, 28, 0.45);
  background: #e5eeda;
  position: relative;
}

#phaseOneConfirm.completed,
#manualFinishBtn.completed {
  background: linear-gradient(90deg, #6cad28, #8fd330);
  color: #0f1f0b;
  border-color: #5b8e1c;
  box-shadow: 0 18px 36px rgba(16, 22, 16, 0.3);
}

#phaseOneConfirm.completed::before,
#manualFinishBtn.completed::before {
  border-color: transparent;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%230f1f0b' d='M6.4 11.2L3 7.9l1.2-1.2 2.2 2.2L11.8 3l1.2 1.2z'/%3E%3C/svg%3E")
      center/12px 12px no-repeat,
    #fff;
}

#phaseOneConfirm:disabled::before,
#manualFinishBtn:disabled::before {
  opacity: 0.7;
}

.decision-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.decision-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.4rem;
  text-align: left;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition),
    box-shadow var(--transition);
}

.decision-card:hover {
  border-color: var(--brand-dark);
}

.decision-card.selected {
  background: var(--bg-quiet);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(134, 188, 37, 0.15);
}

.branch-panel {
  display: none;
  margin-top: 1.5rem;
  padding: 2rem 0 0;
}

.branch-panel.is-active {
  display: block;
}

.branch-head h3 {
  margin: 0 0 0.4rem;
}

.branch-head p {
  margin: 0;
  color: var(--ink-light);
}

.decision-hint {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.installer-wrapper {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg-soft);
}

.accordion-checklist {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.check-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: visible;
  background: var(--bg-soft);
  transition: border-color var(--transition), box-shadow var(--transition),
    background var(--transition);
}

.check-accordion::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--bg);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.check-accordion.is-open {
  border-color: var(--brand);
  background: var(--bg-quiet);
  box-shadow: 0 12px 30px rgba(16, 22, 16, 0.08);
}

.check-accordion.is-complete {
  border-color: var(--brand-dark);
  background: var(--bg-quiet);
}

.check-accordion.is-open::before,
.check-accordion.is-complete::before {
  background: var(--brand);
}

.check-accordion.is-open .check-accordion-toggle,
.check-accordion.is-complete .check-accordion-toggle {
  background: var(--bg-quiet);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.check-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.5rem;
  border: none;
  background: var(--bg-soft);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.check-accordion-toggle strong {
  display: block;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.check-accordion-toggle > div {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.25rem;
}

.check-accordion-toggle > div > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: center;
  text-align: center;
}

.check-accordion-toggle > div p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-light);
  text-align: center;
}

.check-accordion .step-status {
  min-width: 90px;
  text-align: right;
}

.check-accordion-toggle:hover {
  background: var(--bg-quiet);
}

.check-accordion-body {
  padding: 1.25rem;
  background: var(--bg);
}

.codeblock {
  position: relative;
  background: #10130f;
  color: #f5fff0;
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--font-mono);
  margin: 0.6rem 0 1rem;
}

.codeblock pre {
  margin: 0;
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.9rem;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}

.code-instruction {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.verify-installer,
.verify-assist,
.verify-checklist {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  background: var(--bg-quiet);
  margin-top: 1rem;
}

.desc-steps ul {
  margin: 0.6rem 0 0 1.3rem;
}

.phase-success {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  background: var(--bg-quiet);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--brand-dark);
}

.phase-success .success-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  display: grid;
  place-items: center;
}

.decision-note,
.phase-note strong {
  color: var(--ink);
}

.summary-label {
  font-size: 0.95rem;
}

.summary-label-hide {
  display: none;
}

details[open] .summary-label-hide {
  display: inline;
}

details[open] .summary-label-show {
  display: none;
}

.side-thumb {
  margin: 1rem 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.side-thumb img {
  border-radius: var(--radius-sm);
}

.side-thumb figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.collapsible-code summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.collapsible-code summary::-webkit-details-marker {
  display: none;
}

.summary-text {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.summary-hint {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.summary-caret {
  width: 8px;
  height: 8px;
  border: 2px solid var(--ink-muted);
  border-left: none;
  border-top: none;
  transform: rotate(-45deg);
  transition: transform var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

details[open] .summary-caret {
  transform: rotate(45deg);
  border-color: var(--brand-dark);
}

.collapsible-code {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: var(--bg);
  margin: 1rem 0;
}

.workflow-footer {
  width: min(1100px, 92%);
  margin: 0 auto 4rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  text-align: center;
}

.reset-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: #444;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all var(--transition);
  z-index: 999;
}

.reset-btn:hover {
  background: #c0392b;
  box-shadow: 0 6px 16px rgba(192, 57, 43, 0.35);
  transform: translateY(-2px);
}

.reset-btn svg {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .os-panel {
    grid-template-columns: 1fr;
  }

  .media-sticky {
    position: relative;
    top: 0;
  }
}

@media (max-width: 640px) {
  .masthead-content,
  main,
  .workflow-footer {
    width: 92%;
  }

  .mini-step-toggle {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .decision-card {
    padding: 1.1rem;
  }

  .branch-panel,
  .phase-card {
    padding: 1.25rem;
  }
}

/* New Masthead Styles */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(134, 188, 37, 0.15);
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  width: fit-content;
}

.eyebrow-pill svg {
  width: 14px;
  height: 14px;
}

.setup-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.setup-card.phase-pill {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--brand-dark);
  border-radius: var(--radius);
  background: var(--bg-quiet);
  min-width: 0;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-align: left;
}

.setup-card.phase-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--brand);
}

.setup-card.phase-pill.is-active {
  background: var(--bg-quiet);
  border-color: var(--brand-dark);
  box-shadow: none;
}

.setup-card.phase-pill.is-complete {
  background: var(--bg-quiet);
  border-color: var(--brand-dark);
  color: inherit;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.85rem;
}

.step-icon {
  width: 24px;
  height: 24px;
  color: var(--ink-light);
}

.setup-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--ink);
}

.setup-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.5;
}

/* Specificity fix for step badge */
.setup-card.phase-pill .step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.85rem;
}

/* Lightbox Modal Styles */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 2rem;
}

.lightbox.show {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10001;
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 80vw;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Make media frame images clickable */
.media-frame img {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.media-frame img:hover {
  transform: scale(1.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 2rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lightbox-content img {
    max-height: 70vh;
  }
}
