.guide-page {
  background:
    linear-gradient(180deg, rgba(255, 176, 0, .035), transparent 360px),
    var(--bg);
}

.guide-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--hairline);
  background: rgba(11, 11, 13, .96);
}

.guide-header {
  padding-top: env(safe-area-inset-top);
}

.guide-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1480px);
  min-height: 68px;
  margin: 0 auto;
  padding: 10px var(--gutter);
}

.guide-header .brand {
  min-height: 44px;
}

.guide-header .brand-sub {
  display: block;
  color: var(--text-steel);
}

.guide-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.guide-header-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary-soft);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

.guide-header-link:hover {
  color: var(--amber);
}

.guide-header .button {
  min-height: 44px;
  padding: 0 16px;
  white-space: nowrap;
}

.guide-home-main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 72px) var(--gutter) 0;
}

.cover-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  grid-template-areas:
    "copy demo"
    "index demo";
  gap: 34px clamp(34px, 6vw, 92px);
  align-items: start;
  padding-bottom: clamp(34px, 5vw, 64px);
}

.cover-copy {
  grid-area: copy;
  min-width: 0;
  max-width: 620px;
}

.cover-copy h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(2.55rem, 4.3vw, 3.95rem);
  font-stretch: 108%;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: .94;
}

.cover-copy h1 span {
  display: block;
  color: var(--amber);
}

.cover-lede {
  max-width: 48ch;
  margin: 24px 0 0;
  color: var(--text-secondary);
  font-size: 1.03rem;
  line-height: 1.65;
}

.cover-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 28px;
}

.cover-actions .button {
  min-height: 46px;
}

.cover-actions .text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--steel-light);
  font-family: var(--display);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cover-actions .text-link:hover {
  color: var(--amber);
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  color: var(--text-steel);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  list-style: none;
  text-transform: uppercase;
}

.cover-meta li {
  padding: 0 10px;
  border-left: 1px solid var(--line-strong);
}

.cover-meta li:first-child {
  padding-left: 0;
  border-left: 0;
}

.cover-index {
  grid-area: index;
  border-top: 1px solid var(--line-strong);
}

.cover-index a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 44px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-secondary);
  text-decoration: none;
}

.cover-index a:hover,
.cover-index a[aria-current="page"] .index-name {
  color: var(--amber);
}

.cover-index .index-no,
.guide-index .index-no {
  color: var(--amber);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.cover-index .index-name {
  display: block;
  color: inherit;
  font-family: var(--display);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.cover-index .index-desc {
  display: block;
  margin-top: 3px;
  color: var(--text-steel);
  font-size: .78rem;
  line-height: 1.35;
}

.cover-demo {
  grid-area: demo;
  align-self: center;
  min-width: 0;
}

.cover-demo .board {
  width: 100%;
  max-width: 760px;
  margin-left: auto;
}

.cover-note {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 760px;
  margin: 12px 0 0 auto;
  color: var(--text-steel);
  font-family: var(--display);
  font-size: .7rem;
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.cover-note span:last-child {
  text-align: right;
}

.cover-note [data-local-note] {
  text-wrap: pretty;
  transition: color 160ms ease;
}

.board.applied + .cover-note [data-local-note] {
  color: var(--verified);
}

.cover-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 calc(var(--gutter) * -1);
  padding: 14px var(--gutter);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-steel);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cover-strip span {
  padding: 0 16px;
  border-left: 1px solid var(--line-strong);
}

.cover-strip span:first-child {
  padding-left: 0;
  border-left: 0;
}

.guide-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(34px, 5vw, 82px);
  align-items: start;
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 48px var(--gutter) 72px;
}

.guide-sidebar {
  position: sticky;
  top: 24px;
  min-width: 0;
  padding-right: 24px;
  border-right: 1px solid var(--line-soft);
}

.guide-side-label {
  margin: 0 0 12px;
  color: var(--text-steel);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.guide-index {
  display: flex;
  flex-direction: column;
}

.guide-index a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  min-height: 44px;
  align-items: center;
  padding: 9px 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-secondary);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

.guide-index a:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.guide-index a:hover {
  background: rgba(255, 255, 255, .045);
  color: var(--white);
}

.guide-index a[aria-current="page"] {
  color: var(--ink);
  background: var(--amber);
}

.guide-index a[aria-current="page"] .index-no {
  color: var(--ink);
}

.guide-side-meta {
  margin: 18px 0 0;
  color: var(--text-steel);
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1.6;
}

.guide-menu {
  display: none;
  margin: 0 0 28px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.guide-menu summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  cursor: pointer;
  color: var(--amber);
  font-family: var(--display);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  list-style: none;
  text-transform: uppercase;
}

.guide-menu summary::-webkit-details-marker {
  display: none;
}

.guide-menu summary::after {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform 160ms ease-out;
}

.guide-menu[open] summary::after {
  transform: rotate(225deg);
}

.guide-menu .guide-index {
  padding-bottom: 12px;
}

.guide-main {
  min-width: 0;
  max-width: 1000px;
}

.chapter-head {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line-strong);
}

