/* Documentation home. Tutorial styling stays in styles.css. */
@layer components {
  .home-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
  .home-nav a { color: var(--muted); font-size: .85rem; text-decoration: none; padding-block: 12px; }
  .home-nav a:hover { color: var(--green); text-decoration: underline; }
  .home-hero { display: grid; grid-template-columns: 1.12fr 1fr; align-items: center; gap: 64px; padding-block: 72px 56px; }
  .home-hero h1 { font-size: clamp(3rem, 5.2vw, 5rem); max-width: 12ch; line-height: 1.04; }
  .home-hero h1 span { color: var(--green); }
  .home-intro { color: var(--muted); font-size: 1.12rem; max-width: 46ch; margin-top: 24px; }
  .home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
  .start-link { display: inline-flex; justify-content: space-between; align-items: center; gap: 30px; padding: 14px 22px; border: 1px solid var(--green); border-radius: 8px; color: white; background: var(--green); text-decoration: none; font-weight: 650; }
  .start-link:hover { background: var(--ink); border-color: var(--ink); }
  .text-link { padding-block: 12px; font-size: .92rem; font-weight: 650; }
  .start-note { font-size: .8rem; color: var(--muted); margin-top: 18px; }
  .example-map { min-width: 0; position: relative; overflow: hidden; padding: 28px; background: #173b30; color: #f2f7eb; border: 1px solid #315748; border-radius: 16px; box-shadow: 0 22px 50px -34px #18332c80; }
  .map-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .map-heading p { font-size: .7rem; letter-spacing: .15em; font-weight: 650; }
  .map-pill { border: 1px solid #628171; padding: 3px 10px; border-radius: 4px; font-size: .72rem; color: #dae8cc; }
  .example-map svg { display: block; width: 100%; height: auto; margin-block: 12px 4px; }
  .map-project { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #d6e2d9; font-size: .77rem; }
  .map-project span { color: #c5e39c; }
  .example-map figcaption { padding: 14px 0 0; margin-top: 18px; border-top: 1px solid #466555; color: #c7d8cd; font-size: .75rem; }
  .home-features { display: flex; flex-wrap: wrap; gap: 14px 48px; margin: 0; padding: 22px 0; list-style: none; border-block: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
  .home-features li { display: flex; align-items: center; gap: 10px; }
  .home-features li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
  .home-section { padding-block: 64px; scroll-margin-top: 24px; }
  .home-section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
  .home-section-head .eyebrow { margin-bottom: 10px; }
  .home-section-head > p { max-width: 34ch; color: var(--muted); font-size: .92rem; }
  .lesson-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0; }
  .lesson-list > li { min-width: 0; }
  .lesson { display: flex; flex-direction: column; height: 100%; padding: 28px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; text-decoration: none; }
  .lesson:hover { border-color: var(--green); box-shadow: 0 10px 24px -18px #18332c55; }
  .lesson:focus-visible { outline-offset: 5px; }
  .lesson-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
  .lesson-number { font-family: Consolas, monospace; font-size: .84rem; color: var(--green); }
  .lesson-status { padding: 3px 9px; border-radius: 4px; background: var(--soft); color: var(--green); font-size: .72rem; }
  .lesson-status.draft { color: #775019; background: #faf0dc; }
  .lesson h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -.025em; }
  .lesson-description { margin-top: 12px; color: var(--muted); font-size: .94rem; }
  .lesson-preview { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #e9eeea; margin-top: 24px; }
  .lesson-preview img { width: 100%; height: auto; }
  .lesson-bottom { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-top: auto; padding-top: 22px; }
  .lesson-bottom small { max-width: 38ch; color: var(--muted); line-height: 1.55; }
  .lesson-arrow { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--green); font-size: 1.2rem; }
  .lesson:hover .lesson-arrow { background: var(--green); color: white; border-color: var(--green); }
  .quick-section { display: grid; grid-template-columns: .8fr 1.4fr; gap: 64px; border-top: 1px solid var(--line); }
  .quick-section h2 { max-width: 15ch; }
  .quick-section > div > p:last-child { margin-top: 20px; max-width: 32ch; color: var(--muted); font-size: .94rem; }
  .quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; list-style: none; padding: 0; margin: 0; }
  .quick-links a { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 100%; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .93rem; font-weight: 600; }
  .quick-links a:hover { color: var(--green); text-decoration: underline; }
  .quick-links a span { color: var(--green); }
  .home-help { display: grid; grid-template-columns: .8fr 1.4fr; gap: 64px; padding: 36px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; scroll-margin-top: 24px; }
  .home-help .eyebrow { margin-bottom: 12px; }
  .home-help h2 { max-width: 12ch; }
  .home-help-intro { color: var(--muted); margin-top: 18px; font-size: .93rem; }
  .home-help details:first-child { padding-top: 0; }
  .home-help details:last-child { border-bottom: 0; padding-bottom: 0; }
  .home-help summary { min-height: 32px; font-size: .94rem; }
  .home-help details p { font-size: .91rem; }
  .edition-note { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-block: 28px 48px; color: var(--muted); font-size: .8rem; }
  .edition-note p { max-width: 78ch; }
  .edition-note a { flex-shrink: 0; }
  .legacy-entry p { display: none; }
  .legacy-entry p:target { display: block; padding: 24px; margin-top: 24px; background: var(--soft); border: 1px solid var(--green); border-radius: 8px; }
  @media (max-width: 1000px) {
    .home-hero { gap: 32px; padding-top: 48px; }
    .home-hero h1 { font-size: clamp(3rem, 6vw, 4.4rem); }
    .example-map { padding: 22px; }
    .quick-section, .home-help { gap: 32px; }
  }
  @media (max-width: 720px) {
    .home .masthead { flex-wrap: wrap; padding-block: 16px; gap: 4px 20px; }
    .home-nav { gap: 20px; }
    .home-nav a { font-size: .8rem; }
    .home-hero { grid-template-columns: 1fr; gap: 32px; padding-block: 36px; }
    .home-hero h1 { font-size: clamp(3rem, 10vw, 4rem); }
    .home-intro { font-size: 1.03rem; }
    .home-actions { gap: 8px 24px; margin-top: 24px; }
    .home-features { gap: 12px 24px; font-size: .8rem; }
    .home-section { padding-block: 40px; }
    .home-section-head { display: block; }
    .home-section-head > p { margin-top: 16px; max-width: 45ch; }
    .lesson-list, .quick-section, .home-help { grid-template-columns: 1fr; }
    .lesson { padding: 22px; }
    .quick-section { gap: 16px; }
    .quick-section h2, .home-help h2 { max-width: none; }
    .home-help { padding: 24px; gap: 28px; }
    .quick-links { column-gap: 24px; }
    .quick-links a { font-size: .86rem; }
    .edition-note { display: block; padding-bottom: 36px; }
    .edition-note a { display: inline-block; margin-top: 16px; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .lesson, .lesson-arrow, .start-link { transition: background-color .16s, border-color .16s, box-shadow .16s; }
  }
  @media print {
    .home-nav, .home-actions, .example-map, .lesson-preview, .legacy-entry { display: none; }
    .home-hero { display: block; padding-block: 24px; }
    .home-hero h1 { font-size: 32pt; }
    .home-section { padding-block: 24px; }
    .lesson, .home-help { break-inside: avoid; }
    .home-help details::details-content { content-visibility: visible; }
  }
}
@layer components {
  .workflow-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: center; padding-block: 12px 32px; }
  .workflow-hero h1 { color: var(--green); font-size: clamp(2.7rem, 4.5vw, 4.2rem); max-width: 14ch; }
  .workflow-lead { margin-block: 20px 26px; color: var(--muted); font-size: 1.12rem; }
  .workflow-image { padding: 14px; border-radius: 14px; background: var(--ink); box-shadow: 0 10px 30px #18332c26; }
  .workflow-crop { overflow: hidden; border-radius: 8px; aspect-ratio: 1630 / 922; }
  .workflow-image img { display: block; width: 102.9%; max-width: none; height: auto; margin-top: -4.79%; }
  .workflow-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .workflow-tile { display: block; position: relative; padding: 24px 28px 24px 20px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 10px; background: white; }
  .workflow-tile h2 { font-size: 1.02rem; line-height: 1.4; letter-spacing: 0; text-wrap: wrap; }
  .workflow-tile p { margin-top: 10px; font-size: .86rem; line-height: 1.6; color: var(--muted); }
  .workflow-tile:hover { border-color: var(--green); background: var(--soft); }
  .tile-number { color: var(--green); }
  .tile-arrow { position: absolute; right: 12px; bottom: 16px; color: var(--green); }
  @media (max-width: 1000px) {
    .workflow-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workflow-hero { gap: 24px; }
  }
  @media (max-width: 800px) {
    .workflow-hero { grid-template-columns: 1fr; padding-top: 0; }
    .workflow-hero h1 { font-size: clamp(2.7rem, 8vw, 3.8rem); }
  }
  @media (max-width: 480px) {
    .workflow-tiles { grid-template-columns: 1fr; }
    .workflow-image { padding: 8px; }
    .workflow-hero .start-link { padding: 12px 14px; font-size: .9rem; }
  }
}
