:root {
  color-scheme: light;
  --ink: #172c2b;
  --muted: #526261;
  --deep: #132b2a;
  --paper: #f7f6f1;
  --line: #dfe5de;
  --orange: #ef9a65;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

:focus-visible {
  outline: 3px solid #a44a19;
  outline-offset: 4px;
}

header :focus-visible,
.guide-cta :focus-visible {
  outline-color: var(--orange);
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 8px 16px;
  background: #fff;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

header {
  color: #fff;
  background: var(--deep);
}

.nav,
.nav-links,
.nav-actions,
.footer-inner,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.nav,
.footer-inner {
  justify-content: space-between;
  padding-block: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 10px;
}

.nav-links a,
.nav-actions > a:not(.button) {
  padding-block: 6px;
  color: #d2e3db;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

[aria-current='page'] {
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 10px;
  color: var(--deep);
  background: var(--orange);
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  background: #f4aa7c;
}

.breadcrumbs {
  padding-top: 32px;
  color: var(--muted);
  font-size: 0.86rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: '/';
  margin-right: 8px;
}

.guide-hero {
  max-width: 880px;
  padding-block: 48px 56px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #426856;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 5.5vw, 4.6rem);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 20px;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.15rem;
}

.guide-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 60px;
  padding-bottom: 64px;
}

.contents {
  position: sticky;
  top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.contents h2 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.contents ol {
  margin: 0;
  padding-left: 18px;
}

.contents li + li {
  margin-top: 12px;
}

.contents a {
  font-size: 0.9rem;
  text-decoration: none;
}

.contents a:hover {
  text-decoration: underline;
}

.guide-body {
  max-width: 760px;
}

.guide-body section {
  margin-bottom: 48px;
  scroll-margin-top: 24px;
}

.guide-body ul,
.guide-body ol {
  padding-left: 24px;
}

.guide-body li + li {
  margin-top: 12px;
}

.example {
  margin-block: 24px;
  padding: 24px 28px;
  border-left: 4px solid #55776c;
  border-radius: 0 12px 12px 0;
  background: #e6f2e9;
}

.example p:last-child {
  margin-bottom: 0;
}

.workflow-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 48px;
  padding: 0;
  list-style: none;
}

.workflow-preview li {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.workflow-preview span {
  display: block;
  margin-bottom: 12px;
  color: #426856;
  font-size: 0.8rem;
  font-weight: 800;
}

.workflow-preview strong {
  display: block;
  font-size: 1.1rem;
}

.workflow-preview p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

details {
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 750;
}

details p {
  margin: 14px 0 0;
}

.related {
  padding-block: 56px;
  border-top: 1px solid var(--line);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
}

.guide-card:hover {
  border-color: #55776c;
}

.guide-card h3 {
  margin-bottom: 12px;
}

.guide-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.directory-section {
  padding-bottom: 56px;
}

.directory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.note-template {
  margin-block: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.directory-link {
  margin-top: 24px;
}

.guide-cta {
  padding-block: 64px;
  color: #fff;
  background: var(--deep);
}

.guide-cta p {
  max-width: 650px;
  color: #c2d8ca;
}

footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links a {
  padding-block: 6px;
}

@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 32px;
  }
  .nav {
    gap: 20px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: calc(100% - 32px);
  }
  .nav-links {
    order: 3;
    width: 100%;
  }
  .nav-actions {
    gap: 16px;
  }
  .guide-hero {
    padding-block: 32px 40px;
  }
  .guide-layout,
  .card-grid,
  .directory-grid,
  .workflow-preview {
    grid-template-columns: 1fr;
  }
  .contents {
    position: static;
  }
  .guide-layout {
    gap: 40px;
    padding-bottom: 24px;
  }
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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