/* AURA demo site · the shared shell's working parts (D-CBO-601), on every mock page with the side menu and top bar. Loaded by demo-shell.js.
   Copies the mocks' own looks (D-CBO-441): the + menu is the Intake mock's (pb-menu, pb-mtwo, in.css .in-plusmenu), the search box is the Settings
   mock's search (st.css .st-search, st-sbox, st-sr), the side menu rows are the side menu's own (.rail-group). Tokens only; even sizes only (1 px hairlines). */

/* D-CBO-612 (Phuc): the picture grain and tone (kit.css, section 8.6) stay off every picture; only the Home's hero slider keeps its own grain (home/hm.css) */
:root, :root[data-theme] { --photo-grain: 0; --photo-tone: none; }

/* ---------- "+ New" on the top bar (D-CBO-603): minimal, outlined, no fill ---------- */
.ds-plus-look { display: inline-flex; align-items: center; gap: 4px; height: 32px; width: auto; padding: 0 12px 0 8px; border: 1px solid var(--hairline); /* D-CBO-606: the light hairline, as the Search box and Cards */ border-radius: var(--r-control); background: transparent; color: var(--ink); font: 500 var(--fs-sm)/20px var(--font); white-space: nowrap; cursor: pointer; transition: background var(--dur-1) var(--ease-out); }
.ds-plus-look .icon.msr { font-size: 18px; width: 18px; height: 18px; color: var(--ink-2); }
.ds-plus-look:hover, .ds-plus-look[aria-expanded="true"] { background: var(--surface-2); }
.ds-plus-look:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.topbar #in-plus.ds-plus-look { width: auto; min-width: 0; padding: 0 12px 0 8px; } /* the Intake mock's own + (its own menu), drawn the same */
.topbar #in-plus.ds-plus-look > span:not(.icon) { display: inline; }
.ds-menu { position: fixed; z-index: 95; width: 320px; }
.ds-menu.open { display: block; }

/* ---------- the side menu folded to its icons (the state holds from page to page) ---------- */
.shell.rail-collapsed .rail .grow, .shell.rail-collapsed .rail .word, .shell.rail-collapsed .rail .item > span:not(.icon) { display: none; }
.shell.rail-collapsed .rail .rail-logo, .shell.rail-collapsed .rail .rail-brand { justify-content: center; }
.shell.rail-collapsed .rail a.item, .shell.rail-collapsed .rail .rail-group.islink > a { justify-content: center; padding-left: 0; padding-right: 0; }
/* (fold button centred above) */
.shell.rail-collapsed .rail .rail-divider { align-self: stretch; margin-left: 8px; margin-right: 8px; }

/* the fold button (D-CBO-604): a small square icon button on the right edge of the side menu; centred once the menu is folded */
.shell .rail .rail-collapse { display: grid; place-items: center; align-self: flex-end; width: 32px; height: 32px; min-width: 0; margin: 8px 0 0; padding: 0; border: 0; border-radius: var(--r-control); background: transparent; color: var(--ink-3); cursor: pointer; }
.shell .rail .rail-collapse:hover { background: var(--surface-3); color: var(--ink); }
.shell .rail .rail-collapse:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }

/* D-CBO-607: folded, every item is one centred 40 px square (active, hover, Library, Sample data and the expand button alike), the small-button radius */
.shell.rail-collapsed .rail .rail-nav { align-items: center; }
.shell.rail-collapsed .rail a.item, .shell.rail-collapsed .rail .rail-group, .shell.rail-collapsed .rail .rail-group.islink > a, .shell.rail-collapsed .rail .rail-collapse {
  box-sizing: border-box; flex: none; width: 40px; height: 40px; min-width: 40px; min-height: 40px; margin-left: auto; margin-right: auto; padding: 0; justify-content: center; align-items: center; border-radius: var(--r-control); }
.shell.rail-collapsed .rail .rail-group.islink > a { display: flex; margin: 0; }
.shell.rail-collapsed .rail .rail-collapse { align-self: center; display: grid; place-items: center; }
.shell.rail-collapsed .rail .mk-sample { justify-content: center; padding: 4px 0; }
.shell.rail-collapsed .rail .mk-sample span.mk-st { box-sizing: border-box; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: var(--r-control); }

/* ---------- the Sample data tag: a lighter paper pill ---------- */
.rail .mk-sample span.mk-st { display: inline-flex; flex: none; width: auto; min-width: 0; background: var(--ground); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--hairline); border-radius: var(--r-round); }
.shell .rail .rail-nav .mk-sample span.mk-st > span.mk-w { display: inline; flex: none; width: auto; container-type: normal; white-space: nowrap; } /* an older sheet on the Home makes this word a size container (zero wide) */
.shell.rail-collapsed .rail .rail-nav .mk-sample span.mk-st > span.mk-w { display: none; }


