:root {
  --paper: #f5f2e9;
  --paper-2: #ece7dc;
  --surface: #fbfaf6;
  --ink: #151510;
  --muted: #727168;
  --line: rgba(21,21,16,.14);
  --line-strong: rgba(21,21,16,.25);
  --orange: #ff6b35;
  --yellow: #f2cb5c;
  --blue: #5c78ff;
  --green: #91bd87;
  --purple: #dcd4ef;
  --sidebar: #1d1e1a;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .17; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E"); }
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button, input, select, [contenteditable] { outline: none; }
button:focus-visible, input:focus-visible, select:focus-visible, [contenteditable]:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.eyebrow { margin: 0 0 13px; color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 1px; margin: 0 9px 3px 0; display: inline-block; background: currentColor; }
h1, h2, h3, p { text-wrap: balance; }
h1, h2, h3 { letter-spacing: -.045em; }
em { font-family: var(--serif); font-weight: 400; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; z-index: 20; height: 100vh; padding: 20px 14px 15px; display: flex; flex-direction: column; color: var(--ink); background: var(--surface); border-right: 1px solid var(--line); }
.brand-row { height: 46px; padding: 0 8px; display: flex; align-items: center; gap: 9px; }
.brand-row img { border-radius: 7px; mix-blend-mode: multiply; }
.brand-row strong { font-size: 15px; letter-spacing: -.035em; }
.brand-row > span { margin-left: auto; padding: 4px 6px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.create-stack { margin: 17px 5px 21px; }
.new-button { width: 100%; min-height: 43px; padding: 0 13px; display: flex; align-items: center; gap: 9px; color: #1a1a16; background: var(--orange); border: 0; border-radius: 9px; font-size: 11px; font-weight: 730; transition: transform .2s, background .2s; }
.new-button:hover { transform: translateY(-2px); background: #ff7b4c; }
.new-button svg { width: 16px; }
.secondary-create { margin-top: 7px; display: grid; grid-template-columns: 1fr; gap: 7px; }
.secondary-create button { min-width: 0; height: 43px; padding: 0 13px; display: flex; align-items: center; gap: 9px; color: white; border: 0; border-radius: 9px; font-size: 10px; font-weight: 730; transition: transform .2s, filter .2s; }
.secondary-create button[data-create-type="document"] { background: #5c78e8; }.secondary-create button[data-create-type="spreadsheet"] { background: #459f69; }
.secondary-create button:hover { color: white; transform: translateY(-2px); filter: brightness(1.07); }
.secondary-create svg { width: 16px; height: 16px; }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.sidebar-scroll::-webkit-scrollbar { display: none; }
.side-nav > p, .frame-nav > p { margin: 0 10px 8px; color: var(--muted); font-size: 8px; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
.side-nav button { position: relative; width: 100%; height: 38px; padding: 0 11px; display: grid; grid-template-columns: 23px 1fr auto; gap: 9px; align-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 8px; text-align: left; font-size: 10px; transition: color .2s, background .2s; }
.side-nav button:hover { color: var(--ink); background: var(--paper-2); }
.side-nav button.active { color: var(--ink); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.side-nav button.active::before { content: ""; position: absolute; left: -2px; width: 3px; height: 19px; background: var(--orange); border-radius: 2px; }
.side-nav svg { width: 17px; height: 17px; }
.side-nav small { min-width: 19px; padding: 3px 5px; color: var(--muted); background: var(--paper); border-radius: 99px; font-size: 7px; text-align: center; }
.side-nav i { width: 6px; height: 6px; background: #53b877; border-radius: 50%; box-shadow: 0 0 0 4px rgba(83,184,119,.1); }
.frame-nav { margin-top: 18px; }
.frame-nav > div { display: grid; grid-template-columns: 1fr; gap: 6px; }
.frame-nav button { min-width: 0; height: 34px; padding: 0 6px; display: flex; align-items: center; gap: 6px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; text-align: left; font-size: 7px; }
.frame-nav button:hover { color: var(--ink); background: var(--paper-2); }
.frame-nav button i { flex: 0 0 19px; height: 19px; display: grid; place-items: center; color: #151510; border-radius: 5px; font-style: normal; font-size: 9px; }
.frame-orange { background: #f3a35f; }.frame-green { background: #77c98d; }.frame-red { background: #ef7670; }.frame-purple { background: #b99bea; }.frame-blue { background: #79aaf5; }.frame-cyan { background: #74c8d9; }.frame-pink { background: #ed8db0; }
.sidebar-note { margin: 12px 5px 18px; padding: 14px 12px; display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); }
.sidebar-note > span { flex: 0 0 27px; height: 27px; display: grid; place-items: center; color: #1e1e19; background: var(--yellow); border-radius: 7px; }
.sidebar-note svg { width: 14px; }
.sidebar-note strong { display: block; margin: 1px 0 5px; font-size: 9px; }
.sidebar-note p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.account-area { position: relative; }
.account-row { min-height: 53px; padding: 10px 8px 0; display: grid; grid-template-columns: 31px 1fr auto; gap: 9px; align-items: center; border-top: 1px solid var(--line); }
.account-row > b { width: 30px; height: 30px; display: grid; place-items: center; color: white; background: #4f73e7; border-radius: 50%; font-size: 8px; }
.account-row div { display: flex; flex-direction: column; gap: 3px; }
.account-row div strong { font-size: 9px; }.account-row div span { color: var(--muted); font-size: 7px; }
.account-more { width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 7px; }
.account-more:hover, .account-more[aria-expanded="true"] { color: var(--ink); background: var(--paper-2); }
.account-more svg { width: 15px; }
.profile-menu { position: absolute; left: 6px; right: 6px; bottom: calc(100% + 8px); z-index: 30; padding: 7px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 38px rgba(25,24,18,.16); }
.profile-menu[hidden] { display: none; }
.profile-menu > p { margin: 3px 7px 7px; color: var(--muted); font-size: 7px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.profile-menu > button { width: 100%; min-height: 48px; padding: 7px; display: grid; grid-template-columns: 27px 1fr auto; gap: 8px; align-items: center; color: var(--ink); background: transparent; border: 0; border-radius: 7px; text-align: left; }
.profile-menu > button:hover { background: var(--paper-2); }
.profile-menu svg { width: 15px; justify-self: center; }
.profile-menu button span { min-width: 0; display: grid; gap: 3px; }
.profile-menu button strong { font-size: 9px; }.profile-menu button small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }.profile-menu button i { color: var(--muted); font-style: normal; font-size: 10px; }

.main-shell { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; height: 72px; padding: 0 28px; display: grid; grid-template-columns: minmax(170px,1fr) minmax(260px,560px) 1fr; align-items: center; gap: 22px; background: rgba(245,242,233,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.crumb { display: flex; align-items: center; gap: 10px; }
.crumb span { font-size: 12px; font-weight: 720; }.crumb small { padding-left: 10px; color: var(--muted); border-left: 1px solid var(--line); font-size: 8px; }
.global-search { height: 38px; padding: 0 10px; display: grid; grid-template-columns: 19px 1fr auto; gap: 7px; align-items: center; color: #898980; background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 9px; }
.global-search svg { width: 15px; }.global-search input { min-width: 0; background: transparent; border: 0; font-size: 10px; }
.global-search kbd { padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; font: 7px var(--sans); }
.top-actions { display: flex; justify-content: flex-end; gap: 9px; }
.top-actions button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.5); font-size: 10px; }
.top-actions .avatar { color: white; background: var(--ink); border-color: var(--ink); font-size: 7px; font-weight: 700; }
.mobile-menu { display: none; }
.view-container { min-height: calc(100vh - 72px); overflow: hidden; }
.view-panel { min-height: calc(100vh - 72px); padding: 46px clamp(28px,4.2vw,72px) 70px; animation: view-in .38s cubic-bezier(.2,.7,.2,1); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.page-heading h1, .kalvi-header h1 { margin: 0; font-size: clamp(50px,5.5vw,84px); line-height: .92; font-weight: 590; }
.round-action { min-height: 48px; padding: 0 19px; display: flex; align-items: center; gap: 9px; color: white; background: var(--ink); border: 0; border-radius: 99px; font-size: 10px; font-weight: 700; transition: transform .2s, background .2s; }
.round-action:hover { transform: translateY(-2px); background: var(--orange); }
.round-action svg { width: 16px; }

/* Home */
.home-heading { margin-bottom: 44px; }
.quick-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.quick-card { min-height: 124px; padding: 17px; display: grid; grid-template-columns: 22px 43px 1fr auto; gap: 10px; align-items: center; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 13px; text-align: left; transition: transform .2s, box-shadow .2s; }
.quick-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(25,24,18,.1); }
.quick-card > span { align-self: start; font: italic 9px var(--serif); }
.quick-card > svg { width: 34px; height: 34px; }
.quick-card div { display: flex; flex-direction: column; gap: 6px; }.quick-card strong { font-size: 14px; }.quick-card small { color: rgba(21,21,16,.6); font-size: 8px; }
.quick-card > i { align-self: start; font-style: normal; font-size: 14px; }
.quick-slides { background: var(--yellow); }.quick-kalvi { background: var(--purple); }.quick-library { background: #a9c9ae; }
.creation-strip { margin-top: 14px; padding: 16px 18px; display: grid; grid-template-columns: minmax(210px,1fr) minmax(190px,.7fr) minmax(190px,.7fr); gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.creation-strip > div .eyebrow { margin-bottom: 6px; font-size: 7px; }.creation-strip > div h2 { margin: 0; font-size: 20px; }
.creation-strip > button { min-width: 0; min-height: 66px; padding: 10px 12px; display: grid; grid-template-columns: 35px 1fr auto; gap: 10px; align-items: center; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; text-align: left; transition: transform .2s, border .2s; }
.creation-strip > button:hover { transform: translateY(-2px); border-color: var(--line-strong); }.creation-strip > button > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 4px; }.creation-strip strong { font-size: 9px; }.creation-strip small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }.creation-strip > button > i { font-style: normal; }
.creation-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; }.creation-icon svg { width: 17px; }.doc-icon { color: #314bb3; background: #cbd5ff; }.sheet-icon { color: #23693f; background: #c6e6ce; }
.template-heading { margin-top: 52px; }.template-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 11px; }
.template-card { min-width: 0; padding: 0; color: var(--ink); background: transparent; border: 0; text-align: left; }.template-card > span { display: block; margin-bottom: 7px; color: var(--muted); font: italic 8px var(--serif); }.template-card > div { position: relative; aspect-ratio: 1.28; padding: 13px; overflow: hidden; border: 1px solid rgba(21,21,16,.25); border-radius: 10px; transition: transform .2s, box-shadow .2s; }.template-card:hover > div { transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 14px 28px rgba(31,29,20,.13); }.template-card small { position: relative; z-index: 2; font-size: 6px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }.template-card strong { position: absolute; z-index: 2; left: 12px; bottom: 12px; font-size: clamp(16px,1.55vw,26px); line-height: .83; letter-spacing: -.07em; }.template-card > p { margin: 9px 2px 0; color: var(--muted); font-size: 8px; }
.template-editorial > div { color: #f5f0e5; background: #242522; }.template-editorial i { position: absolute; width: 70%; height: 1px; right: -10%; top: 34%; background: #f1683b; transform: rotate(-25deg); }
.template-data > div { color: #20201a; background: #f2cf5b; }.template-data strong { font: clamp(35px,4vw,62px)/.8 var(--serif); }.template-data i { position: absolute; bottom: 13px; width: 8%; background: #405ac5; }.template-data i:nth-of-type(1) { right: 32%; height: 24%; }.template-data i:nth-of-type(2) { right: 20%; height: 44%; }.template-data i:nth-of-type(3) { right: 8%; height: 65%; }
.template-field > div { color: #173d2a; background: #a5cc96; }.template-field i { position: absolute; right: -10%; bottom: -16%; width: 68%; aspect-ratio: 1; border: 1px solid #24573d; border-radius: 50%; box-shadow: 0 0 0 19px #a5cc96, 0 0 0 20px #24573d; }
.template-pitch > div { color: #f6efe3; background: #ec744c; }.template-pitch i { position: absolute; right: -10%; top: -20%; width: 56%; aspect-ratio: 1; background: #333bc1; border-radius: 50%; }
.template-classroom > div { color: #f3efe7; background: #4d4bb2; }.template-classroom i { position: absolute; right: 8%; bottom: 10%; width: 28%; aspect-ratio: 1; background: #f1c653; clip-path: polygon(50% 0,100% 100%,0 100%); transform: rotate(14deg); }
.template-signal > div { color: #f4efe4; background: #18283f; }.template-signal i { position: absolute; right: 13%; top: 21%; width: 18%; aspect-ratio: 1; background: #ff7043; border-radius: 50%; box-shadow: 0 0 0 14px rgba(255,112,67,.14); }
.template-timeline > div { color: #27251f; background: #eee5cf; }.template-timeline i { position: absolute; z-index: 2; bottom: 18%; width: 9px; height: 9px; background: #4c62d0; border-radius: 50%; }.template-timeline i:nth-of-type(1) { left: 53%; }.template-timeline i:nth-of-type(2) { left: 69%; background: #e36f4b; }.template-timeline i:nth-of-type(3) { left: 85%; background: #5ca270; }.template-timeline > div::after { content: ""; position: absolute; left: 53%; right: 11%; bottom: calc(18% + 4px); height: 1px; background: #8d887d; }
.template-photo > div { color: white; background: linear-gradient(135deg,#de875d 0 38%,#293a61 38% 100%); }.template-photo i { position: absolute; right: 10%; top: 12%; width: 36%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; }
.template-lab > div { color: #103d3a; background: #8fc9bc; }.template-lab i { position: absolute; z-index: 2; width: 12px; height: 12px; background: #f3d45d; border: 1px solid #103d3a; border-radius: 50%; }.template-lab i:nth-of-type(1) { right: 18%; top: 20%; }.template-lab i:nth-of-type(2) { right: 34%; top: 43%; }.template-lab i:nth-of-type(3) { right: 12%; top: 58%; }.template-lab > div::after { content: ""; position: absolute; right: 14%; top: 31%; width: 26%; height: 32%; border: 1px solid #103d3a; transform: rotate(-28deg); }
.template-portfolio > div { color: #fff6eb; background: #bc6248; }.template-portfolio i { position: absolute; right: 9%; width: 31%; height: 31%; background: #f1d9bd; border: 1px solid #743c2d; }.template-portfolio i:nth-of-type(1) { top: 13%; }.template-portfolio i:nth-of-type(2) { bottom: 13%; background: #6b83cf; }
.template-workshop > div { color: #272323; background: #d9c7ef; }.template-workshop i { position: absolute; width: 25%; aspect-ratio: 1; border-radius: 3px; transform: rotate(8deg); }.template-workshop i:nth-of-type(1) { right: 28%; top: 15%; background: #f2cb5c; }.template-workshop i:nth-of-type(2) { right: 8%; top: 34%; background: #ef8468; transform: rotate(-7deg); }
.template-review > div { color: #f3efe6; background: #272824; }.template-review i { position: absolute; bottom: 13%; width: 8%; background: #6f86ed; }.template-review i:nth-of-type(1) { right: 31%; height: 22%; }.template-review i:nth-of-type(2) { right: 19%; height: 39%; background: #f0c957; }.template-review i:nth-of-type(3) { right: 7%; height: 59%; background: #e97956; }
.section-title { margin: 64px 0 21px; display: flex; justify-content: space-between; align-items: end; }
.section-title .eyebrow { margin-bottom: 8px; }.section-title h2 { margin: 0; font-size: clamp(28px,3vw,42px); font-weight: 600; }
.section-title > button { padding: 8px 0; background: transparent; border: 0; border-bottom: 1px solid var(--ink); font-size: 9px; font-weight: 700; }.section-title button span { margin-left: 18px; }
.project-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.project-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; transition: transform .2s, box-shadow .2s; cursor: pointer; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 18px 38px rgba(31,29,20,.12); }
.project-cover { position: relative; aspect-ratio: 1.55; overflow: hidden; }
.project-cover > span { position: absolute; z-index: 2; left: 7%; top: 9%; font-size: clamp(20px,2.1vw,36px); font-weight: 760; line-height: .8; letter-spacing: -.07em; }
.project-info { padding: 16px 17px 18px; }.project-info small { color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
.project-info h3 { margin: 9px 0 6px; overflow: hidden; font-size: 17px; white-space: nowrap; text-overflow: ellipsis; }.project-info p { margin: 0; color: var(--muted); font-size: 8px; }
.project-cities .project-cover { color: #173d2a; background: #9bcc86; }
.project-cities .project-cover b { position: absolute; right: 9%; top: 10%; width: 24%; aspect-ratio: 1; background: #f4df77; border: 1px solid #173d2a; border-radius: 50%; }
.project-cities .project-cover i { position: absolute; bottom: 0; width: 18%; background: #235c3e; border: 1px solid #173d2a; }.project-cities .project-cover i:nth-of-type(1) { left: 9%; height: 34%; }.project-cities .project-cover i:nth-of-type(2) { left: 29%; height: 53%; }.project-cities .project-cover i:nth-of-type(3) { left: 49%; height: 67%; }
.project-flight .project-cover { color: #f6f0dc; background: #3b57ca; }.project-flight .project-cover > span { font-size: clamp(30px,3.6vw,58px); }
.project-flight .project-cover b { position: absolute; width: 150%; height: 70%; left: -27%; top: 46%; border: 2px solid #efb34f; border-color: #efb34f transparent transparent; border-radius: 50%; transform: rotate(-12deg); }.project-flight .project-cover i { position: absolute; width: 23%; height: 13%; right: 17%; bottom: 24%; background: #f6f0dc; clip-path: polygon(0 42%,100% 0,72% 54%,100% 100%); transform: rotate(-10deg); }
.project-deep .project-cover { color: #e8896c; background: linear-gradient(#6247a6,#172145); }.project-deep .project-cover > span { font: clamp(35px,4.4vw,70px)/1 var(--serif); }.project-deep .project-cover small { font-size: .35em; }
.project-deep .project-cover i { position: absolute; right: 8%; bottom: -28%; width: 55%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; }.project-deep .project-cover i:nth-of-type(2) { right: 18%; bottom: -7%; width: 34%; }.project-deep .project-cover b { position: absolute; left: 8%; bottom: 13%; width: 24%; height: 1px; background: #e8896c; }
.home-bottom-grid { margin-top: 14px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.continue-card, .library-status { min-height: 180px; padding: 24px; border: 1px solid var(--line); border-radius: 13px; }
.continue-card { display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); }.continue-card > div { display: flex; gap: 15px; align-items: flex-start; }.blue-mark { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 10px; }.blue-mark svg { width: 19px; }
.continue-card .eyebrow, .library-status .eyebrow { margin-bottom: 9px; }.continue-card h3, .library-status h3 { margin: 0; font: 24px/1.05 var(--serif); }
.continue-card button, .library-status button { align-self: flex-start; padding: 8px 0; background: transparent; border: 0; border-bottom: 1px solid var(--ink); font-size: 9px; font-weight: 700; }.continue-card button span, .library-status button span { margin-left: 25px; }
.library-status { display: grid; grid-template-columns: 100px 1fr; gap: 21px; align-items: center; color: var(--paper); background: var(--ink); }
.status-ring { width: 96px; height: 96px; display: grid; place-content: center; border: 1px solid #58594f; border-radius: 50%; text-align: center; }.status-ring::before { content: ""; position: absolute; }.status-ring span { font: 34px/1 var(--serif); }.status-ring small { margin-top: 4px; color: #93948b; font-size: 7px; }.library-status .eyebrow { color: #92948a; }.library-status button { color: var(--paper); border-color: #6d6f64; }

/* Editor */
.editor-view { padding: 27px 28px 30px; background: #e5e2da; }
.editor-header { display: flex; justify-content: space-between; align-items: end; }.editor-header .eyebrow { margin-bottom: 7px; }.editor-header h1 { display: inline-block; margin: 0; font-size: 27px; }.editor-header > div:first-child > span { margin-left: 11px; color: var(--muted); font-size: 7px; }
.editor-actions { display: flex; gap: 8px; }.editor-actions button { height: 37px; padding: 0 13px; display: flex; gap: 7px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 9px; font-weight: 680; }.editor-actions svg { width: 14px; }.editor-actions .dark-action { color: white; background: var(--ink); border-color: var(--ink); }
.editor-toolbar { height: 46px; margin-top: 21px; padding: 0 9px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px 10px 0 0; }.editor-toolbar > div { display: flex; gap: 4px; }.editor-toolbar > span { flex: 1; }.editor-toolbar button, .editor-toolbar b { height: 28px; padding: 0 10px; display: grid; place-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 6px; font-size: 8px; }.editor-toolbar button.selected { color: white; background: var(--ink); }.editor-toolbar b { color: var(--ink); background: #eeece5; font-weight: 650; }
.editor-grid { height: calc(100vh - 218px); min-height: 550px; display: grid; grid-template-columns: 165px minmax(450px,1fr) 230px; background: #d8d6cf; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; overflow: hidden; }
.filmstrip { padding: 15px 12px; overflow-y: auto; background: #f2f0e9; border-right: 1px solid var(--line); }
.slide-thumb { position: relative; width: 100%; margin-bottom: 11px; padding: 0 0 0 19px; display: block; background: transparent; border: 0; }.slide-thumb > span { position: absolute; left: 2px; top: 4px; color: var(--muted); font-size: 7px; }.slide-thumb > div { aspect-ratio: 1.62; overflow: hidden; border: 2px solid transparent; border-radius: 5px; box-shadow: 0 3px 8px rgba(0,0,0,.08); }.slide-thumb.active > div { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(92,120,255,.15); }
.thumb-cities { position: relative; padding: 10px; color: #173d2a; background: #9bcc86; text-align: left; }.thumb-cities b { font-size: 10px; line-height: .8; }.thumb-cities i { position: absolute; bottom: 0; width: 16%; background: #235c3e; }.thumb-cities i:nth-of-type(1) { left: 12%; height: 34%; }.thumb-cities i:nth-of-type(2) { left: 31%; height: 54%; }.thumb-cities i:nth-of-type(3) { left: 50%; height: 69%; }
.thumb-quote { display: grid; place-items: center; color: #f7f2e5; background: #3556c8; }.thumb-quote b { font: 12px/1.1 var(--serif); }.thumb-data { padding: 14px; display: flex; flex-direction: column; align-items: flex-start; color: #21170f; background: #f29a75; }.thumb-data b { font-size: 25px; }.thumb-data small { margin-top: 2px; font-size: 6px; }
.add-slide { width: calc(100% - 19px); height: 32px; margin-left: 19px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); background: transparent; border: 1px dashed var(--line-strong); border-radius: 6px; font-size: 7px; }.add-slide svg { width: 12px; }
.canvas-area { min-width: 0; padding: 35px; display: grid; place-items: center; overflow: auto; }.canvas-area > p { margin: -20px 0 0; color: #85857d; font-size: 7px; }
.slide-canvas { position: relative; width: min(100%,900px); aspect-ratio: 16/9; overflow: hidden; color: #173d2a; background: #9bcc86; border: 1px solid rgba(0,0,0,.22); box-shadow: 0 20px 45px rgba(30,28,20,.18); transition: color .3s, background .3s; }
.slide-canvas.theme-blue { color: #f7f0dd; background: #3556c8; }.slide-canvas.theme-coral { color: #21170f; background: #f29a75; }.slide-canvas.theme-cream { color: #191913; background: #f4f0e4; }
.canvas-kicker { position: absolute; z-index: 3; left: 5%; top: 6%; font-size: clamp(6px,.6vw,10px); font-weight: 720; letter-spacing: .14em; }
.slide-canvas h2 { position: absolute; z-index: 3; left: 5%; top: 18%; margin: 0; font-size: clamp(43px,6.1vw,96px); line-height: .78; letter-spacing: -.08em; }
.slide-canvas > p { position: absolute; z-index: 3; left: 5%; bottom: 7%; margin: 0; font-size: clamp(8px,.8vw,13px); }
.city-sun { position: absolute; right: 8%; top: 9%; width: 22%; aspect-ratio: 1; background: var(--yellow); border: 1px solid currentColor; border-radius: 50%; }.city-line { position: absolute; left: 7%; top: 38%; width: 50%; height: 1px; background: currentColor; transform: rotate(-11deg); }
.building { position: absolute; bottom: 0; width: 16%; background: #235c3e; border: 1px solid currentColor; }.b1 { left: 38%; height: 30%; }.b2 { left: 54%; height: 48%; }.b3 { left: 70%; height: 37%; }.b4 { left: 86%; height: 62%; }
.theme-blue .building { background: #263f9d; }.theme-coral .building { background: #ca6e4b; }.theme-cream .building { background: #d9d0bc; }
.slide-number { position: absolute; z-index: 4; right: 3%; bottom: 4%; font: italic 9px var(--serif); }
.inspector { overflow-y: auto; background: #f5f3ed; border-left: 1px solid var(--line); }.inspector-tabs { height: 46px; padding: 0 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: center; border-bottom: 1px solid var(--line); }.inspector-tabs button { height: 28px; background: transparent; border: 0; border-radius: 6px; color: var(--muted); font-size: 8px; }.inspector-tabs button.active { color: var(--ink); background: #e5e2da; }
.inspector section { padding: 17px; border-bottom: 1px solid var(--line); }.inspector label { margin-bottom: 13px; display: flex; justify-content: space-between; color: #55554e; font-size: 8px; font-weight: 700; }.theme-options { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }.theme-options button { aspect-ratio: 1.25; border: 1px solid var(--line-strong); border-radius: 6px; }.theme-options button.active { outline: 2px solid var(--ink); outline-offset: 2px; }.theme-options .theme-green { background: #9bcc86; }.theme-options .theme-blue { background: #3556c8; }.theme-options .theme-coral { background: #f29a75; }.theme-options .theme-cream { background: #f4f0e4; }
.inspector input[type="range"] { width: 100%; accent-color: var(--ink); }.layout-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }.layout-grid button { height: 39px; padding: 7px; display: flex; flex-direction: column; gap: 5px; background: white; border: 1px solid var(--line); border-radius: 5px; }.layout-grid button.active { border-color: var(--ink); }.layout-grid i { height: 5px; background: #aaa9a1; }.layout-grid i:last-child { width: 60%; }
.inspector .inspector-help { margin: 14px; padding: 14px; display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: start; background: #e2ddf2; border: 0; border-radius: 8px; }.inspector-help svg { width: 18px; }.inspector-help strong { font-size: 8px; }.inspector-help p { margin: 5px 0 0; color: #6f6c76; font-size: 7px; line-height: 1.4; }.inspector-help button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: white; font-size: 7px; }

/* Kalvi */
.kalvi-view { padding-top: 30px; padding-bottom: 24px; background: #e9e6ef; }.kalvi-header { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 20px; }.kalvi-controls { display: flex; gap: 8px; }.kalvi-controls button { height: 36px; padding: 0 12px; color: #55545d; background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 8px; font-size: 8px; }.kalvi-controls span { margin-left: 8px; }
.kalvi-workspace { height: min(660px,calc(100vh - 305px)); min-height: 390px; display: grid; grid-template-columns: 180px minmax(380px,1fr) 205px; overflow: hidden; background: #f6f5fa; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 22px 55px rgba(47,42,62,.1); }
.conversation-list { padding: 18px 12px; background: #efedf4; border-right: 1px solid var(--line); }.conversation-list > div { margin: 0 5px 12px; display: flex; justify-content: space-between; align-items: center; }.conversation-list .eyebrow { margin: 0; font-size: 7px; }.conversation-list > div button { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: white; }.conversation-list svg { width: 12px; }
.conversation-list > button { width: 100%; padding: 11px 10px; display: flex; flex-direction: column; gap: 5px; color: #6e6c75; background: transparent; border: 0; border-radius: 7px; text-align: left; }.conversation-list > button.active { color: var(--ink); background: white; box-shadow: 0 4px 12px rgba(40,36,50,.05); }.conversation-list strong { font-size: 8px; }.conversation-list span { color: #96949c; font-size: 6px; }
.chat-panel { min-width: 0; display: grid; grid-template-rows: 1fr auto; }.chat-scroll { padding: 24px 8%; overflow-y: auto; }.chat-date { margin-bottom: 28px; color: #96949d; font-size: 7px; text-align: center; text-transform: uppercase; letter-spacing: .1em; }
.message { margin-bottom: 22px; display: flex; }.message p { margin: 0; font-size: 11px; line-height: 1.55; }.user-message { justify-content: flex-end; }.user-message p { max-width: 65%; padding: 12px 15px; background: #dedde3; border-radius: 12px 12px 3px 12px; }
.kalvi-message { gap: 11px; align-items: flex-start; }.kalvi-message > span { flex: 0 0 31px; height: 31px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 9px; }.kalvi-message svg { width: 16px; }.kalvi-message > div { max-width: 78%; padding: 2px 0; }.kalvi-message small { display: block; margin-bottom: 7px; color: #77757e; font-size: 6px; font-weight: 760; letter-spacing: .12em; }.hint-choices { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; }.hint-choices button { padding: 7px 9px; color: #45444b; background: white; border: 1px solid var(--line); border-radius: 99px; font-size: 7px; transition: border .2s, transform .2s; }.hint-choices button:hover { border-color: var(--blue); transform: translateY(-1px); }
.chat-composer { height: 62px; margin: 0 18px 18px; padding: 0 7px; display: grid; grid-template-columns: 34px 1fr auto 36px; gap: 5px; align-items: center; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 22px rgba(39,36,50,.06); }.chat-composer > button:first-child { width: 29px; height: 29px; display: grid; place-items: center; background: #f1eff4; border: 0; border-radius: 7px; }.chat-composer svg { width: 13px; }.chat-composer input { min-width: 0; border: 0; background: transparent; font-size: 9px; }.chat-composer > span { color: #8a8891; font-size: 6px; }.chat-composer .send-button { width: 32px; height: 32px; color: white; background: var(--ink); border: 0; border-radius: 50%; }
.thinking-panel { padding: 21px 16px; background: #f0eef5; border-left: 1px solid var(--line); }.thinking-panel .eyebrow { font-size: 7px; }.path-step { padding: 12px 0; display: grid; grid-template-columns: 27px 1fr; gap: 8px; border-top: 1px solid var(--line); opacity: .45; }.path-step.active, .path-step.complete { opacity: 1; }.path-step > span { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font: italic 7px var(--serif); }.path-step.complete > span { color: white; background: #5ea276; border-color: #5ea276; }.path-step.active > span { color: white; background: var(--blue); border-color: var(--blue); }.path-step strong { font-size: 8px; }.path-step p { margin: 4px 0 0; color: #7d7b84; font-size: 7px; line-height: 1.4; }.thinking-note { margin-top: 28px; padding: 14px; color: #4d3d18; background: #f2dd8f; border-radius: 9px; }.thinking-note strong { font-size: 8px; }.thinking-note p { margin: 7px 0 0; font: 11px/1.35 var(--serif); }

/* Library */
.library-view { background: #e2ddf0; }.library-heading { margin-bottom: 38px; }.library-tools { min-height: 55px; padding: 8px 10px; display: grid; grid-template-columns: minmax(240px,1fr) auto auto; gap: 12px; align-items: center; background: rgba(255,255,255,.58); border: 1px solid var(--line); border-radius: 11px; }.library-tools > label { height: 37px; padding: 0 10px; display: grid; grid-template-columns: 18px 1fr; gap: 7px; align-items: center; background: white; border: 1px solid var(--line); border-radius: 7px; }.library-tools svg { width: 14px; }.library-tools input { min-width: 0; background: transparent; border: 0; font-size: 9px; }.filter-chips { display: flex; gap: 4px; }.filter-chips button, .library-tools > button { height: 33px; padding: 0 11px; color: #6b6872; background: transparent; border: 0; border-radius: 7px; font-size: 8px; }.filter-chips button.active { color: white; background: var(--ink); }.library-tools > button { border: 1px solid var(--line); background: white; }
.library-layout { margin-top: 15px; display: grid; grid-template-columns: minmax(0,1fr); gap: 15px; align-items: start; }.source-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }.source-card { position: relative; min-width: 0; min-height: 245px; padding: 18px; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; transition: transform .2s, box-shadow .2s; }.source-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(38,32,53,.1); }.source-type { color: var(--muted); font-size: 7px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }.source-card h3 { position: relative; z-index: 2; margin: 14px 0 9px; font-size: 18px; line-height: 1.05; }.source-card > p { position: relative; z-index: 2; margin: 0; color: var(--muted); font-size: 7px; }.source-card footer { position: relative; z-index: 2; margin-top: auto; padding-top: 13px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 7px; }.source-card footer button { width: 25px; height: 25px; background: transparent; border: 1px solid currentColor; border-radius: 50%; }.source-card.featured { color: #f4f1e8; background: var(--ink); }.source-card.featured .source-type, .source-card.featured > p, .source-card.featured footer { color: #aaa99f; }.source-card.featured h3 { max-width: 80%; font: 22px/1.05 var(--serif); }.source-orbits { position: absolute; width: 160px; height: 160px; right: -45px; bottom: 8px; border: 1px solid #515249; border-radius: 50%; }.source-orbits::before, .source-orbits::after { content: ""; position: absolute; border: 1px solid #44453e; border-radius: 50%; }.source-orbits::before { inset: 25px -17px; }.source-orbits::after { inset: -17px 25px; }.source-orbits i { position: absolute; width: 6px; height: 6px; background: var(--yellow); border-radius: 50%; }.source-orbits i:nth-child(1) { left: 12px; top: 35px; }.source-orbits i:nth-child(2) { right: 30px; top: -3px; }.source-orbits i:nth-child(3) { left: 68px; bottom: -3px; }
.source-card.yellow { background: var(--yellow); }.source-card blockquote { margin: 26px 0 10px; font: 15px/1.2 var(--serif); }.media-preview { height: 75px; margin-bottom: 15px; padding: 12px; display: flex; align-items: center; gap: 12px; color: white; background: #292a25; border-radius: 7px; }.media-preview > span { width: 30px; height: 30px; display: grid; place-items: center; background: var(--orange); border-radius: 50%; font-size: 8px; }.media-preview > div { flex: 1; display: flex; gap: 4px; align-items: center; }.media-preview i { width: 3px; height: 15px; background: #a9aaa2; }.media-preview i:nth-child(2), .media-preview i:nth-child(6) { height: 28px; }.media-preview i:nth-child(3), .media-preview i:nth-child(5) { height: 38px; }
.source-card.blue { background: #8f9fe5; }.mini-chart { margin: auto 0 15px; height: 65px; display: flex; gap: 8px; align-items: end; border-bottom: 1px solid rgba(21,21,16,.35); }.mini-chart i { width: 13%; background: #344aaf; }.mini-chart i:nth-child(1) { height: 25%; }.mini-chart i:nth-child(2) { height: 43%; }.mini-chart i:nth-child(3) { height: 72%; }.mini-chart i:nth-child(4) { height: 58%; }.mini-chart i:nth-child(5) { height: 91%; }.source-card ul { margin: 22px 0; padding-left: 16px; color: #66665f; font-size: 8px; line-height: 1.9; }.source-card.coral { background: #f29a75; }.heat-map { margin: auto 0 12px; height: 73px; position: relative; background: #df7f59; border: 1px solid rgba(21,21,16,.25); }.heat-map i { position: absolute; border-radius: 50%; filter: blur(4px); }.heat-map i:nth-child(1) { width: 55px; height: 55px; left: 9%; top: 12%; background: #f2cb5c; }.heat-map i:nth-child(2) { width: 46px; height: 46px; left: 35%; top: 23%; background: #9dc688; }.heat-map i:nth-child(3) { width: 62px; height: 62px; right: 7%; top: 5%; background: #d95745; }.heat-map i:nth-child(4) { width: 30px; height: 30px; right: 34%; bottom: 2%; background: #7459c4; }
.source-card.filtered-out { display: none; }

/* Settings */
.settings-view { background: #f0ece2; }.settings-heading { padding-bottom: 40px; border-bottom: 1px solid var(--line); }.settings-saved { padding: 9px 12px; display: flex; gap: 7px; align-items: center; color: #5d5d55; background: #e3e7dc; border-radius: 99px; font-size: 8px; }.settings-saved i { width: 6px; height: 6px; background: #5ea276; border-radius: 50%; }
.settings-layout { display: grid; grid-template-columns: 190px minmax(0,760px); gap: clamp(35px,6vw,90px); }.settings-nav { padding-top: 37px; }.settings-nav button { width: 100%; padding: 12px 9px; color: var(--muted); background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; }.settings-nav button.active { color: var(--ink); font-weight: 730; }.settings-content { min-width: 0; }.setting-section { padding: 38px 0 15px; border-bottom: 1px solid var(--line-strong); }.setting-title { margin-bottom: 27px; display: grid; grid-template-columns: 33px 1fr; gap: 8px; }.setting-title > span { padding-top: 5px; color: var(--muted); font: italic 9px var(--serif); }.setting-title h2 { margin: 0 0 5px; font-size: 25px; }.setting-title p { margin: 0; color: var(--muted); font-size: 8px; }.setting-row { min-height: 77px; display: grid; grid-template-columns: 1fr minmax(190px,260px); gap: 24px; align-items: center; border-top: 1px solid var(--line); }.setting-row strong { font-size: 10px; }.setting-row p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }.setting-row > input, .setting-row > select { height: 37px; padding: 0 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-size: 9px; }.segmented { padding: 3px; display: grid; grid-template-columns: repeat(2,1fr); background: #e3ded2; border-radius: 8px; }.segmented button { height: 30px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; font-size: 8px; }.segmented button.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 7px rgba(21,21,16,.08); }.toggle { justify-self: end; width: 43px; height: 24px; padding: 3px; background: #ccc8bd; border: 0; border-radius: 99px; transition: background .2s; }.toggle i { display: block; width: 18px; height: 18px; background: white; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: transform .2s; }.toggle.on { background: var(--ink); }.toggle.on i { transform: translateX(19px); }.privacy-card { padding: 18px; display: grid; grid-template-columns: 39px 1fr auto; gap: 13px; align-items: center; color: #f5f2e9; background: var(--ink); border-radius: 10px; }.privacy-card > span { width: 37px; height: 37px; display: grid; place-items: center; color: #151510; background: var(--yellow); border-radius: 8px; }.privacy-card svg { width: 17px; }.privacy-card strong { font-size: 9px; }.privacy-card p { margin: 5px 0 0; color: #a9aaa0; font-size: 8px; }.privacy-card > b { padding: 6px 9px; color: #abd6b7; background: #283c2d; border-radius: 99px; font-size: 7px; }

/* Presentation and feedback */
.presentation-overlay { position: fixed; inset: 0; z-index: 80; padding: 5vw; display: grid; place-items: center; background: #0c0c0a; }.presentation-overlay[hidden] { display: none; }.presentation-overlay > button { position: absolute; right: 25px; top: 22px; width: 38px; height: 38px; color: white; background: #262620; border: 1px solid #45453d; border-radius: 50%; font-size: 22px; }.presented-slide { position: relative; width: min(88vw,1200px); aspect-ratio: 16/9; overflow: hidden; color: #173d2a; background: #9bcc86; }.presented-slide > p { position: absolute; z-index: 3; left: 5%; top: 5%; font-size: 9px; font-weight: 720; letter-spacing: .14em; }.presented-slide h2 { position: absolute; z-index: 3; left: 5%; top: 16%; margin: 0; font-size: clamp(62px,9vw,130px); line-height: .78; letter-spacing: -.08em; }.presented-slide > span { position: absolute; z-index: 4; left: 5%; bottom: 5%; font-size: 8px; }.presented-slide .building { width: 16%; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; min-width: 220px; padding: 12px 17px; color: white; background: var(--ink); border-radius: 9px; box-shadow: 0 15px 35px rgba(0,0,0,.2); font-size: 9px; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%,12px); transition: opacity .2s, transform .2s; }.toast.show { opacity: 1; transform: translate(-50%,0); }

body.theme-dark { --paper: #1b1c18; --paper-2: #22231e; --surface: #292a25; --ink: #f3f0e7; --muted: #aaa99f; --line: rgba(255,255,255,.12); --line-strong: rgba(255,255,255,.22); color-scheme: dark; }
.theme-dark .sidebar { color: #f3f0e7; background: #11120f; border-color: rgba(255,255,255,.1); }.theme-dark .brand-row img { filter: invert(1); mix-blend-mode: screen; }.theme-dark .brand-row > span { color: #aaa9a2; border-color: #3b3c36; }
.theme-dark .secondary-create button, .theme-dark .frame-nav button { color: #aeb0a8; background: #1c1d19; border-color: #353630; }.theme-dark .secondary-create button:hover, .theme-dark .frame-nav button:hover { color: white; background: #292a25; }.theme-dark .side-nav > p, .theme-dark .frame-nav > p { color: #74756d; }.theme-dark .side-nav button { color: #aeb0a8; }.theme-dark .side-nav button:hover { color: white; background: #292a25; }.theme-dark .side-nav button.active { color: white; background: #30312c; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }.theme-dark .side-nav small { color: #898b83; background: #262722; }.theme-dark .sidebar-note { background: #252621; border-color: #383a33; }.theme-dark .account-row { border-color: #353630; }
.theme-dark .topbar { background: rgba(27,28,24,.93); }.theme-dark .global-search, .theme-dark .top-actions button { color: var(--muted); background: #292a25; }.theme-dark .top-actions .avatar { color: #151510; background: #f3f0e7; border-color: #f3f0e7; }.theme-dark input::placeholder { color: #85867d; }
.theme-dark .quick-card { color: #151510; }.theme-dark .creation-strip { background: #252620; }.theme-dark .creation-strip > button { background: #30312b; }.theme-dark .template-card { color: var(--ink); }.theme-dark .template-data > div { color: #20201a; }.theme-dark .round-action, .theme-dark .library-status, .theme-dark .privacy-card, .theme-dark .editor-actions .dark-action, .theme-dark .chat-composer .send-button, .theme-dark .filter-chips button.active, .theme-dark .editor-toolbar button.selected { color: #f5f2e9; background: #0f100d; border-color: #0f100d; }.theme-dark .library-status button { color: #f5f2e9; }.theme-dark .toast { color: #151510; background: #f3f0e7; }
.theme-dark .editor-view { background: #20211d; }.theme-dark .editor-toolbar, .theme-dark .filmstrip, .theme-dark .inspector { background: #292a25; }.theme-dark .editor-grid { background: #181914; }.theme-dark .canvas-area { background: #1c1d19; }.theme-dark .editor-toolbar b, .theme-dark .inspector-tabs button.active, .theme-dark .layout-grid button, .theme-dark .inspector-help button { color: var(--ink); background: #34352f; }.theme-dark .inspector label { color: #cfcec5; }.theme-dark .inspector .inspector-help { background: #32303d; }.theme-dark .editor-actions button { background: #292a25; }
.theme-dark .kalvi-view { background: #20211e; }.theme-dark .kalvi-controls button { color: #cfcec7; background: #292a25; }.theme-dark .kalvi-workspace, .theme-dark .chat-composer { background: #252620; }.theme-dark .conversation-list, .theme-dark .thinking-panel { background: #191a16; }.theme-dark .conversation-list > div button, .theme-dark .hint-choices button, .theme-dark .chat-composer > button:first-child { color: var(--ink); background: #30312b; }.theme-dark .conversation-list > button { color: #a8a79f; }.theme-dark .conversation-list > button.active { color: var(--ink); background: #30312b; }.theme-dark .user-message p { background: #373833; }.theme-dark .path-step p, .theme-dark .kalvi-message small { color: var(--muted); }
.theme-dark .library-view { background: #20211d; }.theme-dark .library-tools { background: #262721; }.theme-dark .library-tools > label, .theme-dark .library-tools > button { color: var(--ink); background: #30312b; }.theme-dark .filter-chips button { color: var(--muted); }.theme-dark .source-card.featured { color: #f4f1e8; background: #11120f; }.theme-dark .source-card.yellow, .theme-dark .source-card.blue, .theme-dark .source-card.coral { color: #151510; }.theme-dark .source-card ul { color: var(--muted); }
.theme-dark .settings-view { background: #20211d; }.theme-dark .settings-saved { color: #c5c8be; background: #30342b; }.theme-dark .setting-row > input, .theme-dark .setting-row > select, .theme-dark .segmented button.active { color: var(--ink); background: #30312b; }.theme-dark .segmented { background: #141510; }.theme-dark .toggle.on { background: #5c78ff; }.theme-dark .privacy-card { color: #f5f2e9; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 220px minmax(0,1fr); }
  .quick-grid { grid-template-columns: 1fr; }.quick-card { min-height: 96px; }
  .creation-strip { grid-template-columns: 1fr 1fr; }.creation-strip > div { grid-column: 1 / -1; }
  .template-grid { grid-template-columns: repeat(3,1fr); }.template-card:nth-child(n+4) { display: none; }
  .project-grid { grid-template-columns: repeat(2,1fr); }.project-card:last-child { display: none; }
  .home-bottom-grid { grid-template-columns: 1fr; }
  .editor-grid { grid-template-columns: 140px minmax(380px,1fr); }.inspector { display: none; }
  .kalvi-workspace { grid-template-columns: 160px minmax(360px,1fr); }.thinking-panel { display: none; }
  .source-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 50; width: 100%; height: 68px; padding: 7px 10px; border: 0; border-top: 1px solid #353630; }
  .brand-row, .create-stack, .side-nav > p, .frame-nav, .sidebar-note, .account-row { display: none; }
  .sidebar-scroll { height: 100%; overflow: visible; }
  .side-nav { height: 100%; display: grid; grid-template-columns: repeat(3,1fr); }
  .side-nav button { height: 100%; padding: 3px; display: flex; flex-direction: column; justify-content: center; gap: 4px; text-align: center; font-size: 8px; }.side-nav button.active::before { left: 50%; top: -7px; width: 22px; height: 3px; transform: translateX(-50%); }.side-nav small, .side-nav i { display: none; }
  .topbar { height: 62px; padding: 0 16px; grid-template-columns: auto 1fr auto; }.crumb { display: none; }.global-search { grid-column: 2; }.top-actions { grid-column: 3; }.top-actions > button:first-child { display: none; }
  .mobile-menu { display: none; }
  .view-container { min-height: calc(100vh - 130px); }.view-panel { min-height: calc(100vh - 130px); padding: 34px 18px 100px; }
  .page-heading h1, .kalvi-header h1 { font-size: clamp(45px,11vw,70px); }
  .project-grid { grid-template-columns: 1fr; }.project-card:nth-child(n+3) { display: none; }
  .template-grid { grid-template-columns: repeat(2,1fr); }.template-card:nth-child(3) { display: none; }
  .home-bottom-grid { display: block; }.continue-card { margin-bottom: 12px; }.library-status { grid-template-columns: 85px 1fr; }
  .editor-view { padding: 22px 12px 86px; }.editor-header { align-items: center; }.editor-header .eyebrow, .editor-header > div:first-child > span { display: none; }.editor-header h1 { max-width: 52vw; font-size: 20px; }.editor-actions button:first-child { display: none; }.editor-toolbar { overflow-x: auto; }.editor-grid { height: calc(100vh - 190px); min-height: 500px; grid-template-columns: 95px minmax(520px,1fr); overflow-x: auto; }.filmstrip { padding-inline: 7px; }.slide-thumb { padding-left: 14px; }.canvas-area { padding: 25px; }.slide-canvas { min-width: 500px; }
  .kalvi-header { display: block; }.kalvi-controls { margin-top: 20px; }.kalvi-workspace { height: calc(100vh - 280px); min-height: 480px; grid-template-columns: 1fr; }.conversation-list { display: none; }.chat-scroll { padding-inline: 5%; }
  .library-tools { grid-template-columns: 1fr; }.filter-chips { overflow-x: auto; }.library-tools > button { display: none; }.library-layout { grid-template-columns: 1fr; }.source-grid { grid-template-columns: 1fr; }.source-card { min-height: 220px; }
  .settings-heading { display: block; }.settings-saved { margin-top: 22px; display: inline-flex; }.settings-layout { grid-template-columns: 1fr; gap: 15px; }.settings-nav { padding-top: 20px; display: flex; overflow-x: auto; }.settings-nav button { min-width: 100px; text-align: center; }.setting-row { grid-template-columns: 1fr; gap: 13px; padding: 17px 0; }.setting-row > input, .setting-row > select { width: 100%; }.toggle { justify-self: start; }
}

@media (max-width: 520px) {
  .global-search kbd { display: none; }.global-search { grid-template-columns: 18px 1fr; }
  .home-heading, .page-heading { display: block; }.round-action { margin-top: 25px; }
  .quick-card { grid-template-columns: 20px 34px 1fr auto; padding: 14px; }.quick-card > svg { width: 27px; }
  .creation-strip { grid-template-columns: 1fr; }.creation-strip > div { grid-column: auto; }.template-card strong { font-size: 18px; }
  .project-grid { grid-template-columns: 1fr; }.project-card:nth-child(n+2) { display: none; }.project-cover > span { font-size: 30px; }
  .library-status { grid-template-columns: 1fr; }.status-ring { width: 75px; height: 75px; }.status-ring span { font-size: 27px; }
  .kalvi-header h1 { font-size: 48px; }.kalvi-controls button:last-child { display: none; }.user-message p { max-width: 88%; }.kalvi-message > div { max-width: 85%; }.chat-composer { grid-template-columns: 31px 1fr 34px; }.chat-composer > span { display: none; }
  .privacy-card { grid-template-columns: 37px 1fr; }.privacy-card > b { grid-column: 2; justify-self: start; }
}

/* Tool-first application layout */
body::before { opacity: .05; }
.view-panel[hidden] { display: none !important; }
.app-shell { grid-template-columns: 244px minmax(0,1fr); }
.topbar { height: 58px; padding: 0 22px; grid-template-columns: 1fr minmax(280px,520px) 1fr; background: rgba(245,242,233,.95); }
.global-search { height: 34px; grid-column: 2; border-radius: 8px; }.top-actions { grid-column: 3; }.view-container { min-height: calc(100vh - 58px); }.view-panel { min-height: calc(100vh - 58px); padding: 32px clamp(24px,3.2vw,52px) 60px; }
.tool-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.tool-view-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.tool-view-header h1, .page-heading.tool-view-header h1, .kalvi-header.tool-view-header h1 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 680; letter-spacing: -.035em; }
.round-action { min-height: 38px; padding: 0 14px; border-radius: 8px; font-size: 9px; }.round-action:hover { transform: none; }

/* Home workspace */
.home-heading { width: 100%; max-width: 2600px; margin: 0 auto 24px; align-items: center; }.home-heading h1 { margin: 0; font-size: 30px; line-height: 1.12; font-weight: 650; letter-spacing: -.04em; }
.quick-grid, .creation-strip, .template-heading, .template-grid, .home-heading + .quick-grid, .project-grid, .home-bottom-grid, .section-title, .work-row { width: 100%; max-width: 2600px; margin-left: auto; margin-right: auto; }
.quick-card { min-height: 78px; padding: 12px 14px; grid-template-columns: 38px 1fr auto; gap: 12px; background: var(--surface); border-color: var(--line); border-radius: 10px; }.quick-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(25,24,18,.07); }.quick-card > span { display: none; }.quick-card > svg { width: 38px; height: 38px; padding: 9px; border-radius: 9px; }.quick-slides > svg { background: #f5d878; }.quick-kalvi > svg { background: #ddd7ee; }.quick-library > svg { background: #bdd7c0; }.quick-card strong { font-size: 11px; }.quick-card small { font-size: 7px; }.quick-card > i { align-self: center; color: var(--muted); font-size: 11px; }
.creation-strip { margin-top: 10px; padding: 12px; grid-template-columns: 150px 1fr 1fr; border-radius: 10px; }.creation-strip > div .eyebrow { margin: 0 0 3px; }.creation-strip > div h2 { font-size: 15px; }.creation-strip > button { min-height: 52px; background: transparent; border-radius: 8px; }.creation-icon { width: 31px; height: 31px; }.creation-strip > button { grid-template-columns: 31px 1fr auto; }
.section-title { margin-top: 38px; margin-bottom: 14px; align-items: center; }.section-title .eyebrow { display: none; }.section-title h2 { font-size: 18px; font-weight: 680; letter-spacing: -.025em; }.section-title > div > p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 8px; }.section-title > button { color: var(--muted); border: 0; font-size: 8px; }.template-heading { margin-top: 34px; }
.template-grid { gap: 10px; }.template-card > span { display: none; }.template-card > div { aspect-ratio: 1.65; border-radius: 8px; }.template-card strong { font-size: clamp(13px,1.2vw,20px); }.template-data strong { font-size: clamp(26px,3vw,45px); }.template-card > p { margin-top: 7px; font-size: 7px; }
.recent-heading { margin-bottom: 18px; }
.work-row + .work-row { margin-top: 34px; }
.work-row-heading { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.work-row-heading h3 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: -.015em; }
.work-row-heading span { color: var(--muted); font-size: 7px; }
.recent-grid .template-card > p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; }
.file-card { min-width: 0; padding: 0; color: var(--ink); background: transparent; border: 0; text-align: left; }
.file-card:hover .file-preview { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(25,24,18,.1); }
.file-preview { position: relative; aspect-ratio: 1.65; margin-bottom: 8px; padding: 14px; overflow: hidden; display: flex; flex-direction: column; color: #171712; border: 1px solid rgba(20,20,16,.08); border-radius: 8px; transition: transform .2s, box-shadow .2s; }
.file-preview span { position: relative; z-index: 1; font-size: 6px; font-weight: 800; letter-spacing: .13em; }
.file-preview b { position: relative; z-index: 1; width: 84%; margin-top: auto; font-size: clamp(11px,1vw,16px); line-height: 1.08; letter-spacing: -.035em; }
.file-card > strong { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.file-card > small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.document-card .file-preview i { position: relative; z-index: 1; width: 88%; height: 2px; margin-top: 5px; background: currentColor; opacity: .16; }
.document-card .file-preview i:nth-of-type(2) { width: 72%; }.document-card .file-preview i:nth-of-type(3) { width: 55%; }
.document-card .file-preview::after { content: ""; position: absolute; right: -12%; top: -24%; width: 48%; aspect-ratio: 1; border: 1px solid currentColor; border-radius: 50%; opacity: .18; }
.doc-blue { --preview: #b8c7ee; }.doc-cream { --preview: #eee3c7; }.doc-green { --preview: #b9d7b0; }.doc-purple { --preview: #d3c2e7; }.doc-coral { --preview: #e9a487; }.doc-navy { --preview: #aec4d7; }
.document-card .file-preview { background: var(--preview); }
.sheet-card .file-preview { background-color: var(--preview); background-image: linear-gradient(rgba(20,20,16,.13) 1px,transparent 1px),linear-gradient(90deg,rgba(20,20,16,.13) 1px,transparent 1px); background-size: 22% 25%; }
.sheet-card .file-preview::after { content: ""; position: absolute; right: 12%; bottom: 14%; width: 43%; height: 34%; background: linear-gradient(90deg,#4965cf 0 22%,transparent 22% 32%,#efd05a 32% 58%,transparent 58% 68%,#ef7855 68%); border-bottom: 2px solid rgba(20,20,16,.36); opacity: .9; }
.sheet-card .file-preview b { width: auto; margin-top: auto; font-size: clamp(19px,1.8vw,30px); }
.sheet-card .file-preview i { display: none; }
.sheet-green { --preview: #add2b3; }.sheet-blue { --preview: #b5c7ed; }.sheet-yellow { --preview: #ecd477; }.sheet-purple { --preview: #cfc2e4; }.sheet-coral { --preview: #eab198; }.sheet-navy { --preview: #b6c7d3; }
.project-grid { gap: 10px; }.project-card { border-radius: 9px; }.project-cover { aspect-ratio: 2.05; }.project-info { padding: 12px 13px 14px; }.project-info h3 { margin: 7px 0 5px; font-size: 13px; }.project-cover > span { font-size: clamp(18px,1.7vw,28px); }.project-flight .project-cover > span { font-size: clamp(26px,3vw,43px); }.project-deep .project-cover > span { font-size: clamp(30px,3.5vw,52px); }
.home-bottom-grid { margin-top: 10px; }.continue-card, .library-status { min-height: 130px; padding: 18px; border-radius: 9px; }.continue-card h3, .library-status h3 { font: 16px/1.2 var(--sans); letter-spacing: -.025em; }.status-ring { width: 72px; height: 72px; }.status-ring span { font-size: 26px; }.library-status { grid-template-columns: 76px 1fr; }

/* Story Builder */
.story-builder-overlay { position: fixed; inset: 0; z-index: 75; padding: 24px; display: grid; place-items: center; }
.story-builder-overlay[hidden] { display: none !important; }
.story-builder-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(18,18,14,.48); backdrop-filter: blur(4px); }
.story-builder-dialog { position: relative; width: min(620px,100%); max-height: calc(100vh - 48px); overflow-y: auto; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 26px 80px rgba(16,15,12,.24); }
.story-builder-dialog > header { padding: 20px; display: grid; grid-template-columns: 38px minmax(0,1fr) 32px; gap: 12px; align-items: start; border-bottom: 1px solid var(--line); }
.story-builder-dialog > header > span { width: 38px; height: 38px; display: grid; place-items: center; color: #151510; background: var(--yellow); border-radius: 9px; }
.story-builder-dialog > header svg { width: 18px; height: 18px; }
.story-builder-dialog h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.story-builder-dialog header p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.story-builder-dialog > header > button { width: 32px; height: 32px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; font-size: 20px; }
.story-builder-dialog > header > button:hover { color: var(--ink); background: var(--paper-2); }
.story-builder-dialog form { padding: 20px; }
.story-builder-dialog label { display: grid; gap: 7px; color: var(--muted); font-size: 8px; font-weight: 700; }
.story-builder-dialog textarea, .story-builder-dialog input, .story-builder-dialog select { width: 100%; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; outline: none; font: 10px/1.5 var(--sans); }
.story-builder-dialog textarea { min-height: 88px; padding: 11px 12px; resize: vertical; }
.story-builder-dialog input, .story-builder-dialog select { height: 39px; padding: 0 11px; }
.story-builder-dialog textarea:focus, .story-builder-dialog input:focus, .story-builder-dialog select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(92,120,232,.12); }
.story-fields { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.story-steps { margin-top: 18px; padding: 12px; display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; background: var(--paper-2); border-radius: 10px; }
.story-steps > div { min-width: 0; padding: 8px; display: flex; gap: 8px; }
.story-steps b { flex: 0 0 auto; color: var(--blue); font: italic 11px var(--serif); }
.story-steps span { min-width: 0; display: grid; gap: 4px; }
.story-steps strong { font-size: 9px; }
.story-steps small { color: var(--muted); font-size: 7px; line-height: 1.4; }
.story-builder-dialog footer { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
.story-builder-dialog footer button { height: 38px; padding: 0 14px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; font-size: 9px; font-weight: 700; }
.story-builder-dialog footer button[type="submit"] { color: #f5f2e9; background: var(--ink); border-color: var(--ink); }
.story-builder-dialog footer button span { margin-left: 8px; }

/* Kalvi workspace */
.kalvi-view { height: calc(100vh - 58px); min-height: 600px; padding: 0; display: flex; flex-direction: column; background: var(--paper); }
.kalvi-header { flex: 0 0 70px; margin: 0; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tool-title { display: flex; align-items: center; gap: 11px; }.tool-title > span { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 9px; }.tool-title svg { width: 17px; }.tool-title p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.kalvi-controls button { height: 32px; padding: 0 10px; background: var(--paper); border-radius: 7px; }
.kalvi-workspace { flex: 1; min-height: 0; height: auto; display: grid; grid-template-columns: 205px minmax(0,1fr); background: var(--paper); border: 0; border-radius: 0; box-shadow: none; }
.conversation-list { padding: 16px 10px; background: var(--paper-2); }.conversation-list > div { margin: 0 6px 10px; }.conversation-list > div > p { margin: 0; color: var(--muted); font-size: 8px; font-weight: 700; }.conversation-list > button { padding: 10px; }.conversation-list > button.active { background: var(--surface); box-shadow: none; }.conversation-list strong { font-size: 9px; }.conversation-list span { font-size: 7px; }
.chat-panel { min-width: 0; grid-template-rows: 43px 1fr auto; background: var(--paper); }.chat-context-bar { padding: 0 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }.chat-context-bar span { padding: 5px 8px; color: #36533f; background: #dce9dc; border-radius: 99px; font-size: 7px; font-weight: 700; }.chat-context-bar p { margin: 0; overflow: hidden; color: var(--muted); font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }.chat-context-bar button { color: var(--muted); background: transparent; border: 0; font-size: 8px; }
.chat-scroll { width: min(780px,calc(100% - 48px)); margin: 0 auto; padding: 36px 0 20px; }.chat-date { margin-bottom: 35px; }.message { margin-bottom: 28px; }.message p { font-size: 13px; line-height: 1.6; }.user-message p { max-width: 72%; padding: 11px 14px; background: var(--paper-2); border-radius: 12px; }.kalvi-message { gap: 13px; }.kalvi-message > span { flex-basis: 32px; height: 32px; }.kalvi-message > div { max-width: 720px; }.kalvi-message small { margin-bottom: 6px; }.hint-choices button { padding: 7px 10px; background: var(--surface); font-size: 8px; }
.chat-composer { width: min(780px,calc(100% - 48px)); height: 62px; margin: 0 auto 24px; grid-template-columns: 35px minmax(0,1fr) auto 36px; background: var(--surface); border-radius: 14px; box-shadow: 0 8px 24px rgba(39,36,50,.08); }.chat-composer input { font-size: 10px; }.thinking-panel { display: none; }

/* Knowledge and settings tools */
.library-view, .settings-view { background: var(--paper); }.library-heading, .settings-heading { margin: 0 0 22px; padding: 0 0 22px; border-bottom: 1px solid var(--line); }.library-tools { background: var(--surface); }.library-layout { grid-template-columns: minmax(0,1fr); }.source-grid { grid-template-columns: repeat(3,1fr); gap: 9px; }.source-card, .source-card.featured, .source-card.yellow, .source-card.blue, .source-card.coral { min-height: 142px; padding: 16px; color: var(--ink); background: var(--surface); border-radius: 8px; }.source-card.featured { border-left: 3px solid #5c78ff; }.source-card.yellow { border-left: 3px solid #dbb83f; }.source-card.blue { border-left: 3px solid #7f91dc; }.source-card.coral { border-left: 3px solid #e78360; }.source-card.featured .source-type, .source-card.featured > p, .source-card.featured footer { color: var(--muted); }.source-card h3, .source-card.featured h3 { max-width: none; margin: 9px 0 6px; font: 14px/1.18 var(--sans); letter-spacing: -.025em; }.source-card blockquote, .source-card ul, .source-orbits, .mini-chart, .heat-map, .media-preview { display: none; }.source-card footer { padding-top: 9px; }
.settings-layout { max-width: 980px; grid-template-columns: 170px minmax(0,700px); gap: 46px; }.settings-nav { padding-top: 22px; }.setting-section { padding-top: 26px; }.setting-title h2 { font-size: 18px; }.setting-title { margin-bottom: 18px; }.settings-saved { flex: 0 0 auto; }

.theme-dark .kalvi-header, .theme-dark .chat-panel, .theme-dark .library-view, .theme-dark .settings-view { background: var(--paper); }.theme-dark .conversation-list { background: #171814; }.theme-dark .chat-context-bar span { color: #b9d4bf; background: #26352a; }.theme-dark .quick-card, .theme-dark .creation-strip, .theme-dark .source-card, .theme-dark .source-card.featured, .theme-dark .source-card.yellow, .theme-dark .source-card.blue, .theme-dark .source-card.coral { color: var(--ink); background: var(--surface); }.theme-dark .secondary-create button[data-create-type="document"] { color: white; background: #506bd5; }.theme-dark .secondary-create button[data-create-type="spreadsheet"] { color: white; background: #39885a; }.theme-dark .quick-slides > svg { color: #151510; background: #d9bd5c; }.theme-dark .quick-kalvi > svg { color: #151510; background: #b9b1d4; }.theme-dark .quick-library > svg { color: #151510; background: #93b598; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 220px minmax(0,1fr); }.template-grid, .file-row-grid { grid-template-columns: repeat(3,1fr); }.template-card:nth-child(n) { display: block; }.quick-grid { grid-template-columns: repeat(3,1fr); }.quick-card { min-height: 78px; }.source-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }.topbar { height: 58px; grid-template-columns: minmax(0,1fr) auto; }.global-search { min-width: 0; grid-column: 1; }.top-actions { grid-column: 2; }.view-panel { min-height: calc(100vh - 126px); padding: 24px 18px 90px; }.home-heading { display: flex; }.home-heading h1 { font-size: 24px; }.quick-grid { grid-template-columns: 1fr; }.creation-strip { grid-template-columns: 1fr 1fr; }.creation-strip > div { grid-column: 1 / -1; }.template-grid, .file-row-grid { grid-template-columns: repeat(2,1fr); }.template-card:nth-child(n) { display: block; }
  .kalvi-view { height: calc(100vh - 126px); min-height: 520px; padding: 0 0 68px; }.kalvi-header { min-height: 64px; padding: 0 16px; display: flex; }.tool-title p { display: none; }.kalvi-controls { margin: 0; }.kalvi-controls button:last-child { display: none; }.kalvi-workspace { grid-template-columns: 1fr; }.conversation-list { display: none; }.chat-context-bar { padding: 0 12px; }.chat-scroll, .chat-composer { width: min(680px,calc(100% - 28px)); }.chat-scroll { padding-top: 24px; }.chat-composer { margin-bottom: 14px; }
  .library-heading, .settings-heading { display: flex; }.library-layout { grid-template-columns: 1fr; }.source-grid { grid-template-columns: 1fr; }.settings-layout { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 520px) {
  .home-heading { align-items: flex-start; }.home-heading .round-action { margin-top: 0; padding-inline: 11px; }.home-heading .round-action span { display: none; }.creation-strip { grid-template-columns: 1fr; }.creation-strip > div { grid-column: auto; }.tool-view-header h1, .page-heading.tool-view-header h1, .kalvi-header.tool-view-header h1 { font-size: 20px; }.tool-subtitle { font-size: 8px; }.chat-context-bar p { display: none; }.chat-context-bar { grid-template-columns: auto 1fr; }.chat-context-bar button { justify-self: end; }.user-message p { max-width: 88%; }.chat-composer { grid-template-columns: 31px 1fr 34px; }.chat-composer > span { display: none; }
  .file-row-grid { grid-template-columns: 1fr; }
  .story-builder-overlay { padding: 12px; }.story-builder-dialog { max-height: calc(100vh - 24px); border-radius: 13px; }.story-builder-dialog > header, .story-builder-dialog form { padding: 16px; }.story-fields, .story-steps { grid-template-columns: 1fr; }.story-steps { gap: 2px; }.story-steps > div { padding: 6px; }
}

@media (max-height: 760px) and (min-width: 821px) {
  .sidebar-note { display: none; }.create-stack { margin-bottom: 14px; }.frame-nav { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
