.demo-page *, .demo-page *::before, .demo-page *::after { box-sizing: border-box; }
.demo-page :is(a,button,input,summary):focus-visible { outline: 3px solid #174e44; outline-offset: 4px; }
.demo-strip { border-bottom: 1px solid #d8d0c3; background: #ece8de; }
.demo-strip>div { max-width: 76rem; padding: .85rem clamp(1rem,4vw,3rem); margin: auto; display: flex; gap: 1rem 2rem; justify-content: space-between; align-items: center; font-size: .8rem; }
.demo-strip>div>span { color: #174e44; font-weight: 700; white-space: nowrap; }
.demo-strip nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.demo-strip a { color: #4f4a43; text-underline-offset: .25em; padding-block: .25rem; }
.demo-strip a[aria-current] { color: #174e44; font-weight: 750; text-decoration-thickness: 2px; }
body.demo-page article.demo-result { max-width: 76rem; }
.demo-session-heading { padding-block: 2.4rem 1.7rem; border-bottom: 1px solid #d8d0c3; }
.demo-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
.demo-page h1,.demo-page h2 { font-family: var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.demo-title-row h1 { font-size: clamp(1.8rem,3.5vw,2.65rem); line-height: 1.15; margin: 0; }
.demo-theme { color: #625e57; font-size: .78rem; background: #ebe5d9; padding: .45rem .7rem; border-radius: .25rem; }
.demo-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 2.5rem; margin-top: 1.7rem; color: #4f4a43; font-size: .95rem; }
.demo-meta>span { border-bottom: 2px solid #174e44; padding-block: .4rem; }
.demo-button { display: inline-flex; justify-content: center; align-items: center; gap: .6rem; background: #fffdf8; color: #174e44; border: 1px solid #d8d0c3; border-radius: var(--control-radius); padding: .425rem .8rem; min-height: 44px; font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.4; text-decoration: none; cursor: pointer; }
.demo-button:hover { border-color: #174e44; }
.demo-caption { font-size: .8rem; color: #625e57; line-height: 1.6; margin-bottom: 0; }
.demo-quadrants { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 2rem; }
.demo-corner { min-width: 0; padding: clamp(1.2rem,3vw,2rem); border-bottom: 1px solid #b7c1b5; }
.demo-corner:nth-child(odd) { border-right: 1px solid #b7c1b5; }
.demo-corner:nth-child(n+3) { border-bottom: 0; }
.demo-corner h2 { font-size: clamp(1.8rem,3vw,2.4rem); color: #174e44; margin: 0 0 1.5rem; font-weight: 500; }
.demo-corner h3 { font-size: .9rem; color: #625e57; line-height: 1.5; margin: 0 0 1rem; font-weight: 600; }
.corner-selection { min-height: 9rem; }
.demo-pills { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.demo-pills li { max-width: 100%; }
.demo-page article .demo-pills :is(a,span) { display: block; background: #174e44; color: #fffdf8; border-radius: 2rem; padding: .48rem .8rem; font-size: .82rem; text-decoration: none; line-height: 1.3; }
.demo-pills a:hover { background: #103d35; }
.corner-counts { padding-top: 1.2rem; }
.demo-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.demo-page article .demo-bars a { display: grid; grid-template-columns: 1fr auto; gap: .35rem; color: #22201d; text-decoration: none; font-size: .84rem; }
.demo-bars a>span:nth-child(2) { color: #625e57; font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1/-1; background: #e4dfd4; height: 6px; border-radius: 10px; overflow: hidden; }
.bar-track>span { height: 100%; display: block; background: #174e44; border-radius: inherit; }
.demo-bars a:hover>span:first-child { text-decoration: underline; }
.demo-empty,.demo-count-note { color: #625e57; font-size: .87rem; line-height: 1.6; }
.demo-count-note { padding-inline: clamp(1.2rem,3vw,2rem); }
.demo-reading,.demo-feedback,.demo-end { margin-top: 3rem; border-top: 1px solid #d8d0c3; padding-top: 2rem; }
.demo-page h2 { font-size: clamp(1.4rem,3vw,1.9rem); font-weight: 500; }
.demo-reading>div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.demo-reading section { padding: 1.3rem; background: #fffdf8; border: 1px solid #e4dfd4; border-radius: .3rem; }
.demo-reading h3 { color: #174e44; font-size: 1rem; margin: 0; }
.demo-reading p { color: #4f4a43; font-size: .93rem; line-height: 1.7; margin-bottom: 0; }
.demo-feedback-controls { display: flex; align-items: end; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem; }
.demo-search { width: min(100%,25rem); max-width: 100%; }
.demo-search label { display: block; font-size: .8rem; margin-bottom: .5rem; font-weight: 600; }
.demo-search>div { display: flex; gap: .5rem; }
.demo-search input[type=search] { flex: 1; width: 0; min-width: 0; background: #fffdf8; border: 1px solid #827b70; border-radius: .3rem; padding: .7rem; font: inherit; font-size: .9rem; }
.demo-search button { flex-shrink: 0; white-space: nowrap; }
.demo-sort { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .8rem; }
.demo-sort [aria-current] { background: #174e44; color: #fffdf8 !important; border-color: #174e44; }
.demo-feedback-status { font-size: .85rem; color: #625e57; margin-block: 1.5rem 1rem; }
.demo-response-list { border: 1px solid #d8d0c3; border-radius: .4rem; overflow: hidden; background: #fffdf8; }
.demo-response + .demo-response { border-top: 1px solid #d8d0c3; }
.demo-response summary { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; cursor: pointer; list-style: none; }
.demo-response summary::-webkit-details-marker { display: none; }
.response-number { display: grid; place-items: center; border-radius: 50%; width: 2rem; height: 2rem; flex-shrink: 0; background: #ede8dd; color: #625e57; font-size: .8rem; }
.response-identity { display: grid; gap: .3rem; }
.response-identity strong { font-size: .95rem; font-weight: 650; }
.response-identity>span { font-size: .8rem; color: #625e57; }
.response-toggle { margin-left: auto; padding: .425rem .8rem; border: 1px solid #d8d0c3; border-radius: var(--control-radius); color: #174e44; font-size: .875rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.open-label { display: none; }
[open]>.response-toggle .closed-label,.demo-response[open] .closed-label { display: none; }
.demo-response[open] .open-label { display: inline; }
.response-detail { padding: 1.5rem; background: #f0ece3; border-top: 1px solid #d8d0c3; }
.response-detail h3 { font-size: .85rem; color: #625e57; margin: 0 0 .8rem; }
.response-detail h3:not(:first-child) { margin-top: 1.5rem; }
.response-comment { padding: 1rem; background: #fffdf8; border: 1px solid #e4dfd4; border-radius: .3rem; line-height: 1.7; font-size: .95rem; white-space: pre-line; margin: 0; }
.demo-no-results { padding: 2rem; }
.demo-end { text-align: center; padding-bottom: 1rem; }
.demo-end h2 { max-width: 36rem; margin: 0 auto 1.5rem; }
.demo-page .topic-cta-action { background: #174e44; color: #fffdf8; font-size: 1rem; }
@media(max-width:48rem) { .demo-strip>div { align-items: start; flex-direction: column; gap: .7rem; } .demo-quadrants { grid-template-columns: 1fr; } .demo-corner:nth-child(odd) { border-right: 0; } .demo-corner:nth-child(3) { border-bottom: 1px solid #b7c1b5; } .corner-selection { min-height: 0; } .demo-reading>div { grid-template-columns: 1fr; } .demo-response summary { flex-wrap: wrap; gap: .6rem; padding: 1rem; } .response-identity { flex: 1; } .response-toggle { margin-left: 2.6rem; } .demo-meta { gap: 1rem; } }
@media(max-width:48rem) { .demo-response summary { display: grid; grid-template-columns: 2rem minmax(0,1fr); align-items: start; } .response-toggle { grid-column: 2; margin-left: 0; justify-self: start; } }

/* The gallery and introductions share the public typography and action roles. */
body.demo-page:not(.demo-results-page) {
  background:#f6f2eb;
  .ontology-session-action { border-radius:999px; font-weight:600; }
  article h1 { font-size:clamp(2rem,3.5vw,2.65rem); line-height:1.15; text-wrap:pretty; }
  :where(article) h2 { color:#174e44; line-height:1.25; }
  main .topic-cta-action { display:inline-flex; align-items:center; justify-content:center; min-height:44px; font-weight:600; line-height:1.4; text-align:center; white-space:normal; }
  .demo-strip { background:#f0ece3; }
  .demo-strip>div { padding-block:.35rem; }
  .demo-strip nav { gap:0 1.15rem; }
  .demo-strip a { display:inline-flex; align-items:center; min-height:44px; }
}
.demo-index .topic-masthead { margin-bottom:1rem; padding-block:clamp(1.5rem,4vw,2.5rem) 1.25rem; }
.demo-index .topic-masthead h1 { margin-bottom:0; }
.demo-index .topic-masthead p { max-width:65ch; margin-top:1rem; font-size:1rem; line-height:1.7; }
.demo-cards,.demo-preview-map { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.demo-cards { gap:1rem; margin-top:1.5rem; }
.demo-index .demo-card { display:flex; flex-direction:column; min-width:0; padding:clamp(1rem,3vw,1.65rem); border:1px solid #d8d0c3; border-radius:var(--card-radius); background:#fffdf8; text-decoration:none; }
.demo-index .demo-card:hover { border-color:#174e44; }
.demo-index .demo-featured { grid-column:1/-1; }
.demo-card h2 { margin:0 0 .75rem; text-wrap:pretty; }
.demo-card p { color:#4f4a43; line-height:1.7; margin:0 0 1rem; max-width:65ch; }
.demo-card-action { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.6rem 1rem; margin-top:auto; padding-top:.5rem; }
.demo-card-action>span,.demo-preview-map dd>span { font-size:.85rem; color:#625e57; }
.demo-card:hover .demo-card-action strong { border-color:#174e44; }
.demo-card .demo-preview-label { font-size:.875rem; font-weight:600; margin-block:.25rem .75rem; }
.demo-preview-map { gap:.5rem; margin:0 0 1.25rem; }
.demo-preview-map>div { min-width:0; padding:clamp(.65rem,2vw,1rem); border:1px solid #d8d0c3; border-radius:.45rem; background:#fffdf8; }
.demo-preview-map dt { color:#174e44; font:500 1.2rem/1.25 var(--font-display); margin-bottom:.5rem; }
.demo-preview-map dd { margin:0; }
.demo-preview-map strong { display:inline-block; max-width:100%; padding:.35rem .6rem; border-radius:999px; background:#174e44; color:#fffdf8; font-size:.82rem; font-weight:600; overflow-wrap:anywhere; }
.demo-preview-map dd>span { display:block; margin-top:.35rem; }
.demo-index .demo-end { background:#174e44; color:#fffdf8; border:0; border-radius:.75rem; text-align:left; padding:clamp(1.5rem,5vw,3rem); }
.demo-index article .demo-end h2 { color:inherit; margin:0; }
.demo-index .demo-end p { margin:.75rem 0 1rem; line-height:1.7; }
.demo-index .demo-end .topic-cta-action { background:#fffdf8; color:#174e44; }
.demo-index .demo-end .topic-cta-action:hover { background:#eef4f0; }
.demo-index .demo-end .topic-cta-action:focus-visible { outline-color:#fffdf8; }
body.demo-page article.demo-introduction { max-width:60rem; padding-top:clamp(1rem,3vw,1.75rem); }
.intro-back { margin-bottom:1rem; }
.intro-card { padding:clamp(1rem,4vw,2.25rem); border:1px solid #d8d0c3; border-radius:var(--card-radius); background:#fffdf8; }
.intro-card h1 { margin:0 0 .75rem; }
.intro-card img { display:block; width:100%; height:auto; margin-top:1.25rem; border-radius:.45rem; }
.intro-message { max-width:65ch; white-space:pre-line; line-height:1.7; margin-block:1.5rem; }
.demo-context { border-top:1px solid #d8d0c3; padding-top:1.25rem; }
.demo-context h2 { margin:0 0 .5rem; }
.intro-card .demo-caption { margin:0; }
.demo-context ul { padding-left:1.2rem; line-height:1.7; }
.intro-actions { display:flex; flex-wrap:wrap; gap:.75rem; margin-top:1.5rem; }
.demo-sort .demo-button { font-size:.875rem; }
.intro-actions .topic-cta-action:hover { background:#103d35; }
@media(max-width:48rem) {
  .demo-page:not(.demo-results-page) .demo-strip>div { gap:.2rem; padding-block:.6rem .3rem; }
}
@media(max-width:35rem) {
  .demo-cards { grid-template-columns:minmax(0,1fr); }
  .intro-actions>* { width:100%; text-align:center; }
}
