/* patrickchu.net — AI-Accelerated Research Support · navy/amber brand */
:root {
  --navy: #1F3A5F;
  --navy-soft: #2E4A74;
  --amber: #B8860B;
  --amber-soft: #F5E6C8;
  --grey: #4A4A4A;
  --light: #EEF3F8;
  --alt: #F4F7FA;
  --white: #ffffff;
  --line: #D8E0EA;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  color: #222; line-height: 1.55; background: var(--white);
}
/* R11 (2026-09-13): reserve a bottom gutter so the fixed Assistant button can never
   cover content. Measured at 390px before this: #assistant-fab (113x40, bottom 12px)
   overlapped walkthrough text and the footer mailto CTA (patrick@patrickchu.net) on
   demos.html. The button itself is unchanged — only the space beneath the content is. */
body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 768px) { body { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- header ---------- */
.site-header { background: var(--navy); color: var(--white); }
.site-header .inner {
  max-width: 960px; margin: 0 auto; padding: 14px 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.brand a { color: var(--white); text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.brand small { display: block; font-size: 11px; font-weight: 400; color: #C7D3E3; letter-spacing: .4px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.site-nav a {
  color: var(--white); text-decoration: none; font-size: 13px; padding: 6px 12px;
  border-radius: 4px; border: 1px solid rgba(255,255,255,.25); transition: background .15s;
}
.site-nav a:hover, .site-nav a.active { background: var(--amber); border-color: var(--amber); }
.mail-decode a { color: inherit; text-decoration: none; }

/* ---------- hero ---------- */
.hero { background: var(--navy); color: var(--white); padding: 44px 20px 40px; }
.hero .inner { max-width: 960px; margin: 0 auto; }
.hero h1 { font-size: 30px; line-height: 1.25; font-weight: 800; max-width: 760px; }
.hero p.lead { margin-top: 14px; font-size: 16px; color: #DCE5F0; max-width: 720px; }
.hero p.sub { color: #C7D3E3; }
.hero .cta-row { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-block; background: var(--amber); color: var(--white); text-decoration: none;
  font-weight: 700; font-size: 14px; padding: 11px 22px; border-radius: 5px; transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,.55); }
.hero .sla { font-size: 12.5px; color: #C7D3E3; }

/* ---------- sections ---------- */
main section { padding: 34px 20px; }
main section .inner { max-width: 960px; margin: 0 auto; }
main section:nth-of-type(even) { background: var(--alt); }
h2.sec { font-size: 21px; color: var(--navy); font-weight: 800; margin-bottom: 6px; }
p.sub { color: var(--grey); font-size: 14.5px; margin-bottom: 16px; max-width: 760px; }
.rule { width: 52px; height: 4px; background: var(--amber); border-radius: 2px; margin: 10px 0 18px; }

/* ---------- prose rhythm ---------- */
.prose-flow > p.sub {
  line-height: 1.5;
  margin-block: 0;
}
.prose-flow > p.sub + p.sub {
  margin-block-start: 12px;
}
.prose-flow > :where(ul, ol):not(.steps):not(.examples) {
  margin-block: 8px 12px;
  padding-inline-start: 20px;
  list-style-position: outside;
}
.prose-flow > :where(ul, ol):not(.steps):not(.examples) > li + li {
  margin-block-start: 4px;
}
.prose-flow > :is(h2, h3, h4):not(:first-child) {
  margin-block: 20px 8px;
}
.prose-flow > h2.sec:not(:first-child) {
  margin-bottom: 8px;
}
.prose-flow > :where(ul, ol):not(.steps):not(.examples) + p.sub {
  margin-block-start: 0;
}
.prose-flow > :is(h1, h2, h3) + p.sub { margin-top: 10px; }
.prose-flow > :is(.rule, table, details) + p.sub { margin-top: 12px; }
/* hero-scoped component rules (the hero .inner is component chrome — do NOT add .prose-flow to it) */
.hero .inner > h1 + p.sub { margin-top: 6px; }
.hero .inner > p.lead + p.sub { margin-top: 10px; }
/* third/fourth shared prose-flow rules */
.prose-flow > p.lead + p.sub { margin-top: 10px; }
.prose-flow > div + p.sub { margin-top: 12px; }

#demo-catalogue > .inner.prose-flow > h2.sec:first-child { margin-top: 28px; }

/* ---------- tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0 6px; }
table.data th {
  background: var(--navy); color: var(--white); text-align: left; padding: 9px 12px;
  font-size: 12.5px; letter-spacing: .3px;
}
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:nth-child(even) td { background: var(--alt); }
table.data .ok { color: #1E7B34; font-weight: 700; white-space: nowrap; }

/* ---------- callout ---------- */
.callout {
  background: var(--amber); color: var(--white); border-radius: 6px; padding: 16px 20px;
  font-weight: 700; font-size: 14.5px; margin-top: 22px;
}
.callout .small { display: block; font-weight: 400; font-size: 12.5px; margin-top: 4px; color: #FFF3D6; }

/* ---------- steps (how we work) ---------- */
.steps { list-style: none; margin-top: 8px; }
.steps li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: none; }
.step-no {
  flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--white);
  font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.steps h3 { font-size: 15.5px; color: var(--navy); font-weight: 800; }
.steps .what { font-size: 13.5px; margin-top: 3px; }
.steps .why { font-size: 13px; color: var(--grey); margin-top: 3px; }
.steps .why b { color: var(--amber); }
.steps .why b, .steps .what b { color: var(--navy); }

/* ---------- second-brain examples list ---------- */
ul.examples { list-style: none; margin: 4px 0 14px; padding: 0; }
ul.examples li { padding: 8px 0 8px 22px; position: relative; font-size: 13.5px; color: var(--grey); border-bottom: 1px solid var(--line); }
ul.examples li:last-child { border-bottom: none; }
ul.examples li::before { content: "→"; position: absolute; left: 0; color: var(--amber); font-weight: 700; }
ul.examples li b { color: var(--navy); }

/* ---------- FAQ ---------- */
.faq-group { margin-top: 18px; }
.faq-group h3 { color: var(--navy); font-size: 16px; font-weight: 800; border-left: 4px solid var(--amber); padding-left: 10px; }
details.faq { margin: 10px 0; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
details.faq summary {
  cursor: pointer; padding: 11px 14px; font-weight: 700; font-size: 14px; color: var(--navy);
  list-style: none; position: relative; padding-right: 34px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 18px; font-weight: 800; color: var(--amber);
}
details.faq[open] summary::after { content: "–"; }
details.faq .ans { padding: 0 14px 12px; font-size: 13.5px; color: var(--grey); }
details.faq .ans b.a { color: var(--amber); }

/* ---------- demo-card full walkthrough (expandable) ---------- */
details.demo-detail { margin: 10px 0 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
details.demo-detail summary {
  cursor: pointer; padding: 9px 13px; font-weight: 700; font-size: 13px; color: var(--navy);
  list-style: none; position: relative; padding-right: 32px;
}
details.demo-detail summary::-webkit-details-marker { display: none; }
details.demo-detail summary::after {
  content: "+"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 16px; font-weight: 800; color: var(--amber);
}
details.demo-detail[open] summary::after { content: "–"; }
details.demo-detail .dd-body { padding: 0 13px 12px; font-size: 13px; color: var(--grey); }
details.demo-detail .dd-body.prose-flow--compact { line-height: 1.5; }
details.demo-detail .dd-body.prose-flow--compact > :is(p, ol) { margin: 0; }
details.demo-detail .dd-body.prose-flow--compact > :is(p, ol) + :is(p, ol) { margin-top: 12px; }
/* R11 (2026-09-13, owner request): the walkthrough body started flush against the summary bar
   (measured gap 0px) and only "What you'd see, step by step:" read as a section. Every section
   label now owns its line (a <br> follows </b>), so give the first block real breathing room and
   keep the between-section rhythm consistent. */
details.demo-detail .dd-body.prose-flow--compact > :first-child { margin-top: 12px; }
details.demo-detail .dd-body.prose-flow--compact > p > b:first-child { color: var(--navy); }
details.demo-detail .dd-body.prose-flow--compact > ol { padding: 0; padding-inline-start: 20px; list-style-position: outside; }
details.demo-detail .dd-body.prose-flow--compact > ol > li { margin: 0; }
details.demo-detail .dd-body.prose-flow--compact > ol > li + li { margin-top: 4px; }
details.demo-detail .dd-cta { margin-top: 8px; font-weight: 700; color: var(--navy); }
details.demo-detail .dd-cta a { color: var(--navy); text-decoration: underline; }

/* ---------- demos page ---------- */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 12px; }
.demo-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px 12px;
  background: var(--white); border-left: 4px solid var(--amber);
}
.demo-card h3 { font-size: 15px; color: var(--navy); font-weight: 800; margin-bottom: 5px; line-height: 1.35; }
.demo-card .demo-tag { font-size: 13px; margin-bottom: 8px; }
.demo-card .demo-data { font-size: 12px; color: var(--grey); margin-bottom: 5px; }
.demo-card .demo-data b { color: var(--navy); }
.demo-card .demo-lim { font-size: 12px; color: var(--grey); font-style: italic; padding-top: 6px; border-top: 1px dashed var(--line); }
.demo-card .demo-lim b { color: var(--amber); font-style: normal; }

/* ---------- product line cards (admin + teaching) ---------- */
.line-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 12px; }
.line-card {
  border: 1px solid var(--line); border-top: 4px solid var(--amber); border-radius: 8px;
  padding: 18px 18px 14px; background: var(--white);
}
.line-card h3 { font-size: 16px; color: var(--navy); font-weight: 800; margin-bottom: 6px; }
.line-card .line-desc { font-size: 13.5px; margin-bottom: 10px; }
.line-card p { font-size: 12.5px; color: var(--grey); margin-bottom: 6px; }
.line-card p b { color: var(--navy); }
.line-card .line-funding { font-size: 12.5px; padding-top: 8px; border-top: 1px dashed var(--line); }
.line-card .line-funding b { color: var(--amber); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.contact-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--white);
}
.contact-card h4 { font-size: 13px; color: var(--amber); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.contact-card .big { font-size: 15.5px; font-weight: 800; color: var(--navy); }
.contact-card p { font-size: 12.5px; color: var(--grey); margin-top: 4px; }
a { color: var(--navy-soft); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #C7D3E3; padding: 26px 20px; font-size: 12.5px; }
.site-footer .inner { max-width: 960px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .hero h1 { font-size: 23px; }
  table.data, table.data thead, table.data tbody, table.data tr, table.data td, table.data th { display: block; }
  table.data thead { display: none; }
  table.data tr { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
  table.data td { border-bottom: 1px solid var(--line); padding: 8px 12px; }
  table.data td::before { content: attr(data-label); display: block; font-size: 10.5px; color: var(--amber); font-weight: 800; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
  table.data td .ok { white-space: normal; word-wrap: break-word; }
  .steps li { gap: 12px; }
}

/* ---------- find-your-case page (scenarios, quiz, filters) ---------- */
.scn-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 8px; }
.scn-card {
  border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 8px;
  padding: 18px 20px 12px; background: var(--white);
}
.scn-card.hidden { display: none; }
.scn-card.flash { outline: 3px solid var(--amber); outline-offset: 2px; }
.scn-card h3 { font-size: 16px; color: var(--navy); font-weight: 800; }
.scn-hook { font-size: 13.5px; color: var(--grey); font-style: italic; margin: 2px 0 8px; }
.scn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  display: inline-block; border: 1px solid var(--line); background: var(--white); color: var(--navy);
  font-size: 12px; padding: 5px 11px; border-radius: 20px; cursor: pointer; font-family: inherit;
}
.chip:hover { border-color: var(--navy); }
.chip.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.chip.static { cursor: default; background: var(--light); border-color: transparent; font-size: 11px; padding: 4px 10px; }
.scn-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.scn-row .lbl { color: var(--amber); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; padding-top: 2px; }
.scn-row ul { margin: 0 0 0 16px; padding: 0; }
.scn-row li { margin-bottom: 3px; color: var(--grey); }
.scn-row p { color: var(--grey); }
.scn-row b { color: var(--navy); }
.scn-cta { margin-top: 10px; padding: 10px 12px; background: var(--light); border-radius: 6px; font-size: 13px; font-weight: 700; color: var(--navy); }
.scn-cta a { color: var(--navy); text-decoration: underline; }
.scn-note { font-size: 11.5px; color: var(--grey); font-style: italic; margin-top: 8px; }
.scn-notsure { border-left-color: var(--navy-soft); background: var(--alt); }

/* filter bar */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 14px; background: var(--light); border: 1px solid var(--line); border-radius: 8px; }
.filter-axis { font-size: 11.5px; font-weight: 800; color: var(--navy); text-transform: uppercase; letter-spacing: .4px; margin-left: 6px; }
.filter-reset { border-color: var(--amber); color: var(--amber); font-weight: 700; }

/* quiz */
.quiz-box { background: var(--light); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-top: 12px; }
.quiz-q { margin-bottom: 16px; }
.quiz-q h4 { font-size: 14px; color: var(--navy); font-weight: 800; margin-bottom: 8px; }
.quiz-opts { display: flex; flex-direction: column; gap: 6px; }
.quiz-opt { display: block; }
.quiz-opt input { display: none; }
.quiz-opt span { display: block; border: 1px solid var(--line); background: var(--white); border-radius: 6px; padding: 8px 12px; font-size: 13px; cursor: pointer; }
.quiz-opt input:checked + span { background: var(--navy); color: var(--white); border-color: var(--navy); }
.quiz-btn { background: var(--amber); color: var(--white); border: none; font-weight: 800; font-size: 14px; padding: 11px 24px; border-radius: 5px; cursor: pointer; margin-top: 4px; }
.quiz-btn:hover { filter: brightness(1.08); }
.quiz-result { display: none; margin-top: 14px; background: var(--white); border: 2px solid var(--amber); border-radius: 8px; padding: 14px 16px; }
.quiz-result.show { display: block; }
.quiz-result h4 { color: var(--navy); font-size: 15px; margin-bottom: 4px; }
.quiz-result p { font-size: 13px; color: var(--grey); margin-top: 6px; }
.quiz-result .scn-cta { margin-top: 10px; }

@media (max-width: 640px) {
  .scn-row { grid-template-columns: 1fr; gap: 2px; }
  .filter-axis { width: 100%; margin-left: 0; }
}

/* plain body copy inside scenario cards (not-sure card) */
.scn-plain { font-size: 13px; color: var(--grey); padding: 7px 0; border-top: 1px dashed var(--line); }
.scn-notsure .scn-plain { border-top: none; padding-top: 0; }

/* ---------- pre-qualification assistant (chat) ---------- */
.chat-box { background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 12px; }
.chat-window { max-height: 430px; overflow-y: auto; padding: 16px; background: var(--alt); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.msg.bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-top-left-radius: 3px; }
.msg.user { align-self: flex-end; background: var(--navy); color: var(--white); border-top-right-radius: 3px; }
.msg.opts { align-self: flex-start; background: transparent; border: none; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 92%; }
.opt-btn { background: var(--white); border: 1px solid var(--navy-soft); color: var(--navy); border-radius: 16px; padding: 7px 14px; font-size: 13px; cursor: pointer; text-align: left; font-family: inherit; display: block; }
.opt-btn:hover { background: var(--navy); color: var(--white); }
.msg a.opt-btn { text-decoration: none; }
.chat-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--white); }
.chat-input-row input { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; font-size: 13px; font-family: inherit; }
.chat-input-row input:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
.chat-input-row button { background: var(--amber); color: var(--white); border: none; border-radius: 6px; padding: 9px 18px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.chat-note { font-size: 11.5px; color: var(--grey); font-style: italic; padding: 8px 14px; background: var(--light); border-top: 1px solid var(--line); }
.chat-note .mail-decode a { color: var(--navy); font-style: normal; }
.chat-sugg { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 12px; background: var(--white); }
.chat-sugg button { background: var(--light); border: 1px dashed var(--navy-soft); color: var(--navy); border-radius: 14px; padding: 6px 12px; font-size: 12px; cursor: pointer; font-family: inherit; text-align: left; }
.chat-sugg button:hover { background: var(--navy); color: var(--white); border-style: solid; }
.chat-input-row button#chat-skip { background: transparent; color: var(--grey); font-weight: 400; padding: 9px 8px; }
.chat-input-row button#chat-skip:hover { color: var(--navy); }

/* ---------- floating pre-qualification assistant widget (every page) ---------- */
#assistant-fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 999; background: var(--navy); color: var(--white); border: none; border-radius: 999px; padding: 12px 20px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
#assistant-fab:hover { background: var(--amber); }
/* R11 (2026-09-13, owner ruling option 1): auto-hide while scrolling deeper into the page.
   The fixed button covered the text on a phone; it now leaves while the visitor scrolls
   down and returns on scroll-up, at the top of the page, on keyboard focus, or whenever
   the panel is open (body.ap-open). Opacity+transform only, so it stays in the tab order. */
#assistant-fab { transition: opacity .18s ease, transform .18s ease; }
#assistant-fab.fab-scroll-hidden { opacity: 0; transform: translateY(10px); pointer-events: none; }
#assistant-fab:focus, #assistant-fab:focus-visible { opacity: 1 !important; transform: none !important; pointer-events: auto !important; }
@media (prefers-reduced-motion: reduce) { #assistant-fab { transition: none; } }
#assistant-panel { position: fixed; right: 18px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 999; width: 360px; max-width: calc(100vw - 36px); max-height: min(70vh, 560px); display: none; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.22); }
#assistant-panel.open { display: flex; }
#assistant-panel, .ap-window { overscroll-behavior: contain; }
.ap-head { display: flex; justify-content: space-between; align-items: center; background: var(--navy); color: var(--white); padding: 10px 14px; font-size: 13.5px; font-weight: 700; }
.ap-close { cursor: pointer; font-size: 15px; opacity: .8; padding: 8px; margin: -8px; }
.ap-close:hover { opacity: 1; }
.ap-window { max-height: 380px; overflow-y: auto; padding: 12px; background: var(--white); display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; }
.ap-window .msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.ap-window .msg.bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-top-left-radius: 3px; }
.ap-window .msg.user { align-self: flex-end; background: var(--navy); color: var(--white); border-top-right-radius: 3px; }
.msg.user .msg-edit { display: block; font-size: 11px; font-weight: 600; opacity: 1; color: #FFD98A; margin-top: 3px; text-decoration: underline; cursor: pointer; }
.msg.user .msg-edit:hover { opacity: 1; }
.ap-window .msg.opts { align-self: flex-start; background: transparent; border: none; padding: 0; display: flex; flex-direction: column; gap: 5px; max-width: 92%; }
.ap-window .opt-btn { background: var(--white); border: 1px solid var(--navy-soft); color: var(--navy); border-radius: 16px; padding: 6px 13px; font-size: 12.5px; cursor: pointer; text-align: left; font-family: inherit; display: block; }
.ap-window .opt-btn:hover { background: var(--navy); color: var(--white); }
.ap-window a.opt-btn { text-decoration: none; text-align: center; }
.ap-back { display: block; margin-top: 4px; font-size: 11.5px; color: var(--grey); cursor: pointer; background: none; border: none; font-family: inherit; text-align: left; padding: 3px 4px; }
.ap-back:hover { color: var(--navy); text-decoration: underline; }
.ap-input-row { display: flex; gap: 8px; padding: 9px 11px; border-top: 1px solid var(--line); background: var(--white); }
.ap-input-row textarea { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 8px 11px; font-size: 13px; font-family: inherit; resize: none; line-height: 1.45; min-height: 44px; max-height: 132px; }
.ap-input-row textarea:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
.ap-input-row button { background: var(--amber); color: var(--white); border: none; border-radius: 6px; padding: 8px 16px; font-weight: 700; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.ap-input-row button#ap-skip, .ap-input-row button#ap-back-in { background: transparent; color: var(--grey); font-weight: 400; padding: 8px 7px; }
.ap-input-row button#ap-skip:hover, .ap-input-row button#ap-back-in:hover { color: var(--navy); }
.ap-sugg { display: flex; flex-wrap: wrap; gap: 7px; padding: 9px 11px 10px; background: var(--white); border-top: 1px solid var(--line); }
.ap-sugg button { background: var(--light); border: 1px dashed var(--navy-soft); color: var(--navy); border-radius: 14px; padding: 5px 11px; font-size: 11.5px; cursor: pointer; font-family: inherit; text-align: left; }
.ap-sugg button:hover { background: var(--navy); color: var(--white); border-style: solid; }
.ap-note { font-size: 11px; color: var(--grey); font-style: italic; padding: 7px 11px; background: var(--light); border-top: 1px solid var(--line); }
/* mobile: kill iOS input zoom, grow tap targets, lift FAB/panel above the sticky CTA bar */
@media (max-width: 768px) {
  .chat-input-row input, .ap-input-row textarea, .ap-input-row button { font-size: 16px; }
  .opt-btn, .ap-check { min-height: 44px; display: flex; align-items: center; }
  .ap-sugg button, .chat-sugg button { padding: 10px 14px; }
  #assistant-fab { right: 12px; }
  /* mobile: full-screen assistant sheet (standard chat pattern) */
  body.ap-open { overflow: hidden; }
  #assistant-panel.open { top: 0; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: none; border-radius: 0; border: none; box-shadow: none; }
  #assistant-panel.open .ap-window { max-height: none; }
  #assistant-panel.open .ap-input-row { padding-bottom: calc(9px + env(safe-area-inset-bottom)); }
  #assistant-panel.open .ap-note { padding-bottom: calc(7px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .ap-window { max-height: none; }
}
@media (max-width: 480px) {
  #assistant-panel { right: 10px; left: 10px; width: auto; max-width: none; bottom: calc(70px + env(safe-area-inset-bottom)); }
  #assistant-fab { bottom: calc(12px + env(safe-area-inset-bottom)); }
}
/* keyboard open (iOS visualViewport) — lift the panel above the keyboard */
#assistant-panel.ap-kb-open { max-height: min(40vh, 420px); }   /* bottom + exact height are set inline from visualViewport (keyboard) */
/* FAB pulse — mobile attention instead of auto-open */
@keyframes fabPulse {
  0% { box-shadow: 0 0 0 0 rgba(184,134,11,.55); }
  70% { box-shadow: 0 0 0 14px rgba(184,134,11,0); }
  100% { box-shadow: 0 0 0 0 rgba(184,134,11,0); }
}
#assistant-fab.fab-pulse { animation: fabPulse 1.6s ease-out 2; }
/* (sticky CTA bar removed 2026-08-25 after iPhone review — felt too salesy; async copy lives in hero + FAQ) */
/* v6: evidence badges, featured strip, filter tabs, demo-shot figure */
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: 12px; margin: 4px 0 8px; letter-spacing: .2px;
}
.badge-real { background: #D4EDDA; color: #1E7B34; border: 1px solid #A3D9B1; }
.badge-tutorial { background: #D6E9F8; color: #1F3A5F; border: 1px solid #A8C8E8; }
.badge-prototype { background: #FFF3CD; color: #856404; border: 1px solid #FFE08A; }
.badge-pending { background: #E9ECEF; color: #495057; border: 1px solid #CED4DA; }

.featured { margin: 20px 0 28px; padding: 18px 0 8px; border-top: 2px solid var(--amber); }
.featured .sec { font-size: 17px; margin-bottom: 12px; }
.featured-grid { margin-top: 8px; }
.featured-why { font-size: 12.5px; color: var(--amber); font-weight: 700; margin: 2px 0 6px; }

.filter-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px;
  padding: 10px 12px; background: var(--light); border: 1px solid var(--line); border-radius: 8px;
}
.filter-tabs button { font-size: 13px; font-weight: 600; line-height: 1.2; padding: 6px 10px; }
.filter-tabs button:hover { border-color: var(--navy); }
.filter-tabs button.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.lib-controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 20px;
}
.lib-search {
  flex: 1 1 260px; min-width: 200px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
  font-family: inherit; background: var(--white); color: var(--navy);
}
.status-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.status-tabs button {
  background: var(--white); border: 1px solid var(--line); color: var(--navy);
  font-size: 12px; padding: 6px 12px; border-radius: 16px; cursor: pointer; font-family: inherit;
}
.status-tabs button:hover { border-color: var(--navy); }
.status-tabs button.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Round-2: card tags, featured star, library count + empty state, search highlight */
.card-tag {
  display: block; width: fit-content; background: var(--light, #eef1f5); color: var(--navy);
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 12px;
  border: 1px solid #D6DAE0; margin: 2px 0 8px; letter-spacing: .2px;
}
.feat-star { color: var(--amber); }
.demo-live { margin: 0 0 12px; }
.demo-title-link { color: inherit; text-decoration: none; }
.demo-title-link:hover { text-decoration: underline; }
.lib-count { font-size: 12.5px; color: var(--grey); margin: 8px 0 0; }
.lib-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 8px; color: var(--grey); font-size: 13.5px; margin-top: 8px; }
mark { background: #F5E6C8; color: inherit; padding: 0 1px; border-radius: 2px; }

.demo-shot {
  max-width: 720px; margin: 18px 0 14px; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; background: var(--white);
}
.demo-shot img { display: block; width: 100%; height: auto; }
.demo-shot figcaption {
  font-size: 12.5px; color: var(--grey); padding: 10px 14px; border-top: 1px solid var(--line);
}

.demo-card-compact { padding: 14px 16px 10px; }
.demo-card-compact h3 { font-size: 14.5px; }
.demo-card-compact .demo-tag { font-size: 12.5px; margin-bottom: 6px; }
.demo-links { font-size: 12px; margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
.demo-run-link {
  display: inline-block; background: var(--navy); color: var(--white); padding: 6px 12px;
  border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 12.5px;
}
.demo-run-link:hover { filter: brightness(1.1); }
.demo-pdf-link { color: var(--navy-soft); }

.pricing-table { max-width: 520px; }

@media (max-width: 480px) {
  .filter-tabs { gap: 5px; padding: 8px; }
  .filter-tabs button { font-size: 11px; padding: 5px 9px; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-shot { max-width: 100%; }
  .demo-shot img { width: 100%; }
}

.ap-window .ap-check { display: flex; align-items: flex-start; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; cursor: pointer; }
.ap-window .ap-check input { margin-top: 2px; accent-color: var(--navy); }
.ap-multi-row { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.ap-window .opt-btn.ap-done { background: var(--navy); color: var(--white); border-color: var(--navy); text-align: center; }
.ap-window .opt-btn.ap-done:hover { background: var(--amber); border-color: var(--amber); }
.ap-window .msg.bot a { color: var(--navy); font-weight: 600; text-decoration: underline; }
.ap-window .msg.bot a.opt-btn { text-decoration: none; }

/* Round-2: explicit link states — no default browser blue/purple on navy */
.hero a:not(.btn):not(.site-nav a) { color: #E8B44C; text-decoration: underline; text-underline-offset: 2px; }
.hero a:not(.btn):not(.site-nav a):visited { color: #E8B44C; }
.hero a:not(.btn):not(.site-nav a):hover { color: #ffffff; }
.hero a:not(.btn):not(.site-nav a):focus-visible { outline: 2px solid #E8B44C; outline-offset: 2px; }
.site-footer a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:visited { color: var(--navy-soft); }
.site-footer a:hover { color: var(--amber); }
/* footer email must not clash with navy bg (owner QA 2026-09-01) */
.site-footer .mail-decode a { color: #C7D3E3; }
.site-footer .mail-decode a:hover { color: var(--amber); }
/* footer email must not clash with navy bg (owner QA 2026-09-01) */
.site-footer .mail-decode a { color: #C7D3E3; }
.site-footer .mail-decode a:hover { color: var(--amber); }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Round-3: Featured pill on grid cards */
.feat-pill { display: inline-block; background: var(--amber-soft); color: var(--navy); }

/* R10 Phase 2+3: Evidence Library — card journey + recommended starting points */
#featured-strip .recommended-release-note {
  font-size: 16px; color: var(--grey); line-height: 1.5; margin: 0 0 14px; max-width: 760px;
}
#featured-strip .recommended-chips {
  display: flex; flex-direction: column; gap: 8px; margin-top: 4px;
}
#featured-strip .recommended-chip {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-left: 4px solid var(--amber);
  border-radius: 8px; padding: 10px 14px; background: var(--white);
  min-height: 44px;
}
#featured-strip .recommended-chip:hover { border-color: var(--navy); background: var(--light); }
#featured-strip .recommended-chip-title {
  display: block; font-size: 14px; font-weight: 800; color: var(--navy); line-height: 1.3;
}
#featured-strip .recommended-chip-caption {
  display: block; font-size: 12px; color: var(--grey); margin-top: 2px; line-height: 1.35;
}

#demo-grid details.demo-detail summary {
  min-height: 44px; display: flex; align-items: center;
  padding: 10px 36px 10px 14px; font-size: 14px; font-weight: 800;
  background: var(--navy); color: var(--white); border-radius: 6px 6px 0 0;
}
#demo-grid details.demo-detail:not([open]) summary { border-radius: 6px; }
#demo-grid details.demo-detail summary::after { color: var(--amber-soft); }
#demo-grid details.demo-detail { margin: 12px 0 0; }
#demo-grid .demo-live {
  margin: 10px 0 0; padding-top: 2px;
}
#demo-grid .demo-run-link {
  min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--navy);
  border: 2px solid var(--navy); border-radius: 6px;
}
#demo-grid .demo-run-link:hover {
  background: var(--light); filter: none;
}

.tbadge { display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); color: #FFD98A; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; padding: 2px 10px; border-radius: 999px; margin-top: 7px; }

/* ---------- workflow responsibility tree (workflow-structure) ---------- */
.workflow-figure { margin: 0; }
.workflow-figure > figcaption {
  font-size: 14px; color: var(--grey); margin-bottom: 14px; line-height: 1.5;
}
.workflow-allocation { position: relative; margin: 18px 0 6px; max-width: 100%; }
.workflow-tree { list-style: none; position: relative; padding: 0; max-width: 100%; }
.workflow-tree ul { list-style: none; display: flex; justify-content: center; position: relative; padding: 26px 0 0; margin: 0; max-width: 100%; }
.workflow-tree > ul { padding-top: 0; }
.workflow-tree > ul::before { display: none; }
.workflow-tree li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 0 10px; max-width: 100%; }
.workflow-tree ul::before {
  content: ''; position: absolute; top: 0; left: 50%; width: 2px; height: 26px;
  background: var(--line);
}
.workflow-tree li::before {
  content: ''; position: absolute; top: -26px; right: 50%; width: 50%; height: 26px;
  border-top: 2px solid var(--line);
}
.workflow-tree li::after {
  content: ''; position: absolute; top: -26px; left: 50%; width: 50%; height: 26px;
  border-top: 2px solid var(--line);
}
.workflow-tree li:first-child::before { border-top: none; }
.workflow-tree li:last-child::after { border-top: none; }
.workflow-tree li:only-child::before,
.workflow-tree li:only-child::after { border-top: none; }
.workflow-tree li > .wnode::before {
  content: ''; position: absolute; top: -26px; left: 50%; width: 2px; height: 26px;
  background: var(--line);
}
.workflow-tree > ul > li { padding-top: 0; }
.workflow-tree > ul > li::before,
.workflow-tree > ul > li::after,
.workflow-tree > ul > li > .wnode::before { display: none; }
.wnode {
  background: var(--white); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 16px; text-align: center; font-weight: 700; font-size: 14px;
  box-shadow: 0 1px 3px rgba(31,58,95,.08); position: relative; max-width: 100%;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.wnode small {
  display: block; font-weight: 400; font-size: 12px; color: var(--grey); margin-top: 3px;
}
.wnode-institution {
  background: var(--navy); color: var(--white); border-color: var(--navy);
  padding: 16px 22px; font-size: 16px;
}
.wnode-environment { border-color: var(--navy-soft); background: var(--alt); }
.wnode-flow {
  border-color: var(--amber); background: var(--amber-soft); font-size: 13.5px;
}
.workflow-evidence-note {
  margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--grey);
  text-align: center; max-width: 100%;
}
.workflow-legend {
  font-size: 12.5px; color: var(--grey); margin-top: 20px; line-height: 1.55; max-width: 100%;
}
@media (max-width: 640px) {
  .workflow-tree ul {
    flex-direction: column; align-items: stretch; margin-left: 14px; padding-left: 16px;
    border-left: 2px solid var(--line); max-width: calc(100% - 14px);
  }
  .workflow-tree > ul { border-left: none; margin-left: 0; padding-left: 0; max-width: 100%; }
  .workflow-tree li {
    align-items: stretch; padding: 8px 0 0; margin-left: 12px; position: relative; max-width: 100%;
  }
  .workflow-tree > ul > li { margin-left: 0; padding-top: 0; }
  .workflow-tree li > .wnode { width: 100%; text-align: left; }
  .wnode { text-align: left; }
  .workflow-tree li::before,
  .workflow-tree li::after,
  .workflow-tree ul::before,
  .workflow-tree li > .wnode::before { display: none; }
  .workflow-tree li::after {
    content: ''; display: block; position: absolute; top: 22px; left: -28px; width: 16px;
    border-top: 2px solid var(--line);
  }
  .workflow-tree > ul > li::after { display: none; }
  .workflow-evidence-note { text-align: left; }
}
@media (max-width: 390px) {
  .workflow-allocation { margin: 14px 0 4px; overflow-x: hidden; }
  .workflow-tree ul {
    margin-left: 10px; padding-left: 12px; border-left-width: 1.5px;
    max-width: calc(100% - 10px);
  }
  .workflow-tree li { margin-left: 8px; padding-top: 6px; }
  .workflow-tree li::after { left: -22px; width: 12px; }
  .wnode { padding: 10px 12px; font-size: 13.5px; }
  .wnode-institution { padding: 14px 16px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .site-nav a { transition: none; }
}
@media print {
  .workflow-tree li::before,
  .workflow-tree li::after,
  .workflow-tree ul::before,
  .workflow-tree li > .wnode::before { display: none !important; }
  .workflow-tree ul { border-left: none; margin-left: 0; padding-left: 0; }
  .wnode { box-shadow: none; break-inside: avoid; }
}

/* ---------- illustrative task-flow example (workflow-example) ---------- */
.workflow-example {
  margin: 22px 0; padding: 18px 20px; max-width: 100%;
  background: var(--alt); border: 1.5px solid var(--line); border-radius: 10px;
  box-shadow: 0 1px 3px rgba(31,58,95,.06);
}
.workflow-example-heading {
  font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 10px; line-height: 1.35;
}
.workflow-example > figcaption {
  font-size: 14px; color: var(--grey); margin-bottom: 14px; line-height: 1.5; max-width: 100%;
}
.workflow-example-steps {
  margin: 0 0 16px; padding-left: 1.35em; max-width: 100%;
}
.workflow-example-steps li {
  margin-bottom: 8px; padding-left: 4px; line-height: 1.55; max-width: 100%;
  overflow-wrap: anywhere; word-wrap: break-word;
}
.workflow-example-steps li:last-child { margin-bottom: 0; }
.workflow-example-disclaimer {
  font-size: 13px; color: var(--grey); line-height: 1.55; margin: 0; max-width: 100%;
  padding-top: 14px; border-top: 1px dashed var(--line);
}
@media (max-width: 390px) {
  .workflow-example { padding: 14px 14px; margin: 18px 0; overflow-x: hidden; }
  .workflow-example-heading { font-size: 16px; }
  .workflow-example-steps { padding-left: 1.2em; }
}
@media print {
  .workflow-example { box-shadow: none; break-inside: avoid; }
}