/* ---------- the side menu's flyouts (D-CBO-610; drawn by demo-nav.js, made by make_nav.py): dark green by default, as the Home and
   Almanac dark bands; the light one with ?fly=light. Rounded and raised as the + New menu and the search box; 24 px from the window's edges ---------- */
.railfly.ds-fly { box-sizing: border-box; max-height: calc(100vh - 80px); overflow: auto; padding: 8px; border: 0; border-radius: var(--r-card); background: var(--night); color: var(--white); box-shadow: var(--shadow-raised); animation: ds-in 160ms var(--ease-out); }
.ds-fly .railfly-head { margin: 0 0 4px; padding: 0 0 8px; border-bottom: 1px solid var(--on-dark-hover); }
.ds-fly .railfly-title { height: 36px; padding: 0 8px; font: 600 var(--fs-sm)/20px var(--font); color: var(--white); }
.ds-fly .railfly-title .icon, .ds-fly .railfly-title .msr { color: var(--v-300); }
.ds-fly .railfly-label { padding: 12px 8px 4px; font: 600 var(--fs-xs)/16px var(--font); color: var(--on-dark-text-2); }
.ds-fly .railfly-item { height: 32px; padding: 0 8px; border-radius: var(--r-control); font: 400 var(--fs-sm)/20px var(--font); color: rgb(255 255 255 / .88); }
.ds-fly .railfly-item .icon, .ds-fly .railfly-item .msr { color: var(--on-dark-text-2); }
.ds-fly .railfly-item:hover, .ds-fly .railfly-title:hover, .ds-fly .railfly-item:focus, .ds-fly .railfly-title:focus { background: var(--on-dark-hover); color: var(--white); outline: 0; }
.ds-fly .railfly-item:hover .icon, .ds-fly .railfly-item:focus .icon { color: var(--v-300); }
.ds-fly .railfly-item:focus-visible, .ds-fly .railfly-title:focus-visible { box-shadow: inset 0 0 0 2px var(--v-300); }
.ds-fly .railfly-item.active { background: rgb(1 192 159 / .16); color: var(--v-200); font-weight: 600; }
.ds-fly .railfly-n { color: var(--on-dark-text-2); }
.ds-fly::-webkit-scrollbar { width: 8px; } .ds-fly::-webkit-scrollbar-thumb { border-radius: 4px; background: var(--on-dark-hover); }
@media (max-width: 767px) { /* over the phone drawer, one column, inside the screen */
  .railfly.ds-fly { z-index: 100; max-width: calc(100vw - 40px); }
  .ds-fly .railfly-cols.two { columns: 1; width: auto; }
}
/* the light alternative, for Phuc to compare (?fly=light) */
html[data-fly="light"] .railfly.ds-fly { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-raised), 0 0 0 1px var(--hairline); }
html[data-fly="light"] .ds-fly .railfly-head { border-bottom-color: var(--hairline); }
html[data-fly="light"] .ds-fly .railfly-title { color: var(--ink); }
html[data-fly="light"] .ds-fly .railfly-title .icon, html[data-fly="light"] .ds-fly .railfly-title .msr { color: var(--v-700); }
html[data-fly="light"] .ds-fly .railfly-label { color: var(--ink-3); }
html[data-fly="light"] .ds-fly .railfly-item { color: var(--ink-2); }
html[data-fly="light"] .ds-fly .railfly-item .icon, html[data-fly="light"] .ds-fly .railfly-item .msr { color: var(--ink-3); }
html[data-fly="light"] .ds-fly .railfly-item:hover, html[data-fly="light"] .ds-fly .railfly-title:hover, html[data-fly="light"] .ds-fly .railfly-item:focus, html[data-fly="light"] .ds-fly .railfly-title:focus { background: var(--surface-2); color: var(--ink); }
html[data-fly="light"] .ds-fly .railfly-item:hover .icon, html[data-fly="light"] .ds-fly .railfly-item:focus .icon { color: var(--v-700); }
html[data-fly="light"] .ds-fly .railfly-item:focus-visible, html[data-fly="light"] .ds-fly .railfly-title:focus-visible { box-shadow: inset 0 0 0 2px var(--focus-color); }

/* ---------- the Ask home (D-CBO-612): page-builder #ask/home, the Answer page's own layout with no answer yet: past Questions on the left,
   a big question box and the suggestions in the middle (the mock's pb-aleft, pb-askin, pb-asklist, copied) ---------- */
