.guide-page {
  padding-top: var(--header-h, 110px);
}

.guide-shell {
  max-width: 1000px;
  padding-top: 36px;
  padding-bottom: 72px;
  overflow-wrap: anywhere;
}

.guide-shell a:not(.mk-btn) {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.guide-shell a:focus-visible,
.guide-shell [tabindex]:focus-visible,
.guide-skip:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 5px;
}

.guide-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 12px 18px;
  background: var(--surface);
  color: var(--text);
  transform: translateY(-180%);
}

.guide-skip:focus {
  transform: translateY(0);
}

.guide-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .8rem;
  padding: 0;
  list-style: none;
  font-size: .9rem;
}

.guide-breadcrumb li + li::before {
  content: "/";
  margin-right: .8rem;
  color: var(--muted);
}

.guide-hero {
  padding: 36px 0 24px;
}

.guide-kicker,
.guide-meta {
  color: var(--muted);
}

.guide-kicker {
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 1.15;
  margin: 16px 0 24px;
  text-wrap: balance;
  hyphens: auto;
}

.guide-intro {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.guide-meta {
  font-size: .9rem;
}

.guide-toc,
.guide-note {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.guide-toc h2,
.guide-note h3 {
  margin-top: 0;
}

.guide-toc ol {
  columns: 2 260px;
  padding-left: 1.4rem;
  margin-bottom: 0;
}

.guide-toc li {
  break-inside: avoid;
  padding: .35rem 0;
}

.guide-article section {
  padding: 32px 0 12px;
}

.guide-article [id] {
  scroll-margin-top: calc(var(--header-h, 110px) + 24px);
}

.guide-article h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
}

.guide-article h3 {
  font-size: 1.2rem;
  margin-top: 1.6rem;
}

.guide-article p,
.guide-article li {
  line-height: 1.8;
}

.guide-article li + li {
  margin-top: .45rem;
}

.guide-table {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.guide-table table {
  border-collapse: collapse;
  width: 100%;
  min-width: 580px;
}

.guide-table caption {
  text-align: left;
  padding: 16px;
  font-weight: 600;
}

.guide-table th,
.guide-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.guide-table th {
  background: var(--surface);
}

.guide-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px 28px;
  padding-left: 1.3rem;
}

.guide-shell .mk-actions {
  justify-content: flex-start;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .guide-shell { padding-top: 20px; }
  .guide-hero { padding-top: 20px; }
  .guide-toc, .guide-note { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.guide-page) { scroll-behavior: auto; }
  .guide-page .mk-btn { transition: none; }
}

@media print {
  .guide-page { padding-top: 0; background: #fff; color: #000; }
  .guide-page::before, .guide-page::after,
  .guide-page #site-header, .guide-page #site-footer,
  .guide-skip, .guide-toc, .guide-shell .mk-actions { display: none; }
  .guide-shell { max-width: none; }
  .guide-shell a:not(.mk-btn) { color: #000; }
  .guide-note, .guide-table th { background: #fff; }
  .guide-table { overflow: visible; }
  .guide-table table { min-width: 0; }
  .guide-meta, .guide-kicker { color: #333; }
}