.chapter-head h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-stretch: 108%;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: .94;
}

.chapter-head p {
  max-width: 58ch;
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 1.03rem;
  line-height: 1.65;
}

.guide-section {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  padding: 34px 0;
  border-top: 1px solid var(--line-soft);
}

.guide-section:first-of-type {
  border-top: 0;
}

.guide-section > h2,
.guide-section > .section-rail h2 {
  margin: 0;
  color: var(--white);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.05;
}

.guide-section > h2 span {
  color: var(--amber);
}

.section-rail p {
  max-width: 22ch;
  margin: 10px 0 0;
  color: var(--text-steel);
  font-size: .8rem;
  line-height: 1.5;
}

.section-body {
  min-width: 0;
}

.section-body > .lede {
  max-width: 66ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.section-body > .lede + .lede {
  margin-top: 12px;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  list-style: none;
}

.process-list li {
  min-width: 0;
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.process-list li:nth-child(even) {
  padding-left: 20px;
  border-left: 1px solid var(--line-soft);
}

.process-list .step-no {
  display: block;
  margin-bottom: 8px;
  color: var(--amber);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
}

.process-list h3 {
  margin: 0;
  color: var(--white);
  font-family: var(--display);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.process-list p {
  margin: 7px 0 0;
  color: var(--text-steel);
  font-size: .84rem;
  line-height: 1.55;
}

.artifact-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.artifact-grid > * {
  min-width: 0;
}

.limit-line {
  max-width: 70ch;
  text-wrap: pretty;
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-steel);
  font-size: .8rem;
  line-height: 1.55;
}

.limit-line strong {
  color: var(--text-secondary);
  font-weight: 700;
}

.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--text-secondary);
  font-size: .86rem;
  line-height: 1.5;
}

.detail-list li:first-child {
  border-top: 0;
}

.detail-list li > span:first-child {
  color: var(--text-steel);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-list code,
.audit-command,
.guide-section code {
  color: var(--amber);
  font-family: var(--mono);
  font-size: .8em;
}

.receipt-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
}

.receipt-copy {
  min-width: 0;
}

.receipt-copy p {
  max-width: 60ch;
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: .95rem;
}

.receipt-copy .proof-note {
  color: var(--text-steel);
  font-size: .82rem;
}

.audit-command {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 18px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  overflow-wrap: anywhere;
}

.audit-note {
  max-width: 58ch;
  margin: 10px 0 0;
  color: var(--text-steel);
  font-size: .8rem;
  line-height: 1.55;
}

.receipt-grid .log-card {
  min-width: 0;
  margin: 0;
}

.receipt-grid .log-card pre {
  max-width: 100%;
}

.guide-section .privacy-table {
  margin-top: 0;
}