.ds-askhome { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: 272px minmax(0, 1fr); background: var(--ground); }
.ds-askhome .pb-aleft { position: static; transform: none; width: auto; box-shadow: none; }
.ds-akmain { min-width: 0; overflow: auto; padding: 120px 32px 64px; background: linear-gradient(180deg, var(--accent-soft) 0, var(--ground) 240px); }
.ds-akcol { width: min(720px, 100%); margin: 0 auto; }
.ds-akkick { margin: 0 0 8px; text-align: center; font: 500 var(--fs-sm)/20px var(--font); color: var(--v-700); }
.ds-akcol h1 { margin: 0 0 32px; text-align: center; font: 400 48px/56px var(--font-serif); letter-spacing: -.02em; color: var(--ink); }
.ds-akcol .pb-askin { height: 64px; }
.ds-akcol .pb-asklist { margin-top: 16px; box-shadow: var(--shadow-rest); }
.ds-akcol .pb-askfoot { margin-top: 16px; color: var(--ink-3); }
@media (max-width: 767px) {
  .ds-askhome { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; overflow: auto; }
  .ds-akmain { order: -1; overflow: visible; padding: 48px 16px 24px; }
  .ds-akcol h1 { font-size: var(--fs-3xl); line-height: 40px; margin-bottom: 24px; }
  .ds-askhome .pb-aleft { overflow: visible; }
}

/* ---------- the Answer page as a live engine (D-CBO-613, demo-answer.js): the Working block, writing, chips and Sources arriving ---------- */
.dap-hide { display: none !important; }
.dap-pend { visibility: hidden; }
.dap-wait { display: none !important; }
.pb-ainput.dap-pend { visibility: visible; opacity: .48; pointer-events: none; }
.dap-rise { animation: dap-rise 420ms var(--ease-out) both; }
@keyframes dap-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dap-pop { animation: dap-pop 280ms var(--ease-out) both; }
@keyframes dap-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.dap-slide { animation: dap-slide 360ms var(--ease-out) both; }
@keyframes dap-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.pb-track i.dap-grow { transition: width 720ms var(--ease-out); }
.dap-typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--v-600); animation: dap-caret 800ms steps(1) infinite; }
@keyframes dap-caret { 50% { opacity: 0; } }
.dap-work { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-rest); }
.dap-wh { display: flex; align-items: center; gap: 8px; }
.dap-wh b { font: 600 var(--fs-xs)/16px var(--font); color: var(--ink-2); }
.dap-took { flex: 1; font: 400 var(--fs-xs)/16px var(--font); color: var(--ink-3); }
.dap-skip { padding: 2px 6px; border: 0; border-radius: var(--r-control); background: none; font: 500 var(--fs-xs)/16px var(--font); color: var(--v-700); cursor: pointer; }
.dap-skip:hover { background: var(--surface-2); }
.dap-skip:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.dap-steps { list-style: none; margin: 8px 0 0; padding: 0; }
.dap-step { display: flex; align-items: center; gap: 8px; min-height: 24px; font: 400 var(--fs-sm)/20px var(--font); color: var(--ink-2); }
.dap-step.dap-pend { visibility: hidden; height: 0; min-height: 0; overflow: hidden; }
.dap-spin { flex: none; box-sizing: border-box; width: 14px; height: 14px; border: 2px solid var(--hairline); border-top-color: var(--v-600); border-radius: var(--r-round); animation: dap-spin 720ms linear infinite; }
@keyframes dap-spin { to { transform: rotate(360deg); } }
.dap-ok { display: none; width: 14px; font-size: 16px; color: var(--v-600); }
.dap-step.ok .dap-spin { display: none; } .dap-step.ok .dap-ok { display: inline-grid; place-items: center; }
.dap-step.ok { color: var(--ink-3); }
.dap-work.done .dap-wh b::before { content: "check_circle"; font-family: 'Material Symbols Rounded'; font-size: 16px; vertical-align: -4px; margin-right: 4px; color: var(--v-600); }
@media (prefers-reduced-motion: reduce) { .dap-rise, .dap-pop, .dap-slide, .dap-spin, .dap-typing::after { animation: none; } .pb-track i.dap-grow { transition: none; } }

