/* Containers Hamlet Design Lab. Code licence: AGPL-3.0-or-later. */
.slideshow { margin: 2rem 0; border: 1px solid var(--border); border-radius: 0.9rem; background: var(--surface); box-shadow: 0 8px 24px rgba(28, 48, 38, 0.06); padding: 1rem; }
.slide-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.slide-head h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
.slide-status { margin: 0; color: var(--muted); font-weight: 600; }
.slide-controls { display: none; flex-wrap: wrap; gap: .5rem; }
.js .slide-controls { display: flex; }
.slide-controls button { min-height: 44px; }
.slide-viewport { margin-top: 1rem; outline-offset: 4px; }
.slide-viewport:focus-visible { outline: 3px solid var(--focus); }
.slide { margin: 0; border: 1px solid var(--border); border-radius: .6rem; overflow: hidden; background: var(--surface); }
.slide img { display: block; width: 100%; height: auto; }
.slide figcaption { margin: 0; padding: .85rem 1rem; font-size: .9rem; line-height: 1.45; background: var(--surface); color: var(--text); }
.slide figcaption strong { display: inline-block; margin-right: .25rem; }
.js .slide-viewport .slide:not(.is-current) { display: none; }
.js .slideshow.is-showing-all .slide-viewport .slide { display: block; margin-bottom: 1rem; }
.js .slideshow.is-showing-all .slide-controls [data-slide-prev],
.js .slideshow.is-showing-all .slide-controls [data-slide-next] { display: none; }
.slide-help { margin: .9rem 0 0; color: var(--muted); font-size: .88rem; }
.badge.illustrative, .badge.geometry { display: inline-block; margin-bottom: .25rem; }
.badge.illustrative { background: #f0e2c8; color: #5f4418; }
.badge.geometry { background: #d7e8d1; color: #254a2c; }
.architecture-facts { margin: 2rem 0; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.fact-grid div { border: 1px solid var(--border); border-radius: .5rem; padding: .7rem .8rem; background: var(--surface); }
.fact-grid dt { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fact-grid dd { margin: .25rem 0 0; }
.architecture-facts .button-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.architecture-facts .button-row .action { min-height: 44px; }
@media (max-width: 600px) {
  .slideshow { padding: .7rem; }
  .slide figcaption { padding: .7rem; }
}
@media (prefers-color-scheme: dark) {
  .slide { background: #121713; }
  .badge.illustrative { background: #4a3a1d; color: #ffe4ad; }
  .badge.geometry { background: #24452b; color: #c9f2cf; }
}
@media (forced-colors: active) {
  .slide, .fact-grid div { border: 1px solid CanvasText; }
  .slide img { forced-color-adjust: none; }
}

/* Seasonal comparison, envelope and vegetation systems */
.season-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.season-pair figure { margin: 0; border: 1px solid var(--border); border-radius: .6rem; overflow: hidden; background: var(--surface); }
.season-pair img { display: block; width: 100%; height: auto; }
.season-pair figcaption { padding: .7rem .8rem; font-size: .88rem; }
.seasonal-section, .assembly-section, .solar-section, .foundation-section, .vegetation-section { margin: 2rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: .9rem; background: var(--surface); }
.exposure-table { width: 100%; border-collapse: collapse; margin: .7rem 0; }
.exposure-table caption { text-align: left; font-weight: 700; padding: .4rem 0; }
.exposure-table th, .exposure-table td { text-align: left; padding: .4rem .5rem; border-top: 1px solid var(--border); }
.assembly-section img, .solar-section img, .foundation-section img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: .5rem; background: var(--paper); margin: .7rem 0; }
.assembly-layers { padding-left: 1.2rem; }
.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.system-card { border: 1px solid var(--border); border-radius: .8rem; padding: 1rem; background: var(--surface); }
.system-card h3 { margin-top: 0; }
.system-card h4 { margin: .8rem 0 .25rem; font-size: .95rem; }
.system-card ul { padding-left: 1.15rem; }
.system-figure { margin: 1rem 0; border: 1px solid var(--border); border-radius: .8rem; overflow: hidden; background: var(--surface); }
.system-figure img { display: block; width: 100%; height: auto; }
.system-figure figcaption { padding: .7rem 1rem; font-size: .88rem; }
.source-list li { margin-bottom: .5rem; }
@media (max-width: 700px) {
  .season-pair, .system-grid { grid-template-columns: 1fr; }
  .seasonal-section, .assembly-section, .solar-section, .foundation-section, .vegetation-section { padding: .8rem; }
}
@media (prefers-color-scheme: dark) {
  .assembly-section img, .solar-section img, .foundation-section img { background: #121713; }
}
@media (forced-colors: active) {
  .season-pair figure, .seasonal-section, .assembly-section, .vegetation-section, .system-card, .system-figure { border: 1px solid CanvasText; }
  .season-pair img, .system-figure img { forced-color-adjust: none; }
}

/* Long review and exposure tables must reflow rather than force the page wide. */
.exposure-table { table-layout: fixed; width: 100%; }
.exposure-table th, .exposure-table td { overflow-wrap: anywhere; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.fact-grid dd, .assembly-layers li, .season-pair figcaption { overflow-wrap: anywhere; }
.pattern-lens .lens-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 1fr); gap: 1rem; margin: 1rem 0; }
.pattern-lens .lens-plan { border: 1px solid var(--border); border-radius: .6rem; padding: .5rem; background: var(--paper); min-width: 0; }
.pattern-lens .lens-plan object { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 820; border: 0; }
.pattern-lens .lens-panel { min-width: 0; }
.lens-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.lens-button { min-height: 2.2rem; }
.lens-status { display: inline-block; margin-left: .4rem; padding: .05rem .35rem; border: 1px solid currentColor; border-radius: .25rem; font-size: .7rem; font-weight: 500; text-transform: none; }
.lens-detail { margin: .5rem 0; padding: .5rem; border: 1px solid var(--border); border-radius: .4rem; }
.lens-detail summary { cursor: pointer; }
@media (max-width: 54rem) { .pattern-lens .lens-layout { grid-template-columns: 1fr; } }
@media (forced-colors: active) { .pattern-lens .lens-plan { border: 1px solid CanvasText; } }
