.guide-header, .guide { width: min(100% - 32px, 56rem); margin-inline: auto; }
.guide-header { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.guide-header a, .guide-nav a { color: var(--blue); font-weight: 700; }
.guide { padding-block: 1rem 2rem; line-height: 1.65; overflow-wrap: anywhere; }
.guide h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; }
.guide-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-block: 1rem; }
.guide section { background: white; border: 1px solid var(--line); border-radius: 12px; padding: clamp(14px, 3vw, 24px); margin-block: 12px; }
.guide h2 { margin: 0; font-size: 1.25rem; }
.guide h3 { font-size: 1rem; }
.guide-example { background: var(--soft); border-radius: 8px; padding: .75rem; }
.guide details { border-top: 1px solid var(--line); margin-top: .6rem; }
.guide summary { cursor: pointer; padding-top: .55rem; font-weight: 700; }
.guide details p { margin-block: .4rem .6rem; }

.guide-header { align-items: center; }
.guide-header, .guide-header-actions { flex-wrap: wrap; }
.guide-header-actions { display: flex; align-items: center; gap: 8px; }
.guide-header .brand { text-decoration: none; }
.guide-header .guide-back {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding-inline: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  text-decoration: none;
}
.guide h1 { margin: .25rem 0 1rem; }
.guide-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 10px;
}
.guide-nav a {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  text-decoration: none;
}
.guide-nav a:hover { border-color: var(--blue2); }
.guide-nav a[aria-current] { border-color: var(--blue2); background: var(--soft); }
.guide-nav span { color: var(--muted); font-size: .875rem; font-weight: 400; }
.guide-topic { scroll-margin-block: 12px; }
.guide { padding-bottom: 0; }
.guide-footer {
  width: min(100% - 32px, 56rem);
  margin: 12px auto 24px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}
.guide-footer p { flex: 1 1 18rem; min-width: 0; }
[data-theme="dark"] .guide-footer {
  background: transparent;
  color: var(--muted);
  border-top-color: var(--line);
}
[data-theme="dark"] .guide-footer b { color: var(--ink); }
.dpi-fields, .dpi-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.dpi-fields label { display: grid; gap: 4px; font-size: .875rem; }
.dpi-fields input { width: 100%; min-height: 42px; padding: 6px 10px; border: 1px solid #aab7c8; border-radius: 8px; }
.dpi-results > div { display: grid; align-content: start; gap: 4px; padding: 10px 12px; background: var(--soft); border-radius: 8px; }
.dpi-results span, .dpi-note { color: var(--muted); font-size: .875rem; }
.dpi-results strong { font-variant-numeric: tabular-nums; }
.dpi-note { margin-bottom: 0; }
.dpi-sources { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .875rem; }
.dpi-sources a { color: var(--blue); }
.format-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 12px; }
.format-types > div { padding: 0 12px; background: var(--soft); border-radius: 8px; }
.format-list > div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 8px; border-top: 1px solid var(--line); padding: 8px 0; }
.format-list dt { font-family: ui-monospace, monospace; font-weight: 700; }
.format-list dd { margin: 0; }
.guide-illustration {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f9fc;
}
.guide-illustration svg { display: block; width: min(100%, 30rem); height: auto; margin-inline: auto; }
.guide-illustration figcaption { margin-top: 8px; color: var(--muted); font-size: .875rem; text-align: center; }
.guide-infographic {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-block: 12px;
}
.guide-infographic .guide-illustration { margin: 0; }
.guide-reading-notes { display: grid; gap: 8px; margin: 0; }
.guide-reading-notes > div { border-inline-start: 3px solid #669bc8; padding: 4px 10px; }
.guide-reading-notes dt { font-weight: 700; color: var(--blue); }
.guide-reading-notes dd { margin: 2px 0 0; font-size: .875rem; }
@media (max-width: 560px) {
  .dpi-fields, .dpi-results { grid-template-columns: 1fr; }
  .format-list > div { grid-template-columns: 1fr; gap: 0; }
  .guide-infographic { grid-template-columns: 1fr; }
}
.print-topic-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
}
.print-topic-diagram span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--surface-raised, #fff);
  font-weight: 700;
}
.bleed-diagram span:first-child { border-style: dashed; }
.booklet-diagram span { min-width: 7rem; text-align: center; letter-spacing: .15em; }

.guide .guide-directory-heading { margin-block: 20px 8px; font-size: 1.05rem; }
.scene-nav { margin-top: 0; }
.scene-nav a {
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 12px;
}
.scene-nav a svg {
  grid-row: span 2;
  align-self: center;
  width: 44px;
  padding: 6px;
  border-radius: 8px;
  color: var(--blue);
  background: var(--soft);
}
.scene-nav svg path, .scene-banner svg path { fill: none; stroke: currentColor; stroke-width: 2.7; stroke-linejoin: round; stroke-linecap: round; }
.scene-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 16rem);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 10px;
  background: var(--soft);
}
.scene-banner p { margin: 4px 0 0; color: var(--muted); }
.scene-banner figure { margin: 0; color: var(--blue); }
.scene-banner svg { display: block; width: 100%; min-height: 68px; }
.scene-banner svg rect { fill: var(--surface-raised, #fff); stroke: currentColor; stroke-width: 1.5; }
.scene-banner svg rect.crop-band { fill: var(--blue); fill-opacity: .28; stroke: none; }
.scene-banner svg .diagram-accent { stroke-width: 5; }
.scene-banner svg text { fill: var(--ink); font-size: 13px; font-weight: 700; text-anchor: middle; }
.scene-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .875rem; margin-bottom: 8px; }
.scene-links a { color: var(--blue); }
.scene-topic summary { padding-block: 8px; }
@media (max-width: 520px) {
  .scene-banner { grid-template-columns: 1fr; }
  .scene-banner figure { width: min(100%, 16rem); }
}
