/* A focused workbench within the shared LAAGAM editorial system. */
.demo-intro { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 50px; padding-block: 46px 38px; }
.demo-intro h1 { font-size: 40px; }
.demo-intro .eyebrow { margin-bottom: 16px; }
.demo-intro > p { font-size: 16px; max-width: 480px; line-height: 1.6; }
.demo-section { padding-top: 0; }
.demo { border: 0; background: #fff; }
.demo-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.demo .text-button { display: inline-flex; align-items: center; gap: 8px; }
.demo .button .demo-icon, .search-input button .demo-icon { filter: invert(1); }
.demo-search .search-input button { display: grid; place-items: center; }
.demo-search { max-width: none; padding: 28px 32px 18px; background: #eff2f2; }
.demo-search label { font: 24px/1.3 var(--display); margin-bottom: 16px; }
.demo-search .search-input { max-width: 840px; border-color: #7b8584; }
.demo-search input { padding: 16px 20px; font-size: 16px; min-height: 56px; }
.demo-search button { flex: 0 0 60px; }
.demo-search button:disabled { opacity: .5; cursor: wait; }
.demo-search > p { font-size: 13px; margin-top: 12px; line-height: 1.5; }
.demo-prompts { display: flex; flex-wrap: wrap; gap: 0 26px; padding: 0 32px 22px; background: #eff2f2; }
.demo-prompts button { border: 0; border-bottom: 1px solid #9ca6a3; background: none; padding: 10px 0; font-size: 14px; text-align: left; min-height: 44px; }
.demo-prompts button { display: inline-flex; align-items: center; gap: 8px; }
.demo-prompts button span { margin-left: 8px; }
.demo-prompts button:hover { border-color: #111; }
.demo-system-outline { display: flex; flex-wrap: wrap; list-style: none; gap: 10px 28px; padding: 22px 0; margin: 0; border-bottom: 1px solid var(--line); }
.demo-system-outline li { font-size: 15px; color: #48534d; }
.demo-system-outline li:not(:last-child)::after { content: '\2192'; margin-left: 28px; color: #68776f; }
.demo-toolbar { padding: 28px 0 24px; margin-top: 12px; gap: 20px 32px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.demo-toolbar #demo-heading { font: 30px/1.2 var(--display); text-wrap: initial; scroll-margin-top: 24px; }
.demo-toolbar #demo-heading:focus { outline: none; }
.demo-toolbar #demo-back { flex-basis: 100%; text-align: left; font-size: 15px; }
.demo-toolbar .sample-label { margin-left: auto; width: auto; font-size: 13px; }
.demo[data-view="tool"] .demo-toolbar { position: sticky; top: 0; z-index: 5; padding-block: 16px; gap: 12px 24px; margin-top: 24px; scroll-margin-top: 0; }
.demo[data-view="tool"] #demo-back { flex-basis: auto; }
.demo[data-view="tool"] #demo-heading { font-size: 26px; margin-right: auto; }
.demo[data-view="tool"] .demo-toolbar .sample-label { flex-basis: 100%; margin: 0; }
#demo-ask { min-height: 44px; font-size: 15px; }
.demo-catalog-tools { display: flex; gap: 24px; justify-content: space-between; align-items: baseline; padding-block: 14px 8px; }
#demo-filters { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.demo-filter { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 0; color: #535858; min-height: 44px; font-size: 15px; }
.demo-filter[aria-pressed="true"] { color: #171a18; border-color: #171a18; }
.demo-filter:hover { color: #111; }
#demo-reset { white-space: nowrap; min-height: 44px; }
.demo-notice { padding: 0; font-size: 15px; }
.demo-notice:not(:empty) { padding: 22px 0 18px; }
.demo-question { font-size: 20px; color: #252a28; line-height: 1.5; overflow-wrap: anywhere; margin-bottom: 8px; }
#demo-retry { margin: 12px 0 24px; }
.demo-choices { padding: 22px 0 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 40px; }
.demo-choice { border: 0; border-top: 1px solid #929c98; padding: 22px 12px 16px 0; min-height: 212px; gap: 12px; background: #fff; }
.demo-choice:after { content: none; }
.demo-choice:hover { background: #f4f6f5; border-color: #171a18; }
.demo-choice small { font-size: 13px; }
.demo-choice strong { font: 26px/1.2 var(--display); padding: 0; }
.demo-choice > span { font-size: 16px; line-height: 1.5; max-width: 500px; }
.demo-choice .demo-choice-action { display: flex; justify-content: space-between; width: 100%; margin-top: auto; padding-top: 10px; color: #171a18; font-size: 14px; }
.demo-choice-action .demo-tool-name { font-size: 14px; color: #535e57; }
.journey-question { padding: 28px 0 24px; }
.journey-question .eyebrow { font-size: 13px; margin-bottom: 10px; color: #59615d; }
.journey-question h3 { font-size: 28px; line-height: 1.35; max-width: 900px; text-wrap: initial; overflow-wrap: anywhere; }
.journey-question > p { font-size: 14px; margin-top: 12px; }
.demo-tool-intro { padding-block: 28px; }
.demo-tool-intro .demo-question { padding-left: 18px; border-left: 2px solid #82968d; margin-bottom: 24px; font-size: 16px; }
.demo-purpose { font-size: 18px; line-height: 1.6; max-width: 850px; color: #343b37; }
.demo-contract { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin: 24px 0 0; }
.demo-contract > div, .record-detail dl > div { padding: 0; margin: 0; border: 0; }
.demo-contract dt, .record-detail dt { font-size: 13px; color: #59615d; margin-bottom: 8px; }
.demo-contract dd, .record-detail dd { margin: 0; font-size: 16px; line-height: 1.55; max-width: 520px; }
.run-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.run-controls .button { min-width: 174px; }
.run-status { font-size: 14px; margin: 0; min-height: 24px; }
.run-progress { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 20px; margin: 26px 0 0; }
.run-progress li { display: block; padding: 0; border-top: 2px solid #c6cdca; border-bottom: 0; color: #59615d; }
.run-progress button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 12px 8px; text-align: left; border: 0; background: none; font-size: 16px; color: inherit; }
.run-progress button:hover { background: #f3f5f4; }
.run-progress li:before, .run-progress li.done:before, .run-progress li.current:before { content: none; }
.run-progress .step-number { flex: 0 0 24px; font-size: 14px; }
.run-progress li.done { border-top-color: #456451; color: #35523f; }
.run-progress li.current { border-top-color: #171a18; color: #171a18; background: #eff2ef; }
.stage-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
#stage-position { font-size: 14px; color: #59615d; }
.stage-controls > div { display: flex; gap: 8px; }
.stage-controls button { display: grid; place-items: center; width: 44px; height: 44px; background: white; border: 1px solid #b5beb8; }
.stage-controls button:hover:not(:disabled) { background: #eff2ef; }
.stage-controls button:disabled { opacity: .35; cursor: default; }
.journey-panel { padding-block: 28px; min-height: 340px; }
.journey-panel > .eyebrow { font-size: 13px; margin-bottom: 14px; color: #59615d; }
.journey-panel > h3 { font-size: 28px; line-height: 1.3; margin-bottom: 20px; text-wrap: initial; }
.journey-panel > p { font-size: 17px; line-height: 1.6; max-width: 900px; }
.context-evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-block: 28px; }
.context-evidence article { border-left: 2px solid #98a99f; padding-left: 22px; }
.context-evidence article > span { font-size: 13px; color: #59615d; }
.context-evidence h4 { font: 400 22px/1.3 var(--display); margin: 12px 0; }
.context-evidence p { font-size: 16px; line-height: 1.6; max-width: 480px; }
.journey-panel .journey-footnote { font-size: 15px; line-height: 1.6; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.agent-handoff { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 28px; padding-block: 20px; font-size: 16px; }
.agent-handoff strong { font-weight: 400; color: #253e31; }
.source-checks { list-style: decimal-leading-zero; padding-left: 32px; margin: 24px 0; }
.source-checks li { padding: 10px 0 10px 8px; font-size: 16px; line-height: 1.55; }
.source-checks li::marker { color: #59615d; font-size: 14px; }
.journey-receipt { margin-top: 28px; border-block: 1px solid var(--line); padding: 18px 0; }
.journey-receipt summary { font-size: 16px; cursor: pointer; }
.journey-receipt dl { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 36px; margin-block: 24px; }
.journey-receipt dt { color: #59615d; font-size: 13px; margin-bottom: 6px; }
.journey-receipt dd { font-size: 16px; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.journey-receipt > p { font-size: 14px; }
.example-records { display: grid; grid-template-columns: minmax(220px, .65fr) 1.35fr; border-block: 1px solid #bac4bf; }
.record-list { border-right: 1px solid #bac4bf; padding: 16px 0; }
.record-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 60px; text-align: left; gap: 16px; border: 0; border-left: 3px solid transparent; background: white; padding: 16px 22px; font-size: 16px; }
.record-list button[aria-pressed="true"] { background: #e9f0ed; border-left-color: #456451; }
.record-list button:hover { background: #f1f4f3; }
.record-detail { padding: 28px 36px; min-width: 0; min-height: 290px; }
.record-detail .eyebrow { font-size: 12px; margin-bottom: 14px; color: #535e57; }
.record-detail h3 { font-size: 26px; }
.record-detail dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin: 26px 0 0; }
.run-outcome { margin: 28px 0 0; padding: 0; border: 0; max-width: 860px; }
.run-outcome h3, .demo-boundary h3 { font-size: 21px; margin-bottom: 10px; }
.run-outcome p, .demo-boundary p { font-size: 16px; line-height: 1.65; }
.demo-boundary { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 860px; }
.run-actions { justify-content: space-between; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.run-actions .text-button { font-size: 15px; min-height: 44px; }

@media(max-width:800px) {
  .demo-intro { grid-template-columns: 1fr; gap: 20px; padding-block: 32px; }
  .demo-intro h1 { font-size: 34px; }
  .demo-intro .eyebrow { margin-bottom: 12px; }
  .demo-search { padding: 24px 20px 16px; }
  .demo-prompts { padding-inline: 20px; gap: 0 20px; }
  .demo-toolbar { padding-block: 24px; }
  .demo-toolbar #demo-heading { font-size: 27px; }
  .demo-toolbar .sample-label { margin-left: 0; flex-basis: 100%; }
  .demo[data-view="tool"] #demo-heading { flex-basis: 100%; order: 2; }
  .demo[data-view="tool"] #demo-ask { margin-left: auto; }
  .demo[data-view="tool"] .demo-toolbar .sample-label { order: 3; }
  .demo-catalog-tools { flex-wrap: wrap; gap: 8px; }
  .demo-choices { gap: 24px; }
  .demo-choice strong { font-size: 23px; }
  .demo-contract { gap: 24px; }
  .run-progress { gap: 16px; }
  .run-progress button { flex-direction: column; align-items: start; gap: 4px; font-size: 15px; }
  .run-progress .step-number { flex-basis: auto; }
  .context-evidence { gap: 24px; }
  .example-records { grid-template-columns: 1fr; }
  .record-list { display: flex; flex-wrap: wrap; gap: 4px; border-right: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .record-list button { width: auto; flex: 1 1 160px; font-size: 15px; padding: 12px 16px; min-height: 48px; }
  .record-detail { padding: 24px 20px; min-height: 280px; }
}
@media(max-width:540px) {
  .demo-search { padding-inline: 16px; }
  .demo-search label { font-size: 22px; }
  .demo-search input { font-size: 16px; padding: 14px 12px; }
  .demo-search button { flex-basis: 48px; }
  .demo-search > p { font-size: 13px; }
  .demo[data-view="tool"] .demo-toolbar { gap: 8px 16px; padding-block: 10px 14px; }
  .demo[data-view="tool"] #demo-heading { font-size: 24px; }
  .demo[data-view="tool"] #demo-back, #demo-ask { font-size: 14px; }
  .demo-prompts { padding-inline: 16px; display: grid; justify-items: start; }
  .demo-prompts button { font-size: 14px; }
  .demo-choices { grid-template-columns: 1fr; gap: 18px; }
  .demo-choice { min-height: 190px; }
  #demo-filters { gap: 2px 20px; }
  .demo-contract { grid-template-columns: 1fr; gap: 20px; }
  .demo-purpose { font-size: 17px; }
  .run-controls { gap: 14px; }
  .run-status { flex-basis: 100%; }
  .demo-system-outline { gap: 10px 18px; }
  .demo-system-outline li:not(:last-child)::after { margin-left: 18px; }
  .run-progress { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(84px,1fr); gap: 8px; margin-top: 20px; overflow-x: auto; }
  .run-progress button { font-size: 14px; padding: 10px 6px; min-height: 70px; }
  .run-progress .step-number { font-size: 13px; }
  .journey-question h3 { font-size: 24px; }
  .journey-panel { padding-block: 24px; min-height: 340px; }
  .journey-panel > h3 { font-size: 25px; }
  .context-evidence, .journey-receipt dl { grid-template-columns: 1fr; }
  .context-evidence article { padding-left: 16px; }
  .agent-handoff { gap: 14px; }
  .record-list { display: grid; grid-template-columns: 1fr; }
  .record-list button { width: 100%; }
  .record-detail { padding-inline: 12px; }
  .record-detail dl { grid-template-columns: 1fr; gap: 20px; }
  .record-detail h3 { font-size: 24px; }
  .run-actions { gap: 16px; }
}