/* ---------- search, over the current page ---------- */
.ds-scrim { position: fixed; inset: 0; z-index: 92; background: var(--scrim); animation: ds-fade 200ms var(--ease-out); }
@keyframes ds-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ds-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ds-scrim[hidden], .ds-search[hidden] { display: none; }
.ds-search { position: fixed; z-index: 93; display: flex; flex-direction: column; max-height: calc(100vh - 32px); border-radius: var(--r-card); background: var(--ground); box-shadow: var(--shadow-raised), 0 0 0 1px var(--hairline); animation: ds-in 200ms var(--ease-out); }
.ds-sbox { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--hairline); flex: none; }
.ds-sbox > .icon.msr { color: var(--ink-3); }
.ds-sbox input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; outline: 0; box-shadow: none; font: 400 var(--fs-xl)/28px var(--font); color: var(--ink); }
.ds-sbox input::placeholder { color: var(--ink-3); }
.ds-sbox input::-webkit-search-cancel-button { display: none; }
.ds-sbox .ds-esc { min-width: 20px; height: 20px; padding: 0 4px; font-size: var(--fs-xs); line-height: 16px; cursor: pointer; border: 0; }
.ds-slist { flex: 1; min-height: 0; overflow: auto; padding: 4px 8px 8px; }
.ds-sgh { display: flex; align-items: center; gap: 8px; padding: 12px 8px 4px; font: 500 var(--fs-xs)/16px var(--font); color: var(--ink-3); }
.ds-sr { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 8px; border-radius: var(--r-control); color: inherit; text-decoration: none; }
.ds-sr:hover, .ds-sr.on { background: var(--surface-2); }
.ds-srt { flex: 1; min-width: 0; }
.ds-srt b { display: block; font: 500 var(--fs-sm)/20px var(--font); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-srt small { display: block; font: 400 var(--fs-xs)/16px var(--font); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-sr kbd.pb-k, .ds-keys kbd.pb-k { min-width: 20px; height: 20px; padding: 0 4px; font-size: var(--fs-xs); line-height: 16px; }
.ds-sr kbd.pb-k { visibility: hidden; }
.ds-sr.on kbd.pb-k { visibility: visible; }
.ds-ld { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-control); background: var(--surface-2); color: var(--ink-2); overflow: hidden; font: 600 var(--fs-xs)/16px var(--font); }
.ds-ld .icon.msr { font-size: 20px; width: 20px; height: 20px; }
.ds-ld.img { background: var(--white); box-shadow: inset 0 0 0 1px var(--hairline); }
.ds-ld.img img { width: 100%; height: 100%; object-fit: contain; padding: 2px; box-sizing: border-box; }
.ds-ld.face img { object-fit: cover; padding: 0; }
.ds-ld.face { border-radius: var(--r-round); }
.ds-ld.grade { background: var(--v-50); color: var(--v-800); }
.ds-none { margin: 0; padding: 16px 8px; font: 400 var(--fs-sm)/20px var(--font); color: var(--ink-3); }
.ds-sfoot { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 48px; padding: 0 16px; border-top: 1px solid var(--hairline); flex: none; }
.ds-keys { display: flex; gap: 16px; font: 400 var(--fs-xs)/16px var(--font); color: var(--ink-3); }
.ds-keys span { display: inline-flex; align-items: center; gap: 4px; }
.ds-seeall { display: inline-flex; align-items: center; gap: 4px; font: 500 var(--fs-sm)/20px var(--font); color: var(--v-700); text-decoration: none; }
.ds-seeall:hover { text-decoration: underline; text-underline-offset: 4px; }
body.ds-lock { overflow: hidden; }

/* ---------- the phone drawer: the side menu over the page (☰) ---------- */
.ds-drawer-x { display: none; }
.ds-drawer-scrim { position: fixed; inset: 0; z-index: 98; background: var(--scrim); animation: ds-fade 200ms var(--ease-out); }
.ds-drawer-scrim[hidden] { display: none; }

@media (max-width: 767px) {
  .shell.ds-drawer .rail { position: fixed; top: 0; bottom: 0; left: 0; z-index: 99; display: flex; flex-direction: column; box-sizing: border-box; width: min(288px, calc(100vw - 48px)); padding: 12px 12px 16px;
    background: var(--window, var(--surface-2)); box-shadow: var(--shadow-raised); overflow: hidden; animation: ds-drawer-in 240ms var(--ease-out); }
  .shell.ds-drawer .rail .rail-nav { padding-top: 8px; }
  .shell.ds-drawer .rail .rail-collapse { display: none; }
  .shell.ds-drawer .rail .ds-drawer-x { display: grid; place-items: center; position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; }
  .shell.ds-drawer .rail .rail-group, .shell.ds-drawer .rail a.item { min-height: 44px; }
  .shell.ds-drawer .rail a.item { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 8px 12px; }
  .shell.ds-drawer .rail a.item > span:not(.icon) { display: inline; }
  /* on a phone the centred logo leaves no room for the word: the same outlined button, + only */
  .topbar .ds-plus-look, .topbar #in-plus.ds-plus-look { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; }
  .topbar .ds-plus-look > span:not(.icon), .topbar #in-plus.ds-plus-look > span:not(.icon) { display: none; }
  .ds-menu { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; }
  .ds-menu .pb-mrow { min-height: 44px; }
  .ds-search { inset: 0; max-height: none; border-radius: 0; }
  .ds-keys { display: none; }
}
@keyframes ds-drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .railfly.ds-fly, .ds-scrim, .ds-search, .ds-drawer-scrim, .shell.ds-drawer .rail { animation: none; } }
