:root { --compare-tray-height: 0px; }
.explore-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--green-deep); font: inherit; cursor: pointer; }
.explore-button:hover { background: #e7eadb; border-color: var(--green); }
.explore-button[aria-pressed="true"] { background: #dce6d8; border-color: var(--green-deep); }
.explore-button:disabled { opacity: .45; cursor: not-allowed; }
.explore-icon { display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; }
button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 3px solid #96682d; outline-offset: 4px; }
.item-actions, .discovery-actions, .practice-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.item-actions { margin-top: 16px; }
.discovery-entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: 20px; margin: 28px 0; padding: 22px; background: linear-gradient(115deg, #f0ebdc, #f8f2e6); border: 1px solid var(--line); border-radius: 20px; }
.discovery-illustration { width: 100%; height: auto; mix-blend-mode: multiply; }
.discovery-copy h2 { color: var(--green-deep); font: 500 clamp(24px, 3vw, 36px)/1.35 var(--serif); margin: 8px 0 20px; }
.discovery-copy small { display: block; margin-top: 13px; color: var(--muted); }
.section-index { color: var(--green); letter-spacing: .13em; font-size: 12px; }
.explore-card-top, .visited-label { display: flex; align-items: center; gap: 8px; }
.explore-card-top { justify-content: space-between; }
.visited-label { color: var(--green); font-size: 12px; white-space: nowrap; }
.explore-project-card { display: flex; flex-direction: column; min-width: 0; text-align: left; cursor: default; }
.explore-project-card:hover { transform: none; }
.explore-project-card .item-actions { margin-top: auto; padding-top: 12px; }
.project-title-button { border: 0; padding: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.project-title-button:hover { text-decoration: underline; text-underline-offset: 5px; }
.card-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.8; color: var(--muted); }
.related-reason { color: var(--green); font-size: 12px; margin-bottom: 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0 32px; }
.explore-one-line { max-width: 850px; font-size: 18px; line-height: 1.9; }
.explore-key-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
.explore-key-facts small, .explore-key-facts strong { display: block; }
.explore-key-facts small { color: var(--muted); margin-bottom: 8px; }
.explore-key-facts strong { font: 500 20px/1.6 var(--serif); }
.explore-sources { display: flex; gap: 8px 16px; flex-wrap: wrap; margin: 12px 0; }
.explore-sources a { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 12px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.practice-experience, .related-section, .registration-section, .explore-reading { margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); }
.practice-experience { padding: clamp(16px, 3vw, 32px); border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, #f0f0e4, #fbf5e6); }
.explore-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.practice-experience h3, .related-section h3, .registration-section h3, .explore-reading > h3, #exploreShell h3 { font-family: var(--serif); }
.practice-count { flex-shrink: 0; color: var(--green); font-size: 13px; }
.practice-note, .section-note, .source-limitation { color: var(--muted); line-height: 1.8; }
.practice-tabs { display: flex; gap: 9px; flex-wrap: wrap; margin: 22px 0; }
.practice-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 50px); align-items: center; }
.practice-figure { margin: 0; min-width: 0; }
.practice-figure > img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; border-radius: 12px; }
.practice-figure figcaption { text-align: center; color: var(--muted); font-size: 12px; padding: 12px; }
.practice-copy h4 { font: 500 clamp(30px, 4vw, 48px)/1.4 var(--serif); margin: 12px 0; }
.practice-copy > p { line-height: 1.9; }
.practice-controls { margin-top: 22px; }
.practice-complete { background: #e3ebdc; border-left: 3px solid var(--green); padding: 18px; margin: 22px 0; line-height: 1.8; }
.practice-experience > .explore-button { margin-top: 18px; }
.registration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.registration-grid dt { color: var(--muted); font-size: 13px; }
.registration-grid dd { margin: 8px 0 0; line-height: 1.7; }
.source-conflict { padding: 12px 16px; background: #f3e6cf; border-left: 2px solid #947041; line-height: 1.8; font-size: 13px; }
.reference-unavailable { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px dashed var(--line); color: var(--muted); }
.detail-reference-item { min-width: 0; overflow-wrap: anywhere; }
#exploreShell { padding: clamp(22px, 4vw, 52px); }
#exploreShell > h2 { font: 500 clamp(30px, 5vw, 48px)/1.4 var(--serif); }
.compare-tray { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); width: min(1100px, calc(100% - 32px)); box-sizing: border-box; z-index: 65; display: flex; align-items: center; gap: 18px; padding: 16px 22px; background: #fbf5e6f5; border: 1px solid var(--green); border-radius: 16px; box-shadow: 0 8px 40px #21373326; }
.compare-tray > strong { white-space: nowrap; }
.compare-tray .item-actions { margin: 0; flex-shrink: 0; }
.compare-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex: 1; min-width: 0; }
.compare-slots > div { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.compare-slots span { overflow-wrap: anywhere; }
.compare-slots .explore-button { padding: 7px; font-size: 12px; }
body.has-compare-tray { padding-bottom: var(--compare-tray-height); }
.comparison-heads, .comparison-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 26px 0; }
.comparison-heads article { border-top: 3px solid var(--green); padding-top: 12px; }
.comparison-row { display: grid; grid-template-columns: 150px repeat(2, minmax(0, 1fr)); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); line-height: 1.8; }
.comparison-row dt { color: var(--muted); }
.comparison-row dd { margin: 0; overflow-wrap: anywhere; }
.mobile-comparison-name { display: none; }
.footprint-stats { display: flex; gap: 50px; padding: 24px 0; }
.footprint-stats strong { font: 500 52px var(--serif); }
.footprint-stats small { display: block; margin-top: 8px; color: var(--muted); font: 14px var(--sans); }
.footprint-empty { max-width: 400px; margin: 0 auto 30px; text-align: center; color: var(--muted); }
.footprint-empty img { width: 100%; height: auto; mix-blend-mode: multiply; }
.pilot-progress { display: grid; gap: 14px; margin: 22px 0 40px; }
.pilot-progress > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 1fr) 55px auto; gap: 15px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.pilot-progress progress { width: 100%; accent-color: var(--green); }
#replaceDialog { width: min(500px, calc(100% - 40px)); box-sizing: border-box; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); }
#replaceDialog::backdrop { background: #182d29a6; }
#replaceDialog .explore-button { display: flex; width: 100%; margin-top: 12px; }
#exploreNotice { position: fixed; top: calc(var(--header-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 80; width: max-content; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 10px; background: var(--green-deep); color: var(--paper); font-size: 14px; box-sizing: border-box; }
#exploreNotice:empty { display: none; }
.preview-sheet-controls { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.preview-sheet-controls [data-explore-action="preview-expand"] { display: none; }
#footprintsButton { display: inline-flex; align-items: center; gap: 6px; }
.explore-empty { padding: 26px 0; line-height: 1.8; }
.hidden { display: none !important; }
@media (max-width: 1000px) {
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-tray { flex-wrap: wrap; gap: 10px; }
  .compare-slots { flex-basis: 65%; }
  .comparison-row { grid-template-columns: 110px repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 1180px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; }
  .site-header .breadcrumb { grid-row: 2; grid-column: 1 / -1; }
  .site-header .site-actions { width: auto; }
  .brand-button, .brand-copy { min-width: 0; }
  .brand-title { white-space: normal; }
  .brand-subtitle, body[data-nav-mode="compact"] .brand-subtitle { display: none; }
}
@media (max-width: 760px) {
  .discovery-entry, .practice-body, .related-grid, .registration-grid { grid-template-columns: minmax(0, 1fr); }
  .discovery-illustration { max-height: 180px; object-fit: contain; }
  .discovery-entry { padding: 18px; gap: 0; }
  .explore-key-facts { gap: 10px; }
  .explore-key-facts strong { font-size: 16px; }
  .practice-tabs .explore-button { flex: 1 0 auto; }
  .comparison-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .comparison-row dt { font-weight: 700; color: var(--ink); }
  .mobile-comparison-name { display: block; font-size: 12px; color: var(--muted); }
  .comparison-heads, .comparison-sources { gap: 14px; }
  .comparison-heads h3, .comparison-sources h3 { font-size: 17px; line-height: 1.7; }
  .compare-tray { bottom: 8px; width: calc(100% - 16px); padding: 12px; max-height: 29dvh; overflow-y: auto; }
  .compare-tray > strong { font-size: 13px; }
  .compare-slots { flex-basis: 100%; order: -1; }
  .compare-tray .item-actions { margin-left: auto; }
  .compare-tray .explore-button { min-height: 36px; font-size: 12px; padding: 7px 9px; }
  .pilot-progress > div { grid-template-columns: minmax(0, 1fr) 50px auto; gap: 10px; }
  .pilot-progress > div > span { grid-column: 1 / -1; }
  .map-context-panel.has-project-preview { display: block !important; position: fixed; top: auto; bottom: calc(var(--compare-tray-height) + 12px); left: 8px; right: 8px; width: auto; max-height: 38dvh; overflow-y: auto; z-index: 60; padding: 16px; border: 1px solid var(--green); border-radius: 18px; background: var(--paper); box-shadow: 0 -8px 40px #21373326; }
  .map-context-panel.has-project-preview.preview-expanded { max-height: calc(80dvh - var(--compare-tray-height)); }
  .preview-sheet-controls { position: sticky; top: -16px; background: var(--paper); padding: 8px 0; z-index: 1; }
  .preview-sheet-controls [data-explore-action="preview-expand"] { display: inline-flex; }
  .has-project-preview:not(.preview-expanded) .map-preview-grid { display: none; }
  .site-header { gap: 8px; }
  .site-header .brand-button { grid-column: 1 / -1; }
  .site-header .brand-title { font-size: 17px; }
  .site-header .breadcrumb { grid-column: 1; min-width: 0; overflow: hidden; }
  .site-header .site-actions { grid-row: 2; grid-column: 2; }
  .site-actions { gap: 5px; flex-wrap: wrap; }
  .header-button, body[data-nav-mode="compact"] .header-button { padding: 8px 10px; font-size: 12px; }
  #footprintsButton .explore-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Desktop reading hierarchy; keep facts and provenance separate from exploration. */
body {
  background: radial-gradient(ellipse at 85% 12%, #e2e6d7 0, transparent 40%),
    linear-gradient(160deg, #f3eddd, #f6f1e6 55%, #eae4d4);
}
.paper-noise { opacity: .07; }
.site-header { border-radius: 18px; background: #213c36f5; }
.brand-title { font-size: 18px; }
.breadcrumb { flex-wrap: nowrap; overflow: hidden; }
.crumb-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-link, .crumb-separator { flex-shrink: 0; }
.hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; min-height: 660px; padding: 56px; border-radius: 26px; }
.hero h1 { max-width: 10em; font-size: clamp(40px, 4.1vw, 60px); line-height: 1.3; text-wrap: balance; }
.hero-subtitle { max-width: 28em; font-size: 18px; line-height: 1.9; margin-top: 24px; }
.hero .eyebrow { font-size: 11px; line-height: 1.8; letter-spacing: .15em; }
.hero .primary-link { min-height: 50px; min-width: 156px; font-size: 16px; }
.hero-stats { margin-top: 48px; padding-top: 26px; border-top: 1px solid #eee1c238; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.hero .stat-card { padding: 0; border: 0; border-radius: 0; background: none; }
.hero .stat-value { font-size: 36px; }
.hero .stat-label { margin-top: 8px; }
.hero-aside { display: flex; align-items: center; }
.hero .discovery-entry { width: 100%; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 28px; gap: 18px; border: 0; border-radius: 22px; }
.hero .discovery-illustration { aspect-ratio: 16/9; max-height: 260px; object-fit: contain; }
.discovery-copy h2 { font-size: 28px; margin: 8px 0 22px; }
.discovery-actions { gap: 8px; }
.discovery-actions .explore-button { padding: 10px 12px; font-size: 14px; }
.discovery-actions .explore-button:first-child { background: var(--green-deep); border-color: var(--green-deep); color: var(--paper); }
.discovery-copy small { margin-top: 16px; line-height: 1.7; }
.stage-shell { border-radius: 22px; box-shadow: 0 12px 36px #283b3010; }
.page-head h2 { font-size: clamp(28px, 2.8vw, 38px); line-height: 1.3; }
.page-head .section-note { margin-bottom: 0; font-size: 15px; }
.map-controls { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 24px 0 20px; }
.map-controls .map-browse-row, .map-controls .search-row { margin: 0; }
.map-controls .search-row { flex: 0 1 380px; }
.map-controls .search-box { width: 100%; }
.map-controls .map-browse-toggle { padding: 5px; }
.project-grid { gap: 20px; }
.explore-project-card { padding: 24px; border-radius: 16px; box-shadow: none; }
.explore-project-card .card-title { font-size: 23px; line-height: 1.5; }
.card-summary { margin: 12px 0 22px; font-size: 14px; line-height: 1.85; }
.card-meta { font-size: 12px; line-height: 1.7; }
.detail-shell { max-width: 1180px; padding: 36px 44px; }
.detail-shell .detail-panel { display: block; padding: 0; background: none; border: 0; box-shadow: none; }
.explore-detail-top { grid-template-columns: minmax(0, 1fr) 240px; align-items: center; gap: 40px; }
.detail-heading-copy { min-width: 0; }
.detail-title { margin-top: 18px; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.45; text-wrap: pretty; }
.detail-subtitle { font-size: 13px; line-height: 1.7; margin: 12px 0 0; }
.explore-one-line { font-size: 17px; line-height: 1.9; margin: 20px 0; }
.explore-key-facts { grid-template-columns: minmax(0, 1fr); gap: 20px; border: 0; border-left: 1px solid var(--line); margin: 0; padding: 4px 0 4px 28px; }
.explore-key-facts small { font-size: 12px; margin-bottom: 5px; }
.explore-key-facts strong { font-size: 18px; }
.project-section-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 30px 0 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.project-section-nav .detail-anchor-button { border: 0; border-radius: 8px; background: #e5e9dc; font-size: 14px; padding: 12px 18px; }
.project-section-nav .detail-anchor-button:hover { background: #d7e1cd; box-shadow: none; }
.detail-panel > section, .detail-panel > details { scroll-margin-top: 112px; }
.detail-panel .practice-experience { margin-top: 0; }
.detail-panel .detail-experience { margin-top: 0; }
.explore-reading { margin-top: 36px; }
.explore-reading > h3, .related-section > h3 { margin: 0 0 22px; font-size: 26px; }
.detail-panel .detail-accordion { border: 0; border-bottom: 1px solid #ccb89099; border-radius: 0; box-shadow: none; background: transparent; }
.detail-panel .detail-accordion-summary { min-height: 66px; padding: 18px 0; gap: 16px; }
.detail-panel .detail-accordion-title { font-size: 18px; }
.detail-panel .detail-accordion-body { padding: 0 0 24px; line-height: 1.95; }
.detail-accordion-body > p { max-width: 52em; font-size: 15px; margin: 8px 0 18px; }
.detail-panel .detail-section-english { margin-top: 16px; }
.registration-section { margin-top: 32px; padding-top: 10px; }
.registration-warning { font-size: 12px; color: #8c572f; margin-left: auto; }
.registration-grid { gap: 24px 36px; padding: 8px 0 16px; }
.project-source-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 24px; font-size: 12px; color: var(--muted); }
.project-source-link { display: inline-flex; align-items: center; gap: 8px; color: var(--green-deep); font-size: 14px; text-underline-offset: 5px; min-height: 44px; }
.related-section { margin-top: 36px; }
.related-section .card-title { font-size: 20px; }
.related-grid { gap: 16px; }
.related-grid .card-summary { -webkit-line-clamp: 2; }
.detail-panel .related-grid { margin-bottom: 8px; }
.footprint-progress-section { margin: 20px 0 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.footprint-progress-section > summary { padding: 20px 0; cursor: pointer; font: 600 22px var(--serif); }
.pilot-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pilot-progress > div { grid-template-columns: minmax(0, 1fr) 42px auto; gap: 12px; }
.pilot-progress > div > span { grid-column: 1 / -1; line-height: 1.7; }
@media (min-width: 1001px) {
  :root { --map-stage-h: clamp(460px, calc(100dvh - 290px), 640px); }
  .map-shell { padding: 26px; }
  .map-shell .map-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; }
}
@media (max-width: 1100px) {
  .hero { gap: 30px; padding: 36px; min-height: 580px; }
  .hero h1 { font-size: 40px; }
  .hero .discovery-entry { padding: 22px; }
  .detail-shell { padding: 30px; }
  .explore-detail-top { grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: auto; padding: 26px 22px; gap: 32px; }
  .hero h1 { font-size: 38px; }
  .hero-stats { margin-top: 28px; }
  .map-controls { align-items: stretch; flex-direction: column; gap: 14px; }
  .map-controls .search-row { flex: auto; }
  .detail-shell { padding: 24px 18px; }
  .explore-detail-top { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .explore-key-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; border-top: 1px solid var(--line); padding: 20px 0 0; gap: 10px; }
  .explore-key-facts strong { font-size: 16px; }
  .detail-title { font-size: 28px; }
  .project-section-nav .detail-anchor-button { padding: 10px 12px; font-size: 13px; }
  .project-source-footer { flex-wrap: wrap; gap: 4px; }
  .pilot-progress { grid-template-columns: minmax(0, 1fr); }
}
