:root {
  --bg: #eaf4ef;
  --panel: #ffffff;
  --panel-soft: #f7fbf9;
  --text: #0b2440;
  --muted: #5d6f7a;
  --teal: #0f8f88;
  --teal-dark: #08736e;
  --teal-soft: #e7f7f5;
  --line: #d7e7e2;
  --shadow: 0 18px 44px rgba(6, 50, 55, 0.12);
  --soft-shadow: 0 8px 22px rgba(6, 50, 55, 0.08);
  --radius: 22px;
  --app-height: 100dvh;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
button, input, textarea, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.app-shell { width: 100%; max-width: 430px; height: var(--app-height); margin: 0 auto; background: linear-gradient(180deg, #fff 0%, #fbfefd 56%, #f5fbf8 100%); overflow: hidden; position: relative; border-left: 1px solid rgba(11,36,64,.08); border-right: 1px solid rgba(11,36,64,.08); box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.screen { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.screen[hidden] { display: none !important; }
.content { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px 10px; }
.topbar { height: 54px; flex: 0 0 auto; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 4px; padding: max(6px, env(safe-area-inset-top)) 12px 6px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }
.topbar.home { height: auto; min-height: 136px; display: flex; align-items: flex-start; padding: max(14px, env(safe-area-inset-top)) 16px 12px; border-bottom: none; }
.brand-row { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; }
.practice-logo { width: 72px; height: 72px; object-fit: contain; flex: 0 0 auto; }
.practice-wordmark strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 29px; line-height: .88; letter-spacing: .01em; color: #0d3459; }
.practice-wordmark span { display: block; letter-spacing: .22em; color: var(--teal); font-weight: 700; font-size: 16px; margin-top: 3px; }
.practice-wordmark small { display: block; font-weight: 700; color: #123; margin-top: 5px; font-size: 12px; }
.header-title { text-align: center; font-weight: 800; font-size: 15px; }
.breadcrumb { text-align: center; font-size: 12px; color: var(--teal-dark); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: var(--teal-dark); border-radius: 999px; }
.icon-btn:active { background: var(--teal-soft); transform: translateY(1px); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.top-actions { display: flex; justify-content: flex-end; gap: 4px; }
.home-top-spacer { width: 0; min-width: 0; }
.office-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 2px 12px; }
.office-action { border: 1px solid var(--line); background: rgba(255,255,255,.95); border-radius: 14px; padding: 9px 4px; min-height: 72px; text-decoration: none; color: var(--text); box-shadow: var(--soft-shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.office-action .big { color: var(--teal); font-size: 22px; line-height: 1; }
.office-action strong { font-size: 12px; line-height: 1; }
.office-action small { color: var(--muted); font-size: 8.5px; line-height: 1.15; text-align: center; }
.home-prompt { text-align: center; margin: 2px 0 12px; }
.home-prompt h1 { margin: 0 0 4px; font-size: 17px; }
.home-prompt p { margin: 0; font-size: 11px; color: var(--muted); font-weight: 600; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.category-card { border: 1px solid rgba(15,143,136,.12); border-radius: 14px; min-height: 96px; padding: 9px 6px; background: var(--card-bg, #f6fbf8); box-shadow: 0 4px 14px rgba(6,50,55,.05); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; color: var(--text); }
.category-card .cat-icon { font-size: 32px; line-height: 1; }
.category-card strong { font-size: 11px; line-height: 1.1; }
.category-card small { font-size: 9px; line-height: 1.15; color: #38505a; }
.mint { --card-bg: #eefaf5; } .peach { --card-bg: #fff3ec; } .lavender { --card-bg: #f5f1ff; } .sky { --card-bg: #eef9ff; } .sage { --card-bg: #f4faee; } .cream { --card-bg: #fff8e8; } .rose { --card-bg: #fff0ed; } .blue { --card-bg: #edf8ff; } .sand { --card-bg: #fff4ed; }
.hero { height: 112px; border-radius: 0; overflow: hidden; background: linear-gradient(135deg, #d8f3f0, #f8fffd); display: grid; place-items: center; margin: -14px -14px 6px; position: relative; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 74% 20%, rgba(255,255,255,.75), transparent 25%), linear-gradient(90deg, rgba(255,255,255,.55), transparent); }
.hero-visual { position: relative; z-index: 1; font-size: 84px; filter: drop-shadow(0 12px 16px rgba(6,50,55,.10)); }
.category-intro { text-align: center; font-weight: 800; font-size: 13px; line-height: 1.35; margin: 0 8px 12px; }
.list-card { display: grid; gap: 8px; }
.topic-row, .related-row { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 12px; display: grid; grid-template-columns: 30px 1fr 18px; align-items: center; gap: 8px; text-align: left; box-shadow: 0 4px 14px rgba(6,50,55,.04); color: var(--text); }
.topic-row strong, .related-row strong { font-size: 13px; }
.topic-row .mini, .related-row .mini { font-size: 20px; }
.chev { color: var(--teal-dark); font-size: 24px; line-height: 1; }
.topic-body h1 { font-size: 22px; margin: 0 0 8px; }
.topic-body p { color: #213b48; font-size: 14px; line-height: 1.45; margin: 0 0 12px; }
.check-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.check-list li { font-size: 13px; line-height: 1.3; display: flex; gap: 8px; align-items: flex-start; }
.check-list li::before { content: "✓"; color: var(--teal); font-weight: 900; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--teal-dark); font-size: 9px; border-radius: 999px; padding: 6px 8px; }
.chat-area { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.message { max-width: 86%; border-radius: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; box-shadow: 0 8px 20px rgba(6,50,55,.06); }
.message.user { align-self: flex-end; background: linear-gradient(135deg, #109a92, #08736e); color: #fff; border-bottom-right-radius: 5px; }
.message.bot { align-self: flex-start; background: #fff; color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.feedback-row { display: flex; gap: 8px; margin-top: 2px; }
.feedback-row button { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--teal-dark); }
.continue-block { margin-top: 4px; }
.continue-block h3, .explore-title { margin: 8px 0 8px; font-size: 13px; }
.input-wrap { flex: 0 0 auto; padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 46px; gap: 9px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
.ask-input { border: 1px solid var(--line); border-radius: 999px; padding: 0 15px; min-height: 46px; outline: none; font-size: 14px; color: var(--text); background: #fff; }
.ask-input:focus { border-color: rgba(15,143,136,.55); box-shadow: 0 0 0 4px rgba(15,143,136,.08); }
.send-btn { border: 0; border-radius: 999px; background: linear-gradient(135deg, #159b91, #08736e); color: #fff; font-size: 25px; display: grid; place-items: center; box-shadow: 0 8px 16px rgba(8,115,110,.22); }
.bottom-nav { flex: 0 0 auto; height: 70px; padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: #fff; }
.nav-btn { border: 0; background: transparent; color: var(--teal-dark); display: grid; place-items: center; align-content: center; gap: 3px; font-size: 11px; font-weight: 800; }
.nav-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn[disabled] { opacity: .3; }
.explore-list { display: grid; gap: 10px; }
.related-row.large { grid-template-columns: 74px 1fr; min-height: 78px; padding: 8px; }
.related-art { width: 64px; height: 64px; border-radius: 10px; background: var(--teal-soft); display: grid; place-items: center; font-size: 34px; }
.related-copy strong { display: block; font-size: 13px; margin-bottom: 3px; }
.related-copy small { color: var(--muted); font-size: 11px; line-height: 1.25; }
.back-category { width: 100%; border: 0; border-radius: 12px; background: linear-gradient(135deg, #109a92, #08736e); color: #fff; padding: 13px 16px; font-weight: 800; margin: 14px 0 2px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(7,31,35,.38); display: grid; place-items: center; padding: 18px; z-index: 20; backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.modal-card { position: relative; width: min(360px, 100%); background: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.modal-card h2 { margin: 0 0 12px; }
.modal-card p, .modal-card li { color: #314852; font-size: 13px; line-height: 1.45; }
.modal-close { position: absolute; top: 14px; right: 14px; border: 0; background: transparent; color: var(--teal-dark); font-size: 26px; }
.version { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #0b2440; color: #fff; padding: 10px 14px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 30; font-size: 13px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 700px) { body { display: grid; place-items: center; } .app-shell { height: min(900px, 96vh); border-radius: 28px; } }
@media (max-width: 370px) { 
.practice-wordmark strong { font-size: 25px; } .category-card { min-height: 82px; } .hero { height: 100px; } }

/* Build 002 home-screen polish */
.screen[data-screen="home"] .content { padding-bottom: 6px; }
.screen[data-screen="home"] .input-wrap { border-top-color: rgba(215,231,226,.85); }
@media (min-width: 700px) {
  .screen[data-screen="home"] .content { flex: 0 0 auto; }
}

/* Build 004 journey completion */
.keep-exploring-btn { width: 100%; border: 1px solid rgba(15,143,136,.22); border-radius: 12px; background: #f0fbf8; color: var(--teal-dark); padding: 11px 14px; font-weight: 800; margin-top: 10px; }
.keep-exploring-btn:active { transform: translateY(1px); background: #e5f7f3; }
.explore-content { padding-top: 18px; }
.explore-intro { text-align: left !important; margin-left: 0 !important; }
.screen[data-screen="conversation"] .chat-area { padding-bottom: 12px; }
.screen[data-screen="topic"] .topic-body { padding-bottom: 8px; }
@media (max-width: 370px) {
  .message { max-width: 92%; }
  .related-row.large { grid-template-columns: 58px 1fr; }
  .related-art { width: 52px; height: 52px; font-size: 28px; }
}


/* Build 006 navigation contract */
.bottom-nav.home-footer { grid-template-columns: repeat(2, 1fr); }
.screen[data-screen="home"] .bottom-nav.home-footer .nav-btn { min-width: 0; }


/* Build 007: starter question chips on Topic screen */
.topic-hint{font-size:12px;color:#496066;margin:14px 0 8px;}
.starter-chips .chip{border:1px solid #cde2dd;background:#fff;border-radius:999px;padding:7px 10px;font-size:11px;color:#0b5f5b;cursor:pointer;}
.starter-chips .chip:active{transform:scale(.98);}

/* Build 008: frozen Dental Knowledge Center architecture */
.frozen-home { padding-bottom: 2px; grid-template-columns: 1fr auto; align-items: start; }
.frozen-home .practice-logo { width: 76px; height: 76px; }
.frozen-home .practice-wordmark strong { font-size: 28px; }
.frozen-home .practice-wordmark span { font-size: 13px; }
.frozen-home .practice-wordmark small { font-size: 10px; }
.frozen-home 
.home-content { padding-top: 4px; }
.knowledge-title { text-align: center; margin: 8px 0 10px; font-size: 20px; line-height: 1.1; color: #0b4f4b; letter-spacing: -0.02em; }
.knowledge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.knowledge-card { border: 1px solid rgba(15,143,136,.12); border-radius: 14px; min-height: 74px; padding: 7px 4px; background: var(--card-bg, #f6fbf8); box-shadow: 0 4px 14px rgba(6,50,55,.05); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3px; color: var(--text); }
.knowledge-card .knowledge-icon { font-size: 24px; line-height: 1; }
.knowledge-card strong { font-size: 10.3px; line-height: 1.05; }
.knowledge-card small { font-size: 8.2px; line-height: 1.05; color: #38505a; }
.input-wrap.home-question { padding-top: 8px; }
.input-wrap.home-question .ask-input::placeholder { color: #6b7f84; font-weight: 700; }
.hero.compact { height: 112px; }
.page-content { padding-top: 14px; }
.learn-more-title { margin: 12px 0 8px; font-size: 13px; font-weight: 900; color: #0b4f4b; }
.related-button-list { display: grid; gap: 8px; margin-bottom: 8px; }
.knowledge-mode h1 { font-size: 22px; margin-bottom: 8px; }
.end-note { font-size: 12px; color: var(--muted); background: #f4fbf8; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.conversation-mode { background: linear-gradient(180deg, #f7fffc, #eef7f3); }
.message.typing { color: var(--muted); font-style: italic; }
.bottom-nav.home-footer { grid-template-columns: repeat(2, 1fr); }
.screen[hidden] { display: none !important; }
@media (max-width: 370px) {
  .frozen-home .practice-logo { width: 66px; height: 66px; }
  .frozen-home 
.office-actions { gap: 6px; }
  .office-action { min-height: 66px; }
  .knowledge-title { font-size: 18px; margin: 6px 0 8px; }
  .knowledge-grid { gap: 6px; }
  .knowledge-card { min-height: 64px; padding: 5px 3px; }
  .knowledge-card .knowledge-icon { font-size: 21px; }
  .knowledge-card strong { font-size: 9.2px; }
  .knowledge-card small { font-size: 7.4px; }
}

/* Build 010: Home screen practice buttons + simplified Knowledge Center flow */
.build010-home {
  min-height: 112px;
  padding-top: max(10px, env(safe-area-inset-top));
  padding-bottom: 6px;
}
.build010-home .practice-logo { width: 66px; height: 66px; }
.build010-home .practice-wordmark strong { font-size: 25px; }
.build010-home .practice-wordmark span { font-size: 12px; }
.build010-home .practice-wordmark small { font-size: 9px; margin-top: 3px; }
.build010-home 
.build010-home-content { padding-top: 2px; }
.practice-actions { gap: 6px; margin-bottom: 8px; }
.practice-actions .office-action { min-height: 58px; padding: 6px 3px; border-radius: 12px; }
.practice-actions .office-action .big { font-size: 19px; }
.practice-actions .office-action strong { font-size: 10.5px; }
.practice-actions .office-action small { font-size: 7.2px; line-height: 1.05; }
.build010-home-content .knowledge-title { margin-top: 9px; margin-bottom: 8px; font-size: 20px; }
.build010-home-content .knowledge-card { min-height: 70px; }
.knowledge-category-page .category-intro { margin-bottom: 10px; }
.answer-card { background: #fff; border: 1px solid rgba(15,143,136,.16); border-radius: 16px; padding: 13px 14px; margin: 0 0 10px; box-shadow: 0 6px 18px rgba(6,50,55,.06); }
.answer-card h2 { margin: 0 0 7px; font-size: 18px; color: #0b4f4b; letter-spacing: -.01em; }
.answer-card p { margin: 0; font-size: 13px; line-height: 1.42; color: #213b48; }
.answer-card.loading p { color: var(--muted); font-style: italic; }
.fixed-subtopics { margin-bottom: 2px; }
.fixed-subtopics .topic-row { min-height: 45px; padding: 10px 12px; }
.fixed-subtopics .topic-row[aria-current="true"] { border-color: rgba(15,143,136,.45); background: #f0fbf8; }
.screen[data-screen="topic"] { display: none !important; }
@media (max-width: 370px) {
  .build010-home { min-height: 100px; }
  .build010-home .practice-logo { width: 58px; height: 58px; }
  .build010-home 
.practice-actions { gap: 5px; }
  .practice-actions .office-action { min-height: 52px; }
  .practice-actions .office-action .big { font-size: 17px; }
  .practice-actions .office-action strong { font-size: 9.4px; }
  .practice-actions .office-action small { font-size: 6.8px; }
  .build010-home-content .knowledge-title { font-size: 18px; margin-top: 7px; margin-bottom: 7px; }
  .build010-home-content .knowledge-card { min-height: 62px; }
  .answer-card { padding: 11px 12px; }
  .answer-card p { font-size: 12.4px; line-height: 1.38; }
}

/* ASK Response Renderer - Build 011 */
.ask-render { width: 100%; }
.ask-paragraph { margin: 0 0 10px; font-size: 13.4px; line-height: 1.48; color: #213b48; white-space: normal; }
.ask-paragraph:last-child { margin-bottom: 0; }
.message.bot .ask-paragraph { font-size: 13.4px; }
.answer-card .ask-paragraph { font-size: 13.2px; line-height: 1.46; }
.ask-list { display: grid; gap: 8px; margin: 9px 0 10px; }
.ask-list-item { display: grid; grid-template-columns: 24px 1fr; gap: 9px; align-items: start; padding: 10px 11px; border-radius: 14px; background: linear-gradient(180deg, rgba(240,250,249,.95), rgba(255,255,255,.96)); border: 1px solid rgba(15,143,136,.16); box-shadow: 0 4px 12px rgba(6,50,55,.05); }
.ask-list-marker { width: 24px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgba(15,143,136,.12); color: #08736e; font-size: 13px; font-weight: 800; line-height: 1; }
.ask-list-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ask-list-copy strong { color: #0b4f4b; font-size: 13.2px; line-height: 1.22; font-weight: 800; }
.ask-list-copy span { color: #243f4b; font-size: 13.1px; line-height: 1.42; }
.ask-list-numbered .ask-list-marker { font-size: 12px; }
.message.bot { white-space: normal; }
.message.user { white-space: pre-wrap; }
@media (max-width: 420px) {
  .ask-paragraph { font-size: 13.1px; line-height: 1.45; }
  .ask-list-item { grid-template-columns: 22px 1fr; gap: 8px; padding: 9px 10px; }
  .ask-list-marker { width: 22px; height: 22px; font-size: 12px; }
}

/* ASK Response Polish - Build 011.1 */
.message.bot { border-color: rgba(15,143,136,.18); background: linear-gradient(180deg, #ffffff, #fbfffe); }
.message.bot .ask-render { font-size: 13.6px; }
.ask-paragraph { margin: 0 0 11px; font-size: 13.6px; line-height: 1.55; color: #1f3d48; }
.answer-card .ask-paragraph { font-size: 13.5px; line-height: 1.54; }
.ask-list-as-paragraph { color: #213b48; }
.ask-list { gap: 7px; margin: 8px 0 10px; }
.ask-list-item { padding: 9px 10px; border-radius: 13px; box-shadow: 0 3px 10px rgba(6,50,55,.045); }
.ask-list-copy strong { font-size: 13.1px; }
.ask-list-copy span { font-size: 13px; }
@media (max-width: 420px) {
  .message.bot .ask-render { font-size: 13.4px; }
  .ask-paragraph { font-size: 13.35px; line-height: 1.52; }
  .answer-card .ask-paragraph { font-size: 13.25px; line-height: 1.5; }
}

/* ASK Response Polish Reset v2.0.018
   Safe CSS-only pass. Does not modify screen visibility or app navigation. */
.message.bot {
  padding: 16px 17px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfffe 100%);
  border: 1px solid rgba(15, 143, 136, 0.18);
  box-shadow: 0 8px 22px rgba(6, 50, 55, 0.055);
}

.answer-card {
  border-radius: 20px;
  border: 1px solid rgba(15, 143, 136, 0.16);
  box-shadow: 0 8px 22px rgba(6, 50, 55, 0.055);
  background: linear-gradient(180deg, #ffffff 0%, #fbfffe 100%);
}

.ask-render {
  width: 100%;
}

.ask-paragraph {
  font-size: 15.8px;
  line-height: 1.68;
  margin: 0 0 16px;
  color: #1f3d48;
  letter-spacing: 0.005em;
}

.message.bot .ask-paragraph {
  font-size: 15.8px;
  line-height: 1.68;
}

.answer-card .ask-paragraph {
  font-size: 15.6px;
  line-height: 1.66;
}

.ask-paragraph:last-child {
  margin-bottom: 0;
}

.ask-list-as-paragraph {
  color: #213b48;
}

.ask-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 14px;
}

.ask-list-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 13px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(240, 250, 249, 0.95), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(15, 143, 136, 0.16);
  box-shadow: 0 5px 14px rgba(6, 50, 55, 0.045);
}

.ask-list-marker {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 143, 136, 0.12);
  color: #08736e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.ask-list-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ask-list-copy strong {
  color: #0b4f4b;
  font-size: 14.5px;
  line-height: 1.25;
  font-weight: 800;
}

.ask-list-copy span {
  color: #243f4b;
  font-size: 14.4px;
  line-height: 1.5;
}

@media (max-width: 420px) {
  .message.bot {
    padding: 15px 16px;
    border-radius: 19px;
  }

  .ask-paragraph,
  .message.bot .ask-paragraph {
    font-size: 15.4px;
    line-height: 1.64;
    margin-bottom: 15px;
  }

  .answer-card .ask-paragraph {
    font-size: 15.2px;
    line-height: 1.62;
  }

  .ask-list-item {
    grid-template-columns: 24px 1fr;
    gap: 9px;
    padding: 11px 12px;
    border-radius: 15px;
  }

  .ask-list-marker {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .ask-list-copy strong {
    font-size: 14.1px;
  }

  .ask-list-copy span {
    font-size: 14px;
  }
}


/* Build 012: Trust Space header + illustration-led home cards */
.trust-space {
  min-height: 142px;
  padding: max(12px, env(safe-area-inset-top)) 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.10) 54%, rgba(255,255,255,.82) 88%, #fff 100%),
    url("../assets/brand/practices/lakeside/morning-lake-trust-space.png");
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
}
.trust-space .trust-brand {
  flex: 0 1 auto;
  justify-content: center;
  align-items: center;
  gap: 11px;
  padding: 5px 14px 7px;
  border-radius: 20px;
  background: rgba(255,255,255,.34);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}
.trust-space .practice-logo {
  width: 66px;
  height: 66px;
}
.trust-space .practice-wordmark strong {
  font-size: 29px;
  line-height: .9;
  color: #0d3459;
}
.trust-space .practice-wordmark span {
  font-size: 13px;
  letter-spacing: .23em;
  color: var(--teal);
}
.trust-space .practice-wordmark small {
  font-size: 9.5px;
  margin-top: 4px;
  color: #173044;
}
.build010-home-content {
  padding-top: 0;
}
.office-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 16px;
  line-height: 1.1;
  color: #0b2440;
  letter-spacing: -.01em;
}
.practice-actions {
  margin-bottom: 7px;
}
.build010-home-content .knowledge-title {
  color: #0b2440;
  margin-top: 7px;
  margin-bottom: 8px;
}
.build010-home-content .knowledge-grid {
  gap: 7px;
}
.build010-home-content .knowledge-card {
  min-height: 88px;
  padding: 5px 4px 6px;
  gap: 2px;
  justify-content: flex-start;
}
.build010-home-content .knowledge-card .knowledge-icon {
  width: 100%;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  overflow: visible;
}
.build010-home-content .knowledge-card .knowledge-icon img {
  width: 72px;
  height: 54px;
  max-width: 92%;
  object-fit: contain;
  display: block;
}
.build010-home-content .knowledge-card strong {
  font-size: 10.4px;
  line-height: 1.05;
}
.build010-home-content .knowledge-card small {
  font-size: 7.9px;
  line-height: 1.05;
}
@media (max-width: 370px) {
  .trust-space { min-height: 128px; }
  .trust-space .practice-logo { width: 58px; height: 58px; }
  .trust-space .practice-wordmark strong { font-size: 26px; }
  .trust-space .practice-wordmark span { font-size: 11px; }
  .trust-space .practice-wordmark small { font-size: 8.5px; }
  .office-title { font-size: 15px; margin-bottom: 6px; }
  .build010-home-content .knowledge-card { min-height: 80px; }
  .build010-home-content .knowledge-card .knowledge-icon { height: 47px; flex-basis: 47px; }
  .build010-home-content .knowledge-card .knowledge-icon img { width: 64px; height: 47px; }
  .build010-home-content .knowledge-card strong { font-size: 9.2px; }
  .build010-home-content .knowledge-card small { font-size: 7.2px; }
}


/* Build 013 / v2.0.020: Trust Space flow + image-only home navigation */
.screen[data-screen="home"] {
  background: #fff;
}

.trust-space {
  position: relative;
  min-height: 168px;
  padding: max(10px, env(safe-area-inset-top)) 14px 20px;
  overflow: hidden;
  isolation: isolate;
  background: #f5fbfa;
}
.trust-space::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -8px -20% -12px -20%;
  background-image: url("../assets/brand/practices/lakeside/morning-lake-trust-space.png");
  background-repeat: no-repeat;
  background-size: 145% auto;
  background-position: 34% 48%;
  opacity: .98;
}
.trust-space::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,.05) 48%, rgba(255,255,255,.58) 78%, #fff 100%),
    linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.13));
}
.trust-space .trust-brand {
  gap: 12px;
  padding: 6px 16px 8px;
  background: rgba(255,255,255,.28);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(22,77,77,.06);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}
.trust-space .practice-logo {
  width: 76px;
  height: 76px;
}
.trust-space .practice-wordmark strong {
  font-size: 32px;
}
.trust-space .practice-wordmark span {
  font-size: 14px;
}
.trust-space .practice-wordmark small {
  font-size: 10px;
  margin-top: 4px;
}

.build010-home-content {
  position: relative;
  z-index: 2;
  margin-top: -19px;
  padding: 0 14px 10px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.86) 0%, #fff 42px, #fff 100%);
}
.office-title,
.build010-home-content .knowledge-title {
  color: #0b2440;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
}
.office-title {
  margin: 0 0 9px;
  padding-top: 8px;
}
.build010-home-content .knowledge-title {
  margin: 13px 0 9px;
}

.practice-actions {
  gap: 8px;
  margin: 0 0 10px;
}
.practice-actions .office-action {
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 4px;
  border: 1px solid rgba(15,143,136,.12);
  border-radius: 17px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 7px 18px rgba(6,50,55,.075);
  overflow: hidden;
}
.practice-actions .office-action .big {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.practice-actions .office-action .big img {
  display: block;
  width: 88%;
  height: 88%;
  object-fit: contain;
}
.practice-actions .office-action:active,
.build010-home-content .knowledge-card:active {
  transform: scale(.975);
}

.build010-home-content .knowledge-grid {
  gap: 8px;
}
.build010-home-content .knowledge-card {
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 3px;
  border: 1px solid rgba(15,143,136,.10);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(6,50,55,.07);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.build010-home-content .knowledge-card .knowledge-icon {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.build010-home-content .knowledge-card .knowledge-icon img {
  display: block;
  width: 108%;
  height: 108%;
  max-width: none;
  object-fit: contain;
}

@media (max-width: 370px) {
  .trust-space { min-height: 152px; padding-bottom: 18px; }
  .trust-space .practice-logo { width: 66px; height: 66px; }
  .trust-space .practice-wordmark strong { font-size: 28px; }
  .trust-space .practice-wordmark span { font-size: 12px; }
  .trust-space .practice-wordmark small { font-size: 9px; }
  .build010-home-content { margin-top: -17px; padding-left: 11px; padding-right: 11px; }
  .office-title,
  .build010-home-content .knowledge-title { font-size: 16px; }
  .practice-actions,
  .build010-home-content .knowledge-grid { gap: 6px; }
  .practice-actions .office-action { border-radius: 15px; }
  .build010-home-content .knowledge-card { border-radius: 16px; }
}

/* Build 014 / v2.0.021: trust-space integration, dominant artwork, persistent question bar */
.trust-space {
  min-height: 138px;
  padding: max(8px, env(safe-area-inset-top)) 14px 8px;
  background: #f7fbfa;
}
.trust-space::before {
  inset: 0;
  background-size: cover;
  background-position: center 46%;
  opacity: 1;
}
.trust-space::after {
  background: linear-gradient(180deg,
    rgba(255,255,255,.02) 0%,
    rgba(255,255,255,.08) 50%,
    rgba(255,255,255,.52) 78%,
    #fff 100%);
}
.trust-space .trust-brand {
  gap: 11px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.trust-space .practice-logo {
  width: 64px;
  height: 64px;
}
.trust-space .practice-wordmark strong {
  font-size: 31px;
}
.trust-space .practice-wordmark span {
  font-size: 13px;
}
.trust-space .practice-wordmark small {
  font-size: 9.5px;
}
.build010-home-content {
  margin-top: -8px;
  padding-top: 0;
  padding-bottom: 132px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.72) 0%, #fff 30px, #fff 100%);
}
.office-title {
  padding-top: 5px;
  margin-bottom: 7px;
}
.practice-actions {
  gap: 7px;
  margin-bottom: 9px;
}
.practice-actions .office-action {
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 5px 14px rgba(6,50,55,.055);
}
.practice-actions .office-action .big img {
  width: 98%;
  height: 98%;
}
.build010-home-content .knowledge-title {
  margin-top: 11px;
  margin-bottom: 8px;
}
.build010-home-content .knowledge-grid {
  gap: 7px;
}
.build010-home-content .knowledge-card {
  padding: 0;
  border-radius: 17px;
  box-shadow: 0 5px 15px rgba(6,50,55,.055);
}
.build010-home-content .knowledge-card .knowledge-icon img {
  width: 98%;
  height: 98%;
}
.screen[data-screen="home"] .home-question {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 70px;
  z-index: 29;
  margin: 0;
  padding: 8px 14px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.screen[data-screen="home"] .bottom-nav.home-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
}
@media (max-width: 370px) {
  .trust-space { min-height: 126px; }
  .trust-space .practice-logo { width: 58px; height: 58px; }
  .trust-space .practice-wordmark strong { font-size: 28px; }
  .build010-home-content { margin-top: -7px; padding-bottom: 128px; }
}

/* Build 015 / v2.0.022: compact one-screen home refinement */
.trust-space {
  min-height: 104px;
  padding: max(5px, env(safe-area-inset-top)) 12px 4px;
}
.trust-space::before {
  inset: -8px -12% -4px -12%;
  background-size: 126% auto;
  background-position: 36% 49%;
}
.trust-space::after {
  background: linear-gradient(180deg,
    rgba(255,255,255,.01) 0%,
    rgba(255,255,255,.05) 44%,
    rgba(255,255,255,.42) 74%,
    #fff 100%);
}
.trust-space .trust-brand { gap: 9px; }
.trust-space .practice-logo { width: 54px; height: 54px; }
.trust-space .practice-wordmark strong { font-size: 27px; }
.trust-space .practice-wordmark span { font-size: 11px; }
.trust-space .practice-wordmark small { font-size: 8.5px; margin-top: 2px; }

.build010-home-content {
  margin-top: -4px;
  padding: 0 12px 126px;
  border-radius: 14px 14px 0 0;
}
.office-title,
.build010-home-content .knowledge-title {
  font-size: 16px;
}
.office-title {
  padding-top: 2px;
  margin-bottom: 5px;
}
.practice-actions {
  gap: 6px;
  margin-bottom: 6px;
}
.practice-actions .office-action {
  aspect-ratio: auto;
  height: 58px;
  min-height: 58px;
  border-radius: 14px;
}
.practice-actions .office-action .big img {
  width: 96%;
  height: 96%;
}

.build010-home-content .knowledge-title {
  margin-top: 7px;
  margin-bottom: 5px;
}
.build010-home-content .knowledge-grid {
  gap: 6px;
}
.build010-home-content .knowledge-card {
  aspect-ratio: auto;
  height: 67px;
  min-height: 67px;
  border-radius: 15px;
}
.build010-home-content .knowledge-card .knowledge-icon img {
  width: 100%;
  height: 100%;
}

@media (max-width: 370px) {
  .trust-space { min-height: 94px; }
  .trust-space .practice-logo { width: 48px; height: 48px; }
  .trust-space .practice-wordmark strong { font-size: 24px; }
  .trust-space .practice-wordmark span { font-size: 10px; }
  .build010-home-content { margin-top: -3px; padding-left: 10px; padding-right: 10px; padding-bottom: 124px; }
  .office-title,
  .build010-home-content .knowledge-title { font-size: 15px; }
  .practice-actions { gap: 5px; }
  .practice-actions .office-action { height: 52px; min-height: 52px; border-radius: 13px; }
  .build010-home-content .knowledge-grid { gap: 5px; }
  .build010-home-content .knowledge-card { height: 59px; min-height: 59px; border-radius: 14px; }
}

/* Build 016 / v2.0.023: compact-home correction — preserve full artwork */
.trust-space {
  min-height: 108px;
  padding: max(5px, env(safe-area-inset-top)) 12px 5px;
}
.trust-space::before {
  inset: -4px -5% -2px -5%;
  background-size: cover;
  background-position: center 47%;
}
.build010-home-content {
  margin-top: -5px;
  padding: 0 12px 126px;
}
.office-title {
  padding-top: 2px;
  margin-bottom: 5px;
}
.practice-actions {
  gap: 6px;
  margin-bottom: 6px;
}
.practice-actions .office-action {
  height: 58px;
  min-height: 58px;
  aspect-ratio: auto;
  padding: 2px;
}
.practice-actions .office-action .big img {
  width: auto;
  height: auto;
  max-width: 96%;
  max-height: 96%;
  object-fit: contain;
}

.build010-home-content .knowledge-title {
  margin-top: 7px;
  margin-bottom: 5px;
}
.build010-home-content .knowledge-grid {
  gap: 6px;
}
.build010-home-content .knowledge-card {
  height: 74px;
  min-height: 74px;
  aspect-ratio: auto;
  padding: 2px;
  overflow: hidden;
}
.build010-home-content .knowledge-card .knowledge-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.build010-home-content .knowledge-card .knowledge-icon img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
@media (max-width: 370px) {
  .trust-space { min-height: 98px; }
  .practice-actions .office-action { height: 53px; min-height: 53px; }
  .build010-home-content .knowledge-card { height: 66px; min-height: 66px; }
}

/* Build 017 / header and DKC balance */
.topbar.home.trust-space {
  min-height: 96px;
  height: 96px;
  padding: max(2px, env(safe-area-inset-top)) 12px 0;
}

.trust-space::before {
  inset: 0 -4% -2px -4%;
  background-size: cover;
  background-position: center 28%;
}

.trust-space .practice-logo {
  width: 49px;
  height: 49px;
}

.trust-space .practice-wordmark strong {
  font-size: 25px;
}

.trust-space .practice-wordmark span {
  font-size: 11px;
}

.trust-space .practice-wordmark small {
  font-size: 9.5px;
  margin-top: 2px;
  font-weight: 500;
}

.build010-home-content {
  margin-top: -10px;
}

.office-title {
  padding-top: 0;
  margin-bottom: 4px;
}

.practice-actions {
  margin-bottom: 4px;
}

.build010-home-content .knowledge-title {
  margin-top: 7px;
  margin-bottom: 7px;
}

.build010-home-content .knowledge-card {
  height: 92px;
  min-height: 92px;
}

@media (max-width: 370px) {
  .topbar.home.trust-space {
    min-height: 88px;
    height: 88px;
  }

  .trust-space .practice-logo {
    width: 44px;
    height: 44px;
  }

  .trust-space .practice-wordmark strong {
    font-size: 22px;
  }

  .trust-space .practice-wordmark span {
    font-size: 9.5px;
  }

.trust-space .practice-wordmark small {
    font-size: 8.5px;
    font-weight: 500;
}

  .build010-home-content .knowledge-card {
    height: 84px;
    min-height: 84px;
  }
}

@media (max-width: 370px) {
  .trust-space { min-height: 58px; }
  .trust-space .practice-logo { width: 44px; height: 44px; }
  .trust-space .practice-wordmark strong { font-size: 22px; }
  .trust-space .practice-wordmark span { font-size: 9.5px; }
  .trust-space .practice-wordmark small { font-size: 7.5px; }
  .build010-home-content .knowledge-card { height: 92px; min-height: 92px; }
}


/* Build 018 repair baseline: original Build 013 artwork + final compact layout */
.topbar.home.trust-space {
  min-height: 96px;
  height: 96px;
  padding: max(2px, env(safe-area-inset-top)) 12px 0;
}

.trust-space::before {
  inset: 0 -4% -2px -4%;
  background-size: cover;
  background-position: center 28%;
}

.topbar.home.trust-space .trust-brand {
  gap: 11px;
  transform: translateY(6px);
}

.topbar.home.trust-space .practice-logo {
  width: 54px;
  height: 54px;
}

.trust-space .practice-wordmark strong {
  font-size: 25px;
}

.trust-space .practice-wordmark span {
  font-size: 11px;
}

.trust-space .practice-wordmark small {
  font-size: 9.5px;
  margin-top: 2px;
  font-weight: 500;
}

.build010-home-content {
  margin-top: -10px;
}

.office-title {
  padding-top: 0;
  margin-bottom: 4px;
}

.practice-actions {
  margin-bottom: 4px;
}

.build010-home-content .knowledge-title {
  margin-top: 7px;
  margin-bottom: 7px;
}

/* Office Information: one consistent centered rule */
.practice-actions .office-action {
  position: relative;
  height: 58px;
  min-height: 58px;
  padding: 0;
  overflow: hidden;
}

.practice-actions .office-action .big {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.practice-actions .office-action .big img {
  display: block;
  width: 110%;
  height: 110%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

/* DKC: compact cards with original Build 013 centering behavior */
.build010-home-content .knowledge-card {
  position: relative;
  height: 92px;
  min-height: 92px;
  padding: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.build010-home-content .knowledge-card .knowledge-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.build010-home-content .knowledge-card .knowledge-icon img {
  display: block;
  width: 108%;
  height: 108%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  margin: 0;
}

@media (max-width: 370px) {
  .topbar.home.trust-space {
    min-height: 88px;
    height: 88px;
  }

  .topbar.home.trust-space .trust-brand {
    transform: translateY(5px);
  }

  .topbar.home.trust-space .practice-logo {
    width: 49px;
    height: 49px;
  }

  .trust-space .practice-wordmark strong {
    font-size: 22px;
  }

  .trust-space .practice-wordmark span {
    font-size: 9.5px;
  }

  .trust-space .practice-wordmark small {
    font-size: 8.5px;
    font-weight: 500;
  }

  .practice-actions .office-action {
    height: 53px;
    min-height: 53px;
  }

  .build010-home-content .knowledge-card {
    height: 84px;
    min-height: 84px;
  }
}

/* DKC container test — preserve full artwork */
.build010-home-content .knowledge-card {
  height: 92px;
  min-height: 92px;
  padding: 3px;
  overflow: hidden;
}

.build010-home-content .knowledge-card .knowledge-icon {
  position: absolute;
  inset: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.build010-home-content .knowledge-card .knowledge-icon img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}
/* Final home scrolling fix */
.screen[data-screen="home"] {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.screen[data-screen="home"] > .content {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
}

/* Build 019 / v2.0.027: full-screen home layout test
   All five DKC rows fit inside the visible app viewport.
   Header, question bar, and footer remain visible. */
.screen[data-screen="home"] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.screen[data-screen="home"] > .content {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  flex: none;
  min-height: 0;
  height: auto;
  overflow: hidden;
  padding-bottom: 6px;
}

.screen[data-screen="home"] .home-question,
.screen[data-screen="home"] .bottom-nav.home-footer {
  position: static;
  inset: auto;
  width: 100%;
  z-index: auto;
}

.screen[data-screen="home"] .knowledge-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.screen[data-screen="home"] .knowledge-card {
  width: 100%;
  height: auto;
  min-height: 0;
}

.screen[data-screen="home"] .knowledge-card .knowledge-icon {
  inset: 3px;
}

/* Short-height devices: reclaim a small amount of vertical space without
   changing the approved visual hierarchy. */
@media (max-height: 760px) {
  .topbar.home.trust-space {
    min-height: 86px;
    height: 86px;
  }
  .topbar.home.trust-space .trust-brand {
    transform: translateY(4px);
  }
  .practice-actions .office-action {
    height: 52px;
    min-height: 52px;
  }
  .office-title {
    margin-bottom: 3px;
  }
  .build010-home-content .knowledge-title {
    margin-top: 4px;
    margin-bottom: 4px;
  }
  .screen[data-screen="home"] .knowledge-grid {
    gap: 5px;
  }
}