.guide-section .pdf-panel {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.pdf-sheet[hidden] {
  display: none;
}

.pdf-sheet.is-active {
  animation: pdf-page-in 220ms cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes pdf-page-in {
  from {
    opacity: .55;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guide-section .theme-rail {
  margin-top: 0;
}

.theme-list {
  display: none;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.theme-list li {
  padding: 5px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--text-secondary);
  font-size: .82rem;
}

html.large-text .theme-list {
  display: block;
}

.guide-section .download-panel {
  max-width: 720px;
}

.chapter-next {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.chapter-next a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary-soft);
  font-family: var(--display);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.chapter-next a:hover {
  color: var(--amber);
}

.chapter-next a:last-child {
  margin-left: auto;
  text-align: right;
}

.guide-footer {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 24px var(--gutter) 34px;
  padding-bottom: max(34px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
}

.guide-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.guide-footer p {
  max-width: 42ch;
  margin: 0;
  color: var(--text-steel);
  font-size: .78rem;
  line-height: 1.55;
}

.guide-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.guide-footer nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary-soft);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.guide-footer nav a:hover {
  color: var(--amber);
}

@media (max-width: 980px) {
  .cover-grid {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 32px;
  }

  .guide-shell {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 34px;
  }

  .guide-section {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 26px;
  }
}

@media (max-width: 860px) {
  .guide-shell {
    display: block;
    padding-top: 28px;
  }

  .guide-sidebar {
    display: none;
  }

  .guide-menu {
    display: block;
  }

  .guide-main {
    max-width: none;
  }

  .cover-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "demo"
      "index";
    gap: 30px;
    padding-bottom: 34px;
  }

  .cover-copy {
    max-width: 720px;
  }

  .cover-copy h1 {
    max-width: 14ch;
  }

  .cover-demo .board {
    max-width: none;
    margin-left: 0;
  }

  .cover-note {
    max-width: none;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .guide-header-inner {
    min-height: 64px;
    gap: 12px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .guide-header .brand-sub {
    display: none;
  }

  .guide-header .brand-name {
    font-size: .88rem;
  }

  .guide-header .brand-mark {
    width: 32px;
    height: 32px;
  }

  .guide-header .brand-mark svg {
    width: 27px;
    height: 27px;
  }

  .guide-header-actions {
    gap: 10px;
  }

  .guide-header-link {
    display: none;
  }

  .guide-header .button {
    padding: 0 12px;
    font-size: max(.8rem, 12px);
  }

  .guide-home-main {
    padding-top: 32px;
  }

  .cover-copy h1 {
    max-width: 13ch;
    font-size: clamp(2.4rem, 11vw, 3.4rem);
  }

  .cover-lede {
    margin-top: 20px;
    font-size: .97rem;
  }

  .cover-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .cover-index {
    margin-top: 28px;
  }

  .cover-strip {
    gap: 8px 0;
    margin-right: calc(var(--gutter) * -1);
    margin-left: calc(var(--gutter) * -1);
  }

  .cover-strip span {
    padding: 0 9px;
  }

  .chapter-head h1 {
    font-size: clamp(2.3rem, 10vw, 3.2rem);
  }

  .guide-section,
  .guide-section:first-of-type {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 26px 0;
  }

  .section-rail p {
    max-width: 54ch;
  }

  .process-list {
    grid-template-columns: 1fr;
  }

  .process-list li:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .artifact-grid,
  .receipt-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .chapter-next {
    flex-wrap: wrap;
  }

  .chapter-next a:last-child {
    margin-left: 0;
  }

  .guide-footer-inner {
    display: block;
  }

  .guide-footer nav {
    margin-top: 12px;
  }
}

@media (max-width: 360px) {
  .guide-header .button {
    padding: 0 9px;
  }

  .guide-header-inner {
    gap: 6px;
  }

  .guide-header .brand-name {
    font-size: .84rem;
  }

  .cover-meta li:last-child {
    padding-left: 0;
    border-left: 0;
  }

  .cover-strip span:last-child {
    border-left: 0;
  }
}

@media (max-width: 1120px) {
  .artifact-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

html.large-text .receipt-grid .log-card,
html.large-text .guide-section .theme-rail,
html.large-text .guide-section .pdf-panel,
html.large-text .guide-section .ops-grid,
html.large-text .guide-section .control-panel,
html.large-text .guide-section .method-demo,
html.large-text .cover-demo {
  display: none;
}

html.large-text .guide-sidebar {
  display: none;
}

html.large-text .guide-menu {
  display: block;
}

html.large-text .guide-header-inner {
  flex-wrap: wrap;
}

html.large-text .guide-header .brand {
  width: 100%;
}

html.large-text .guide-header-actions {
  width: 100%;
  justify-content: flex-end;
}

html.large-text .guide-header .button {
  margin-left: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .guide-menu summary::after,
  .pdf-sheet.is-active {
    animation: none;
    transition: none;
  }
}
