/* 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);
}

/* ---------- 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); }
.contact-pill { font-size: 12.5px; color: #FFD98A; font-weight: 600; white-space: nowrap; }
.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; }

/* ---------- 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 ol { margin: 4px 0 8px 18px; padding: 0; }
details.demo-detail .dd-body li { margin-bottom: 3px; }
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; }
  .steps li { gap: 12px; }
  .contact-pill { width: 100%; }
}

/* ---------- 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: 18px; 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); }
#assistant-panel { position: fixed; right: 18px; bottom: 76px; 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; }
.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: 0 3px; }
.ap-close:hover { opacity: 1; }
.ap-window { max-height: 380px; overflow-y: auto; padding: 12px; background: var(--alt); display: flex; flex-direction: column; gap: 8px; }
.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; }
.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: 34px; 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); }
@media (max-width: 480px) { #assistant-panel { right: 10px; left: 10px; bottom: 70px; width: auto; max-width: none; } #assistant-fab { right: 12px; bottom: 12px; } }
