:root {
  --ink: #172033;
  --slate: #65718a;
  --muted: #8d98ad;
  --paper: #f7f8fb;
  --panel: #ffffff;
  --line: #dce2eb;
  --line-strong: #c4ccd9;
  --blue: #304f88;
  --blue-2: #416aa9;
  --blue-soft: #eaf0fa;
  --copper: #ae5f3d;
  --green: #287866;
  --shadow: 0 12px 34px rgba(23, 32, 51, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { height: 100%; height: 100dvh; margin: 0; overflow: hidden; }
.boot-splash {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  overflow: hidden; color: white; isolation: isolate;
  background: #0868bd url("/theoryvisionary-splash.png") center center / cover no-repeat;
  animation: boot-arrive .8s ease-out both;
}
.boot-splash::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(0, 37, 89, .78) 0%, rgba(0, 65, 126, .42) 42%, rgba(255, 193, 47, .06) 75%);
}
.boot-splash.departing { animation: boot-depart .72s cubic-bezier(.4, 0, .2, 1) forwards; }
.boot-copy { width: min(630px, 80vw); margin-right: 28vw; text-align: center; text-shadow: 0 3px 18px rgba(0, 28, 67, .6); }
.boot-mark {
  width: 92px; height: 92px; margin: 0 auto 18px; display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.82); border-radius: 28px; font: 700 55px Georgia, serif;
  background: linear-gradient(145deg, rgba(7,87,169,.82), rgba(255,191,45,.76));
  box-shadow: 0 18px 55px rgba(0,44,96,.36), inset 0 0 24px rgba(255,255,255,.18);
  animation: boot-mark-rise 1.3s cubic-bezier(.2,.8,.2,1) both;
}
.boot-kicker { margin: 0 0 4px; text-transform: uppercase; letter-spacing: .28em; font-size: 12px; font-weight: 800; }
.boot-copy h1 { margin: 0; font: 700 clamp(44px, 7vw, 84px)/1 Georgia, serif; letter-spacing: -.035em; }
.boot-developer { margin: 13px 0 0; font-size: 15px; letter-spacing: .06em; }
.boot-credit { margin: 7px 0 0; color:rgba(255,255,255,.8); font-size:11px; letter-spacing:.12em; text-transform:uppercase; }
.boot-progress { width: min(310px, 65vw); height: 4px; margin: 30px auto 0; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.3); }
.boot-progress span { display: block; width: 100%; height: 100%; transform-origin: left; background: linear-gradient(90deg, #fff, #ffd24d); animation: boot-load 2.35s ease-in-out both; }
.boot-recovery { margin:20px auto 0; padding:13px 15px; max-width:440px; border:1px solid rgba(255,255,255,.42); border-radius:12px; background:rgba(0,36,78,.7); text-align:left; }
.boot-recovery[hidden] { display:none; }
.boot-recovery p { margin:0 0 10px; font-size:13px; line-height:1.45; }
.boot-recovery button { width:100%; color:#0b467d; background:#fff; }
.boot-sky-glow { position: absolute; right: 14%; bottom: 30%; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,210,78,.2); filter: blur(18px); animation: sunrise-pulse 2.4s ease-in-out infinite alternate; }
.boot-cloud { position: absolute; width: 180px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.16); filter: blur(7px); }
.boot-cloud-one { top: 16%; left: -12%; animation: cloud-drift 12s linear infinite; }
.boot-cloud-two { top: 27%; left: -22%; width: 260px; animation: cloud-drift 16s 1.2s linear infinite; }
.math-sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; perspective: 900px; }
.math-sky::before { content:""; position:absolute; inset:-20% 0 0; background:repeating-linear-gradient(108deg,transparent 0 8%,rgba(255,231,143,.07) 9%,transparent 13%); transform:translateX(-8%); animation:equation-rays 7s ease-in-out infinite alternate; }
.math-sky span {
  position: absolute; left: var(--x); top: -14%; display: block;
  color: rgba(255,255,255,.56); font: 500 calc(18px * var(--s))/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: .02em; text-shadow: 0 0 12px rgba(255,243,188,.6), 0 12px 28px rgba(0,49,105,.48);
  animation: equation-rain 12s var(--d) linear infinite;
  will-change: transform, opacity; white-space: nowrap;
}
.math-sky span:nth-child(3n) { color: rgba(255,226,126,.72); animation-duration: 15.5s; }
.math-sky span:nth-child(2n) { animation-duration:13.5s; }
.startup-menu {
  position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(135deg, rgba(2,54,110,.92), rgba(12,111,180,.82) 48%, rgba(255,194,45,.62)),
    url("/theoryvisionary-splash.png") center / cover no-repeat;
}
.project-hub { width:min(1040px,94vw); max-height:92vh; overflow:auto; background:rgba(250,253,255,.98); border:1px solid rgba(255,255,255,.8); border-radius:22px; box-shadow:0 30px 90px rgba(18,58,102,.28); animation:startup-card-in .62s cubic-bezier(.2,.8,.2,1) both; }
.hub-header { display:flex; justify-content:space-between; gap:24px; padding:24px 28px 18px; color:white; background:linear-gradient(120deg,#123a66,#0f74a8 62%,#e3a526 160%); }
.hub-header h1 { margin:5px 0 6px; font:700 34px/1.1 Georgia,serif; }
.hub-header p { margin:0; max-width:720px; color:#dceef8; }
.hub-header .eyebrow { color:#ffd768; }
.icon-close { font-size:24px; align-self:flex-start; color:white; border-color:rgba(255,255,255,.35); background:rgba(255,255,255,.12); }
.hub-grid { display:block; min-height:560px; background:linear-gradient(145deg,#f8fbff,#f2f5fa); }
.hub-projects,.session-studio { padding:24px 28px 26px; }
.session-studio { max-width:760px; margin:0 auto; background:#f3f8fb; border-left:1px solid var(--line); border-right:1px solid var(--line); }
.loader-page { display:none; animation:loader-page-in .24s ease both; }
.loader-page.active { display:block; }
@keyframes loader-page-in { from{opacity:0;transform:translateY(7px)} to{opacity:1;transform:none} }
.loader-stepper { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; padding:0 20px; color:#dce8f4; background:#10243d; }
.project-layout-toggle { margin:0 0 14px; border:1px solid #c3d8e8; border-radius:11px; background:#f8fcff; }
.project-layout-toggle summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; cursor:pointer; }
.project-layout-toggle summary span:first-child { display:grid; gap:2px; }
.project-layout-toggle summary small { color:var(--muted); font-weight:400; }
.project-layout-toggle > div { display:grid; grid-template-columns:1fr 1fr auto; align-items:end; gap:10px; padding:0 12px 12px; }
.project-dock-designer { margin-top:18px; padding:16px; border:1px solid #b9cfdf; border-radius:14px; background:linear-gradient(145deg,#f8fcff,#fffdf3); box-shadow:0 8px 24px rgba(18,58,102,.06); }
.project-dock-designer > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.project-dock-designer h3 { margin:2px 0 4px; color:#123a66; }
.project-dock-designer p { margin:0; color:#60778b; font-size:11px; line-height:1.4; }
.project-main-choice { display:grid; grid-template-columns:1fr minmax(180px,320px) auto; align-items:center; gap:10px; margin:13px 0; padding:10px; border:1px solid #d4e1ea; border-radius:10px; background:white; }
.project-main-choice div { display:grid; gap:2px; }
.project-main-choice small { color:var(--muted); }
.project-dock-columns { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.project-dock-columns h4 { margin:0 0 3px; }
.project-dock-columns .export-dropzone { min-height:120px; max-height:230px; overflow:auto; scrollbar-gutter:stable; }
.loader-stepper button { position:relative; display:grid; grid-template-columns:34px 1fr; grid-template-rows:auto auto; column-gap:9px; padding:14px 16px; border:0; border-radius:0; color:#9eb0c5; background:transparent; text-align:left; }
.loader-stepper button::after { content:""; position:absolute; left:0; right:0; bottom:0; height:3px; background:transparent; }
.loader-stepper button span { grid-row:1/3; width:29px; height:29px; display:grid; place-items:center; align-self:center; border:1px solid #52677f; border-radius:9px; font-weight:800; }
.loader-stepper button strong { color:#dce8f4; font-size:12px; }
.loader-stepper button small { font-size:10px; }
.loader-stepper button.active { color:white; background:rgba(255,255,255,.055); }
.loader-stepper button.active::after { background:linear-gradient(90deg,#4bc5ec,#f0bd3b); }
.loader-stepper button.active span { color:#10243d; border-color:#8de3f5; background:#8de3f5; }
.loader-stepper button.complete span { color:#153d35; border-color:#78d5b6; background:#9be1c9; }
.loader-lead { max-width:720px; margin:0 0 16px; color:#60778b; line-height:1.5; }
.loader-ready { max-width:860px; margin:0 auto; padding:32px; }
.loader-ready h2 { margin:5px 0 8px; color:#123a66; font-size:28px; }
.loader-ready-card { display:grid; gap:4px; padding:18px; margin:20px 0 12px; border:1px solid #bdd4e4; border-radius:14px; background:white; box-shadow:0 8px 24px rgba(18,58,102,.07); }
.loader-ready-card span,.loader-ready-grid span { color:#60778b; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.09em; }
.loader-ready-card strong { color:#123a66; font-size:20px; }
.loader-ready-card code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#60778b; }
.loader-ready-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.loader-ready-grid article { min-height:128px; display:grid; align-content:start; gap:8px; padding:15px; border:1px solid var(--line); border-radius:12px; background:#fbfdff; }
.loader-ready-grid strong { color:#173d60; line-height:1.35; }
.loader-ready-grid small { color:#718397; line-height:1.4; }
.loader-launch-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:16px 0; }
.loader-launch-grid button { min-height:82px; display:grid; gap:5px; align-content:center; text-align:left; }
.loader-launch-grid button strong { font-size:14px; }
.loader-launch-grid button small { color:inherit; opacity:.76; font-size:10px; line-height:1.35; }
.loader-ready-actions { display:flex; justify-content:space-between; gap:9px; padding-top:8px; }
.outset-environment,.outset-plan { max-width:860px; margin:0 auto; padding:30px; }
.outset-environment h2,.outset-plan h2 { margin:5px 0 8px; color:#123a66; font-size:27px; }
.outset-choice-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:11px; padding:16px; border:1px solid #c8d9e6; border-radius:14px; background:white; }
.outset-choice-grid label,.outset-plan-grid label { display:grid; gap:5px; color:#41596e; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.outset-choice-grid select,.outset-plan-grid select,.outset-plan-grid textarea { width:100%; padding:9px; border:1px solid var(--line-strong); border-radius:8px; color:var(--ink); background:#fbfcfe; text-transform:none; letter-spacing:0; font-weight:400; }
.outset-tool-toggles { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; margin:12px 0; }
.outset-tool-toggles label { display:flex; align-items:center; gap:7px; padding:9px; border:1px solid var(--line); border-radius:9px; color:#456075; background:#fbfdff; font-size:11px; }
.outset-page-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:15px; color:#687d90; font-size:11px; }
.journal-outset-choice { margin:12px 0; padding:13px; display:grid; grid-template-columns:1fr 1fr; gap:8px; border:1px solid #bfd3e2; border-radius:11px; background:white; }
.journal-outset-choice legend { padding:0 6px; color:#123a66; font-weight:800; }
.journal-outset-choice label { margin:0 !important; }
.journal-outset-choice label:last-child { grid-column:1/-1; }
.outset-plan-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.outset-plan-grid textarea { min-height:110px; resize:vertical; }
.outset-plan-grid .outset-missions { grid-column:1/-1; }
.outset-plan-grid .outset-missions textarea { min-height:130px; }
.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.section-heading h2,.session-studio h2 { margin:4px 0 14px; color:#123a66; }
.location-badge { padding:5px 9px; border-radius:999px; color:#205b78; background:#dceef6; font-size:11px; font-weight:700; }
.current-project-card { padding:16px; margin-bottom:12px; border-radius:14px; background:white; border:1px solid #c9ddea; box-shadow:0 6px 18px rgba(18,58,102,.08); }
.current-project-card strong { display:block; color:#123a66; font-size:17px; }
.current-project-card code { display:block; margin-top:5px; color:#60778b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.package-economy-note { display:grid; grid-template-columns:auto 1fr; gap:9px; align-items:start; margin:0 0 14px; padding:10px 12px; border:1px solid #d7c776; border-radius:10px; color:#5e5221; background:#fffbe8; font-size:11px; line-height:1.45; }
.package-economy-note strong { color:#745c08; }
.package-card-heading { display:flex; align-items:center; gap:10px; }
.package-glyph { flex:0 0 auto; width:36px; height:36px; display:grid; place-items:center; border-radius:9px; color:white; background:linear-gradient(145deg,#24598b,#d99a20); font-size:9px; font-weight:900; letter-spacing:.06em; box-shadow:0 4px 10px rgba(22,58,91,.18); }
.package-card-actions { display:flex; justify-content:flex-end; gap:7px; margin-top:11px; }
.package-project { display:grid; grid-template-columns:auto minmax(0,1fr) auto; }
.project-package-columns { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:14px 0; padding:15px; border:1px solid var(--line); border-radius:12px; background:linear-gradient(110deg,#e9f5ff,#fff8d9); }
.project-package-columns h3 { margin:0; color:var(--ink); font-size:13px; }
.project-package-columns section > p { margin:3px 0 8px; color:var(--muted); font-size:10px; }
.package-dropzone { min-height:170px; max-height:230px; overflow:auto; align-content:start; padding:9px; border:2px dashed var(--line-strong); border-radius:10px; background:#f7f9fc; }
.package-dropzone.included { border-color:#dbc781; background:#fffdf5; }
.project-package-columns .current-project-card { margin:0; box-shadow:none; }
.project-package-columns .recent-projects { gap:6px; }
.recent-projects { display:grid; gap:7px; max-height:180px; overflow:auto; }
.recent-project { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.recent-project button { flex:1; text-align:left; border:0; background:transparent; padding:0; color:#163d61; overflow:hidden; text-overflow:ellipsis; }
.recent-project small { color:#738598; white-space:nowrap; }
.project-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:14px 0; }
.template-choice { grid-column:1/-1; display:grid; gap:5px; color:#41596e; font-size:12px; font-weight:700; }
.template-choice select { width:100%; }
.main-file-dialog { width:min(520px,92vw); border:1px solid #bfd0e0; border-radius:16px; padding:0; box-shadow:0 26px 80px rgba(18,58,102,.35); }
.main-file-dialog::backdrop { background:rgba(8,24,42,.58); backdrop-filter:blur(3px); }
.main-file-dialog form { padding:24px; }
.main-file-dialog h2 { margin:5px 0 8px; color:#123a66; }
.main-file-dialog p { color:#536a7e; line-height:1.5; }
.main-file-dialog label { display:grid; gap:6px; color:#41596e; font-size:12px; font-weight:700; }
.main-file-dialog select { width:100%; }
.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; }
.cloud-explainer { border-top:1px solid var(--line); padding-top:12px; color:#536a7e; font-size:12px; }
.cloud-explainer summary { cursor:pointer; color:#205b78; font-weight:700; }
.bridge-row { display:flex; flex-wrap:wrap; gap:7px; }
.session-studio label { display:grid; gap:4px; margin:10px 0; color:#41596e; font-size:12px; font-weight:700; }
.session-studio select,.session-studio textarea,.session-studio input { width:100%; }
.customization-progress { height:7px; margin-top:10px; overflow:hidden; border-radius:999px; background:#dce5ec; }
.customization-progress span { display:block; width:0; height:100%; background:linear-gradient(90deg,#147aa7,#e4a825); transition:width .2s ease; }
#customizationProgressText { display:block; margin-top:5px; color:#60778b; }
.session-intro { color:#60778b; line-height:1.45; }
.session-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }
.session-actions .primary { flex:1 0 100%; }
.dock-browser-tools { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:5px; padding:8px 12px 4px; }
.client-project-loader { border-bottom:1px solid var(--line); background:linear-gradient(145deg,color-mix(in srgb,var(--blue-soft) 72%,var(--panel)),var(--panel)); }
.client-project-loader > summary { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 12px; cursor:pointer; color:var(--blue); font-size:12px; }
.client-project-loader > summary span:first-child { display:grid; gap:1px; }
.client-project-loader > summary small { color:var(--muted); font-weight:400; }
.client-project-current { display:grid; gap:4px; margin:0 9px 7px; padding:8px; border:1px solid var(--line); border-radius:8px; background:var(--panel); }
.client-project-current button { justify-self:start; margin-top:3px; padding:5px 7px; font-size:10px; }
.client-project-current span,.client-project-current code { color:var(--muted); font-size:10px; }
.client-project-current strong,.client-project-current code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.client-project-history { display:grid; gap:4px; max-height:150px; padding:0 9px 7px; overflow:auto; }
.client-project-history > button { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; justify-content:space-between; gap:8px; width:100%; padding:7px 8px; text-align:left; }
.client-project-history .package-glyph { width:28px; height:28px; border-radius:7px; font-size:8px; }
.client-project-history > button span:first-child { display:grid; min-width:0; }
.client-project-history strong,.client-project-history small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.client-project-history small,.client-project-history p { color:var(--muted); font-size:10px; }
.client-project-actions { display:grid; grid-template-columns:1fr 1fr; gap:5px; padding:0 9px 9px; }
.client-project-actions button { padding:6px; font-size:10px; }
.dock-browser-tools input { min-width:0; }
.dock-browser-tools button { padding:6px 8px; font-size:11px; }
.dock-keyboard-help { padding: 5px 12px 7px; border-bottom: 1px solid var(--line); color: var(--slate); background: var(--panel); }
.dock-keyboard-help summary { cursor: pointer; color: var(--blue); font-size: 11px; font-weight: 750; }
.dock-keyboard-help p { margin: 6px 0 1px; font-size: 10px; line-height: 1.45; }
.folder-breadcrumbs { display:flex; align-items:center; gap:3px; padding:4px 12px 8px; overflow-x:auto; white-space:nowrap; border-bottom:1px solid var(--line); }
.folder-breadcrumbs button { padding:2px 5px; border:0; color:#245b7a; background:transparent; font-size:11px; }
.folder-breadcrumbs span { color:#9aabba; }
.main-document-bar { display:grid; grid-template-columns:minmax(0,1fr) minmax(90px,1fr) auto; align-items:center; gap:6px; padding:7px 12px; border-bottom:1px solid var(--line); background:var(--panel); }
.main-document-bar > div { min-width:0; display:grid; gap:1px; }
.main-document-bar strong,.main-document-bar small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.main-document-bar strong { color:var(--ink); font-size:11px; }
.main-document-bar small { color:var(--muted); font-size:10px; }
.main-document-bar select,.main-document-bar button { min-width:0; padding:5px 6px; font-size:10px; }
.main-document-bar.missing { background:#fff4d9; border-left:4px solid #d89b1d; }
.main-document-bar.missing strong { color:#7b4b00; }
.main-document-bar.ready { background:#edf8f4; }
.forpages-manager { border-bottom:1px solid var(--line); background:color-mix(in srgb, var(--blue-soft) 48%, var(--panel)); }
.forpages-manager summary { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 12px; cursor:pointer; color:var(--blue); font-size:12px; }
.forpages-manager summary span:first-child { display:grid; gap:1px; }
.forpages-manager summary small { color:var(--muted); font-weight:400; }
.forpages-manager > p { margin:0; padding:0 12px 8px; color:var(--slate); font-size:11px; line-height:1.4; }
.include-count { padding:3px 7px; border-radius:999px; background:var(--panel); color:var(--green); font-size:10px; white-space:nowrap; }
.forpages-folder-list { max-height:180px; overflow:auto; padding:0 9px 9px; display:grid; gap:3px; }
.forpages-folder-list label { display:grid; grid-template-columns:18px 1fr; align-items:start; gap:5px; padding:5px 6px; border-radius:6px; color:var(--ink); font-size:11px; }
.forpages-folder-list label:hover { background:var(--panel); }
.forpages-folder-list code { overflow-wrap:anywhere; }
.upload-number-option { display:flex; align-items:center; gap:4px; }
.session-focus-chip { display:none; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:6px 9px; border-radius:999px; background:#fff4ca; color:#6f5410; font-size:10px; font-weight:800; }
.project-compass { margin:8px 12px; padding:11px; border:1px solid #c7dae5; border-radius:11px; background:linear-gradient(145deg,#f8fcff,#fff9e6); }
.project-compass h2 { margin:2px 0 5px; color:#123a66; font-size:15px; }
.project-compass p { margin:5px 0; color:#526a7e; font-size:11px; line-height:1.4; }
.project-compass ol { margin:7px 0 8px; padding-left:20px; color:#263f55; font-size:11px; line-height:1.45; }
.project-compass button { width:100%; padding:6px; font-size:11px; }
body.session-large { font-size:17px; }
body.session-large .tree-row { min-height:40px; }
body.session-contrast { --paper:#fff; --ink:#071829; --slate:#24384a; --line:#718294; }
@media (max-width:900px) { .session-studio{border-left:0;border-right:0}.project-hub{max-height:96vh}.hub-header h1{font-size:28px}.loader-stepper{padding:0 5px}.loader-stepper button{display:grid;grid-template-columns:1fr;padding:9px 4px;text-align:center}.loader-stepper button span{grid-row:auto;margin:auto}.loader-stepper button small{display:none}.loader-ready-grid,.loader-launch-grid,.outset-choice-grid,.outset-plan-grid,.project-package-columns,.project-dock-columns{grid-template-columns:1fr}.project-layout-toggle>div,.project-main-choice{grid-template-columns:1fr}.loader-ready,.outset-environment,.outset-plan{padding:22px}.hub-grid{min-height:0}.outset-tool-toggles{grid-template-columns:1fr 1fr}.outset-plan-grid .outset-missions{grid-column:auto} }
.startup-card {
  position: relative; width: min(610px, 94vw); padding: 38px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.7); border-radius: 28px;
  background: rgba(250,253,255,.94); box-shadow: 0 30px 90px rgba(0,35,79,.4); backdrop-filter: blur(18px);
  animation: startup-card-in .62s cubic-bezier(.2,.8,.2,1) both;
}
.startup-card h1 { margin: 6px 0 12px; color: #123a66; font: 700 42px/1.05 Georgia, serif; }
.startup-card > p:not(.eyebrow):not(.startup-credit) { max-width: 520px; color: #526b85; line-height: 1.6; }
.startup-actions { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 10px; margin-top: 25px; }
.startup-actions button { min-height: 48px; font-weight: 750; }
.startup-actions .primary { background: linear-gradient(135deg, #0a6ebd, #07539a); box-shadow: 0 8px 24px rgba(8,94,167,.25); }
.startup-credit { margin: 24px 0 0; color: #788b9f; font-size: 11px; letter-spacing: .04em; }
.startup-sun { position: absolute; right: -28px; top: -42px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, #fff5b8 0%, #ffd143 45%, rgba(255,209,67,0) 72%); opacity: .76; }
@keyframes boot-arrive { from { opacity: 0; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }
@keyframes boot-depart { to { opacity: 0; transform: scale(1.03); visibility: hidden; } }
@keyframes boot-mark-rise { from { opacity: 0; transform: translateY(28px) scale(.82) rotate(-5deg); } to { opacity: 1; transform: none; } }
@keyframes boot-load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sunrise-pulse { to { transform: scale(1.18); opacity: .9; } }
@keyframes cloud-drift { to { transform: translateX(125vw); } }
@keyframes equation-rays { to { transform:translateX(8%) scale(1.08); opacity:.72; } }
@keyframes equation-rain {
  0% { opacity:0; transform:translate3d(-5vw,-12vh,-180px) rotate(-2deg); }
  10% { opacity:.76; }
  72% { opacity:.55; }
  100% { opacity:0; transform:translate3d(10vw,126vh,130px) rotate(3deg); }
}
@keyframes startup-card-in { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.skip-link:focus { top: 10px; }
body.theme-dark {
  --ink: #e8edf6; --slate: #aeb8ca; --muted: #7f8ba1; --paper: #111827;
  --panel: #182132; --line: #303c51; --line-strong: #46536a; --blue: #7da2df;
  --blue-2: #91b4ea; --blue-soft: #23334e; --copper: #e39a75; --green: #68bda7;
  background: var(--paper);
}
body.theme-sepia {
  --ink: #352d25; --slate: #776858; --muted: #9a8873; --paper: #f3ead8;
  --panel: #fffaf0; --line: #ded0b8; --line-strong: #cbb99c; --blue: #526b73;
  --blue-2: #6d858c; --blue-soft: #e6e2d3; --copper: #9b5639; --green: #54745f;
}
body.theme-contrast {
  --ink: #000; --slate: #202020; --muted: #444; --paper: #fff; --panel: #fff;
  --line: #111; --line-strong: #000; --blue: #003cff; --blue-2: #0028aa;
  --blue-soft: #e5edff; --copper: #9d2400; --green: #006d32;
}
body.scale-80 { font-size: 80%; }
body.scale-90 { font-size: 90%; }
body.scale-110 { font-size: 110%; }
body.scale-125 { font-size: 125%; }
body.scale-150 { font-size: 150%; }
body.font-mono #editor { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
body.font-serif #editor { font-family: Georgia, "Times New Roman", serif; }
body.font-accessible #editor, body.font-accessible #journalNotes, body.font-accessible textarea { font-family: Verdana, Tahoma, Arial, sans-serif; line-height: 1.7; }
button, input, textarea { font: inherit; }
button, .button-link {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
  transition: .14s ease;
}
button:focus-visible, .button-link:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .tree-row:focus-visible {
  outline: 3px solid var(--copper); outline-offset: 2px;
}
button:hover, .button-link:hover { border-color: var(--blue-2); color: var(--blue); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--blue); border-color: var(--blue); color: white; }
button.primary:hover { background: var(--blue-2); color: white; }

.topbar {
  height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  background: var(--ink);
  color: white;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 170px; }
.brand .mark {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--copper), #d18a65);
  font-family: Georgia, serif; font-size: 20px; font-weight: 700;
}
.brand strong { display: block; letter-spacing: .02em; }
.brand span { display: block; color: #aeb8ca; font-size: 11px; margin-top: 1px; }
.workspace-tabs { justify-self:center; display:flex; min-width:0; background:#0d1524; padding:3px; border-radius:9px; }
.workspace-tabs button { display:flex; align-items:center; justify-content:center; gap:5px; min-width:0; border:0; color:#aeb8ca; background:transparent; padding:6px 9px; white-space:nowrap; }
.workspace-tabs button.active { background: #2b3850; color: white; }
.tab-symbol { min-width:14px; font-size:14px; line-height:1; text-align:center; }
.tab-symbol-text { font-size:8px; font-weight:900; letter-spacing:-.03em; }
.tab-label { font-size:11px; }
.compile-group { justify-self:end; display:flex; align-items:center; gap:5px; min-width:0; }
.compile-group button:not(.primary) { background: #243048; border-color: #3a4965; color: #dfe6f1; }
.top-tool { width:34px; height:34px; display:grid; place-items:center; padding:0; font-size:16px; line-height:1; }
.top-tool:hover { background:#31415f !important; color:white !important; }
.compile-action { min-height:36px; padding-inline:12px; font-weight:800; white-space:nowrap; box-shadow:0 4px 14px rgba(40,120,102,.28); }
.compile-indicator { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #9be1c9; }
.is-compiling .compile-indicator { border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; background: transparent; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pathbar {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.pathbar label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--slate); font-weight: 700; }
.pathbar input {
  flex: 1; min-width: 120px; border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 10px; color: var(--ink); background: var(--paper);
}
.status {
  min-width: 120px; text-align: right; font-size: 12px; color: var(--slate);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status.working { color: var(--copper); }
.status.success { color: var(--green); }
.status.error { color: #a43333; }

.workspace {
  height: calc(100dvh - 106px);
  display: grid;
  grid-template-columns: var(--dock-width,26fr) var(--editor-width,39fr) var(--preview-width,35fr);
  gap: 1px;
  background: var(--line);
  position: relative;
}
.layout-bar { min-height:44px; display:none; align-items:flex-start; gap:9px; padding:10px; border:1px solid var(--line); border-radius:12px; background:linear-gradient(110deg,#e9f5ff,#fff8d9); box-shadow:0 16px 42px rgba(20,35,55,.2); }
body.layout-adjuster-open .layout-bar { position:fixed; top:66px; right:12px; z-index:80; display:flex !important; max-width:calc(100vw - 24px); }
.layout-adjuster-launch { white-space:nowrap; }
.layout-bar-toggle { font-weight:800; color:var(--blue); }
.layout-bar-content { min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:7px; flex:1; }
.layout-bar label { display:flex; align-items:center; gap:6px; color:var(--slate); font-size:10px; font-weight:700; }
.layout-bar select { max-width:165px; padding:6px; border:1px solid var(--line); border-radius:7px; background:white; }
.layout-bar button { padding:6px 9px; font-size:10px; }
.pane-toggles { display:flex; gap:3px; padding:2px; border:1px solid var(--line); border-radius:8px; background:white; }
.pane-toggles button { border:0; color:var(--muted); background:transparent; }
.pane-toggles button[aria-pressed="true"] { color:white; background:var(--blue); }
.layout-popouts { display:flex; gap:3px; padding:2px; border:1px solid var(--line); border-radius:8px; background:white; }
.layout-bar.collapsed .layout-bar-content { display:none; }
.layout-bar.collapsed { width:max-content; position:fixed; top:64px; right:9px; z-index:30; border:1px solid var(--line); border-radius:9px; box-shadow:var(--shadow); }
body.bars-minimized .topbar { height:44px; }
body.bars-minimized .brand, body.bars-minimized .workspace-tabs, body.bars-minimized .session-focus-chip { display:none; }
body.bars-minimized .compile-group { margin-left:auto; }
body.bars-minimized .pathbar { display:none; }
body.bars-minimized .workspace { height:calc(100vh - 44px) !important; }
body.bars-minimized.layout-adjuster-open .layout-bar { top:49px; }
body.layout-controls-minimized .workspace { height:calc(100vh - 106px); }
body.bars-minimized.layout-controls-minimized .workspace { height:calc(100vh - 78px); }
body.workflow-rules-minimized .project-compass,
body.workflow-rules-minimized .forpages-manager,
body.workflow-rules-minimized .dock-keyboard-help,
body.workflow-rules-minimized .order-legend,
body.workflow-rules-minimized .creation-target { display:none !important; }
.workspace-resizer { position:absolute; top:0; bottom:0; width:9px; transform:translateX(-50%); z-index:20; cursor:col-resize; background:transparent; }
.workspace-resizer::after { content:""; position:absolute; top:0; bottom:0; left:4px; width:1px; background:var(--line-strong); transition:.15s; }
.workspace-resizer:hover::after,.workspace-resizer.dragging::after { width:3px; left:3px; background:var(--copper); }
.workspace-resizer.first { left:var(--dock-edge,26%); }
.workspace-resizer.second { left:var(--editor-edge,65%); }
.workspace.hide-dock .dock-pane,.workspace.hide-editor .editor-pane,.workspace.hide-preview .preview-pane { display:none !important; }
.workspace.hide-dock .workspace-resizer.first,.workspace.hide-editor .workspace-resizer,.workspace.hide-preview .workspace-resizer.second { display:none; }
.restore-dock-button { display:none; position:fixed; left:10px; top:50%; z-index:80; padding:9px 11px; transform:translateY(-50%); color:white; border-color:#0b6da7; background:#0b6da7; box-shadow:0 8px 25px rgba(9,64,105,.28); writing-mode:vertical-rl; }
body.dock-is-hidden .restore-dock-button { display:block; }
body.dock-is-detached .restore-dock-button { display:block; }
.workspace.dock-detached .dock-pane,.workspace.dock-detached .workspace-resizer.first { display:none !important; }
.pane { min-width: 0; background: var(--panel); overflow: hidden; }
.dock-pane { grid-column:1; }
.editor-pane { grid-column:2; }
.preview-pane { grid-column:3; }

.pane-title, .editor-toolbar {
  height: 71px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.eyebrow { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .11em; color: var(--copper); font-weight: 800; }
h1, h2 { margin: 2px 0 0; font-family: Georgia, "Times New Roman", serif; color: var(--ink); }
h1 { font-size: 21px; } h2 { font-size: 20px; }
.view-switch { display: flex; gap: 4px; }
.dock-window-actions { display: flex; align-items: center; gap: 6px; }
.dock-window-actions > button { padding: 6px 8px; font-size: 10px; }
.dock-sync-state { padding:4px 7px; border:1px solid #a9d8c2; border-radius:999px; background:#e8f8f0; color:#176342; font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.dock-sync-state.syncing { border-color:#e1c46d; background:#fff8d9; color:#765514; }
.dock-sync-state.blocked { border-color:#e2aaa4; background:#fff0ee; color:#933c34; }
.view-switch button { width: 34px; padding: 6px; }
.view-switch button.selected { background: var(--blue-soft); color: var(--blue); border-color: #b8c8e0; }
.dock-pane { display:flex; flex-direction:column; min-height:0; overflow-y:auto; scrollbar-gutter:stable; overscroll-behavior:contain; }
.dock-pane .pane-title { position:sticky; top:0; z-index:12; flex:0 0 auto; background:var(--panel); }
.dock-pane > :not(.tree) { flex:0 0 auto; }
body.dock-whole-scroll .dock-pane .tree { flex:0 0 auto; min-height:clamp(240px,42dvh,420px); overflow:visible; }
.dock-actions { padding: 9px 12px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; border-bottom:1px solid var(--line); }
.dock-actions button { padding-left:5px; padding-right:5px; font-size:12px; }
body.dock-popout { overflow: hidden; }
body.dock-popout .boot-splash,
body.dock-popout .startup-menu,
body.dock-popout .topbar,
body.dock-popout .pathbar { display: none !important; }
body.dock-popout .layout-bar { display:none !important; }
body.dock-popout .workspace { display: block; height: 100vh; }
body.dock-popout .workspace > :not(.dock-pane) { display: none !important; }
body.dock-popout .dock-pane { display: flex; width: 100%; height: 100%; }
body.dock-popout #breakoutDockBtn { display: none; }
body.editor-popout { overflow:hidden; }
body.editor-popout .boot-splash,
body.editor-popout .startup-menu,
body.editor-popout .topbar,
body.editor-popout .pathbar { display:none !important; }
body.editor-popout .layout-bar { display:none !important; }
body.editor-popout .workspace { display:block; height:100vh; overflow:auto; background:#cfd4db; }
body.editor-popout .workspace > :not(.editor-pane) { display:none !important; }
body.editor-popout .editor-pane { display:grid; width:100%; min-height:100vh; border:0; background:#d8dde4; }
body.editor-popout .editor-toolbar { background:#f8f9fb; box-shadow:0 2px 5px rgba(22,33,50,.15); z-index:2; }
body.editor-popout .editor-shell { grid-template-columns:1fr; width:min(816px,calc(100% - 48px)); min-height:1056px; height:auto; margin:34px auto 140px; background:#fff; border:1px solid #b8bec8; box-shadow:0 8px 24px rgba(30,40,55,.24); }
body.editor-popout #lineNumbers { display:none; }
body.editor-popout #editor { min-height:1056px; height:auto; padding:72px 78px 180px; color:#111; background:#fff; font:16px/1.65 Cambria,Georgia,"Times New Roman",serif; white-space:pre-wrap; overflow:hidden; scroll-padding-bottom:180px; }
body.editor-popout .editor-footer { position:sticky; bottom:0; z-index:3; }
body.editor-popout #breakoutEditorBtn { display:none; }
body.editor-math-popout .workspace { display:grid; grid-template-columns:minmax(500px,56fr) minmax(420px,44fr); height:100vh; overflow:hidden; }
body.editor-math-popout .workspace > :not(.editor-pane):not(.preview-pane) { display:none !important; }
body.editor-math-popout .editor-pane { display:grid; min-height:100vh; overflow:auto; }
body.editor-math-popout .editor-pane { grid-column:1; }
body.editor-math-popout .preview-pane { display:grid !important; grid-column:2; min-height:100vh; }
body.editor-math-popout .preview-tab:not([data-preview="mathdock"]) { display:none; }
body.editor-math-popout .editor-shell { width:calc(100% - 28px); margin:18px auto; }
body.editor-math-popout #editor { padding:48px; }
body.math-popout { overflow:hidden; }
body.math-popout .boot-splash,
body.math-popout .startup-menu,
body.math-popout .topbar,
body.math-popout .pathbar { display:none !important; }
body.math-popout .layout-bar { display:none !important; }
body.math-popout .workspace { display:block; height:100vh; overflow:auto; background:linear-gradient(135deg,#e8f4ff,#fff6d7); }
body.math-popout .workspace > :not(.editor-pane),
body.math-popout .editor-title-row,
body.math-popout .document-ribbon,
body.math-popout .macro-builder,
body.math-popout .editor-shell,
body.math-popout .editor-footer { display:none !important; }
body.math-popout .editor-pane { display:block; width:100%; overflow:visible; background:transparent; }
body.math-popout .editor-toolbar { display:block; height:auto; padding:18px; border:0; overflow:visible; }
body.math-popout .math-synthesizer { display:grid !important; max-width:1200px; margin:0 auto; border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); }
body.viewer-popout { overflow:hidden; }
body.viewer-popout .boot-splash,
body.viewer-popout .startup-menu,
body.viewer-popout .topbar,
body.viewer-popout .pathbar,
body.viewer-popout .layout-bar { display:none !important; }
body.viewer-popout .workspace { display:block; height:100vh; }
body.viewer-popout .workspace > :not(.preview-pane) { display:none !important; }
body.viewer-popout .preview-pane { display:grid !important; width:100%; height:100vh; }
.order-legend {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; padding: 7px 14px; color: var(--muted);
  font-size: 10px; border-bottom: 1px solid var(--line);
}
.creation-target { width: 100%; overflow: hidden; color: var(--blue); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.dot.numbered { background: var(--green); }

.tree { flex:1 0 220px; min-height:160px; height:auto; overflow:auto; padding:8px; scrollbar-gutter:stable both-edges; overscroll-behavior:contain; }
.tree-node { position: relative; }
.tree-row {
  display:grid; grid-template-columns:15px 18px auto minmax(0,1fr) auto auto; align-items:center; gap:6px;
  min-height: 40px; padding: 6px 7px; margin: 2px 0; border: 1px solid transparent;
  margin-left: calc(var(--depth, 0) * 13px); border-radius: 7px; cursor: pointer;
}
.tree-row:hover { background: var(--paper); border-color: var(--line); }
.tree-row.selected { background: var(--blue-soft); border-color: #bfd0e9; }
.tree-row[aria-selected="true"] .node-name { font-weight: 750; }
.tree-row.drop-target { outline: 2px solid var(--copper); }
.tree-row.dragging { opacity: .45; }
.drag-handle { color: var(--muted); cursor: grab; }
.node-icon { color: var(--slate); text-align: center; }
.node-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.order-badge { color: var(--green); font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 800; }
.node-actions { display:flex; align-items:center; gap:3px; }
.node-menu { opacity:0; min-width:28px; min-height:28px; padding:2px 5px; font-size:11px; border-radius:5px; }
.node-delete { opacity:.72; min-width:28px; min-height:28px; padding:2px 5px; font-size:11px; border-radius:5px; }
.node-delete { color:#9b2f2f; border-color:#e7bebe; background:#fff7f7; font-size:17px; line-height:1; }
.node-delete:hover { color:#fff; border-color:#a83c3c; background:#a83c3c; }
.forpages-row-toggle { min-height:28px; padding:3px 6px; border-color:var(--line); color:var(--slate); font-size:10px; white-space:nowrap; }
.forpages-row-toggle.included { border-color:#9acbbd; background:#e8f6f1; color:#17654f; }
.tree-row:hover .node-menu,.tree-row:hover .node-delete { opacity:1; }
.tree-row:focus .node-menu,.tree-row:focus .node-delete { opacity:1; }
.tree-row:focus-within .node-menu,.tree-row:focus-within .node-delete { opacity:1; }
.tree-children { border-left: 1px solid var(--line); }
.tree-node.collapsed > .tree-children { display: none; }
.folder-explorer { display:grid; gap:7px; margin:7px 9px; padding:9px; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb,var(--blue-soft) 45%,var(--panel)); }
.folder-explorer header,.folder-explorer footer { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.folder-explorer h2 { margin:1px 0 0; font-size:14px; }
.folder-explorer-paths { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.folder-explorer-paths label { display:grid; gap:3px; min-width:0; color:var(--slate); font-size:9px; font-weight:800; text-transform:uppercase; }
.folder-explorer-paths select { min-width:0; width:100%; padding:6px; border:1px solid var(--line-strong); border-radius:6px; background:var(--panel); }
.folder-explorer-items { display:grid; gap:3px; max-height:145px; overflow:auto; padding:4px; border:1px solid var(--line); border-radius:6px; background:var(--panel); }
.folder-explorer-item { display:grid; grid-template-columns:auto auto minmax(0,1fr); align-items:center; gap:6px; padding:4px 5px; border-radius:5px; }
.folder-explorer-item:hover { background:var(--blue-soft); }
.folder-explorer-item code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.folder-explorer footer { align-items:flex-end; color:var(--muted); font-size:9px; }
.folder-explorer footer > div { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
@media (max-width:760px) { .folder-explorer-paths { grid-template-columns:1fr; } .folder-explorer footer { align-items:stretch; flex-direction:column; } }
.shortcut-save-panel { margin:7px 9px; border:1px solid var(--line); border-radius:9px; background:var(--panel); }
.shortcut-save-panel > summary { display:flex; justify-content:space-between; gap:8px; padding:9px; cursor:pointer; }
.shortcut-save-panel > summary span:first-child { display:grid; gap:2px; }
.shortcut-save-panel > summary small { color:var(--muted); font-size:9px; font-weight:400; }
.shortcut-key-grid { display:grid; grid-template-columns:1fr 1fr; gap:5px; padding:0 9px 8px; }
.shortcut-key-grid > span { display:flex; align-items:center; gap:3px; padding:6px; border-radius:6px; background:var(--paper); font-size:9px; }
.shortcut-key-grid small { margin-left:4px; color:var(--muted); }
.shortcut-key-grid kbd { padding:2px 4px; border:1px solid var(--line-strong); border-bottom-width:2px; border-radius:4px; background:white; font:700 9px/1 monospace; }
.alt-save-create { display:flex; align-items:center; gap:7px; padding:0 9px 8px; }
.alt-save-create small { color:var(--muted); font-size:9px; }
.ui-scale-state { margin:0 9px 8px; padding:5px 7px; border-radius:6px; color:var(--blue); background:var(--blue-soft); font-size:9px; font-weight:800; }
.alt-save-list { display:grid; gap:5px; max-height:210px; overflow:auto; padding:0 9px 9px; }
.alt-save-list > p { margin:0; color:var(--muted); font-size:10px; }
.alt-save-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 7px; padding:7px; border:1px solid var(--line); border-radius:7px; background:white; }
.alt-save-card > strong,.alt-save-card > small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.alt-save-card > small { grid-column:1; color:var(--muted); }
.alt-save-card > div { grid-column:2; grid-row:1 / span 2; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:3px; }
.alt-save-card button { padding:4px 6px; font-size:9px; }

.tree.grid-view {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  align-content: start; gap: 8px; padding: 12px;
}
.grid-view > .tree-node { min-width: 0; }
.grid-view .tree-children { display: none; }
.grid-view .tree-row {
  display: flex; flex-direction: column; justify-content: center; min-height: 105px; text-align: center;
  margin-left: 0; padding: 12px; border-color: var(--line); background: var(--panel);
}
.grid-view .node-icon { font-size: 24px; }
.grid-view .node-name { width: 100%; white-space: normal; line-height: 1.2; }
.grid-view .node-actions { margin-top:5px; }
.grid-view .node-menu,.grid-view .node-delete { opacity:1; }
.grid-view .drag-handle { display: none; }

.editor-pane { container-type:inline-size; display:grid; grid-template-rows:auto 1fr 27px; min-width:0; }
.editor-toolbar { display:block; height:auto; padding:0; }
.editor-title-row { min-height:64px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; }
.file-identity { flex:1 1 180px; min-width:0; }
.file-identity strong { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:3px; }
.editor-file-actions { flex:0 1 auto; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; min-width:0; }

@container (max-width:900px) {
  .editor-title-row { align-items:flex-start; flex-direction:column; }
  .file-identity,.editor-file-actions { width:100%; }
  .editor-file-actions { justify-content:flex-start; }
  .editor-file-actions button { flex:1 1 auto; }
}

@media (min-width:1900px) {
  .session-focus-chip { display:inline-block; max-width:min(220px,12vw); }
}

@media (min-width:1181px) and (max-width:1540px) {
  .tab-label { display:none; }
  .workspace-tabs button { width:34px; padding:6px; }
}
.document-ribbon { display:flex; align-items:stretch; gap:0; min-height:58px; padding:6px 8px; overflow-x:auto; border-top:1px solid var(--line); background:linear-gradient(#fff,#f4f6fa); }
.ribbon-group { display:flex; flex-direction:column; justify-content:space-between; gap:4px; padding:0 9px; border-right:1px solid var(--line); }
.ribbon-group:last-child { border-right:0; }
.macro-builder { display:grid; grid-template-columns:auto minmax(130px,.7fr) 105px minmax(180px,1.3fr); gap:8px; align-items:end; padding:10px 12px; border-top:1px solid var(--line); background:linear-gradient(90deg,#eef6fb,#fff9e9); }
.macro-builder > div:first-child { align-self:center; }
.macro-builder label { display:grid; gap:3px; color:var(--slate); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.macro-builder label span { color:var(--muted); font-size:8px; font-weight:400; text-transform:none; letter-spacing:0; }
.macro-builder input,.macro-builder select { min-width:0; padding:6px 7px; border:1px solid var(--line); border-radius:6px; background:white; color:var(--ink); }
.macro-builder code { grid-column:2 / span 2; min-width:0; overflow:auto; padding:7px; border-radius:6px; background:#172235; color:#f8e6a8; white-space:nowrap; }
.math-synthesizer { display:grid; grid-template-columns:minmax(320px,1fr) minmax(210px,.38fr); gap:12px; align-items:end; padding:16px; border-top:1px solid #c9d7e5; background:linear-gradient(135deg,#f1f7fc,#fffaf0); }
.math-synthesizer label { display:grid; gap:6px; color:#4b5e73; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.055em; }
.math-synthesizer textarea,.math-synthesizer select { width:100%; min-width:0; padding:10px 11px; border:1px solid #b8c7d7; border-radius:9px; background:#fff; color:#172033; font:13px/1.5 "Cascadia Mono",Consolas,monospace; resize:vertical; text-transform:none; letter-spacing:0; box-shadow:inset 0 1px 2px rgba(20,40,65,.04); }
.math-synth-heading { align-self:center; display:grid; gap:3px; }
.math-synth-heading strong { font:700 17px/1.25 Georgia,"Times New Roman",serif; color:#18324d; }
.math-synth-heading small { color:#6f7e8e; font-size:10px; }
.math-builder-nav { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:5px; padding:5px; border:1px solid #cbd8e5; border-radius:10px; background:rgba(255,255,255,.78); }
.math-builder-nav button { flex:1 1 88px; padding:7px 10px; border-color:transparent; color:#4d6075; background:transparent; font-size:11px; }
.math-builder-nav button.selected { border-color:#96b8da; background:#dfeefa; color:#174f78; box-shadow:0 2px 7px rgba(31,92,122,.12); }
.math-tool-pane:not(.active) { display:none; }
.math-language-input textarea { min-height:70px; }
.math-synth-actions { display:flex; flex-wrap:wrap; gap:6px; }
.formula-shortcut { grid-column:1 / -1; display:grid; grid-template-columns:minmax(280px,1fr) auto minmax(360px,1.3fr); gap:8px; align-items:end; margin:0; padding:9px; border:1px solid rgba(31,92,122,.22); border-radius:8px; background:rgba(255,255,255,.72); }
.formula-shortcut legend { padding:0 5px; color:var(--blue); font:700 10px/1.2 system-ui,sans-serif; }
.formula-shortcut label { display:grid; gap:4px; }
.formula-shortcut input { width:100%; min-width:0; padding:7px 8px; border:1px solid var(--line-strong); border-radius:7px; background:white; color:#172033; font:12px/1.4 "Cascadia Mono",Consolas,monospace; }
.formula-shortcut small { align-self:center; color:var(--muted); font:9px/1.45 system-ui,sans-serif; }
.formula-shortcut small code { padding:2px 4px; background:#f3f6fa; color:#25344c; white-space:nowrap; }
.math-formula-gui { grid-column:1 / -1; display:grid; grid-template-columns:1.15fr repeat(4,minmax(115px,1fr)) auto; gap:7px; align-items:end; margin:0; padding:9px; border:1px solid rgba(31,92,122,.22); border-radius:8px; background:rgba(255,255,255,.7); }
.math-formula-gui legend { padding:0 5px; color:var(--blue); font:700 10px/1.2 system-ui,sans-serif; }
.math-formula-gui label[hidden] { display:none; }
.math-formula-gui input,.math-formula-gui select { font-family:inherit; }
.unix-math-keyboard { grid-column:1 / -1; display:grid; grid-template-columns:minmax(240px,.8fr) auto minmax(280px,1.2fr); gap:7px 14px; align-items:center; margin:0; padding:9px; border:1px solid rgba(177,119,22,.25); border-radius:8px; background:rgba(255,255,255,.72); }
.unix-math-keyboard legend { padding:0 5px; color:var(--copper); font:700 10px/1.2 system-ui,sans-serif; }
.unix-math-keyboard p { grid-column:3; margin:0; color:var(--muted); font:10px/1.4 system-ui,sans-serif; }
.unix-math-keyboard p code,.unix-math-keyboard kbd { padding:1px 4px; border:1px solid var(--line); border-radius:4px; background:white; color:var(--ink); font:10px/1.2 Consolas,monospace; }
.math-keyboard-switch { display:flex !important; grid-auto-flow:column; grid-template-columns:auto 1fr; align-items:center; justify-content:start; gap:7px !important; text-transform:none !important; letter-spacing:0 !important; font-size:10px !important; }
.math-keyboard-state { padding:4px 8px; border-radius:999px; background:#eee; color:var(--muted); font:800 9px/1 system-ui,sans-serif; text-transform:uppercase; letter-spacing:.06em; }
.math-keyboard-state.on { background:#d9f3e7; color:#176342; box-shadow:0 0 0 2px rgba(23,99,66,.12); }
.math-keyboard-try { grid-column:1; }
.math-keyboard-result { grid-column:2 / -1; color:var(--blue); font:11px/1.35 Consolas,monospace; overflow-wrap:anywhere; }
.math-key-palette { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:4px; }
.math-key-palette button { min-width:32px; padding:5px 7px; font:15px/1.1 Georgia,serif; }
.math-output { grid-column:1; padding:10px; border:1px solid #cbd8e5; border-radius:10px; background:rgba(255,255,255,.76); }
.math-synthesizer code { min-width:0; overflow:auto; padding:8px; border-radius:6px; background:#172235; color:#f8e6a8; white-space:pre-wrap; }
#mathLatexPreview { grid-column:1; min-height:42px; padding:11px 12px; border-radius:9px; }
#mathLatexPreview + .math-synth-actions { grid-column:2; align-self:end; justify-content:flex-end; }
.math-library { grid-column:1 / -1; display:grid; grid-template-columns:minmax(180px,.8fr) minmax(240px,1.4fr) 170px auto; gap:8px; align-items:center; padding:10px; border:1px solid rgba(31,92,122,.22); border-radius:9px; background:rgba(255,255,255,.8); }
.math-library > div:first-child { display:grid; gap:2px; }
.math-library small { color:var(--muted); font:9px/1.3 system-ui,sans-serif; }
.math-library input,.math-library select { min-width:0; padding:7px 8px; border:1px solid var(--line-strong); border-radius:7px; background:white; color:#172033; }
.math-library-results { grid-column:1 / -1; display:grid; grid-template-columns:repeat(auto-fill,minmax(155px,1fr)); gap:5px; max-height:260px; overflow:auto; padding:4px; }
.math-library-entry { display:grid; grid-template-columns:1fr auto; gap:5px; align-items:center; min-height:50px; padding:6px 7px; text-align:left; }
.math-library-entry span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; }
.math-library-entry code { padding:3px 5px; color:#f8e6a8; font-size:10px; }
.math-dock-panel { padding:0 !important; background:linear-gradient(160deg,#f4f8fc,#fffaf0); }
.math-dock-header { display:flex; justify-content:space-between; gap:16px; padding:18px; border-bottom:1px solid #d1dce7; background:rgba(255,255,255,.78); }
.math-dock-header h2 { margin:3px 0 5px; }
.math-dock-header p { max-width:620px; margin:0; color:#667789; font-size:12px; line-height:1.5; }
.math-dock-save-state { align-self:start; padding:5px 9px; border:1px solid #bdd1c6; border-radius:999px; background:#edf8f1; color:#286246; font-size:9px; font-weight:800; white-space:nowrap; }
.math-dock-save-state.dirty { border-color:#ddc77f; background:#fff8df; color:#755710; }
.math-dock-toolbar { display:flex; flex-wrap:wrap; gap:6px; padding:11px 18px; border-bottom:1px solid #d7e0e9; }
.math-dock-summary { display:flex; justify-content:space-between; gap:12px; padding:10px 18px; color:#627286; font-size:11px; }
.math-dock-summary strong { color:#1c496c; }
.math-dock-list { display:grid; gap:10px; padding:4px 18px 18px; }
.math-dock-empty { padding:28px; border:1px dashed #abc0d4; border-radius:12px; background:rgba(255,255,255,.65); text-align:center; color:#697b8d; }
.math-argument-card { border:1px solid #c9d7e4; border-radius:12px; background:#fff; box-shadow:0 5px 14px rgba(28,56,83,.08); overflow:hidden; }
.math-argument-card header { display:grid; grid-template-columns:auto minmax(130px,1fr) 145px 120px auto; gap:7px; align-items:center; padding:9px; background:#edf5fb; border-bottom:1px solid #d6e1eb; }
.math-argument-number { display:grid; place-items:center; width:29px; height:29px; border-radius:50%; background:#1f5c7a; color:white; font-size:10px; font-weight:800; }
.math-argument-card input,.math-argument-card select,.math-argument-card textarea,.math-dock-export input { width:100%; min-width:0; padding:7px 8px; border:1px solid #c2cfdb; border-radius:7px; background:#fff; color:#172033; font:11px/1.45 system-ui,sans-serif; }
.math-argument-card main { display:grid; grid-template-columns:minmax(190px,.75fr) minmax(210px,1fr); gap:8px; padding:10px; }
.math-argument-card label { display:grid; gap:4px; color:#56697c; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.math-argument-formula { grid-row:span 2; }
.math-argument-formula textarea { height:100%; min-height:104px; font:12px/1.5 "Cascadia Mono",Consolas,monospace; color:#163e5c; background:#f8fbfe; }
.math-argument-card footer { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; padding:8px 10px; border-top:1px solid #e0e7ee; }
.math-argument-card footer button { padding:5px 8px; font-size:10px; }
.math-argument-card footer .danger { margin-left:auto; color:#9b3c35; }
.math-dock-export { display:grid; grid-template-columns:minmax(170px,1fr) minmax(150px,.8fr) auto auto; gap:8px; align-items:end; padding:13px 18px 18px; border-top:1px solid #d1dce7; background:rgba(255,255,255,.72); }
.math-dock-export label { display:grid; gap:4px; color:#56697c; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.macro-actions { display:flex; justify-content:flex-end; gap:5px; }
.macro-actions button { padding:6px 8px; font-size:10px; }
.ribbon-group > span { color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; text-align:center; }
.ribbon-group > div { display:flex; gap:3px; }
.ribbon-group button { min-height:28px; padding:5px 8px; font-size:11px; border-color:#cfd6e2; background:#fff; }
.ribbon-group button:hover:not(:disabled) { background:#e7f0ff; border-color:#93b4e8; }
.editor-shell { position:relative; display:grid; grid-template-columns:46px minmax(0,1fr); width:100%; min-width:0; min-height:0; overflow:hidden; background:linear-gradient(180deg,#ffffff,#f8fafc); box-shadow:inset 0 1px 0 rgba(255,255,255,.9); }
#lineNumbers {
  margin: 0; padding: 14px 9px; overflow: hidden; text-align: right; color: #9ba5b7;
  background: #f0f3f8; border-right: 1px solid var(--line); font: 13px/1.55 "Cascadia Mono", Consolas, monospace;
  user-select: none;
}
#editor {
  display:block; width:100%; min-width:0; max-width:100%; height:100%; resize:none; outline:none; border:0; padding:14px 16px;
  background: transparent; color: #172033; font: 14px/1.55 "Cascadia Mono", Consolas, monospace;
  tab-size: 2; white-space: pre; overflow: auto; scrollbar-gutter:stable; scroll-padding-bottom:160px;
}
.autocomplete-control { display:grid; gap:2px; color:var(--muted); font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.autocomplete-control select { min-width:88px; padding:5px 7px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--panel); font-size:10px; text-transform:none; }
.latex-autocomplete { position:absolute; z-index:30; left:58px; bottom:12px; width:min(420px,calc(100% - 74px)); max-height:min(320px,52%); overflow:auto; padding:5px; border:1px solid #aebed0; border-radius:10px; background:rgba(255,255,255,.98); box-shadow:0 16px 45px rgba(21,35,55,.24); backdrop-filter:blur(10px); }
.latex-autocomplete button { display:grid; grid-template-columns:minmax(120px,.8fr) 1fr; gap:12px; width:100%; padding:8px 10px; border:0; text-align:left; background:transparent; }
.latex-autocomplete button.selected,.latex-autocomplete button:hover { color:var(--blue); background:var(--blue-soft); }
.latex-autocomplete code { overflow:hidden; text-overflow:ellipsis; color:inherit; font:12px/1.3 "Cascadia Mono",Consolas,monospace; }
.latex-autocomplete span { color:var(--muted); font-size:10px; }
.editor-footer {
  padding: 5px 12px; display: flex; justify-content: space-between; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 11px; background: #fafbfd;
}
.editor-save-state { margin-inline:auto; color:var(--green); font-weight:700; }
.editor-save-state.dirty,.editor-save-state.recovering { color:var(--copper); }
.editor-save-state.saving { color:var(--blue); }
.editor-save-state.error { color:#a43333; }
.layout-document { grid-template-columns:1fr; background:#cfd4db; }
.layout-document .dock-pane, .layout-document .preview-pane { display:none; }
.layout-document .editor-pane { grid-column:1; grid-template-rows:auto minmax(0,1fr) auto; width:100%; min-height:0; overflow:hidden; border:0; background:#d8dde4; }
.layout-document .editor-toolbar { max-height:min(280px,42dvh); overflow:auto; scrollbar-gutter:stable; background:#f8f9fb; box-shadow:0 2px 5px rgba(22,33,50,.15); z-index:2; }
.layout-document .file-identity strong { max-width:70vw; }
.layout-document .editor-shell { grid-template-columns:52px minmax(0,1fr); width:min(1040px,calc(100% - 32px)); max-width:calc(100% - 32px); min-height:0; height:calc(100% - 28px); margin:14px auto; background:#fff; border:1px solid #b8bec8; border-radius:5px; box-shadow:0 8px 24px rgba(30,40,55,.20); align-self:stretch; }
.layout-document #lineNumbers { display:block; height:100%; overflow:hidden; padding:32px 10px 80px; background:#f4f6f9; }
.layout-document #editor { min-height:0; height:100%; padding:32px clamp(22px,5vw,64px) 80px; color:#172033; background:#fff; font:15px/1.62 "Cascadia Mono",Consolas,monospace; white-space:pre; overflow:auto; overflow-wrap:normal; scroll-padding-bottom:120px; }
.layout-document .editor-footer { position:relative; z-index:3; min-height:30px; box-shadow:0 -1px 4px rgba(25,35,50,.08); }
.journal-persist-toggle { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:2px 7px; max-width:250px; padding:8px 10px; border:1px solid var(--line); border-radius:9px; color:var(--slate); background:var(--paper); font-size:11px; font-weight:700; }
.journal-persist-toggle input { grid-row:1 / 3; }
.journal-persist-toggle small { color:var(--muted); font-size:9px; font-weight:400; }
.journal-view-customizer { margin:0 0 14px; border:1px solid #bfd3e2; border-radius:10px; background:#f8fcff; }
.journal-view-customizer summary { padding:10px 12px; cursor:pointer; color:var(--blue); font-size:12px; font-weight:800; }
.journal-custom-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:0 12px 10px; }
.journal-custom-grid fieldset { display:grid; gap:6px; min-width:0; margin:0; padding:10px; border:1px solid var(--line); border-radius:8px; background:white; }
.journal-custom-grid legend { padding:0 5px; color:var(--slate); font-size:10px; font-weight:800; }
.journal-custom-grid label { display:flex; align-items:center; gap:7px; color:var(--ink); font-size:11px; }
.journal-view-customizer > p { margin:0; padding:0 12px 11px; color:var(--muted); font-size:9px; }

.preview-pane { display: grid; grid-template-rows: 42px 1fr; }
.preview-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 5px 7px 0; gap: 4px; }
.preview-tab { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 11px; color: var(--slate); }
.preview-tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.preview-panel { display: none; min-height: 0; overflow: auto; }
.preview-panel.active { display: block; }
#pdfPanel.active { position: relative; overflow: hidden; }
.pdf-toolbar { min-height: 43px; display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex-wrap:wrap; }
.pdf-toolbar strong { flex: 1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-toolbar button { padding: 5px 8px; font-size: 11px; }
.pdf-refresh-state { color: var(--green); font-size: 10px; white-space: nowrap; }
.document-zoom { display:flex; align-items:center; gap:3px; padding:2px; border:1px solid var(--line); border-radius:7px; background:#f7f9fc; }
.document-zoom span { min-width:52px; text-align:center; color:var(--slate); font-size:10px; }
.document-zoom button { border:0; background:transparent; }
.pdf-page-controls { display:flex; align-items:center; gap:4px; color:var(--slate); font-size:10px; }
.pdf-page-controls input { width:52px; padding:5px; border:1px solid var(--line); border-radius:6px; }
.pdf-grid-control { display:flex; align-items:center; gap:4px; color:var(--slate); font-size:10px; }
.pdf-grid-control select { padding:5px; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--ink); }
.pdf-document-stage { display:none; height:calc(100% - 52px); padding:16px; overflow:auto; scroll-behavior:smooth; background:linear-gradient(90deg,#cbd3dd,#e8edf2 12%,#e8edf2 88%,#cbd3dd); }
.pdf-document-stage.visible { display:block; }
#pdfViewer { width: 100%; height: 100%; border: 1px solid #c1c8d2; border-radius:3px; box-shadow:0 8px 28px rgba(20,35,55,.22); background: white; display: none; }
#pdfViewer.visible { display: block; }
.pdf-grid-viewer { display:none; grid-template-columns:repeat(var(--pdf-grid-columns,2),minmax(280px,1fr)); gap:16px; align-items:start; }
.pdf-grid-viewer.visible { display:grid; }
.pdf-grid-page { min-width:0; padding:8px; border:1px solid #b4bfca; border-radius:7px; background:#f7f9fb; box-shadow:0 7px 22px rgba(20,35,55,.16); scroll-margin-top:12px; }
.pdf-grid-page header { display:flex; justify-content:space-between; padding:2px 3px 7px; color:var(--slate); font-size:10px; }
.pdf-grid-page iframe { width:100%; height:72vh; border:0; background:white; }
.hidden { display: none !important; }
.empty-state { height: calc(100% - 43px); display: grid; place-content: center; text-align: center; color: var(--slate); padding: 24px; }
.empty-state h2 { margin: 11px 0 4px; }
.empty-state p { margin: 0; font-size: 13px; }
.empty-icon { width: 58px; height: 68px; margin: auto; display: grid; place-items: center; border: 2px solid var(--line-strong); border-radius: 6px; color: var(--copper); font-weight: 800; }

#gptPanel, #commandPanel, #orderPanel { padding: 18px; }
.gpt-intro p, .order-header p { color: var(--slate); font-size: 13px; line-height: 1.45; margin: 7px 0 16px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.command-heading h2 { margin: 5px 0 7px; }
.command-heading p, .research-bridges p { margin: 0 0 13px; color: var(--slate); font-size: 12px; line-height: 1.5; }
.command-location { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px 8px 0 0; background: var(--blue-soft); font-size: 10px; color: var(--slate); }
.command-location code { overflow: hidden; text-overflow: ellipsis; color: var(--blue); font: 11px "Cascadia Mono", Consolas, monospace; }
.command-output { height: 245px; margin: 0; padding: 13px; overflow: auto; border: 1px solid #23334d; border-top: 0; background: #111b2b; color: #d9e8fa; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.55 "Cascadia Mono", Consolas, monospace; }
.command-form { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 8px 8px; background: var(--panel); }
.command-form > span { color: #e1a900; font: 800 22px/1 "Cascadia Mono", Consolas, monospace; }
.command-form input { min-width: 0; border: 0; outline: 0; padding: 7px 3px; color: var(--ink); background: transparent; font: 12px "Cascadia Mono", Consolas, monospace; }
.command-quick-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 18px; }
.command-quick-actions button { padding: 5px 8px; font-size: 10px; }
.research-bridges { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg, var(--panel), var(--blue-soft)); }
.research-bridges h3 { margin: 4px 0 6px; font-size: 15px; }
.research-bridges > div { display: flex; flex-wrap: wrap; gap: 7px; }
.research-bridges .button-link { font-size: 11px; }
#gptPanel label { display: block; font-size: 11px; color: var(--slate); text-transform: uppercase; letter-spacing: .06em; margin: 11px 0; font-weight: 700; }
#gptPanel input, #gptPanel textarea {
  display: block; width: 100%; margin-top: 6px; border: 1px solid var(--line-strong);
  border-radius: 7px; padding: 9px 10px; color: var(--ink); background: #fbfcfe;
  text-transform: none; letter-spacing: 0; font-weight: 400;
}
#snippetContent { min-height: 230px; resize: vertical; font-family: "Cascadia Mono", Consolas, monospace; line-height: 1.45; }
.gpt-prompt { min-height: 95px !important; resize: vertical; }
.gpt-answer { min-height: 180px !important; resize: vertical; font-family: "Cascadia Mono", Consolas, monospace; line-height: 1.45; }
.gpt-request-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 9px 0 14px; }
.connection-pill {
  margin-left: auto; padding: 5px 8px; border-radius: 999px; background: #eef1f6;
  color: var(--slate); font-size: 10px; font-weight: 700;
}
.connection-pill.ready { background: #e6f4ef; color: var(--green); }
.connection-pill.offline { background: #fff0e9; color: var(--copper); }
.startup-zip-drop { margin-top:12px; padding:15px; display:grid; gap:3px; place-items:center; border:2px dashed #9eb6d4; border-radius:12px; color:var(--blue); background:linear-gradient(135deg,#f4f9ff,#fffdf4); cursor:pointer; text-align:center; }
.startup-zip-drop span { color:var(--slate); font-size:11px; }
.startup-zip-drop.dragover { border-color:var(--copper); background:#fff8e8; transform:translateY(-1px); }
.educator-alpha { margin-top:12px; border:1px solid var(--line); border-radius:12px; background:white; overflow:hidden; }
.educator-alpha summary { padding:13px 15px; cursor:pointer; color:var(--ink); }
.educator-alpha summary span { display:inline-grid; gap:3px; margin-left:5px; }
.educator-alpha summary small { color:var(--slate); font-weight:400; }
.educator-alpha-grid { padding:0 14px 14px; display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.educator-alpha-grid label { color:var(--slate); font-size:10px; font-weight:700; }
.educator-alpha-grid input,.educator-alpha-grid select { width:100%; margin-top:4px; padding:8px; border:1px solid var(--line); border-radius:7px; background:#fbfcfe; }
.educator-alpha-grid button { align-self:end; min-height:35px; }
.quicklook-panel { padding:16px; }
.quicklook-panel > header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.quicklook-panel > code { display:block; margin:10px 0; padding:8px; border-radius:7px; background:#edf2f8; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; }
.quicklook-stage { min-height:380px; display:grid; place-items:center; overflow:auto; border:1px solid var(--line); border-radius:10px; background:repeating-conic-gradient(#f6f8fb 0 25%,#eef2f7 0 50%) 50%/22px 22px; }
.quicklook-stage img,.quicklook-stage video { display:block; max-width:100%; max-height:65vh; object-fit:contain; background:white; }
.quicklook-stage audio { width:min(520px,90%); }
.quicklook-stage iframe { width:100%; height:65vh; border:0; background:white; }
.quicklook-stage pre { width:100%; min-height:380px; margin:0; padding:16px; overflow:auto; color:#172033; background:white; font:12px/1.55 "Cascadia Mono",Consolas,monospace; white-space:pre-wrap; }
.quicklook-recent { margin-top:13px; }
.quicklook-recent > strong { color:var(--slate); font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
#quickLookRecent { display:flex; flex-wrap:wrap; gap:6px; margin-top:7px; }
#quickLookRecent button { max-width:210px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:5px 8px; font-size:10px; }
#gptPanel hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0 16px; }
.snippet-tools { display: flex; gap: 5px; }
.snippet-tools button { font-size: 11px; padding: 5px 8px; }
.gpt-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.button-link { text-decoration: none; display: inline-block; }
.privacy-note { font-size: 11px; line-height: 1.4; color: var(--muted); border-top: 1px solid var(--line); padding-top: 11px; }
.order-list { margin: 12px 0; padding-left: 30px; }
.order-list li { margin: 5px 0; padding: 5px 7px; background: var(--paper); border-radius: 6px; font: 12px/1.4 "Cascadia Mono", Consolas, monospace; }

.project-management-dock { margin:8px 9px; border:1px solid #b8d8d4; border-radius:10px; background:linear-gradient(145deg,#fbfffe,#f1f9f8); }
.project-management-dock > summary { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 10px; cursor:pointer; }
.project-management-dock > summary span:first-child { display:grid; gap:2px; }
.project-management-dock > summary small { color:var(--slate); font-size:9px; font-weight:500; }
.project-mission-label { display:grid; gap:4px; padding:0 9px 8px; color:#275c58; font-size:10px; font-weight:800; }
.project-mission-label textarea { width:100%; resize:vertical; min-height:48px; padding:7px; border:1px solid #bed7d4; border-radius:7px; font:11px/1.4 inherit; background:#fff; }
.project-lane-settings { margin:0 9px 8px; border:1px solid #d0e2df; border-radius:7px; background:#fff; }
.project-lane-settings > summary { padding:6px 8px; color:var(--slate); cursor:pointer; font-size:10px; font-weight:700; }
.project-lane-inputs { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:0 8px 8px; }
.project-lane-inputs label { color:var(--slate); font-size:9px; font-weight:700; }
.project-lane-inputs input { width:100%; margin-top:3px; padding:5px; border:1px solid var(--line); border-radius:5px; font-size:10px; }
.project-task-form { display:grid; grid-template-columns:minmax(0,1fr) 76px auto; gap:5px; padding:0 9px 8px; }
.project-task-form input,.project-task-form select { min-width:0; padding:6px; border:1px solid #bed7d4; border-radius:6px; background:#fff; font-size:10px; }
.project-task-form button { padding:5px 8px; font-size:10px; }
.project-task-board { display:grid; grid-template-columns:repeat(4,minmax(112px,1fr)); gap:6px; padding:0 9px 8px; overflow-x:auto; scrollbar-width:thin; }
.project-task-lane { min-height:96px; padding:6px; border:1px dashed #b9cecb; border-radius:7px; background:rgba(255,255,255,.74); }
.project-task-lane.drag-over { border-color:#2b8b80; background:#e5f6f3; }
.project-task-lane h4 { margin:0 0 5px; color:#315e5a; font-size:9px; text-transform:uppercase; letter-spacing:.05em; }
.project-task-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px; align-items:start; margin:0 0 5px; padding:6px; border:1px solid #d6e4e2; border-radius:6px; background:white; box-shadow:0 2px 7px rgba(32,76,72,.07); cursor:grab; }
.project-task-card span { overflow-wrap:anywhere; font-size:10px; line-height:1.3; }
.project-task-card button { padding:0 3px; border:0; color:#855; background:transparent; }
.project-board-actions { display:flex; justify-content:space-between; gap:6px; padding:0 9px 9px; }
.project-board-actions button { flex:1; padding:6px; font-size:10px; }

.tutorial-pane { display:none; }
.layout-tutorial { display:block; }
.layout-tutorial > .dock-pane,.layout-tutorial > .editor-pane,.layout-tutorial > .preview-pane,.layout-tutorial > .journal-pane,.layout-tutorial > .educator-pane,.layout-tutorial > .settings-pane { display:none; }
.layout-tutorial .tutorial-pane { position:relative; height:100%; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:auto; scrollbar-gutter:stable; overscroll-behavior:contain; background:linear-gradient(145deg,#eef7f6,#f7f7ff 55%,#fff8e8); }
.tutorial-header { display:flex; align-items:center; justify-content:space-between; gap:22px; padding:20px 25px; color:white; background:linear-gradient(118deg,#143e5c,#087b77 60%,#b98316 150%); }
.tutorial-header h1 { margin:3px 0 6px; font:700 30px/1.1 Georgia,serif; }
.tutorial-header p { max-width:780px; margin:0; color:#dff4f1; line-height:1.45; }
.tutorial-header .eyebrow { color:#ffe287; }
.tutorial-header-tools { min-width:290px; display:grid; justify-items:end; gap:8px; }
.tutorial-research-launch { min-width:240px; display:grid; gap:2px; padding:9px 12px; border-color:rgba(255,255,255,.45); color:#123e57; background:#fff4c9; text-align:left; box-shadow:0 5px 16px rgba(0,0,0,.13); }
.tutorial-research-launch strong { font-size:12px; }
.tutorial-research-launch span { font-size:9px; opacity:.78; }
.tutorial-mode-switch { display:flex; gap:4px; padding:4px; border:1px solid rgba(255,255,255,.25); border-radius:10px; background:rgba(0,0,0,.12); }
.tutorial-mode-switch button { padding:7px 10px; border-color:transparent; color:#e7f7f5; background:transparent; }
.tutorial-mode-switch button[aria-selected="true"] { color:#133f4f; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.15); }
.tutorial-progress { min-width:150px; display:grid; gap:5px; padding:10px 13px; border:1px solid rgba(255,255,255,.28); border-radius:12px; background:rgba(255,255,255,.1); text-align:right; }
.tutorial-progress strong { font-size:18px; }
.tutorial-progress span { color:#d7eeeb; font-size:10px; }
.tutorial-grid { min-height:0; display:grid; grid-template-columns:minmax(260px,28%) minmax(320px,1fr) minmax(300px,31%); gap:12px; padding:14px; }
.tutorial-catalog-panel,.tutorial-path-panel,.tutorial-inspector-panel { min-width:0; min-height:0; padding:14px; border:1px solid rgba(45,102,98,.18); border-radius:14px; background:rgba(255,255,255,.92); box-shadow:0 8px 22px rgba(23,63,78,.07); }
.tutorial-catalog-panel,.tutorial-inspector-panel { display:flex; flex-direction:column; overflow:hidden; }
.tutorial-path-panel { display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
.tutorial-panel-heading h2 { margin:2px 0 5px; }
.tutorial-panel-heading p { margin:0 0 10px; color:var(--slate); font-size:11px; line-height:1.4; }
#tutorialSearch { width:100%; padding:9px; border:1px solid var(--line); border-radius:8px; }
.tutorial-filters { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin:8px 0; }
.tutorial-filters label { color:var(--slate); font-size:9px; font-weight:800; text-transform:uppercase; }
.tutorial-filters select { width:100%; margin-top:3px; padding:7px; border:1px solid var(--line); border-radius:7px; background:white; }
.tutorial-catalog { min-height:0; overflow:auto; display:grid; gap:7px; align-content:start; padding-right:3px; scrollbar-width:thin; }
.tutorial-card { padding:10px; border:1px solid #d9e7e5; border-left:4px solid #24847a; border-radius:9px; background:#fbfffe; cursor:grab; }
.tutorial-card:hover,.tutorial-card.selected { border-color:#24847a; background:#edf9f7; transform:translateY(-1px); }
.tutorial-card header { display:flex; justify-content:space-between; gap:8px; }
.tutorial-card strong { font-size:12px; line-height:1.3; }
.tutorial-card small { flex:none; color:#7b5a16; font-size:8px; font-weight:800; text-transform:uppercase; }
.tutorial-card p { margin:5px 0; color:var(--slate); font-size:10px; line-height:1.35; }
.tutorial-card footer { display:flex; justify-content:space-between; color:#557; font-size:9px; }
.tutorial-path-drop { min-height:180px; overflow:auto; padding:10px; border:2px dashed #9fcac4; border-radius:12px; background:linear-gradient(180deg,#f8fffe,#f2f6fb); scrollbar-width:thin; }
.tutorial-path-drop.drag-over { border-color:#137b70; background:#e9f8f5; }
.tutorial-path-empty { display:grid; place-items:center; min-height:160px; color:var(--slate); text-align:center; font-size:12px; }
.tutorial-path-card { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:8px; align-items:center; margin-bottom:7px; padding:9px; border:1px solid #ccdfdc; border-radius:9px; background:white; cursor:grab; }
.tutorial-path-card .tutorial-order { display:grid; place-items:center; width:30px; height:30px; border-radius:8px; color:white; background:#1e746c; font-size:10px; font-weight:800; }
.tutorial-path-card strong { display:block; font-size:11px; }
.tutorial-path-card small { color:var(--slate); font-size:9px; }
.tutorial-path-card button { padding:4px 6px; }
.tutorial-path-actions,.tutorial-inspector-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:10px; }
.tutorial-lesson-meta { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; }
.tutorial-lesson-meta span { padding:4px 7px; border-radius:999px; color:#315a56; background:#e4f3f1; font-size:9px; font-weight:700; }
.tutorial-inspector-panel label { min-height:0; display:flex; flex:1; flex-direction:column; color:var(--slate); font-size:10px; font-weight:800; }
#tutorialLatexPreview { flex:1; min-height:200px; margin-top:5px; resize:none; padding:11px; border:1px solid var(--line); border-radius:9px; color:#182c3a; background:#f8fafc; font:11px/1.5 "Cascadia Mono",Consolas,monospace; }
.tutorial-note { margin:9px 0 0; color:var(--slate); font-size:10px; line-height:1.4; }

.research-consensus-workspace { min-height:0; display:grid; grid-template-columns:minmax(255px,25%) minmax(340px,1fr) minmax(330px,32%); gap:12px; padding:14px; }
.research-consensus-workspace.hidden { display:none; }
.research-modal { position:absolute; inset:0; z-index:40; max-height:100%; overflow:auto; scrollbar-gutter:stable; overscroll-behavior:contain; padding:48px 14px 14px; background:rgba(238,247,246,.98); }
.research-modal-close { position:absolute; top:10px; right:14px; z-index:2; width:32px; height:32px; padding:0; border-radius:50%; font-size:20px; }
.research-query-panel,.research-evidence-panel,.research-output-panel { min-width:0; min-height:0; padding:14px; border:1px solid rgba(45,102,98,.18); border-radius:14px; background:rgba(255,255,255,.94); box-shadow:0 8px 22px rgba(23,63,78,.07); }
.research-query-panel,.research-output-panel { overflow:auto; }
.research-evidence-panel { display:flex; flex-direction:column; overflow:auto; }
.research-evidence-list { flex:1; min-height:180px; }
.research-topic-options,.research-suggestions,.project-research-options { margin:10px 0; padding:11px; border:1px solid #bdcec8; border-left:4px solid var(--vision-research,#26877d); border-radius:9px; background:#f5fbf9; }
.research-topic-options summary,.research-suggestions summary,.project-research-options summary { cursor:pointer; color:#215d56; font-weight:800; font-size:12px; }
.research-topic-options label { display:grid; gap:5px; margin:9px 0; font-size:11px; }
.research-topic-options p,.research-suggestions p,.research-idea-list p { font-size:11px; line-height:1.5; }
.research-topic-options small { display:block; font-size:10px; color:var(--slate); }
.research-idea-list { display:grid; gap:8px; max-height:300px; overflow:auto; margin-top:9px; }
.research-idea-card { padding:10px; border:1px solid #d4ddd8; border-radius:8px; background:white; overflow-wrap:anywhere; }
.research-idea-card strong { font-size:12px; }
.research-idea-card small { display:block; margin-top:6px; color:#49635e; font-size:10px; }
.research-idea-card p { margin:6px 0; }
.research-idea-actions { display:flex; gap:7px; flex-wrap:wrap; margin-top:8px; }
.research-idea-actions button { font-size:11px; }
.research-relevance { color:#215d56 !important; font-weight:700; }
.article-panel.active { display:flex; flex-direction:column; min-height:0; overflow:auto; }
.article-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:12px; border-bottom:1px solid var(--line); }
.article-toolbar h2 { margin:3px 0; font-size:16px; overflow-wrap:anywhere; }
.article-toolbar a { align-self:center; font-size:12px; }
.article-notice { margin:0; padding:10px 14px; background:#f1f7fb; color:#334c5f; font-size:12px; line-height:1.5; }
.article-frame-stage { flex:1; min-height:430px; }
.article-frame-stage iframe { display:block; width:100%; height:100%; min-height:430px; border:0; background:white; }
.article-abstract { margin:12px; padding:12px; border:1px solid var(--line); border-radius:8px; }
.article-abstract pre { white-space:pre-wrap; overflow-wrap:anywhere; font:14px/1.7 Georgia,serif; }
.article-abstract[data-full="true"] { flex:1; overflow:auto; }
.research-query-panel > label,.research-output-panel > label,.research-google-options label { display:grid; gap:5px; margin-top:10px; color:var(--slate); font-size:10px; font-weight:800; }
.research-query-panel textarea,.research-output-panel textarea,.research-query-panel select,.research-google-options input { width:100%; box-sizing:border-box; padding:9px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:white; font:inherit; }
.research-controls { display:grid; grid-template-columns:minmax(0,1fr) 82px; gap:7px; }
.research-controls label { display:grid; gap:4px; margin-top:10px; color:var(--slate); font-size:9px; font-weight:800; text-transform:uppercase; }
.research-google-options { margin-top:12px; padding:9px; border:1px solid #d5e6e3; border-radius:9px; background:#f7fbfa; }
.research-google-options summary { cursor:pointer; color:#285d58; font-size:11px; font-weight:800; }
.research-google-options .research-check { grid-template-columns:18px 1fr; align-items:center; text-transform:none; }
.research-google-options input[type="checkbox"] { width:16px; height:16px; padding:0; }
.research-google-options p { color:var(--slate); font-size:9px; line-height:1.4; }
.research-run { width:100%; margin-top:12px; min-height:40px; }
.research-status { margin:9px 2px; color:var(--slate); font-size:10px; line-height:1.4; }
.research-evidence-toolbar { display:flex; align-items:center; gap:6px; margin:6px 0 9px; }
.research-evidence-toolbar span { margin-left:auto; color:var(--slate); font-size:9px; font-weight:800; }
.research-evidence-list { min-height:0; overflow:auto; display:grid; gap:8px; align-content:start; padding-right:3px; scrollbar-width:thin; }
.research-evidence-card { display:grid; grid-template-columns:20px minmax(0,1fr); gap:8px; padding:10px; border:1px solid #d6e5e3; border-radius:9px; background:#fbfefd; }
.research-evidence-card.selected { border-color:#26877d; background:#eef9f7; }
.research-evidence-card input { margin-top:2px; }
.research-evidence-card h3 { margin:0 0 3px; font-size:11px; line-height:1.3; }
.research-evidence-card .research-source-meta { display:flex; flex-wrap:wrap; gap:5px; color:#58716e; font-size:8px; font-weight:800; text-transform:uppercase; }
.research-evidence-card p { margin:6px 0; color:var(--slate); font-size:10px; line-height:1.45; }
.research-evidence-card a,.research-evidence-card code { color:#176a63; font-size:9px; overflow-wrap:anywhere; }
.research-consensus-card { display:grid; gap:5px; margin:7px 0 11px; padding:12px; border-left:5px solid #b68118; border-radius:8px; background:#fff7df; }
.research-consensus-card[data-status="aligned"] { border-color:#25806f; background:#eaf8f3; }
.research-consensus-card[data-status="insufficient"] { border-color:#8a7085; background:#f6f1f6; }
.research-consensus-card strong { font-size:13px; }
.research-consensus-card span { color:var(--slate); font-size:10px; line-height:1.4; }
#researchLatex { min-height:260px; resize:vertical; font:10px/1.45 "Cascadia Mono",Consolas,monospace; }
.research-output-panel .research-build-toggle { display:grid; grid-template-columns:20px minmax(0,1fr); align-items:start; gap:8px; margin-top:9px; padding:9px; border:1px solid #d5e6e3; border-radius:8px; background:#f7fbfa; cursor:pointer; }
.research-build-toggle input { width:17px; height:17px; margin:1px 0 0; }
.research-build-toggle strong,.research-build-toggle small { display:block; }
.research-build-toggle small { margin-top:2px; color:var(--slate); font-weight:400; line-height:1.35; }
.research-output-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; margin-top:9px; }

.layout-split { grid-template-columns: minmax(275px, 28%) minmax(400px, 72%); }
.layout-split .preview-pane { display: none; }
.layout-pdf { display: block; }
.layout-pdf .dock-pane, .layout-pdf .editor-pane { display: none; }
.layout-pdf .preview-pane { width: 100%; height: 100%; display: grid; }
.layout-pdf .preview-pane { grid-column:1; }
.layout-pdf .preview-tabs { justify-content: center; }
.layout-pdf .preview-tab:not([data-preview="pdf"]) { display: none; }

.educator-pane { display: none; }
.layout-educator { display: block; }
.layout-educator > .dock-pane,
.layout-educator > .editor-pane,
.layout-educator > .preview-pane,
.layout-educator > .journal-pane,
.layout-educator > .settings-pane { display: none; }
.layout-educator .educator-pane { height: 100%; display: grid; grid-template-rows: auto 1fr; overflow: hidden; background: var(--paper); }
.educator-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; background: var(--panel); border-bottom: 1px solid var(--line); }
.educator-header p { max-width: 720px; margin: 6px 0 0; color: var(--slate); line-height: 1.45; }
.educator-header > button { min-height: 44px; font-weight: 800; }
.educator-grid { overflow: auto; padding: 22px; display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 16px; align-content: start; }
.educator-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 6px 20px rgba(23,32,51,.05); }
.educator-card h2 { margin-bottom: 9px; }
.educator-card p, .educator-card li { color: var(--slate); line-height: 1.55; font-size: 13px; }
.template-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.template-buttons button { min-height: 44px; text-align: left; }
.access-checklist { display: grid; gap: 10px; margin: 15px 0; }
.access-checklist label { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; color: var(--ink); font-size: 13px; line-height: 1.4; }
.access-checklist input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.workflow-card ol { padding-left: 21px; }
.educator-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }

.journal-pane { display: none; }
.layout-journal { display: block; }
.layout-journal > .dock-pane,
.layout-journal > .editor-pane,
.layout-journal > .preview-pane { display: none; }
.layout-journal .journal-pane {
  height: 100%; display: grid;
  grid-template-columns: minmax(250px, 22%) minmax(440px, 1fr) minmax(280px, 27%);
}
.layout-journal .journal-pane.journal-no-calendar { grid-template-columns:minmax(440px,1fr) minmax(280px,27%); }
.layout-journal .journal-pane.journal-no-timeline { grid-template-columns:minmax(250px,22%) minmax(440px,1fr); }
.layout-journal .journal-pane.journal-no-calendar.journal-no-timeline { grid-template-columns:minmax(0,1fr); }
.journal-module-hidden { display:none !important; }
.settings-pane { display: none; }
.layout-settings { display: block; }
.layout-settings > .dock-pane,
.layout-settings > .editor-pane,
.layout-settings > .preview-pane,
.layout-settings > .journal-pane { display: none; }
.layout-settings > .educator-pane { display: none; }
.layout-settings .settings-pane { height: 100%; display: grid; grid-template-rows: auto 1fr; overflow: hidden; background: var(--paper); }
.settings-header {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 17px 22px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.settings-header p { margin: 5px 0 0; color: var(--slate); font-size: 12px; }
.settings-savebar { display: flex; align-items: center; gap: 10px; }
#settingsState { color: var(--muted); font-size: 11px; }
#settingsState.dirty { color: var(--copper); }
.settings-grid {
  overflow: auto; padding: 18px; display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 14px; align-content: start;
}
.settings-card {
  min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); box-shadow: 0 4px 14px rgba(23,32,51,.04);
}
.workflow-settings-card { grid-column:span 2; border-color:#b9d2e3; background:linear-gradient(145deg,#fbfdff,#f5f9fc); }
.workflow-toggle-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; margin:12px 0; }
.workflow-settings-actions { display:flex; justify-content:flex-end; gap:8px; margin:13px 0 7px; }

/* Classic is the quiet compatibility workspace used before the optimization patch. */
body:not(.workflow-layout-tools):not(.layout-adjuster-open) .layout-bar { display:none !important; }
body:not(.workflow-layout-tools) .workspace { height:calc(100vh - 106px); }
body.bars-minimized:not(.workflow-layout-tools) .workspace { height:calc(100vh - 44px); }
body.workflow-classic .workspace { height:calc(100vh - 106px); }
body.workflow-classic .workspace-resizer { display:none !important; }
body.workflow-classic.layout-adjuster-open .layout-dock > .workspace-resizer { display:block !important; }
.workspace:not(.layout-dock) > .workspace-resizer { display:none !important; }
body.workflow-classic .layout-dock .dock-pane,
body.workflow-classic .layout-dock .editor-pane,
body.workflow-classic .layout-dock .preview-pane { display:flex !important; }
body.workflow-classic .layout-dock .editor-pane { display:grid !important; }
body.workflow-classic .layout-dock .preview-pane { display:grid !important; }
body.workflow-classic .layout-dock.hide-dock .dock-pane { display:none !important; }
body.workflow-classic .layout-dock.hide-editor .editor-pane { display:none !important; }
body.workflow-classic .layout-dock.hide-preview .preview-pane { display:none !important; }
body.workflow-classic .layout-dock { grid-template-columns:var(--dock-width,26fr) var(--editor-width,39fr) var(--preview-width,35fr) !important; }
body.workflow-startup-classic .loader-stepper,
body.workflow-startup-classic .loader-ready { display:none !important; }
body.workflow-startup-classic .hub-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr); min-height:0; }
body.workflow-startup-classic .hub-projects,
body.workflow-startup-classic .session-studio { display:block !important; }
body.workflow-startup-classic .session-studio { max-width:none; margin:0; border-right:0; }
body.workflow-startup-classic #continueCurrentProjectBtn,
body.workflow-quick-start .session-studio,
body.workflow-quick-start .loader-stepper,
body.workflow-quick-start .loader-ready { display:none !important; }
body.workflow-quick-start .hub-grid { min-height:0; }
body.workflow-no-quicklook [data-preview="quicklook"],
body.workflow-no-quicklook #quicklookPanel { display:none !important; }
body.workflow-no-math-breakout #breakoutEditorMathBtn,
body.workflow-no-math-breakout #mathDockBreakoutBtn { display:none !important; }
body.workflow-no-compass .project-compass { display:none !important; }
.settings-card h2 { margin-bottom: 14px; }
.settings-card > label, .settings-row label {
  display: block; margin: 11px 0; color: var(--slate); font-size: 10px;
  text-transform: uppercase; letter-spacing: .07em; font-weight: 800;
}
.settings-card input:not([type="checkbox"]), .settings-card select, .settings-card textarea {
  display: block; width: 100%; margin-top: 5px; padding: 8px 9px; border: 1px solid var(--line-strong);
  border-radius: 7px; color: var(--ink); background: var(--paper); text-transform: none;
  letter-spacing: 0; font-weight: 400;
}
.settings-card textarea { min-height: 92px; resize: vertical; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.check-setting { display: flex !important; align-items: flex-start; gap: 8px; text-transform: none !important; letter-spacing: 0 !important; line-height: 1.35; }
.check-setting input { margin-top: 2px; }
.diagnostic-line { display: flex; align-items: center; gap: 7px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--slate); font-size: 11px; }
.diagnostic-line button { margin-left: auto; }
.compiler-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.compiler-actions .button-link { margin: 0; }
.compiler-proof { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.compiler-proof.ready { color: var(--success); }
.diagnostic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.diagnostic-dot.ready { background: var(--green); }
.diagnostic-dot.error { background: #b63c32; }
.settings-note { color: var(--muted); font-size: 11px; line-height: 1.45; }
.api-cost-note { color: var(--muted); font-size: 11px; line-height: 1.45; }
.api-cost-note a { color: var(--accent); }
.patch-card { grid-column: span 2; }
.code-setting { min-height: 150px !important; font: 12px/1.45 "Cascadia Mono", Consolas, monospace !important; }
.patch-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.diagnostics { display: grid; grid-template-columns: auto 1fr; gap: 8px 13px; margin: 12px 0 18px; font-size: 11px; }
.diagnostics dt { color: var(--muted); font-weight: 700; }
.diagnostics dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
body.density-compact .tree-row { min-height: 34px; padding-top: 3px; padding-bottom: 3px; }
body.density-compact .settings-card { padding: 12px; }
body.density-compact .settings-grid { gap: 9px; padding: 12px; }
body.density-spacious .tree-row { min-height: 42px; }
body.density-spacious .settings-card { padding: 22px; }
body.density-spacious .settings-grid { gap: 20px; padding: 24px; }
.calendar-column, .activity-column { min-width: 0; padding: 18px; background: #fbfcfe; overflow: auto; }
.calendar-column { border-right: 1px solid var(--line); }
.activity-column { border-left: 1px solid var(--line); }
.journal-brand p, .activity-heading p {
  margin: 7px 0 18px; color: var(--slate); font-size: 12px; line-height: 1.45;
}
.calendar-toolbar { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 7px; margin: 14px 0 8px; }
.calendar-toolbar strong { text-align: center; font-family: Georgia, serif; }
.calendar-toolbar button { padding: 5px; font-size: 19px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar-weekdays span { padding: 5px 0; text-align: center; color: var(--muted); font-size: 9px; text-transform: uppercase; font-weight: 800; }
.calendar-day {
  min-height: 36px; padding: 4px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--ink); font-size: 11px;
}
.calendar-day:hover { background: var(--blue-soft); }
.calendar-day.outside { opacity: .3; }
.calendar-day.today { border-color: var(--copper); }
.calendar-day.selected { background: var(--blue); color: white; border-color: var(--blue); }
.calendar-day.has-entry::after {
  content: ""; display: block; width: 5px; height: 5px; margin: 2px auto 0;
  border-radius: 50%; background: var(--copper);
}
.calendar-day.selected.has-entry::after { background: white; }
#journalTodayBtn { width: 100%; margin-top: 12px; }
.saved-notes { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.saved-notes-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.saved-notes-heading h2 { margin: 0; font-size: 17px; }
.saved-notes-heading span { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); text-align: center; font-size: 11px; font-weight: 800; }
.saved-notes-list { display: grid; gap: 6px; margin-top: 10px; }
.saved-notes-list button { width: 100%; min-height: 38px; text-align: left; }
.saved-notes-empty { color: var(--muted); font-size: 12px; line-height: 1.45; }
.journal-editor { min-width: 0; padding: 22px 26px; background: white; overflow: auto; }
.journal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.timer-card { display: flex; align-items: center; gap: 9px; padding: 7px 8px 7px 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
#timerDisplay { min-width: 76px; font: 14px "Cascadia Mono", Consolas, monospace; color: var(--blue); }
.journal-title-label, .journal-notes-label {
  display: block; color: var(--slate); font-size: 10px; text-transform: uppercase;
  letter-spacing: .08em; font-weight: 800;
}
#journalTitle {
  display: block; width: 100%; margin-top: 6px; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; color: var(--ink); text-transform: none; letter-spacing: 0;
}
.journal-notes-label { min-height: 0; margin-top: 16px; }
#journalNotes {
  display: block; width: 100%; height: 260px; min-height: 220px; margin-top: 6px;
  resize: none; border: 1px solid var(--line); border-radius: 8px; padding: 14px;
  color: var(--ink); background: #fdfdfe; font: 14px/1.55 Georgia, serif;
  text-transform: none; letter-spacing: 0; font-weight: 400;
}
.journal-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 13px; color: var(--muted); font-size: 11px; }
.journal-actions > div { display: flex; gap: 7px; }
.journal-actions select {
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 9px;
  color: var(--ink); background: white; font-size: 11px;
}
.day-planner, .progress-report {
  margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(145deg, #fbfdff, #fffdf6); box-shadow: 0 8px 24px rgba(18,58,102,.055);
}
.day-planner-heading, .progress-report-heading, .progress-actions {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
}
.day-planner h3, .progress-report h3 { margin: 2px 0 0; color: var(--blue); font: 700 20px Georgia, serif; }
.day-planner-heading p { max-width: 620px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.day-planner-heading label, .progress-report-heading label {
  display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
}
.day-planner select, .progress-report select {
  min-width: 112px; padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; color: var(--ink);
}
.day-progress-row { display: flex; align-items: center; gap: 12px; margin: 13px 0 10px; }
.day-progress-track { flex: 1; height: 7px; overflow: hidden; border-radius: 99px; background: #dce5ec; }
.day-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--copper)); transition: width .25s ease; }
.day-progress-row strong { min-width: 102px; color: var(--slate); font-size: 10px; text-align: right; }
.day-activity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.day-activity-card {
  min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: white;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.day-activity-card:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(18,58,102,.1); transform: translateY(-1px); }
.day-activity-card[data-status="active"] { border-color: #d89b1d; background: #fffaf0; }
.day-activity-card[data-status="done"] { border-color: #3e9070; background: #f3fbf7; }
.day-activity-card[data-status="skipped"] { opacity: .62; background: #f2f4f6; }
.day-activity-card header { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 6px; }
.day-activity-card time { color: var(--blue); font-size: 10px; font-weight: 800; }
.day-status-button { padding: 3px 6px; border-radius: 99px; font-size: 8px; text-transform: uppercase; letter-spacing: .04em; }
.day-activity-card input { width: 100%; padding: 6px 7px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 11px; }
.day-agenda-button { width:100%; margin-top:6px; padding:5px 6px; border-color:#b9cfdf; color:var(--blue); background:#f3f8fc; font-size:9px; }
.agenda-notebook { display:none; }
body.agenda-popout { min-width:0; overflow:auto; color:#182b3f; background:linear-gradient(145deg,#dceaf4,#f6e8b8); }
body.agenda-popout > :not(.agenda-notebook) { display:none !important; }
body.agenda-popout .agenda-notebook { display:block; min-height:100vh; }
.agenda-notebook-header { position:sticky; top:0; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:17px 26px; color:white; background:linear-gradient(120deg,#123a66,#0f74a8 66%,#dca82e 150%); box-shadow:0 4px 18px rgba(16,48,78,.2); }
.agenda-notebook-header h1 { margin:2px 0; color:white; font-size:26px; }
.agenda-notebook-header p { margin:3px 0 0; color:#dbeefa; font-size:11px; }
.agenda-notebook-header .eyebrow { color:#ffd768; }
.agenda-notebook-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.agenda-notebook-actions span { font-size:10px; color:#dbeefa; }
.agenda-notebook-actions button { color:white; border-color:rgba(255,255,255,.42); background:rgba(255,255,255,.12); }
.agenda-notebook-progress { position:sticky; top:84px; z-index:6; height:5px; background:rgba(255,255,255,.55); }
.agenda-notebook-progress span { display:block; width:0; height:100%; background:linear-gradient(90deg,#2dc4e8,#ffd45c); transition:width .25s ease; }
.agenda-notebook-page { width:min(920px,calc(100% - 44px)); margin:30px auto 100px; padding:42px 52px 64px; border:1px solid #bac8d3; border-radius:5px; background:#fffefa; box-shadow:0 18px 50px rgba(25,58,87,.2); }
.agenda-notebook-page label { display:grid; gap:6px; margin-bottom:16px; color:#34516a; font-size:10px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.agenda-notebook-page input,.agenda-notebook-page select,.agenda-notebook-page textarea { width:100%; padding:10px 11px; border:1px solid #c7d2dc; border-radius:7px; color:#17283a; background:white; font:14px/1.55 Georgia,serif; text-transform:none; letter-spacing:0; font-weight:400; }
.agenda-notebook-page textarea { min-height:110px; resize:vertical; }
.agenda-notebook-topline { display:grid; grid-template-columns:1fr 180px; gap:12px; }
.agenda-notebook-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.agenda-notebook-grid textarea { min-height:180px; }
.agenda-summary-label textarea { min-height:180px; background:#f5f8fa; }
@media (max-width:760px) { .agenda-notebook-header{position:relative;align-items:flex-start;flex-direction:column}.agenda-notebook-progress{top:0}.agenda-notebook-page{width:calc(100% - 20px);margin:10px auto 60px;padding:24px 18px}.agenda-notebook-topline,.agenda-notebook-grid{grid-template-columns:1fr} }
.progress-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 13px 0; }
.progress-metrics span { padding: 8px; border-radius: 8px; background: var(--paper); color: var(--muted); font-size: 9px; text-align: center; }
.progress-metrics strong { display: block; margin-bottom: 2px; color: var(--blue); font-size: 14px; }
.progress-focus, .progress-fields label, .progress-summary-label {
  display: grid; gap: 5px; color: var(--slate); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
}
.progress-focus input, .progress-fields textarea, #progressSummary {
  width: 100%; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font: 11px/1.45 Arial, sans-serif; text-transform: none; letter-spacing: 0; font-weight: 400;
}
.progress-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
.progress-fields textarea { height: 72px; resize: vertical; }
.progress-summary-label { margin-top: 9px; }
#progressSummary { height: 104px; resize: vertical; background: #f8fafc; font-family: Georgia, serif; }
.progress-actions { align-items: center; margin-top: 9px; color: var(--muted); font-size: 10px; }
.progress-actions > div { display: flex; gap: 6px; flex-wrap: wrap; }
.journal-outline-bridge,.journal-media { margin:16px 0; padding:16px; border:1px solid var(--line); border-radius:12px; background:#fbfcfe; }
.outline-bridge-heading,.journal-media-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.journal-outline-bridge h3,.journal-media h3 { margin:2px 0 0; color:var(--blue); font:700 20px Georgia,serif; }
.journal-outline-bridge > p,.journal-media > p { margin:6px 0 10px; color:var(--muted); font-size:11px; line-height:1.45; }
#journalOutline { width:100%; height:118px; resize:vertical; padding:10px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:white; font:12px/1.5 "Cascadia Mono",Consolas,monospace; }
.outline-bridge-actions { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; align-items:end; margin-top:9px; }
.outline-bridge-actions label { display:grid; gap:4px; color:var(--slate); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.outline-bridge-actions input { min-width:0; padding:7px; border:1px solid var(--line); border-radius:7px; }
.journal-media-gallery { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:9px; }
.journal-media-item { min-width:0; padding:8px; border:1px solid var(--line); border-radius:8px; background:white; }
.journal-media-item img { width:100%; height:140px; object-fit:contain; border-radius:5px; background:var(--paper); }
.journal-media-item audio { width:100%; min-height:38px; }
.journal-media-item a { display:block; margin-top:6px; overflow:hidden; color:var(--blue); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.journal-album-toolbar { display:grid; grid-template-columns:auto minmax(150px,1fr) 150px auto; gap:7px; align-items:center; margin:9px 0 12px; }
.journal-album-scope { display:flex; gap:4px; }
.journal-album-scope button.selected { border-color:var(--blue); background:var(--blue); color:white; }
.journal-album-toolbar input,.journal-album-toolbar select { min-width:0; padding:7px 8px; border:1px solid var(--line); border-radius:7px; background:white; color:var(--ink); }
#albumCount { color:var(--muted); font-size:10px; white-space:nowrap; }
.journal-media-item { display:grid; grid-template-rows:auto 1fr auto; gap:6px; }
.journal-media-item video { width:100%; height:140px; border-radius:5px; background:#111; }
.journal-file-placeholder { min-height:110px; display:grid; place-items:center; border-radius:6px; background:linear-gradient(140deg,#eaf5fb,#fff7d7); color:var(--blue); font:700 14px/1.2 Georgia,serif; text-align:center; }
.journal-file-meta { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:9px; }
.journal-file-actions { display:flex; gap:5px; }
.journal-file-actions a { flex:1; margin:0; padding:5px 6px; border:1px solid var(--line); border-radius:5px; background:var(--paper); text-align:center; }
@media (max-width:760px) { .journal-album-toolbar { grid-template-columns:1fr; } .journal-album-scope { flex-wrap:wrap; } }
.activity-list { list-style: none; margin: 14px 0 0; padding: 0; }
.activity-list li { position: relative; padding: 0 0 17px 19px; color: var(--slate); font-size: 12px; line-height: 1.4; border-left: 1px solid var(--line); }
.activity-list li::before { content: ""; position: absolute; left: -4px; top: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.activity-list time { display: block; margin-bottom: 2px; color: var(--copper); font-size: 10px; font-weight: 800; }
.activity-empty { color: var(--muted); font-style: italic; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(11, 18, 31, .54); backdrop-filter: blur(3px); }
.modal-backdrop.hidden { display: none; }
.modal { width: min(430px, calc(100vw - 30px)); padding: 20px; background: white; border-radius: 12px; box-shadow: var(--shadow); }
.modal h2 { margin: 0; }
.modal p { color: var(--slate); font-size: 13px; }
.modal input { width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; padding: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 16px; }
.export-composer-dialog { width:min(960px,calc(100vw - 32px)); max-height:calc(100vh - 36px); padding:0; border:0; border-radius:15px; background:var(--panel); color:var(--ink); box-shadow:0 24px 80px rgba(8,18,31,.35); }
.export-composer-dialog::backdrop { background:rgba(8,18,31,.56); backdrop-filter:blur(4px); }
.export-composer-header { display:flex; justify-content:space-between; gap:18px; padding:19px 21px 14px; border-bottom:1px solid var(--line); background:linear-gradient(110deg,#e9f5ff,#fff8d9); }
.export-composer-header h2 { margin:3px 0; }
.export-composer-header p { margin:0; color:var(--slate); font-size:11px; }
.export-composer-header > button { align-self:flex-start; min-width:34px; font-size:20px; }
.export-essentials { display:grid; grid-template-columns:minmax(230px,.7fr) 1.3fr; gap:14px; padding:13px 21px; border-bottom:1px solid var(--line); }
.export-essentials small { display:block; margin-top:4px; color:var(--muted); line-height:1.35; }
#exportEssentialsList { display:flex; flex-wrap:wrap; gap:5px; }
.export-essential-chip { padding:5px 8px; border:1px solid #aad1e7; border-radius:999px; background:#eef8fd; color:#24546c; font:10px/1.2 Consolas,monospace; }
.export-essential-chip.attached { border-color:#e0c168; background:#fff8d9; color:#765514; }
.export-composer-columns { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:15px 21px; }
.export-composer-columns h3 { margin:0; font-size:13px; }
.export-composer-columns p { margin:3px 0 8px; color:var(--muted); font-size:10px; }
.export-dropzone { min-height:220px; max-height:310px; overflow:auto; display:grid; align-content:start; gap:6px; padding:9px; border:2px dashed var(--line-strong); border-radius:10px; background:#f7f9fc; }
.export-dropzone.included { background:#fffdf5; border-color:#dbc781; }
.export-dropzone.drag-over { border-color:var(--blue); background:#eaf6ff; }
.export-item { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; padding:8px 9px; border:1px solid var(--line); border-radius:8px; background:white; cursor:grab; }
.export-item:active { cursor:grabbing; }
.export-item code { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); }
.export-item small { color:var(--muted); }
.export-empty { margin:auto; color:var(--muted); font-size:11px; text-align:center; }
.export-composer-options { display:flex; flex-wrap:wrap; gap:18px; padding:0 21px 14px; color:var(--slate); font-size:11px; }
.export-composer-options label { display:flex; align-items:center; gap:6px; }
.export-composer-dialog footer { display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:12px 21px; border-top:1px solid var(--line); }
#exportComposerStatus { margin-right:auto; color:var(--muted); font-size:10px; }
@media (max-width:720px) { .export-composer-columns,.export-essentials { grid-template-columns:1fr; } .export-dropzone { min-height:140px; } .export-composer-dialog footer { flex-wrap:wrap; } #exportComposerStatus { width:100%; } }
.closed { min-height: 100vh; display: grid; place-content: center; text-align: center; background: var(--paper); }

@media (max-width: 1080px) {
  .workspace { grid-template-columns: 280px 1fr; }
  .preview-pane { display: none; }
  .layout-pdf .preview-pane { display: grid; }
  .brand { min-width: 0; }
  .layout-journal .journal-pane { grid-template-columns:minmax(205px,22%) minmax(0,1fr) minmax(220px,25%); }
  .layout-journal .journal-pane.journal-no-calendar { grid-template-columns:minmax(0,1fr) minmax(220px,25%); }
  .layout-journal .journal-pane.journal-no-timeline { grid-template-columns:minmax(205px,22%) minmax(0,1fr); }
  .layout-journal .journal-pane.journal-no-calendar.journal-no-timeline { grid-template-columns:minmax(0,1fr); }
  .layout-journal .activity-column { display:block; padding:14px; }
  .settings-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .educator-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  body.mathdock-preview .preview-pane { display:grid; }
  body.mathdock-preview .editor-pane { display:none; }
  body.mathdock-preview .workspace { grid-template-columns:280px minmax(0,1fr); }
  body.workflow-classic .layout-dock { grid-template-columns:280px minmax(0,1fr) !important; }
  body.workflow-classic .layout-dock .preview-pane { display:none !important; }
  body.workflow-classic.mathdock-preview .layout-dock .editor-pane { display:none !important; }
  body.workflow-classic.mathdock-preview .layout-dock .preview-pane { display:grid !important; }
}

@media (max-width: 760px) {
  .boot-copy { margin-right: 0; }
  .startup-actions { grid-template-columns: 1fr; }
  .educator-grid { grid-template-columns: 1fr; }
  .educator-header { align-items: flex-start; flex-direction: column; }
  .day-activity-grid, .progress-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-fields { grid-template-columns: 1fr; }
  .day-planner-heading, .progress-report-heading, .progress-actions { flex-direction: column; }
  .macro-builder { grid-template-columns:1fr; }
  .macro-builder code { grid-column:auto; }
  .math-synthesizer { grid-template-columns:1fr; }
  .math-output { grid-column:auto; }
  #mathLatexPreview,#mathLatexPreview + .math-synth-actions { grid-column:auto; }
  .formula-shortcut,.math-library { grid-template-columns:1fr; }
  .math-library-results { grid-column:auto; }
  .math-formula-gui { grid-column:auto; grid-template-columns:1fr; }
  .unix-math-keyboard { grid-column:auto; grid-template-columns:1fr; }
  .unix-math-keyboard p,.math-keyboard-try,.math-keyboard-result { grid-column:auto; }
  .math-key-palette { grid-column:auto; }
  .outline-bridge-actions { grid-template-columns:1fr; }
  .math-argument-card header,.math-argument-card main,.math-dock-export { grid-template-columns:1fr; }
  .math-argument-number { display:none; }
  body.mathdock-preview .workspace { display:block; }
  body.mathdock-preview .dock-pane { display:none; }
  body.mathdock-preview .preview-pane { height:100%; }
  .layout-document .editor-shell { width:calc(100% - 16px); max-width:calc(100% - 16px); margin:8px auto 80px; }
  .layout-document #editor { padding:36px 22px 140px; }
  .journal-persist-toggle { max-width:none; }
  .journal-custom-grid { grid-template-columns:1fr; }
  .layout-journal { overflow:auto; }
  .layout-journal .journal-pane { display:block; height:auto; min-height:100%; }
  .layout-journal .calendar-column,.layout-journal .activity-column { max-height:none; border:0; border-bottom:1px solid var(--line); }
  .layout-journal .journal-editor { overflow:visible; padding:18px; }
}

/* Monitor-fit shell: normal windows consume the exact remaining viewport area. */
body:not(.dock-popout):not(.editor-popout):not(.editor-math-popout):not(.viewer-popout):not(.math-popout):not(.agenda-popout) {
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr);
}
body:not(.dock-popout):not(.editor-popout):not(.editor-math-popout):not(.viewer-popout):not(.math-popout):not(.agenda-popout) > .topbar { grid-row:1; }
body:not(.dock-popout):not(.editor-popout):not(.editor-math-popout):not(.viewer-popout):not(.math-popout):not(.agenda-popout) > .pathbar { grid-row:2; }
body:not(.dock-popout):not(.editor-popout):not(.editor-math-popout):not(.viewer-popout):not(.math-popout):not(.agenda-popout) > .workspace {
  grid-row:3;
  height:var(--adaptive-workspace-height,auto) !important;
  max-height:var(--adaptive-workspace-height,none);
  min-height:0;
  overflow:hidden;
}
body.bars-minimized:not(.dock-popout):not(.editor-popout):not(.editor-math-popout):not(.viewer-popout):not(.math-popout):not(.agenda-popout) {
  grid-template-rows:auto minmax(0,1fr);
}
body.bars-minimized:not(.dock-popout):not(.editor-popout):not(.editor-math-popout):not(.viewer-popout):not(.math-popout):not(.agenda-popout) > .workspace { grid-row:2; }

/* Every expanded Dock menu remains reachable without stealing the whole screen. */
.client-project-loader[open], .forpages-manager[open], .project-management-dock[open] {
  max-height:min(44dvh,390px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.client-project-loader[open] > summary, .forpages-manager[open] > summary, .project-management-dock[open] > summary {
  position:sticky;
  top:0;
  z-index:8;
  background:color-mix(in srgb,var(--blue-soft) 68%,var(--panel));
}
.dock-pane, .tree, .client-project-loader, .client-project-history, .forpages-manager, .forpages-folder-list, .project-management-dock {
  scrollbar-color:var(--line-strong) transparent;
  scrollbar-width:thin;
}
.dock-pane::-webkit-scrollbar, .tree::-webkit-scrollbar,
.client-project-loader::-webkit-scrollbar, .client-project-history::-webkit-scrollbar,
.forpages-manager::-webkit-scrollbar, .forpages-folder-list::-webkit-scrollbar { width:10px; height:10px; }
.dock-pane::-webkit-scrollbar-thumb, .tree::-webkit-scrollbar-thumb,
.client-project-loader::-webkit-scrollbar-thumb, .client-project-history::-webkit-scrollbar-thumb,
.forpages-manager::-webkit-scrollbar-thumb, .forpages-folder-list::-webkit-scrollbar-thumb {
  border:2px solid transparent;
  border-radius:999px;
  background:var(--line-strong);
  background-clip:padding-box;
}

@media (max-width:1180px) {
  .tutorial-grid { grid-template-columns:minmax(235px,34%) minmax(0,1fr); }
  .tutorial-inspector-panel { grid-column:1 / -1; min-height:380px; }
  .research-consensus-workspace { grid-template-columns:minmax(250px,34%) minmax(0,1fr); overflow:auto; }
  .research-output-panel { grid-column:1/-1; min-height:430px; }
}

@media (max-width:760px) {
  .tutorial-header { align-items:flex-start; padding:15px; }
  .tutorial-header h1 { font-size:24px; }
  .tutorial-progress { min-width:105px; }
  .layout-tutorial { overflow:auto; }
  .layout-tutorial .tutorial-pane { height:auto; min-height:100%; overflow:visible; }
  .tutorial-grid { display:block; }
  .tutorial-catalog-panel,.tutorial-path-panel,.tutorial-inspector-panel { min-height:420px; margin-bottom:12px; }
  .tutorial-header-tools { min-width:0; justify-items:stretch; }
  .tutorial-mode-switch { flex-direction:column; }
  .research-consensus-workspace { display:block; }
  .research-consensus-workspace.hidden { display:none; }
  .research-query-panel,.research-evidence-panel,.research-output-panel { min-height:420px; margin-bottom:12px; }
  .research-evidence-list { max-height:520px; }
}

@media (max-width:980px) {
  .topbar {
    height:auto;
    min-height:58px;
    grid-template-columns:auto minmax(0,1fr);
    grid-template-areas:"brand actions" "tabs tabs";
    gap:6px 14px;
    padding:7px 14px;
  }
  .brand { grid-area:brand; }
  .workspace-tabs {
    grid-area:tabs;
    width:100%;
    min-width:0;
    overflow-x:auto;
    scrollbar-width:thin;
  }
  .workspace-tabs button { flex:1 0 auto; padding:6px 11px; white-space:nowrap; }
  .compile-group {
    grid-area:actions;
    justify-self:stretch;
    justify-content:flex-end;
    min-width:0;
    max-width:100%;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:thin;
  }
  .compile-group > * { flex:0 0 auto; }
  .dock-pane .pane-title { height:auto; min-height:64px; align-items:flex-start; gap:8px; }
  .dock-window-actions { flex-wrap:wrap; justify-content:flex-end; }
}

@media (max-width:1180px) {
  .topbar { padding-inline:10px; }
  .brand span, .session-focus-chip { display:none; }
  .tab-label { display:none; }
  .workspace-tabs button { width:34px; padding:6px; }
  .compile-group button { padding:6px 8px; font-size:11px; }
  .compile-group .top-tool { padding:0; }
  .compile-action { min-height:34px; }
  .pathbar { height:auto; min-height:44px; padding:6px 10px; }
  .pathbar label { display:none; }
}

@media (max-height:800px) {
  .dock-pane .pane-title { min-height:56px; padding:8px 10px; }
  .dock-pane .pane-title h1 { font-size:18px; }
  .dock-actions { padding:6px 9px; gap:4px; }
  .dock-actions button { padding-top:5px; padding-bottom:5px; font-size:11px; }
  .dock-browser-tools { padding:6px 9px 3px; }
  .project-compass { margin:6px 9px; padding:8px; }
  .tree { min-height:140px; }
  body.dock-whole-scroll .dock-pane .tree { min-height:clamp(220px,38dvh,330px); }
}

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

/* MathMotion is additive: it uses the original Theory Visionary palette,
   typography, controls, spacing, and card language. */
.mathmotion-pane { display:none; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; background:var(--paper); }
.layout-mathmotion { display:block; }
.layout-mathmotion > .dock-pane,
.layout-mathmotion > .editor-pane,
.layout-mathmotion > .preview-pane,
.layout-mathmotion > .journal-pane,
.layout-mathmotion > .educator-pane,
.layout-mathmotion > .settings-pane { display:none !important; }
.layout-mathmotion .mathmotion-pane { display:block; width:100%; height:100%; min-height:0; }
.mathmotion-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 22px; border-bottom:1px solid var(--line); background:var(--panel); }
.mathmotion-header h1 { margin:3px 0; }
.mathmotion-header p { margin:4px 0 0; color:var(--slate); font-size:12px; }
.mathmotion-actions { display:flex; align-items:end; gap:7px; }
.mathmotion-actions label { display:grid; gap:3px; color:var(--slate); font-size:10px; font-weight:700; }
.mathmotion-actions select { min-width:130px; padding:7px; border:1px solid var(--line-strong); border-radius:7px; color:var(--ink); background:var(--panel); }
.mathmotion-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,.7fr); gap:14px; padding:18px; }
.mathmotion-card { min-width:0; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--panel); box-shadow:var(--shadow); }
.mathmotion-card h2 { margin:4px 0 8px; font-size:18px; }
.mathmotion-director-card { grid-column:1/-1; display:grid; gap:12px; overflow:visible; }
.mathmotion-projectbar { display:grid; grid-template-columns:minmax(180px,.8fr) minmax(210px,1fr) auto; align-items:end; gap:8px 10px; padding:10px; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb,var(--blue-soft) 36%,var(--panel)); }
.mathmotion-projectbar label { display:grid; gap:4px; color:var(--slate); font-size:10px; font-weight:700; }
.mathmotion-projectbar input,.mathmotion-projectbar select { box-sizing:border-box; width:100%; min-width:0; padding:7px 8px; border:1px solid var(--line-strong); border-radius:7px; color:var(--ink); background:var(--panel); }
.mathmotion-project-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.mathmotion-project-state { grid-column:1/-1; color:var(--muted); font-size:10px; }
.mathmotion-series-dock { display:grid; gap:8px; padding:11px; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb,var(--paper) 72%,var(--blue-soft)); }
.mathmotion-series-dock header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.mathmotion-series-dock h3 { margin:2px 0; font-size:15px; }
.mathmotion-series-dock p { margin:0; color:var(--slate); font-size:10px; }
.mathmotion-series-dock header > div:last-child { display:flex; flex-wrap:wrap; gap:6px; }
.mathmotion-series-list { display:grid; gap:5px; max-height:230px; overflow:auto; overscroll-behavior:contain; }
.mathmotion-series-item { display:grid; grid-template-columns:32px minmax(0,1fr) auto; align-items:center; gap:8px; padding:7px 8px; border:1px solid var(--line); border-radius:7px; background:var(--panel); cursor:pointer; }
.mathmotion-series-item.selected { border-color:var(--blue); box-shadow:inset 3px 0 var(--blue); background:var(--blue-soft); }
.mathmotion-series-number { color:var(--blue); font-weight:800; text-align:center; }
.mathmotion-series-copy { min-width:0; display:grid; gap:2px; }
.mathmotion-series-copy strong,.mathmotion-series-copy code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mathmotion-series-copy code { color:var(--muted); font-size:9px; }
.mathmotion-series-tools { display:flex; align-items:center; gap:4px; }
.mathmotion-series-status { padding:2px 5px; border-radius:999px; color:var(--slate); background:var(--paper); font-size:9px; }
.mathmotion-story-builder { border-top:1px solid var(--line); padding-top:8px; }
.mathmotion-story-builder summary { display:flex; justify-content:space-between; align-items:center; gap:12px; cursor:pointer; }
.mathmotion-story-builder summary span:first-child { display:grid; gap:2px; }
.mathmotion-story-builder summary small { color:var(--muted); font-weight:400; }
.mathmotion-story-controls { display:grid; grid-template-columns:minmax(220px,1fr) auto auto; align-items:end; gap:8px; margin-top:10px; }
.mathmotion-import-controls { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.mathmotion-story-controls label { display:grid; gap:4px; }
.mathmotion-story-files { display:grid; gap:4px; max-height:180px; overflow:auto; margin-top:8px; }
.mathmotion-story-file { display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:7px; padding:6px 8px; background:var(--panel); border:1px solid var(--line); border-radius:6px; }
.mathmotion-story-file code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mathmotion-story-file div { display:flex; gap:4px; }
@media (max-width:800px) { .mathmotion-story-controls { grid-template-columns:1fr; } }
.mathmotion-director-card textarea { position:relative; z-index:1; box-sizing:border-box; width:100%; min-height:78px; max-height:220px; resize:vertical; padding:12px 14px; border:1px solid var(--line-strong); border-radius:9px; color:var(--ink); background:var(--paper); font:13px/1.45 inherit; }
.mathmotion-option-grid { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:9px; }
.mathmotion-option-grid label { display:grid; gap:4px; color:var(--slate); font-size:10px; font-weight:700; }
.mathmotion-option-grid select { box-sizing:border-box; width:100%; min-width:0; padding:7px 8px; border:1px solid var(--line-strong); border-radius:7px; color:var(--ink); background:var(--panel); }
.mathmotion-findings { min-height:20px; padding:9px 11px; border-left:3px solid var(--blue); border-radius:0 7px 7px 0; color:var(--slate); background:var(--blue-soft); font-size:11px; line-height:1.45; }
.mathmotion-voice-note { margin:0; color:var(--muted); font-size:10px; line-height:1.45; }
.mathmotion-playbar { position:relative; z-index:4; display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; min-height:42px; padding-top:2px; background:var(--panel); }
.mathmotion-playbar button { position:relative; flex:0 0 auto; min-height:38px; }
.mathmotion-play-btn { min-width:190px; font-weight:800; }
.mathmotion-play-btn span { margin-right:6px; }
.mathmotion-developer { border:1px solid var(--line); border-radius:9px; background:var(--paper); overflow:hidden; }
.mathmotion-developer > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 13px; cursor:pointer; color:var(--ink); background:var(--blue-soft); }
.mathmotion-developer > summary span:first-child { display:grid; gap:2px; }
.mathmotion-developer > summary small { color:var(--slate); font-size:10px; font-weight:400; }
.mathmotion-code-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:8px; padding:10px 12px; border-top:1px solid var(--line); }
.mathmotion-code-toolbar label { display:grid; gap:3px; flex:1 1 220px; color:var(--slate); font-size:10px; font-weight:700; }
.mathmotion-code-toolbar input { padding:7px 8px; border:1px solid var(--line-strong); border-radius:7px; color:var(--ink); background:var(--panel); font-family:Consolas,monospace; }
.mathmotion-developer #mathmotionCode { box-sizing:border-box; display:block; width:calc(100% - 24px); min-height:340px; max-height:70dvh; margin:0 12px; resize:vertical; padding:13px; border:1px solid var(--line-strong); border-radius:8px; color:#dfe8f2; background:#111827; tab-size:4; white-space:pre; overflow:auto; font:11px/1.55 Consolas,"Courier New",monospace; }
.mathmotion-code-footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:8px 12px 11px; color:var(--muted); font-size:10px; }
.mathmotion-code-footer span:first-child { color:var(--blue); font-weight:700; }
.vision-customization { margin:0 12px 12px; border:1px solid var(--line); border-radius:9px; padding:9px 12px; background:var(--panel); }
.vision-customization summary { cursor:pointer; color:#6258c9; font-weight:700; }
.vision-customization-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); gap:10px; padding:12px 0; }
.vision-customization-grid label { display:grid; gap:5px; font-size:11px; color:var(--slate); }
.vision-customization-grid input { width:100%; padding:5px; border:1px solid var(--line); border-radius:6px; }
.vision-customization p { font-size:11px; color:var(--slate); margin:0 0 4px; }
.mathmotion-developer { --vision-code-accent:#7468e9; --vision-code-surface:#111827; border-top:3px solid var(--vision-code-accent); }
.mathmotion-developer #mathmotionCode { background:var(--vision-code-surface); border-color:var(--vision-code-accent); caret-color:#fff; }
.zotero-import { display:grid; gap:7px; margin:14px 0; padding:12px; border-left:3px solid #36a897; background:var(--paper); }
.zotero-import small { color:var(--slate); }
.mathmotion-summary-card p { color:var(--slate); }
.mathmotion-cue-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:13px; }
.mathmotion-cue-row code { padding:6px 8px; border:1px solid var(--line); border-radius:7px; color:var(--blue); background:var(--blue-soft); font-size:10px; }
.mathmotion-log-card pre { min-height:110px; max-height:210px; overflow:auto; margin:0; padding:11px; border-radius:8px; color:#dfe8f2; background:#172033; white-space:pre-wrap; font:10px/1.5 Consolas,monospace; }
.mathmotion-preview-card { min-height:0; }
.mathmotion-preview-card video { display:block; width:100%; max-height:360px; border-radius:8px; background:#080b12; }
.mathmotion-download-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:10px; }
.mathmotion-download-actions .button-link.primary { padding:7px 11px; border:1px solid var(--blue); border-radius:7px; color:#fff; background:var(--blue); font-size:11px; font-weight:700; text-decoration:none; }
.mathmotion-storyboard-card { grid-column:1/-1; }
.mathmotion-storyboard-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.mathmotion-storyboard-heading p { max-width:680px; margin:4px 0 0; color:var(--slate); font-size:11px; }
.mathmotion-storyboard-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:7px; }
.mathmotion-table-wrap { max-height:clamp(220px,calc(var(--adaptive-workspace-height,700px) - 330px),58dvh); overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; border:1px solid var(--line); border-radius:9px; }
.mathmotion-table { width:100%; border-collapse:collapse; font-size:11px; }
.mathmotion-table th { position:sticky; top:0; z-index:1; padding:8px 10px; text-align:left; color:var(--slate); background:var(--paper); border-bottom:1px solid var(--line-strong); }
.mathmotion-table td { padding:8px 10px; vertical-align:top; border-bottom:1px solid var(--line); }
.mathmotion-table td:first-child { width:42px; color:var(--muted); }
.mathmotion-table td:nth-child(2) { width:100px; color:var(--blue); font-weight:700; }
.mathmotion-table td:last-child { width:70px; }
.mathmotion-table select,.mathmotion-table textarea,.mathmotion-table input { box-sizing:border-box; width:100%; min-width:0; padding:6px 7px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--panel); font:10px/1.35 inherit; }
.mathmotion-table textarea { min-width:260px; resize:vertical; }
.mathmotion-table input[type="color"] { height:28px; margin-top:4px; padding:2px; cursor:pointer; }
.mathmotion-table td:nth-child(6) { width:78px; }
.mathmotion-table td:nth-child(6) small { display:block; margin-top:2px; color:var(--muted); font-size:8px; }
.mathmotion-beat-notes { margin-top:4px; color:var(--slate) !important; font-size:9px !important; }
.mathmotion-beat-tools { display:grid; grid-template-columns:repeat(2,28px); gap:3px; }
.mathmotion-beat-tools button { padding:4px; }
.mathmotion-storyboard-help { margin:9px 2px 0; color:var(--muted); font-size:10px; }

@media (max-width:1180px) {
  .editor-title-row { align-items:flex-start; }
  .editor-file-actions { justify-content:flex-end; flex-wrap:wrap; }
  .document-ribbon { flex-wrap:wrap; overflow-x:visible; }
  .ribbon-group { flex:1 1 auto; padding-block:3px; }
  .mathmotion-table textarea { min-width:200px; }
}

@media (max-width:880px) {
  .pathbar { flex-wrap:wrap; }
  .status { flex:1 0 100%; text-align:left; }
  .editor-title-row { flex-direction:column; }
  .editor-file-actions { width:100%; justify-content:flex-start; }
  .editor-file-actions button { flex:1 1 auto; }
  .editor-footer { flex-wrap:wrap; gap:3px 12px; min-height:27px; height:auto; }
  .mathmotion-storyboard-heading { align-items:flex-start; flex-direction:column; }
  .mathmotion-storyboard-actions { width:100%; justify-content:flex-start; }
  .mathmotion-table,.mathmotion-table tbody { display:block; }
  .mathmotion-table thead { display:none; }
  .mathmotion-table tr { display:grid; grid-template-columns:42px 1fr 1fr; gap:7px; margin:8px; padding:9px; border:1px solid var(--line); border-radius:9px; background:var(--panel); }
  .mathmotion-table td { width:auto !important; padding:0; border:0; }
  .mathmotion-table td:nth-child(3) { grid-column:1/-1; }
  .mathmotion-table td:nth-child(6) { grid-column:2; }
  .mathmotion-table td:nth-child(7) { grid-column:3; }
  .mathmotion-table textarea { min-width:0; }
  .mathmotion-beat-tools { display:flex; justify-content:flex-end; }
}

@media (max-width:760px) {
  .brand > div:last-child { display:none; }
  .topbar { padding-inline:8px; }
  .compile-group .top-tool:not(.primary) { display:none; }
  .workspace-tabs button { min-width:40px; }
  body.workflow-classic .layout-dock { grid-template-columns:minmax(190px,30%) minmax(0,1fr) !important; }
  .latex-autocomplete { left:8px; width:calc(100% - 16px); }
  #lineNumbers { display:none; }
  .editor-shell { grid-template-columns:minmax(0,1fr); }
  .layout-document .editor-shell { grid-template-columns:minmax(0,1fr); width:calc(100% - 12px); max-width:calc(100% - 12px); height:calc(100% - 12px); margin:6px auto; }
  .layout-document #lineNumbers { display:none; }
  .layout-document #editor { padding:22px 18px 72px; font-size:14px; }
}
@media (max-width:900px) {
  .mathmotion-header { align-items:flex-start; flex-direction:column; }
  .mathmotion-actions { flex-wrap:wrap; }
  .mathmotion-grid { grid-template-columns:1fr; }
  .mathmotion-director-card { grid-column:1; }
  .mathmotion-projectbar { grid-template-columns:1fr 1fr; }
  .mathmotion-project-actions { grid-column:1/-1; justify-content:flex-start; }
  .mathmotion-option-grid { grid-template-columns:repeat(2,minmax(140px,1fr)); }
  .mathmotion-storyboard-card { grid-column:1; }
}
@media (max-width:620px) {
  .mathmotion-option-grid { grid-template-columns:1fr; }
  .mathmotion-projectbar { grid-template-columns:1fr; }
  .mathmotion-project-actions { grid-column:1; }
  .mathmotion-playbar { align-items:stretch; flex-direction:column; }
  .mathmotion-playbar button { width:100%; }
}

/* Adaptive scrolling: pane boundaries follow the actual WebView viewport,
   including browser zoom, compact title bars, and Windows display scaling. */
.workspace > .pane { min-height:0; max-height:100%; overscroll-behavior:contain; }
.editor-pane, .preview-pane, .journal-pane, .educator-pane, .settings-pane { min-height:0; }
#editor { scroll-padding-bottom:var(--adaptive-scroll-padding,120px); }
.preview-panel.active, .mathmotion-log-card pre, .mathmotion-table-wrap {
  scrollbar-color:var(--line-strong) transparent;
  scrollbar-width:thin;
}
@media (max-height:760px) {
  .mathmotion-header { padding:10px 14px; }
  .mathmotion-grid { gap:10px; padding:10px; }
  .mathmotion-card { padding:12px; }
  .mathmotion-table-wrap { max-height:clamp(180px,calc(var(--adaptive-workspace-height,560px) - 275px),48dvh); }
}

/* Navigation is always local so unsaved work survives returning home. */
button.studio-home { border:0; background:transparent; color:inherit; text-align:left; padding:0; cursor:pointer; }
button.studio-home:focus-visible { outline:2px solid #b6e5ff; outline-offset:4px; }
.studio-notice { position:fixed; right:16px; bottom:42px; z-index:25000; max-width:min(460px,calc(100vw - 32px)); padding:16px; border:1px solid #cb9547; border-radius:12px; background:#fff9ed; color:#292c34; box-shadow:0 8px 32px #0003; }
.studio-notice[hidden] { display:none; }
.studio-notice p { margin:0 0 12px; overflow-wrap:anywhere; }
.studio-notice button { margin-right:8px; }


/* Keep the compact cloud menu on one row; reveal overflow by scrolling sideways. */
body.cloud-studio .topbar {
  height:54px; min-height:54px; grid-template-columns:max-content max-content max-content;
  grid-template-areas:none; grid-auto-flow:column; justify-content:space-between;
  gap:11px; padding:0 12px; overflow-x:auto; overflow-y:hidden;
  scrollbar-width:thin; scrollbar-color:#7085a6 #101827; overscroll-behavior-x:contain;
}
body.cloud-studio .topbar > .brand,
body.cloud-studio .topbar > .workspace-tabs,
body.cloud-studio .topbar > .compile-group { grid-area:auto; }
body.cloud-studio .topbar .workspace-tabs {
  width:max-content; max-width:none; overflow:visible; flex-wrap:nowrap;
}
body.cloud-studio .topbar .workspace-tabs button { flex:0 0 auto; width:auto; padding:6px 9px; }
body.cloud-studio .topbar .tab-label { display:inline; }
body.cloud-studio .topbar .compile-group { flex-wrap:nowrap; overflow:visible; max-width:none; padding:0; }
body.cloud-studio .topbar .compile-group > * { flex:0 0 auto; }
body.cloud-studio .topbar .compile-group .top-tool:not([hidden]) { display:grid; }
body.cloud-studio .topbar #cloudFilesBtn,
body.cloud-studio .topbar #arxivQuickBtn,
body.cloud-studio .topbar #captureQuickBtn { width:max-content; min-width:34px; padding-inline:9px; white-space:nowrap; }
body.cloud-studio .topbar [hidden] { display:none !important; }
body.cloud-studio .topbar::-webkit-scrollbar { height:7px; }
body.cloud-studio .topbar::-webkit-scrollbar-track { background:#101827; }
body.cloud-studio .topbar::-webkit-scrollbar-thumb { background:#7085a6; border-radius:8px; }
body.cloud-studio.bars-minimized .topbar { height:44px; min-height:44px; }

/* Let the browser size the cloud workspace on every layout, including zoom.
   A cached pixel measurement must not leave unused space below the editor. */
body.cloud-studio:not(.dock-popout):not(.editor-popout):not(.editor-math-popout):not(.viewer-popout):not(.math-popout):not(.agenda-popout) {
  grid-template-columns:minmax(0,1fr);
}
body.cloud-studio:not(.dock-popout):not(.editor-popout):not(.editor-math-popout):not(.viewer-popout):not(.math-popout):not(.agenda-popout) > .workspace {
  height:auto !important;
  max-height:none;
  min-width:0;
  align-self:stretch;
}

/* Utility layout: original controls stay in place, with deliberate focus views. */
body.tv-utility-ui .tv-brand-actions { display:flex; align-items:center; gap:10px; min-width:0; }
body.tv-utility-ui .topbar > .tv-brand-actions { grid-area:auto; }
#tvToolsBtn { flex:0 0 auto; color:#e7f0ff; border-color:#52627c; background:#25334b; padding:7px 11px; }
#tvResearchTab { border-bottom:3px solid var(--vision-research,#348a70); }
#tvResearchTab[aria-pressed="true"] { background:#2b3850; color:#fff; }
.tv-panel-hidden { display:none !important; }
.tv-section-nav { position:sticky; top:0; z-index:12; display:flex; align-items:center; gap:7px; padding:9px 14px; min-width:0; overflow-x:auto; white-space:nowrap; background:var(--panel); border-bottom:1px solid var(--line-strong); scrollbar-width:thin; }
.tv-section-nav button { flex:0 0 auto; min-height:34px; padding:6px 11px; font-size:12px; }
.tv-section-nav [aria-pressed="true"] { color:#fff; background:var(--blue); border-color:var(--blue); }
.tv-section-nav label { display:flex; align-items:center; gap:10px; font-size:12px; }
.tv-section-nav select { min-width:0; max-width:min(420px,65vw); padding:7px; background:var(--panel); color:var(--ink); border:1px solid var(--line-strong); border-radius:7px; }
.tv-panel-hint { color:var(--slate); font-size:12px; line-height:1.5; margin:6px 0 10px; }
.tv-arrival { outline:3px solid var(--vision-research,#348a70); outline-offset:3px; }
body.tv-utility-ui :is(.tutorial-pane,.research-consensus-workspace,.settings-pane,.mathmotion-pane,.journal-pane,.educator-pane) :is(section,aside,details,h2,h3,input,textarea,button,select) { scroll-margin-top:65px; }
body.tv-utility-ui :is(.tutorial-pane,.settings-pane,.mathmotion-pane,.journal-pane,.educator-pane,.cloud-files) { scrollbar-gutter:stable; scrollbar-width:auto; scrollbar-color:var(--line-strong) var(--paper); }
body.tv-utility-ui :is(.tutorial-pane,.settings-pane,.mathmotion-pane,.journal-pane,.educator-pane,.cloud-files)::-webkit-scrollbar { width:12px; height:12px; }
body.tv-utility-ui :is(.tutorial-pane,.settings-pane,.mathmotion-pane,.journal-pane,.educator-pane,.cloud-files)::-webkit-scrollbar-thumb { background:var(--line-strong); border:3px solid var(--paper); border-radius:10px; }

/* Learn and Research use the pane as their outer scroll area. No absolutely
   positioned overlay or shrinking panel may clip the bottom action controls. */
body.tv-utility-ui .layout-tutorial .tutorial-pane { display:block; height:100%; min-height:0; overflow:auto; }
body.tv-utility-ui .tutorial-header { padding:16px 20px; gap:16px; align-items:flex-start; }
body.tv-utility-ui .tutorial-header h1 { font-size:25px; }
body.tv-utility-ui .tutorial-header p { font-size:13px; }
body.tv-utility-ui .tutorial-header-tools { min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
body.tv-utility-ui .tutorial-research-launch { min-width:0; }
body.tv-utility-ui .tutorial-progress { min-width:0; grid-column:1/-1; display:flex; align-items:center; justify-content:flex-end; gap:12px; padding:5px 10px; }
body.tv-utility-ui .tutorial-grid,body.tv-utility-ui .tv-research-panels { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding:16px; align-items:start; }
body.tv-utility-ui :is(.tutorial-catalog-panel,.tutorial-path-panel,.tutorial-inspector-panel,.research-query-panel,.research-evidence-panel,.research-output-panel) { display:block; min-width:0; min-height:0; max-height:none; overflow:visible; padding:16px; }
body.tv-utility-ui :is(.tutorial-catalog,.tutorial-path-drop,.research-evidence-list) { max-height:55dvh; overflow:auto; scrollbar-gutter:stable; }
body.tv-utility-ui .tutorial-path-drop { min-height:160px; }
body.tv-utility-ui .tutorial-card strong { font-size:14px; }
body.tv-utility-ui .tutorial-card p,body.tv-utility-ui .research-evidence-card p { font-size:12px; }
body.tv-utility-ui .tutorial-card small,body.tv-utility-ui .research-source-meta { font-size:10px; }
body.tv-utility-ui .tutorial-panel-heading p { font-size:12px; }
body.tv-utility-ui .tutorial-inspector-panel label { display:block; font-size:12px; }
body.tv-utility-ui #tutorialLatexPreview,body.tv-utility-ui #researchLatex { display:block; box-sizing:border-box; width:100%; min-height:260px; height:36dvh; max-height:70dvh; resize:vertical; overflow:auto; font:13px/1.55 Consolas,monospace; }
body.tv-utility-ui :is(.tutorial-path-actions,.tutorial-inspector-actions,.research-evidence-toolbar,.research-output-actions) { flex-wrap:wrap; }
body.tv-utility-ui :is(.tutorial-path-actions,.tutorial-inspector-actions) button { min-height:36px; white-space:normal; }
body.tv-utility-ui .tutorial-path-card { grid-template-columns:34px minmax(0,1fr); }
body.tv-utility-ui .tv-path-controls { grid-column:1/-1; display:flex; gap:6px; flex-wrap:wrap; }
body.tv-utility-ui .tv-path-controls button { min-height:32px; padding:5px 9px; }
body.tv-utility-ui .research-modal { position:static; inset:auto; z-index:auto; padding:0; max-height:none; min-height:100%; overflow:visible; }
body.tv-utility-ui .research-consensus-workspace:not(.hidden) { display:block; }
body.tv-utility-ui .tv-research-open > .tutorial-header,
body.tv-utility-ui .tv-research-open > #tvLearnNav,
body.tv-utility-ui .tv-research-open > #tutorialLearningWorkspace { display:none; }
body.tv-utility-ui .research-query-panel > label,body.tv-utility-ui .research-output-panel > label,body.tv-utility-ui .research-google-options label { font-size:12px; }
body.tv-utility-ui .research-query-panel :is(input,select,textarea) { min-width:0; max-width:100%; }
body.tv-utility-ui .research-evidence-list { display:grid; }
body.tv-utility-ui .research-idea-list { max-height:42dvh; }
body.tv-utility-ui :is(.tutorial-grid,.tv-research-panels):not([data-panel-view="all"]) { grid-template-columns:minmax(0,1fr); }
body.tv-utility-ui :is(.tutorial-grid,.tv-research-panels):not([data-panel-view="all"]) > * { grid-column:1; }
body.tv-utility-ui .tv-research-panels[data-panel-view="draft"] #researchLatex { height:50dvh; }

/* Viewer tabs remain reachable in full view; explicit preview requests should
   not disappear because a compact Dock hides its third column. */
body.tv-utility-ui .preview-pane { min-width:0; grid-template-rows:auto minmax(0,1fr); }
body.tv-utility-ui .preview-tabs { min-width:0; overflow-x:auto; overflow-y:hidden; justify-content:flex-start; scrollbar-width:thin; }
body.tv-utility-ui .preview-tab { flex:0 0 auto; white-space:nowrap; }
body.tv-utility-ui .layout-pdf .preview-tab:not([data-preview="pdf"]) { display:block; }
body.tv-utility-ui.workflow-no-quicklook .preview-tab[data-preview="quicklook"] { display:none !important; }
body.tv-utility-ui .article-toolbar { flex-wrap:wrap; }
body.tv-utility-ui .article-toolbar > div { min-width:0; }
body.tv-utility-ui .article-toolbar h2 { overflow-wrap:anywhere; }
body.tv-utility-ui .pdf-toolbar { align-items:center; }
body.tv-utility-ui :is(.layout-dock,.layout-split) .editor-pane { grid-template-rows:auto minmax(0,1fr) auto; }
body.tv-utility-ui :is(.layout-dock,.layout-split,.layout-document) .editor-toolbar { max-height:38dvh; overflow:auto; scrollbar-gutter:stable; }
body.tv-utility-ui .layout-split { grid-template-columns:minmax(170px,28%) minmax(0,1fr); }

/* Preferences, teaching and journals adapt before their minimum widths collide. */
body.tv-utility-ui .layout-settings .settings-pane,body.tv-utility-ui .layout-educator .educator-pane { display:block; height:100%; overflow:auto; }
body.tv-utility-ui :is(.settings-header,.settings-savebar,.educator-header,.journal-header,.timer-card,.mathmotion-header,.mathmotion-actions) { flex-wrap:wrap; }
body.tv-utility-ui .settings-grid,body.tv-utility-ui .educator-grid { overflow:visible; grid-template-columns:repeat(3,minmax(0,1fr)); }
body.tv-utility-ui .settings-card,body.tv-utility-ui .educator-card { min-width:0; }
body.tv-utility-ui :is(.settings-row,.workflow-toggle-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.tv-utility-ui :is(.settings-card,.educator-card) button { white-space:normal; }
body.tv-utility-ui .layout-journal .journal-pane { grid-template-columns:minmax(0,22fr) minmax(0,51fr) minmax(0,27fr); grid-template-rows:auto minmax(0,1fr); overflow:hidden; }
body.tv-utility-ui .tv-journal-nav { grid-column:1/-1; }
body.tv-utility-ui .layout-journal .journal-pane.journal-no-calendar { grid-template-columns:minmax(0,1fr) minmax(0,30%); }
body.tv-utility-ui .layout-journal .journal-pane.journal-no-timeline { grid-template-columns:minmax(0,25%) minmax(0,1fr); }
body.tv-utility-ui .layout-journal .journal-pane.journal-no-calendar.journal-no-timeline { grid-template-columns:minmax(0,1fr); }
body.tv-utility-ui :is(.calendar-column,.journal-editor,.activity-column) { min-height:0; scrollbar-gutter:stable; }
body.tv-utility-ui .journal-editor { padding:18px; }
body.tv-utility-ui :is(.journal-actions,.day-planner-heading,.progress-report-heading,.journal-media-heading,.outline-bridge-heading) { flex-wrap:wrap; }
body.tv-utility-ui .mathmotion-series-dock header,body.tv-utility-ui .mathmotion-storyboard-heading { flex-wrap:wrap; }
body.tv-utility-ui .mathmotion-projectbar { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
body.tv-utility-ui .mathmotion-project-actions { grid-column:1/-1; justify-content:flex-start; }
body.tv-utility-ui .mathmotion-playbar { flex-wrap:wrap; justify-content:flex-start; }
body.tv-utility-ui .mathmotion-playbar button { min-height:40px; }
body.tv-utility-ui .mathmotion-table-wrap { max-width:100%; overflow:auto; }
body.tv-utility-ui .layout-bar { max-height:calc(100dvh - 90px); overflow:auto; }
body.tv-utility-ui .vision-sidebar { max-height:calc(100dvh - 86px); }

.tv-tool-finder { box-sizing:border-box; width:min(760px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); padding:0; border:1px solid var(--line-strong); border-radius:14px; color:var(--ink); background:var(--panel); overflow:auto; scrollbar-gutter:stable; box-shadow:0 24px 90px #08172677; }
.tv-tool-finder::backdrop { background:#0b193a88; }
.tv-tool-finder header { display:flex; justify-content:space-between; align-items:start; padding:18px 20px 10px; gap:14px; }
.tv-tool-finder h2 { margin:0; font-size:24px; }
.tv-tool-finder header p { margin:6px 0; color:var(--slate); font-size:13px; }
.tv-tool-search { display:block; position:sticky; top:0; z-index:1; padding:10px 20px; background:var(--panel); font-size:12px; }
.tv-tool-search input { display:block; box-sizing:border-box; width:100%; padding:12px; margin-top:5px; border:1px solid var(--line-strong); border-radius:8px; color:var(--ink); background:var(--paper); font:inherit;font-size:15px; }
#tvToolsCount,.tv-tools-hint { padding:0 20px; font-size:12px; color:var(--slate); }
#tvToolsResults { padding:0 20px 12px; }
#tvToolsResults h3 { margin:16px 0 8px; color:var(--slate); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.tv-tool-result { display:block; box-sizing:border-box; width:100%; text-align:left; margin:6px 0; padding:12px; white-space:normal; }
.tv-tool-result strong,.tv-tool-result span,.tv-tool-result small { display:block; }
.tv-tool-result span { margin-top:5px; font-size:12px; font-weight:400; color:var(--slate); line-height:1.4; }
.tv-tool-result small { margin-top:5px; }
.tv-tool-finder :focus-visible { outline:3px solid var(--blue); outline-offset:2px; }
@media(max-width:1440px) {
  body.tv-utility-ui .tutorial-grid,body.tv-utility-ui .tv-research-panels { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.tv-utility-ui .tutorial-inspector-panel,body.tv-utility-ui .research-output-panel { grid-column:1/-1; }
  body.tv-utility-ui .settings-grid,body.tv-utility-ui .educator-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:1100px) {
  body.tv-utility-ui .tutorial-header { flex-direction:column; }
  body.tv-utility-ui .tutorial-header-tools { width:100%; }
  body.tv-utility-ui .tutorial-grid,body.tv-utility-ui .tv-research-panels { grid-template-columns:minmax(0,1fr); }
  body.tv-utility-ui .layout-journal .journal-pane { display:block; overflow:auto; }
  body.tv-utility-ui .layout-journal :is(.calendar-column,.journal-editor,.activity-column) { height:auto; max-height:none; overflow:visible; }
  body.tv-utility-ui .layout-journal .calendar-column { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0 16px; align-items:start; }
  body.tv-utility-ui .layout-journal .calendar-column > * { grid-column:1; }
  body.tv-utility-ui .layout-journal .saved-notes { grid-column:2; grid-row:1/7; max-height:380px; overflow:auto; margin-top:0; }
}
@media(max-width:800px) {
  body.tv-utility-ui .settings-grid,body.tv-utility-ui .educator-grid,body.tv-utility-ui .mathmotion-grid { grid-template-columns:minmax(0,1fr); }
  body.tv-utility-ui .settings-card,body.tv-utility-ui .mathmotion-card { grid-column:1; }
  body.tv-utility-ui :is(.arxiv-columns,.capture-columns,.arxiv-filters,.capture-search) { grid-template-columns:minmax(0,1fr); }
  body.tv-utility-ui :is(.arxiv-heading,.capture-heading) { padding:16px; }
  body.tv-utility-ui :is(.arxiv-columns,.capture-columns,.arxiv-filters,.capture-search) { padding-inline:16px; min-height:0; }
  body.tv-utility-ui .capture-tools input { min-width:0; flex-basis:100%; }
}
@media(max-width:520px) {
  body.tv-utility-ui :is(.settings-row,.workflow-toggle-grid,.mathmotion-projectbar,.mathmotion-option-grid,.journal-custom-grid,.day-activity-grid,.progress-metrics) { grid-template-columns:minmax(0,1fr); }
  body.tv-utility-ui .tutorial-header-tools { grid-template-columns:minmax(0,1fr); }
  body.tv-utility-ui .layout-journal .calendar-column { display:block; }
  body.tv-utility-ui .layout-journal .saved-notes { max-height:none; }
  body.tv-utility-ui .tutorial-grid,body.tv-utility-ui .tv-research-panels { padding:10px; }
  body.tv-utility-ui :is(.arxiv-browser,.capture-dialog) { max-width:calc(100vw - 12px); width:calc(100vw - 12px); max-height:calc(100dvh - 12px); }
}
@media(max-height:520px) { .tv-section-nav { position:static; } body.tv-utility-ui .tutorial-header { padding:10px 16px; } }
@media(prefers-reduced-motion:reduce) { .tv-arrival { transition:none; } }

/* Use the project browser's visual language throughout the feature workspaces. */
body.tv-utility-ui :is(.tutorial-pane,.mathmotion-pane,.settings-pane,.educator-pane) { background:#f6f7f9; }
body.tv-utility-ui :is(.tutorial-header,.mathmotion-header,.settings-header,.educator-header) { color:#f8fafc; background:radial-gradient(ellipse at top right,#31516b88,transparent 65%),#132b40; padding:18px 24px; border-bottom:1px solid #203f58; }
body.tv-utility-ui :is(.tutorial-header,.mathmotion-header,.settings-header,.educator-header) h1 { margin:3px 0 6px; font:500 27px/1.2 Georgia,serif; }
body.tv-utility-ui :is(.tutorial-header,.mathmotion-header,.settings-header,.educator-header) :is(p,.eyebrow,#settingsState) { color:#bdcddd; }
body.tv-utility-ui :is(.tutorial-header,.mathmotion-header,.settings-header,.educator-header) button { color:#254056; background:#f7fafc; border-color:#b8cad8; }
body.tv-utility-ui :is(.tutorial-catalog-panel,.tutorial-path-panel,.tutorial-inspector-panel,.research-query-panel,.research-evidence-panel,.research-output-panel,.educator-card,.settings-card,.mathmotion-card) { border:1px solid #d6e1e9; border-radius:12px; box-shadow:0 3px 12px #23405608; }
body.tv-utility-ui .research-modal { background:#f6f7f9; }
body.tv-utility-ui .tutorial-catalog { gap:10px; }
body.tv-utility-ui .tutorial-card { border:1px solid #d6e1e9; border-left:4px solid var(--vision-research); border-radius:10px; background:var(--panel); padding:13px; }
body.tv-utility-ui .tv-lesson-list .tutorial-card { padding:9px 12px; border-radius:6px; }
body.tv-utility-ui .tv-lesson-list .tutorial-card p { margin:3px 0; }
body.tv-utility-ui .research-evidence-card { border:1px solid #d6e1e9; border-radius:10px; padding:13px; background:var(--panel); }
body.tv-utility-ui .research-evidence-card h3 { font-size:14px; }
.tv-source-filtered { display:none !important; }
.tv-source-search { display:flex; flex-wrap:wrap; align-items:end; gap:8px; margin:10px 0; }
.tv-source-search label { display:grid; gap:5px; flex:1; min-width:120px; color:var(--slate); font-size:12px; }
.tv-source-search input { box-sizing:border-box; width:100%; min-width:0; border:1px solid var(--line-strong); border-radius:8px; padding:10px; color:var(--ink); background:var(--panel); }
.tv-source-search span { flex-basis:100%; color:var(--slate); font-size:11px; }
body.tv-utility-ui.theme-dark :is(.tutorial-pane,.mathmotion-pane,.settings-pane,.educator-pane,.research-modal) { background:var(--paper); }
body.tv-utility-ui.theme-dark :is(.tutorial-catalog-panel,.tutorial-path-panel,.tutorial-inspector-panel,.research-query-panel,.research-evidence-panel,.research-output-panel) { background:var(--panel); color:var(--ink); border-color:var(--line); }


/* THEORY-VISION-B13-MATH-LEARNING-CSS-v1-BEGIN */
/* Scope the change to navigation hit areas and these two existing panels. */
body.tv-utility-ui .workspace-tabs { gap:2px; }
body.tv-utility-ui .workspace-tabs > button { flex-shrink:0; position:relative; overflow:hidden; }
body.tv-utility-ui .workspace-tabs > #tvResearchTab { min-width:34px; }
#tv07MathFeedback,#tv07LearningFeedback { display:block; margin:8px 0; padding:9px 12px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--paper); font-size:12px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
#tv07MathFeedback[data-kind="error"],#tv07LearningFeedback[data-kind="error"] { border-width:2px; }
#tv07LearningBar {padding:8px 16px; background:var(--paper); color:var(--ink);}
#tutorialPane #tv07LearningFeedback {color:var(--ink);max-width:none;margin:0;}
#tutorialPane > header h2 {color:#f4f8ff;}
#tv07LearningTools { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:6px 0 10px; }
#tv07LearningTools button { min-height:32px; }
/* A single-panel choice must not remain hidden by a previous workspace. */
body.tv-utility-ui .layout-tutorial #tutorialLearningWorkspace { min-width:0; }
body.tv-utility-ui .layout-tutorial #tutorialCatalog { min-height:80px; }
body.tv-utility-ui .layout-tutorial #tutorialLatexPreview { min-height:180px; }
body.tv-utility-ui .workspace-tabs > [data-layout="tutorial"]:focus-visible,
body.tv-utility-ui .workspace-tabs > #tvResearchTab:focus-visible { outline:2px solid currentColor; outline-offset:-3px; }
/* THEORY-VISION-B13-MATH-LEARNING-CSS-v1-END */


/* THEORY-VISION-B13-JOURNAL-CSS-v1-BEGIN */
.tv08 {box-sizing:border-box;min-width:0;color:#e3eaf4;}
.tv08 [hidden],#dayActivityGrid[hidden]{display:none!important}
#tv08Toolbar {grid-column:1/-1;border:1px solid #3b5269;background:#152536;padding:14px;border-radius:10px;margin:12px 0;}
.tv08-toolbar,.tv08-note-tools,.tv08-recovery{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tv08 button {min-height:34px;padding:7px 11px;border-radius:6px;border:1px solid #526b86;background:#20364c;color:#f0f5fb;cursor:pointer;font:inherit;white-space:normal;}
.tv08 button[aria-pressed=true]{background:#296583;border-color:#8fd4eb}.tv08 button:disabled{opacity:.5;cursor:default}.tv08 button:focus-visible,.tv08 input:focus-visible,.tv08 textarea:focus-visible,.tv08 select:focus-visible{outline:2px solid #8fd4eb;outline-offset:2px}
.tv08 input:not([type=checkbox]),.tv08 textarea,.tv08 select{box-sizing:border-box;width:100%;padding:7px 9px;border:1px solid #536b84;border-radius:5px;color:#f0f5fb;background:#122232;font:inherit;min-width:0;}
.tv08 input[type=checkbox],.tv08-grid-check input{width:18px;height:18px;accent-color:#2f8fb6;flex-shrink:0}.tv08 label{display:flex;flex-direction:column;gap:4px;font-size:13px}.tv08 label:has(input[type=checkbox]){flex-direction:row;align-items:center}
.tv08 p{margin:8px 0;font-size:13px;line-height:1.5}.tv08-hint{color:#b7cadd}.tv08 [data-error=true]{color:#ffb3ac}.tv08 [aria-invalid=true]{outline:2px solid #ffaaa0}.tv08 h3{font-size:18px;margin:4px 0 12px}.tv08 h4{font-size:14px;margin:8px 0}
#tv08SpreadsheetPanel{margin-top:10px;padding:12px;border-radius:8px;background:#152536}.tv08-sheet-scroll{overflow:auto;max-height:550px;border:1px solid #526b86;border-radius:7px}.tv08-sheet{border-collapse:separate;border-spacing:0;width:100%;min-width:1170px;background:#142638;color:#edf4fc;table-layout:fixed;font-size:13px}.tv08-sheet th,.tv08-sheet td{padding:7px;border-bottom:1px solid #344c63;border-right:1px solid #344c63;vertical-align:top}.tv08-sheet thead th{position:sticky;top:0;background:#264661;z-index:2;color:white;font-weight:600}.tv08-sheet th:nth-child(1){width:64px}.tv08-sheet th:nth-child(2){width:64px}.tv08-sheet th:nth-child(3){width:108px}.tv08-sheet th:nth-child(4){width:210px}.tv08-sheet th:nth-child(5){width:110px}.tv08-sheet th:nth-child(6),.tv08-sheet th:nth-child(7){width:210px}.tv08-sheet th:nth-child(8),.tv08-sheet th:nth-child(9),.tv08-sheet th:nth-child(10){width:100px}.tv08-sheet th:nth-child(11){width:270px}.tv08-sheet textarea{height:72px;resize:vertical}.tv08-sheet input,.tv08-sheet select{min-height:35px}.tv08-sheet small{display:block;color:#b7cadd}.tv08 details{margin-top:12px}.tv08 details summary{cursor:pointer;padding:10px}
.tv08-grid-check{display:flex;align-items:center;gap:7px;font-size:12px;padding:5px 0}.tv08-recovery{margin-top:8px}.tv08-recovery button{font-size:12px;background:#192d40}
#tv08TimedPanel,#tv08NotesPanel{grid-column:1/-1;margin:12px 0;padding:16px;background:#152536;border:1px solid #3b5269;border-radius:10px}.tv08-timer-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.tv08-timer-fields label{min-width:0}#tv08Clock{font:600 48px/1.3 ui-monospace,monospace;letter-spacing:2px;margin:16px 0 4px;color:#b7e5f5}.tv08-schedule{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #355068;padding:9px 0;font-size:13px}
.tv08-notebook{display:grid;grid-template-columns:minmax(200px,30%) minmax(0,1fr);gap:12px;margin-top:12px}.tv08-note-tools input{flex:1;min-width:180px!important}#tv08NoteList{max-height:560px;overflow:auto;display:flex;flex-direction:column;gap:7px;border-right:1px solid #3b5269;padding-right:10px}#tv08NoteList button{text-align:left;padding:12px}#tv08NoteList strong,#tv08NoteList span,#tv08NoteList time,#tv08NoteList small{display:block;overflow-wrap:anywhere}#tv08NoteList span{font-size:12px;line-height:1.5;max-height:72px;overflow:hidden;margin-top:5px}#tv08NoteList time,#tv08NoteList small{font-size:11px;color:#c0d4e8}#tv08NoteList .selected{border-color:#8fd4eb;background:#254b67}.tv08-note-editor{display:grid;gap:9px;align-content:start}#tv08NoteBody{min-height:320px;resize:vertical;line-height:1.6}.tv08-dialog{width:min(540px,90vw);border:1px solid #526b86;border-radius:10px;background:#152536;padding:20px}.tv08-dialog::backdrop{background:#0009}.tv08-dialog form{display:grid;gap:10px}.tv08-dialog p{min-height:20px;color:#ffb3ac}
@media(max-width:650px){.tv08-notebook{grid-template-columns:1fr}#tv08NoteList{max-height:230px;border-right:0}.tv08-timer-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.tv08-toolbar button{flex:1 1 140px}#tv08Clock{font-size:38px}}
#tv08SheetDialog{width:97vw;max-width:1700px;height:94vh;max-height:94vh;overflow:auto;padding:10px;background:#152536;border:1px solid #62849c;border-radius:10px;color:#e3eaf4}#tv08SheetDialog::backdrop{background:#081220b8}#tv08SheetDialog .tv08-sheet-scroll{max-height:65vh}#tv08SheetDialog #tv08SpreadsheetPanel{margin:0}#tv08SheetDialog h3{margin:6px 0}
/* THEORY-VISION-B13-JOURNAL-CSS-v1-END */


/* THEORY-VISION-B13-BLUEPRINT-CSS-v1-BEGIN */
#blueprintPanel{padding:0;overflow:auto;min-height:0}#blueprintPanel.bp-studio{padding:12px}#blueprintPanel.active{display:block!important}#tv08BlueprintTab{font-weight:650;color:var(--text,#243c53)}
.bp-studio{color:#e4edf7;background:#142537;font:13px/1.4 system-ui,sans-serif;min-width:0;box-sizing:border-box;padding:12px;container-type:inline-size}.bp-studio *{box-sizing:border-box}.bp-studio [hidden]{display:none!important}.bp-studio button{background:#25415b;border:1px solid #55748e;border-radius:5px;color:#f4f8fc;padding:6px 9px;min-height:32px;cursor:pointer;white-space:normal;font:inherit}.bp-studio button:disabled{opacity:.5;cursor:default}.bp-studio button[aria-pressed=true],.bp-studio button[aria-expanded=true]{background:#276f87;border-color:#b2e3f0}.bp-studio input,.bp-studio select,.bp-studio textarea{background:#0e1d2d;color:#f0f5fb;border:1px solid #55748e;padding:6px 7px;border-radius:4px;min-width:0;font:inherit;width:100%}.bp-studio input[type=checkbox]{width:17px;height:17px;accent-color:#66b4d2}.bp-studio input[type=color]{height:34px;padding:3px}.bp-studio label{display:flex;flex-direction:column;gap:4px;font-size:12px}.bp-studio label:has(input[type=checkbox]){flex-direction:row;align-items:center}.bp-studio :is(button,input,select,textarea):focus-visible{outline:2px solid #94d4ed;outline-offset:2px}
.bp-header{display:flex;align-items:end;gap:12px;margin-bottom:10px}.bp-header label{flex:1}.bp-save-state{font-size:12px;align-self:center;color:#b4ccdf}.bp-actions,.bp-exportbar,.bp-filebar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:8px 0}.bp-actions label{flex-direction:row;align-items:center}.bp-actions select{width:80px}.bp-filebar label{flex:1 1 280px;max-width:500px}.bp-workspace{display:grid;grid-template-columns:190px minmax(200px,1fr) 165px;border:1px solid #46617a;border-radius:7px;overflow:hidden}.bp-library{padding:10px;border-right:1px solid #46617a;min-width:0}.bp-library>label{margin-bottom:8px}.bp-library-tabs{display:flex;gap:4px;margin-bottom:8px}.bp-library-tabs button{flex:1;font-size:11px;padding:5px}.bp-library-list{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-height:515px;overflow:auto;align-content:start}.bp-library-list .bp-library-item{padding:5px;min-width:0;overflow:hidden;display:block;text-align:left}.bp-library-item svg{width:100%;height:56px;display:block;background:#fff;border-radius:3px;margin-bottom:4px}.bp-library-item strong{font-size:10px;line-height:1.2;display:block;overflow-wrap:anywhere}.bp-library-item small{display:block;font-size:9px;color:#b9cedf;margin-top:3px}.bp-canvas-column{min-width:0;background:#eaf0f7}.bp-canvas{width:100%;height:520px;overflow:auto;background:white;touch-action:none;position:relative;cursor:crosshair}.bp-canvas>svg{display:block;max-width:none!important;flex-shrink:0}.bp-canvas svg text{pointer-events:none}.bp-canvas [data-node]{cursor:move}.bp-canvas [data-port]{cursor:crosshair}.bp-help{color:#21394e;font-size:11px;margin:8px;line-height:1.5}.bp-inspector{padding:10px;border-left:1px solid #46617a;max-height:600px;overflow:auto;min-width:0}.bp-inspector h4{margin:5px 0 9px;font-size:13px}.bp-inspector label{margin-bottom:7px}.bp-inspector p{font-size:11px;color:#b9cedf}.bp-properties{display:grid;grid-template-columns:1fr 1fr;gap:7px}.bp-align{display:flex;flex-wrap:wrap;gap:5px}.bp-align button{font-size:11px}.bp-source{height:200px;resize:vertical;font:12px/1.5 ui-monospace,monospace!important}.bp-status{margin:8px 0 0;color:#c3d9e9;line-height:1.5}.bp-status[data-error=true]{color:#ffb4a8}.bp-dialog{width:min(1500px,97vw);height:min(940px,96vh);padding:0;border:1px solid #5b7892;border-radius:9px;background:#142537;color:#e4edf7;max-width:97vw;max-height:96vh;overflow:auto}.bp-dialog::backdrop{background:#050c15b0}
@container(max-width:850px){.bp-workspace{grid-template-columns:150px minmax(180px,1fr)}.bp-inspector{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:start;gap:10px;max-height:240px;border-left:0;border-top:1px solid #46617a}.bp-inspector label{max-width:110px}.bp-inspector h4{width:100%}.bp-properties{display:flex;flex-wrap:wrap}.bp-properties label{width:80px}.bp-canvas{height:450px}.bp-library-list{max-height:430px}}
@container(max-width:500px){.bp-workspace{grid-template-columns:1fr}.bp-library{border-right:0;border-bottom:1px solid #46617a}.bp-library-list{grid-template-columns:repeat(4,minmax(0,1fr));max-height:170px}.bp-library>label{display:inline-flex;width:49%}.bp-library-tabs{max-width:300px}.bp-canvas{height:350px}.bp-header{flex-wrap:wrap}.bp-header label{flex-basis:100%}.bp-save-state{flex:1}}
/* THEORY-VISION-B13-BLUEPRINT-CSS-v1-END */


/* THEORY-VISION-B13-ORDER-STYLE-v1-BEGIN */
#orderPanel{padding:14px!important;overflow:auto;min-width:0;background:var(--panel,#fff);color:var(--ink,#172738)}
#orderPanel [hidden]{display:none!important}
#orderPanel .tv09-header{display:flex;align-items:start;justify-content:space-between;gap:12px;margin:0 0 12px;border-bottom:1px solid var(--line,#c9d1da);padding-bottom:10px}
#orderPanel h2{font-size:23px;margin:4px 0}#orderPanel h3{font-size:14px;margin:0;padding:9px 10px;border-bottom:1px solid var(--line,#c9d1da)}
#orderPanel p{font-size:12px;line-height:1.5;margin:5px 0}#tv09Count{font-size:12px;white-space:nowrap;color:var(--muted,#586779)}
.tv09-toolbar,.tv09-mini-tools{display:flex;flex-wrap:wrap;gap:5px;margin:7px 0}.tv09-toolbar button,.tv09-mini-tools button,#tv09Rules button,#tv09Tex{font-size:11px;min-height:30px;padding:5px 9px;white-space:normal}
.tv09-workspace{display:grid;grid-template-columns:minmax(150px,.75fr) minmax(270px,1.4fr) minmax(180px,.85fr);gap:10px;min-height:420px}
.tv09-sources,.tv09-composition,.tv09-preview{min-width:0;border:1px solid var(--line,#bccbd5);border-radius:9px;overflow:hidden;background:var(--panel,#fff);align-self:stretch;padding-bottom:8px}
.tv09-mini-tools{padding:0 8px}.tv09-tree-scroll{max-height:49vh;min-height:180px;overflow:auto;overscroll-behavior:contain;padding:3px}
#tv09Search{width:calc(100% - 16px);margin:8px;font-size:12px;padding:7px;box-sizing:border-box}
.tv09-row,.tv09-source-row{display:flex;align-items:center;gap:5px;min-height:42px;padding:4px 7px 4px calc(5px + min(var(--depth),8)*13px);border:1px solid transparent;border-bottom-color:var(--line,#dce3e8);border-radius:4px;cursor:grab;font-size:12px}
.tv09-row.selected,.tv09-source-row.selected{background:var(--blue-soft,#e0eef8);border-color:var(--blue,#3f7baf);color:var(--ink,#172738)}
.tv09-row.excluded{opacity:.62}.tv09-row button,.tv09-source-row button{flex:0 0 22px;min-width:22px;min-height:25px;padding:0;background:transparent;border:0;color:inherit}
.tv09-row input[type=checkbox]{width:15px;height:15px;flex:0 0 15px}.tv09-kind{font:9px monospace;padding:3px;border:1px solid var(--line,#aaa);border-radius:3px}
.tv09-node-name{display:flex;flex-direction:column;flex:1;min-width:0;gap:2px}.tv09-node-name strong{font-weight:550;font-size:12px;overflow-wrap:anywhere}.tv09-node-name small{font-size:10px;color:var(--muted,#667785);overflow-wrap:anywhere}
.tv09-order-number{font:12px monospace}.tv09-source-badge{font-size:9px;color:var(--muted,#677)}.tv09-row.drop-before{border-top:3px solid var(--blue,#3681bc)}
.tv09-root-drop{padding:10px;margin:7px;border:1px dashed var(--line,#789);border-radius:5px;color:var(--muted,#677);font-size:11px;text-align:center}
#tv09Rules{padding:10px;border-top:1px solid var(--line,#bccbd5)}#tv09Selected{display:block;font-size:11px;overflow-wrap:anywhere;margin-bottom:8px}.tv09-rule-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;font-size:11px}.tv09-rule-grid label{display:flex;flex-direction:column;gap:4px}.tv09-rule-grid select,.tv09-rule-grid input[type=text]{width:100%;min-width:0;font-size:11px;padding:5px;box-sizing:border-box}#tv09FolderRules{display:contents}#tv09FolderRules[hidden]{display:none!important}.tv09-rule-grid label:first-child{flex-direction:row;align-items:center}#tv09Rules.no-selection .tv09-rule-grid{visibility:hidden}
#tv09Sequence{max-height:64vh;overflow:auto;list-style:none;margin:0;padding:6px}#tv09Sequence li{display:flex;gap:7px;flex-wrap:wrap;align-items:baseline;font-size:11px;padding:6px 3px;border-bottom:1px solid var(--line,#d6e0e8)}#tv09Sequence li b{min-width:15px}#tv09Sequence code{font-size:10px;overflow-wrap:anywhere;flex:1}#tv09Sequence small{font-size:9px;color:var(--muted,#677)}
#orderPanel .tv09-status{padding:7px 9px;background:var(--blue-soft,#edf5fa);border-radius:5px;overflow-wrap:anywhere;min-height:20px}.tv09-status.error,#tv09Diagnostics .error{color:#9d2424;background:#fff0ed}
#tv09Diagnostics{padding:8px;max-height:180px;overflow:auto}#tv09Diagnostics p{font-size:11px}.tv09-footnote{padding:8px;color:var(--muted,#657585)}#tv09Tex{margin:6px}.tv09-empty{padding:18px!important;color:var(--muted,#63798a)}
#orderPanel.tv09-expanded{position:fixed;inset:12px;z-index:18000;border:1px solid var(--line,#b8c5d1);border-radius:12px;box-shadow:0 12px 50px #0006}.tv09-expanded .tv09-tree-scroll{max-height:52vh}
.tv09-expanded .tv09-composition .tv09-tree-scroll{max-height:min(44vh,calc(100vh - 490px));min-height:160px}
@media(max-width:1100px){.tv09-workspace{grid-template-columns:minmax(160px,.75fr) minmax(270px,1.3fr)}.tv09-preview{grid-column:1/-1}#tv09Sequence{max-height:240px}}
@media(max-width:650px){.tv09-workspace{display:flex;flex-direction:column}.tv09-tree-scroll{max-height:260px}.tv09-header{flex-direction:column}#orderPanel.tv09-expanded{inset:4px}.tv09-rule-grid{grid-template-columns:1fr 1fr}}
/* Narrow viewer panes also stack columns; expanded mode restores full workspace. */
#orderPanel:not(.tv09-expanded) .tv09-workspace{display:flex;flex-direction:column}#orderPanel:not(.tv09-expanded) .tv09-tree-scroll{max-height:260px}
/* THEORY-VISION-B13-ORDER-STYLE-v1-END */


/* THEORY-VISION-B13-DECORATIVE-DOCK-v1-BEGIN */
/* Visual only. Native visibility, geometry, focusability and click handlers stay. */
#restoreDockBtn.restore-dock-button {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--ink, #172033) !important;
  opacity: 0;
}
body.dock-is-hidden #restoreDockBtn.restore-dock-button,
body.dock-is-detached #restoreDockBtn.restore-dock-button {
  animation: tv15-dock-cue 3s ease-out both !important;
}
#restoreDockBtn.restore-dock-button:hover,
#restoreDockBtn.restore-dock-button:focus-visible {
  animation: none !important;
  opacity: 1 !important;
}
#restoreDockBtn.restore-dock-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
@keyframes tv15-dock-cue {
  0%, 65% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body.dock-is-hidden #restoreDockBtn.restore-dock-button,
  body.dock-is-detached #restoreDockBtn.restore-dock-button {
    animation-timing-function: step-end !important;
  }
}
/* THEORY-VISION-B13-DECORATIVE-DOCK-v1-END */
/* THEORY-VISION-B13-RESEARCH-PROVIDERS-v1-BEGIN */
.tv38-provider-label select { min-width: 190px; }
.tv38-provider-disabled { opacity: .62; }
.tv38-provider-access { margin: 8px 0 12px; padding: 8px 10px; border: 1px solid var(--line, #d7dde8); border-radius: 10px; background: color-mix(in srgb, var(--panel, #fff) 92%, transparent); }
.tv38-provider-access > summary { cursor: pointer; font-weight: 700; }
.tv38-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.tv38-provider-access p { margin: 8px 0 0; font-size: .83rem; line-height: 1.35; }
@media (max-width: 800px) { .tv38-provider-grid { grid-template-columns: minmax(0,1fr); } }
/* THEORY-VISION-B13-RESEARCH-PROVIDERS-v1-END */
/* THEORY-VISION-B13-RESEARCH-API-VAULT-v1-BEGIN */
.tv40-research-vault { display:grid; gap:8px; margin-top:10px; }
.tv40-vault-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 10px; border:1px solid var(--line,#d7dde8); border-radius:9px; background:color-mix(in srgb,var(--panel,#fff) 96%,transparent); }
.tv40-vault-card > div:first-child { min-width:0; display:grid; gap:3px; }
.tv40-vault-card small { opacity:.78; overflow-wrap:anywhere; }
.tv40-vault-actions { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.tv40-vault-actions button { white-space:nowrap; }
.tv40-vault-note { margin:2px 0 0 !important; }
.tv40-vault-note.error { color:var(--danger,#b42318); }
@media (max-width:700px) { .tv40-vault-card { align-items:stretch; flex-direction:column; } .tv40-vault-actions { justify-content:flex-start; } }
/* THEORY-VISION-B13-RESEARCH-API-VAULT-v1-END */
/* THEORY-VISION-B13-RESEARCH-SESSION-PDF-CACHE-v1-BEGIN */
.tv41-session-cache{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin-left:auto;font-size:.78rem;color:var(--muted,#8f98a8)}
.tv41-session-cache button{font-size:.75rem;padding:.3rem .55rem}
.tv41-cache-badge{display:inline-flex;align-items:center;margin-left:.45rem;padding:.18rem .45rem;border:1px solid currentColor;border-radius:999px;font-size:.7rem;line-height:1.1;opacity:.86}
.tv41-cache-badge[data-state="ready"]{font-weight:700;opacity:1}
.tv41-cache-badge[data-state="pending"]{border-style:dashed}
@media(max-width:760px){.tv41-session-cache{width:100%;margin:.45rem 0 0}.tv41-cache-badge{margin-left:.3rem}}
/* THEORY-VISION-B13-RESEARCH-SESSION-PDF-CACHE-v1-END */

/* THEORY-VISION-B13-PROGRESS-PORTFOLIO-CSS-v1-BEGIN */
:root{--tvpp-bg:#080d12;--tvpp-panel:#0e151d;--tvpp-panel-2:#121c26;--tvpp-panel-3:#172431;--tvpp-line:#263746;--tvpp-line-bright:#38536a;--tvpp-text:#eef6fb;--tvpp-muted:#91a7b8;--tvpp-blue:#59bff2;--tvpp-cyan:#62e5d2;--tvpp-gold:#e8c56c;--tvpp-red:#ff8e8e;--tvpp-shadow:0 22px 80px #000c}
#tvppDialog{box-sizing:border-box;width:min(1580px,calc(100vw - 28px));height:min(940px,calc(100vh - 28px));max-width:none;max-height:none;margin:auto;padding:0;border:1px solid var(--tvpp-line-bright);border-radius:16px;background:var(--tvpp-bg);color:var(--tvpp-text);box-shadow:var(--tvpp-shadow);overflow:hidden;color-scheme:dark}
#tvppDialog::backdrop{background:rgba(2,6,10,.82);backdrop-filter:blur(4px)}
#tvppDialog.tvpp-expanded,#tvppDialog.tvpp-window-dialog{width:100vw;height:100vh;border:0;border-radius:0}
.tvpp-shell,.tvpp-shell *{box-sizing:border-box}
.tvpp-shell{height:100%;display:grid;grid-template-rows:auto auto auto minmax(0,1fr);background:radial-gradient(circle at 76% -18%,rgba(40,141,180,.18),transparent 38%),linear-gradient(145deg,#0b1118 0%,#080d12 68%);font:13px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
.tvpp-shell button,.tvpp-shell input,.tvpp-shell textarea{font:inherit}
.tvpp-shell button{min-height:36px;border:1px solid var(--tvpp-line-bright);border-radius:8px;background:#15212c;color:var(--tvpp-text);padding:7px 12px;cursor:pointer;transition:border-color .15s,background .15s,transform .15s}
.tvpp-shell button:hover:not(:disabled){border-color:var(--tvpp-blue);background:#1a2b39}
.tvpp-shell button:active:not(:disabled){transform:translateY(1px)}
.tvpp-shell button:disabled{cursor:not-allowed;opacity:.48}
.tvpp-shell button:focus-visible,.tvpp-shell input:focus-visible,.tvpp-shell textarea:focus-visible,.tvpp-shell a:focus-visible{outline:3px solid rgba(89,191,242,.45);outline-offset:2px}
.tvpp-topbar{display:grid;grid-template-columns:minmax(220px,1fr) auto minmax(280px,1fr);align-items:center;gap:18px;min-height:72px;padding:10px 16px;border-bottom:1px solid var(--tvpp-line);background:rgba(10,16,23,.93)}
.tvpp-brand{display:flex;align-items:center;gap:11px;min-width:0}.tvpp-orb{width:42px;height:42px;display:grid;place-items:center;border:1px solid #3a6b83;border-radius:50%;background:radial-gradient(circle at 30% 24%,#8cf5e3,#167ba8 45%,#102131 75%);color:#031118;font-size:21px;font-weight:900;box-shadow:0 0 22px #2bc8d83d}.tvpp-brand p,.tvpp-brand h1{margin:0}.tvpp-brand p{color:var(--tvpp-muted);font-size:10px;letter-spacing:.14em;text-transform:uppercase}.tvpp-brand h1{font-size:19px;white-space:nowrap}
.tvpp-equation{display:flex;align-items:center;gap:9px;margin:0;padding:7px 13px;border:1px solid var(--tvpp-line);border-radius:999px;background:#0c161f;color:var(--tvpp-muted);white-space:nowrap}.tvpp-equation span:first-child{color:var(--tvpp-text);font-weight:800}.tvpp-equation span:nth-of-type(2){color:var(--tvpp-gold)}.tvpp-equation span:last-child{color:var(--tvpp-cyan)}.tvpp-equation b{color:#597184}
.tvpp-top-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap}.tvpp-icon-btn{width:38px;padding:0!important;font-size:22px}
.tvpp-tabs{display:flex;gap:5px;padding:8px 16px;border-bottom:1px solid var(--tvpp-line);background:#0b1219;overflow-x:auto}.tvpp-tabs button{flex:0 0 auto;border-color:transparent;background:transparent;color:var(--tvpp-muted);font-weight:700}.tvpp-tabs button[aria-selected="true"]{border-color:#326480;background:#173044;color:#fff;box-shadow:inset 0 -2px 0 var(--tvpp-cyan)}
.tvpp-periodbar{display:flex;align-items:center;gap:9px;padding:8px 16px;border-bottom:1px solid var(--tvpp-line);background:#0d151d}.tvpp-periodbar>button:first-child,.tvpp-periodbar>button:nth-of-type(2){width:38px;padding:0;font-size:22px}.tvpp-periodbar>div{min-width:200px}.tvpp-periodbar p,.tvpp-periodbar h2{margin:0}.tvpp-periodbar p{color:var(--tvpp-cyan);font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.tvpp-periodbar h2{font-size:16px}.tvpp-periodbar #tvppTodayBtn{margin-left:auto}.tvpp-periodbar #tvppSaveState{min-width:150px;color:var(--tvpp-muted);text-align:right;font-size:11px}
.tvpp-main{min-height:0;display:grid;grid-template-columns:282px minmax(0,1fr);overflow:hidden}.tvpp-sidebar{min-height:0;padding:12px;border-right:1px solid var(--tvpp-line);background:#090f15;overflow:auto}.tvpp-sidebar>section{margin-bottom:11px;border:1px solid var(--tvpp-line);border-radius:11px;background:linear-gradient(145deg,#101923,#0c141c);padding:11px}.tvpp-sidebar h2,.tvpp-sidebar h3,.tvpp-sidebar h4,.tvpp-sidebar p{margin:0}.tvpp-sidebar h3{font-size:12px}.tvpp-sidebar p{color:var(--tvpp-muted);font-size:11px}
.tvpp-profile-card{display:flex;align-items:center;gap:10px}.tvpp-avatar{flex:0 0 42px;width:42px;height:42px;display:grid;place-items:center;border:1px solid #45728b;border-radius:11px;background:linear-gradient(145deg,#204a64,#132838);color:var(--tvpp-cyan);font-weight:900}
.tvpp-calendar-card header,.tvpp-share-card header,.tvpp-highlights>header{display:flex;align-items:center;justify-content:space-between;gap:8px}.tvpp-calendar-card header button{width:31px;min-height:30px;padding:0}.tvpp-weekdays,.tvpp-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.tvpp-weekdays{margin-top:8px;color:#698092;text-align:center;font-size:9px}.tvpp-calendar{margin-top:4px}.tvpp-calendar button{position:relative;min-width:0;min-height:31px;padding:2px;border-color:transparent;background:transparent;color:#bdcbd5;font-size:10px}.tvpp-calendar button.outside{opacity:.35}.tvpp-calendar button.saved:after{content:"";position:absolute;bottom:3px;left:50%;width:4px;height:4px;border-radius:50%;background:var(--tvpp-cyan);transform:translateX(-50%)}.tvpp-calendar button.today{border-color:#516574}.tvpp-calendar button.selected{background:#1c4b64;color:#fff}
#tvppSavedDates{display:grid;gap:4px;margin-top:8px;max-height:180px;overflow:auto}#tvppSavedDates button{display:flex;justify-content:space-between;min-height:32px;padding:6px 8px;text-align:left}#tvppSavedDates small{color:var(--tvpp-muted)}
.tvpp-share-card header{align-items:flex-start}.tvpp-share-card>button{width:100%;margin:9px 0}.tvpp-share-card #tvppShareBadge{border:1px solid #466276;border-radius:999px;padding:3px 7px;color:var(--tvpp-cyan);font-size:9px;text-transform:uppercase}.tvpp-share-card #tvppShareState{min-height:30px}.tvpp-share-card #tvppOwnerShares{display:grid;gap:5px;margin-top:8px}.tvpp-share-card #tvppOwnerShares article{display:grid;grid-template-columns:1fr auto auto;gap:4px;align-items:center;border-top:1px solid var(--tvpp-line);padding-top:6px}.tvpp-share-card #tvppOwnerShares a{min-width:0;color:var(--tvpp-blue);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tvpp-share-card #tvppOwnerShares button{min-height:29px;padding:3px 6px;font-size:10px}
.tvpp-content{min-height:0;overflow:auto;padding:14px 16px 22px;scrollbar-gutter:stable}.tvpp-status{min-height:28px;margin-bottom:10px;border:1px solid var(--tvpp-line);border-radius:8px;background:#0d1821;padding:5px 9px;color:var(--tvpp-muted)}.tvpp-status[data-kind="working"]{border-color:#806a34;color:var(--tvpp-gold)}.tvpp-status[data-kind="error"]{border-color:#7e3c43;color:#ffb1b1}.tvpp-status[data-kind="success"]{border-color:#277366;color:var(--tvpp-cyan)}
.tvpp-editor-head{display:grid;gap:10px}.tvpp-editor-head>label,.tvpp-reflection-grid label{display:grid;gap:5px;color:#b8cbd9;font-weight:700}.tvpp-shell input,.tvpp-shell textarea{width:100%;border:1px solid var(--tvpp-line-bright);border-radius:8px;background:#091119;color:var(--tvpp-text);padding:8px 10px}.tvpp-shell textarea{min-height:86px;resize:vertical;line-height:1.45}.tvpp-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.tvpp-pair label{display:grid;grid-template-rows:auto auto minmax(92px,auto);gap:3px;border:1px solid var(--tvpp-line);border-radius:11px;background:var(--tvpp-panel);padding:10px}.tvpp-pair label>span,.tvpp-reflection-grid label>span{font-size:12px;font-weight:850}.tvpp-pair small{color:var(--tvpp-muted);font-weight:400}.tvpp-expect>span{color:var(--tvpp-gold)}.tvpp-result>span{color:var(--tvpp-cyan)}
.tvpp-metrics{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px;margin:12px 0}.tvpp-metrics article{display:flex;gap:9px;align-items:flex-start;min-height:82px;border:1px solid var(--tvpp-line);border-radius:10px;background:linear-gradient(145deg,#121e29,#0d161f);padding:10px}.tvpp-metric-icon{flex:0 0 25px;width:25px;height:25px;display:grid;place-items:center;border:1px solid #39657c;border-radius:7px;color:var(--tvpp-blue);font-size:10px}.tvpp-metrics p,.tvpp-metrics strong,.tvpp-metrics small{display:block;margin:0}.tvpp-metrics p{color:var(--tvpp-muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em}.tvpp-metrics strong{margin:2px 0;font-size:18px}.tvpp-metrics small{color:#7790a2}
.tvpp-relation{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;margin-bottom:12px;border:1px solid var(--tvpp-line);border-radius:10px;background:var(--tvpp-line);overflow:hidden}.tvpp-relation>div{padding:9px 11px;background:#0c151d}.tvpp-relation span,.tvpp-relation strong{display:block}.tvpp-relation span{color:var(--tvpp-muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}.tvpp-relation strong{margin-top:3px;font-size:12px}
.tvpp-journal-layout{margin-top:11px}.tvpp-journal-layout>header{display:flex;align-items:end;justify-content:space-between;margin:0 0 8px}.tvpp-journal-layout>header p,.tvpp-journal-layout>header h2{margin:0}.tvpp-journal-layout>header p{color:var(--tvpp-blue);font-size:10px;text-transform:uppercase;letter-spacing:.12em}.tvpp-journal-layout>header h2{font-size:17px}
.tvpp-block{min-width:0;border:1px solid var(--tvpp-line);border-radius:10px;background:linear-gradient(160deg,#121c26,#0c141c);padding:8px}.tvpp-block header{display:flex;align-items:baseline;justify-content:space-between;gap:4px;margin-bottom:7px}.tvpp-block h3{margin:0;font-size:12px}.tvpp-block header span{color:var(--tvpp-muted);font-size:9px}.tvpp-block label{display:grid;gap:2px;margin-top:5px}.tvpp-block label>span{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.tvpp-block textarea{min-height:66px;padding:6px 7px;border-radius:6px;font-size:11px}.tvpp-block .tvpp-expect textarea{border-left:2px solid var(--tvpp-gold)}.tvpp-block .tvpp-result textarea{border-left:2px solid var(--tvpp-cyan)}
.tvpp-daily-timeline{display:grid;grid-template-columns:repeat(4,minmax(190px,1fr));gap:7px}.tvpp-weekly-columns{display:grid;grid-template-columns:repeat(7,minmax(185px,1fr));gap:7px;overflow-x:auto;padding-bottom:6px}.tvpp-weekly-columns .tvpp-block textarea{min-height:120px}
.tvpp-month-weekdays,.tvpp-monthly-calendar{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));gap:5px;min-width:1080px}.tvpp-month-weekdays{margin-bottom:4px;color:var(--tvpp-muted);text-align:center;font-size:10px;font-weight:800;text-transform:uppercase}.tvpp-monthly-calendar{overflow:visible}.tvpp-journal-layout:has(#tvppMonthlyCalendar){overflow-x:auto}.tvpp-monthly-calendar .tvpp-block{min-height:206px}.tvpp-monthly-calendar .tvpp-block textarea{min-height:55px}.tvpp-month-blank{min-height:206px;border:1px dashed #1a2834;border-radius:10px}.tvpp-month-weeks{display:grid;grid-template-columns:repeat(3,minmax(210px,1fr));gap:7px;margin-top:9px}.tvpp-yearly-months{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:8px}.tvpp-yearly-months .tvpp-block textarea{min-height:95px}
.tvpp-reflection-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.tvpp-reflection-grid label{border:1px solid var(--tvpp-line);border-radius:10px;background:var(--tvpp-panel);padding:9px}.tvpp-reflection-grid textarea{min-height:98px}
.tvpp-highlights{margin-top:14px;border-top:1px solid var(--tvpp-line);padding-top:12px}.tvpp-highlights>header p,.tvpp-highlights>header h2{margin:0}.tvpp-highlights>header p{color:var(--tvpp-blue);font-size:9px;text-transform:uppercase;letter-spacing:.12em}.tvpp-highlights>header h2{font-size:16px}.tvpp-highlights>header>span{color:var(--tvpp-muted);font-size:10px}#tvppCards{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:7px;margin-top:8px}#tvppCards article{border:1px solid var(--tvpp-line);border-radius:9px;background:#0e1821;padding:9px}#tvppCards time,#tvppCards span{color:var(--tvpp-muted);font-size:9px;text-transform:uppercase}#tvppCards span{float:right;color:var(--tvpp-cyan)}#tvppCards p{margin:7px 0 0}.tvpp-empty{grid-column:1/-1;color:var(--tvpp-muted)}
.tvpp-footer{position:sticky;bottom:-22px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px -16px -22px;padding:11px 16px;border-top:1px solid var(--tvpp-line);background:rgba(9,15,21,.96);backdrop-filter:blur(8px)}.tvpp-footer p{margin:0;color:var(--tvpp-muted)}.tvpp-footer button{border-color:#3c8279;background:#17453f;color:#dcfff8;font-weight:800}
body.tvpp-window-mode{overflow:hidden}body.tvpp-window-mode>.tvpp-studio-chrome{display:none!important}body.tvpp-window-mode #tvppDialog{position:fixed;inset:0;margin:0}
body.tvpp-shared-mode #tvppSaveBtn,body.tvpp-shared-mode #tvppShareBtn{display:none!important}
@media(max-width:1180px){.tvpp-topbar{grid-template-columns:1fr auto}.tvpp-equation{grid-column:1/-1;grid-row:2;justify-self:center}.tvpp-main{grid-template-columns:240px minmax(0,1fr)}.tvpp-metrics{grid-template-columns:repeat(2,1fr)}.tvpp-daily-timeline{grid-template-columns:repeat(3,minmax(180px,1fr))}.tvpp-yearly-months{grid-template-columns:repeat(2,minmax(230px,1fr))}}
@media(max-width:820px){#tvppDialog{width:100vw;height:100vh;border:0;border-radius:0}.tvpp-topbar{grid-template-columns:1fr}.tvpp-equation{display:none}.tvpp-top-actions{justify-content:flex-start}.tvpp-main{display:block;overflow:auto}.tvpp-sidebar{border-right:0;border-bottom:1px solid var(--tvpp-line);max-height:none}.tvpp-content{overflow:visible}.tvpp-calendar-card{max-width:380px}.tvpp-pair,.tvpp-reflection-grid{grid-template-columns:1fr}.tvpp-daily-timeline{grid-template-columns:repeat(2,minmax(160px,1fr))}.tvpp-relation{grid-template-columns:1fr}.tvpp-yearly-months{grid-template-columns:1fr}.tvpp-month-weeks{grid-template-columns:1fr 1fr}.tvpp-periodbar #tvppSaveState{display:none}}
@media(max-width:520px){.tvpp-topbar,.tvpp-tabs,.tvpp-periodbar,.tvpp-content{padding-left:10px;padding-right:10px}.tvpp-shell button,.tvpp-tabs button,.tvpp-shell input{min-height:44px}.tvpp-top-actions button:not(#tvppCloseBtn){flex:1}.tvpp-periodbar>div{min-width:0;flex:1}.tvpp-periodbar #tvppTodayBtn{display:none}.tvpp-tabs button{font-size:11px;padding:8px}.tvpp-metrics,.tvpp-daily-timeline,#tvppCards{grid-template-columns:1fr}.tvpp-month-weeks{grid-template-columns:1fr}.tvpp-daily-timeline,.tvpp-weekly-columns,.tvpp-monthly-calendar,.tvpp-yearly-months{overflow-x:auto}.tvpp-footer{margin-left:-10px;margin-right:-10px}.tvpp-footer p{display:none}.tvpp-footer button{width:100%}}
@media(prefers-reduced-motion:reduce){.tvpp-shell button{transition:none}}
.tvpp-shell [hidden]{display:none!important}
.tvpp-customize{margin:0 0 14px;border:1px solid #376172;border-radius:11px;background:#10212b;padding:12px}
.tvpp-customize>header,.tvpp-file-evidence>header{display:flex;justify-content:space-between;align-items:center;gap:12px}.tvpp-customize h2,.tvpp-file-evidence h2{margin:0;font-size:16px}.tvpp-customize p{margin:4px 0;color:var(--tvpp-muted)}.tvpp-customize fieldset{margin:12px 0 0;border:1px solid var(--tvpp-line-bright);border-radius:8px;padding:10px}.tvpp-customize legend{padding:0 6px;color:var(--tvpp-cyan);font-weight:700}.tvpp-section-choices{display:flex;flex-wrap:wrap;gap:8px 18px}.tvpp-hour-choices{display:grid;grid-template-columns:repeat(8,minmax(60px,1fr));gap:7px;margin-bottom:10px}.tvpp-customize label{display:flex;align-items:center;gap:7px;font-size:12px;cursor:pointer}.tvpp-customize input[type="checkbox"]{width:17px;height:17px;min-height:0;margin:0;accent-color:var(--tvpp-cyan)}
.tvpp-block .tvpp-hide-hour{margin-left:auto;font-size:9px;min-height:25px;padding:3px 6px;background:#14212a;color:var(--tvpp-muted)}.tvpp-hidden-hours{display:flex;flex-wrap:wrap;align-items:center;gap:8px;color:var(--tvpp-muted);font-size:11px}.tvpp-hidden-hours button{min-height:30px;padding:4px 8px}
.tvpp-file-evidence{margin-top:16px;padding:12px;border:1px solid var(--tvpp-line);border-radius:11px;background:#0f1a24}.tvpp-file-evidence>header p{margin:0;color:var(--tvpp-blue);font-size:10px;letter-spacing:.08em;text-transform:uppercase}.tvpp-file-note{margin:8px 0 12px;color:var(--tvpp-muted);font-size:11px}#tvppFileEvidence{display:grid;gap:7px}.tvpp-file-card{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid var(--tvpp-line);border-radius:8px;background:#0b141c;padding:10px}.tvpp-file-card>div:first-child{min-width:0}.tvpp-file-card strong{overflow-wrap:anywhere;color:var(--tvpp-text)}.tvpp-file-card p{margin:4px 0 0;color:var(--tvpp-muted);overflow-wrap:anywhere;font-size:11px}.tvpp-file-actions{display:flex;gap:6px;flex-wrap:wrap;flex-shrink:0}.tvpp-file-actions button{min-height:32px;font-size:11px}
@media(min-width:1181px){.tvpp-topbar{grid-template-columns:minmax(210px,.7fr) auto minmax(380px,1.3fr)}.tvpp-top-actions button{font-size:11px;min-height:32px;padding:5px 8px}}
@media(max-width:900px){.tvpp-file-card{align-items:flex-start;flex-direction:column}.tvpp-file-actions{flex-shrink:1}.tvpp-hour-choices{grid-template-columns:repeat(6,minmax(50px,1fr))}}
@media(max-width:520px){.tvpp-hour-choices{grid-template-columns:repeat(4,minmax(40px,1fr))}.tvpp-customize>header,.tvpp-file-evidence>header{align-items:flex-start;flex-direction:column}.tvpp-customize input[type="checkbox"]{min-height:0}.tvpp-journal-layout>header{gap:8px;align-items:flex-start;flex-direction:column}.tvpp-file-actions{width:100%}.tvpp-file-actions button{flex:1}}
/* THEORY-VISION-B13-PROGRESS-PORTFOLIO-CSS-v1-END */

/* THEORY-VISION-B13-QUICK-IMPORT-LIBRARY-v1-CSS-BEGIN */
.tvql-dialog{--ql-bg:#151a23;--ql-panel:#1c2330;--ql-line:#354052;--ql-muted:#9ba8bd;--ql-text:#e6edf8;box-sizing:border-box;color:var(--ql-text);background:var(--ql-bg);border:1px solid var(--ql-line);border-radius:12px;padding:0;width:min(1080px,96vw);max-width:96vw;max-height:94vh;font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 28px 90px #0008;color-scheme:dark;z-index:10050}.tvql-dialog *{box-sizing:border-box}.tvql-dialog::backdrop{background:#050911ad;backdrop-filter:blur(3px)}.tvql-dialog button,.tvql-link-button{border:1px solid var(--ql-line);background:#242e3e;color:var(--ql-text);border-radius:6px;padding:8px 12px;cursor:pointer;font:inherit;text-decoration:none;transition:background .12s ease}.tvql-dialog button:hover,.tvql-link-button:hover{background:#303d52}.tvql-dialog button:disabled{opacity:.5;cursor:default}.tvql-dialog :focus-visible{outline:2px solid #a89aff;outline-offset:3px}.tvql-dialog .tvql-primary{background:#7662cf;border-color:#9785e4;color:#fff}.tvql-dialog .tvql-primary:hover{background:#8872e6}.tvql-shell{display:flex;flex-direction:column;min-height:540px;max-height:92vh}.tvql-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:23px 26px 18px;border-bottom:1px solid var(--ql-line)}.tvql-header h1{font:600 23px/1.25 system-ui;margin:3px 0 5px;letter-spacing:-.4px}.tvql-header p{margin:0;color:var(--ql-muted);font-size:12px}.tvql-header>div>p:first-child{text-transform:uppercase;font-size:10px;letter-spacing:1.7px;color:#b8a9ff;font-weight:700}.tvql-toolbar{display:flex;gap:9px;padding:16px 24px 10px}.tvql-search{flex:1}.tvql-dialog input,.tvql-dialog select{background:#111721;border:1px solid var(--ql-line);border-radius:6px;color:var(--ql-text);padding:9px 11px;font:inherit;width:100%;min-width:0}.tvql-drop{margin:0 24px 10px;padding:12px 18px;text-align:center;border:1px dashed #46546c;border-radius:6px;color:var(--ql-muted);font-size:12px;cursor:pointer}.tvql-drop:hover,.tvql-drop.is-dragging{border-color:#b8a9ff;background:#28243a;color:#eee8ff}.tvql-status{min-height:28px;padding:3px 24px 10px;color:#b9c5d8;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.tvql-status[data-error=true]{color:#ffc1a9}.tvql-body{display:grid;grid-template-columns:minmax(0,1fr) 285px;min-height:260px;overflow:auto;flex:1;border-top:1px solid var(--ql-line)}.tvql-files{min-width:0;padding:0 14px 14px 24px}.tvql-file-heading{display:flex;justify-content:space-between;padding:15px 6px 10px;font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--ql-muted)}.tvql-dialog .tvql-file-row{display:flex;align-items:center;gap:13px;width:100%;text-align:left;margin-bottom:4px;padding:11px 10px;background:transparent;border:1px solid transparent;border-radius:6px}.tvql-dialog .tvql-file-row:hover{background:#202838}.tvql-dialog .tvql-file-row[aria-pressed=true]{background:#2d2943;border-color:#605385}.tvql-file-icon{display:flex;justify-content:center;align-items:center;flex:none;height:35px;width:39px;background:#303b4d;border:1px solid #485269;color:#c9bee9;border-radius:5px;font-size:9px;font-weight:700}.tvql-file-details{min-width:0;display:flex;flex-direction:column}.tvql-file-details strong{font-size:13px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tvql-file-details small{font-size:11px;color:var(--ql-muted);margin-top:2px}.tvql-inspector{padding:20px;border-left:1px solid var(--ql-line);background:#191f2b;overflow-wrap:anywhere}.tvql-inspector h2{font-size:17px;margin:0 0 10px}.tvql-inspector p{font-size:12px;margin:8px 0 16px}.tvql-inspector>button,.tvql-inspector>.tvql-link-button{display:block;width:100%;margin-bottom:9px;text-align:center}.tvql-muted{color:var(--ql-muted);font-size:12px}.tvql-empty{color:var(--ql-muted);padding:12px 8px;font-size:13px}.tvql-footer{display:flex;justify-content:space-between;gap:20px;padding:12px 24px;border-top:1px solid var(--ql-line);font-size:10px;color:var(--ql-muted)}.tvql-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.tvql-import-dialog{width:min(500px,94vw);z-index:10070}.tvql-import-form{padding:25px}.tvql-import-form h2{margin:0 0 10px;font-size:21px}.tvql-import-form p{font-size:12px;color:var(--ql-muted);overflow-wrap:anywhere}.tvql-import-form label{display:block;margin:15px 0;font-size:12px}.tvql-import-form label input,.tvql-import-form label select{display:block;margin-top:5px}.tvql-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.tvql-import-form .tvql-actions{justify-content:flex-end;margin-top:18px}.tvql-import-status{min-height:18px}.tvql-editor{width:min(1500px,98vw);max-width:98vw;z-index:10060}.tvql-editor-shell{display:flex;flex-direction:column;height:min(900px,92vh)}.tvql-editor.tvql-window{width:100vw;height:100vh;max-width:100vw;max-height:100vh;margin:0;border:0;border-radius:0}.tvql-window .tvql-editor-shell{height:100vh}.tvql-editor-toolbar{display:flex;gap:9px;align-items:center;padding:12px 24px}.tvql-editor-toolbar>span{color:var(--ql-muted);font-size:12px;margin-left:auto}.tvql-editor-body{display:grid;grid-template-columns:200px minmax(250px,1fr) minmax(250px,1fr);flex:1;min-height:0;border-top:1px solid var(--ql-line);overflow:auto}.tvql-outline{padding:15px 10px;border-right:1px solid var(--ql-line);overflow:auto}.tvql-outline h2,.tvql-preview-pane h2{font-size:11px;text-transform:uppercase;letter-spacing:1px;margin:0 0 12px;color:var(--ql-muted)}.tvql-outline h2{padding-left:8px}.tvql-outline p{font-size:12px;color:var(--ql-muted);padding:0 8px}.tvql-dialog .tvql-outline button{display:block;max-width:100%;width:100%;padding:7px 8px;text-align:left;font-size:12px;overflow-wrap:anywhere;background:transparent;border:0}.tvql-dialog .tvql-outline button:hover{background:#2c3546}.tvql-source-pane{display:flex;min-height:300px;min-width:0;flex-direction:column;padding:15px;border-right:1px solid var(--ql-line)}.tvql-source-pane>label{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--ql-muted);margin-bottom:12px}.tvql-source-pane textarea{display:block;flex:1;resize:none;min-height:220px;width:100%;background:#111620;color:#dce6f5;border:1px solid #354052;border-radius:5px;font:13px/21px ui-monospace,SFMono-Regular,Consolas,monospace;padding:14px;tab-size:2}.tvql-dialog [hidden]{display:none!important}#tvqlBinaryNote{color:var(--ql-muted);font-size:13px;line-height:1.8}.tvql-preview-pane{padding:15px;overflow:auto;min-width:0}#tvqlPreview{height:calc(100% - 30px);min-height:180px}#tvqlPreview pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;margin:0;color:#d5deeb}#tvqlPreview img{max-width:100%;height:auto;border-radius:5px}#tvqlPreview iframe{width:100%;height:calc(100% - 45px);min-height:330px;border:1px solid #354052;background:#fff}#tvqlPreview p{color:var(--ql-muted);font-size:12px}@media(max-width:760px){.tvql-header{padding:18px}.tvql-header h1{font-size:20px}.tvql-toolbar{padding:12px}.tvql-drop{margin:0 12px 10px}.tvql-status{padding-left:12px;padding-right:12px}.tvql-body{grid-template-columns:minmax(0,1fr) 220px}.tvql-files{padding-left:10px}.tvql-inspector{padding:14px}.tvql-footer{padding:10px 12px;flex-wrap:wrap;gap:5px}.tvql-editor-body{grid-template-columns:135px minmax(250px,1fr)}.tvql-preview-pane{grid-column:1/-1;min-height:250px;border-top:1px solid var(--ql-line)}.tvql-source-pane{border-right:0}.tvql-editor-toolbar{padding:10px;flex-wrap:wrap}.tvql-editor-toolbar>span{margin-left:0}.tvql-editor .tvql-header{flex-wrap:wrap}}@media(max-width:500px){.tvql-toolbar{flex-wrap:wrap}.tvql-search{flex-basis:100%}.tvql-body{display:block}.tvql-inspector{border-left:0;border-top:1px solid var(--ql-line)}.tvql-files{min-height:180px}.tvql-editor-body{display:block}.tvql-outline{max-height:130px;border-bottom:1px solid var(--ql-line)}.tvql-source-pane{min-height:400px}.tvql-editor .tvql-header h1{overflow-wrap:anywhere}}
/* THEORY-VISION-B13-QUICK-IMPORT-LIBRARY-v1-CSS-END */

/* THEORY-VISION-B13-DYNAMIC-ORGANIZER-v1-CSS-BEGIN */
.tvo-org-dialog,.tvo-org-item-dialog{--org-bg:#12151c;--org-panel:#1b2029;--org-line:#313846;--org-text:#e7eaf0;--org-muted:#9faabc;--org-accent:#a7b4ff;box-sizing:border-box;color:var(--org-text);background:var(--org-bg);border:1px solid var(--org-line);font:14px/1.45 ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:dark;border-radius:14px;padding:0;box-shadow:0 24px 90px #0009}
.tvo-org-dialog{width:min(1550px,96vw);max-width:96vw;height:94vh;max-height:94vh;overflow:auto}.tvo-org-dialog::backdrop,.tvo-org-item-dialog::backdrop{background:#070b12bd;backdrop-filter:blur(3px)}
.tvo-org-dialog *,.tvo-org-item-dialog *{box-sizing:border-box}.tvo-org-dialog h1,.tvo-org-dialog h2,.tvo-org-dialog h3,.tvo-org-dialog h4,.tvo-org-item-dialog h2{margin:0;font-weight:650;letter-spacing:-.015em}.tvo-org-dialog h1{font-size:22px}.tvo-org-dialog h2,.tvo-org-item-dialog h2{font-size:18px}.tvo-org-dialog h3{font-size:13px}.tvo-org-dialog h4{font-size:14px}.tvo-org-dialog p{margin:7px 0;white-space:pre-wrap;overflow-wrap:anywhere}.tvo-org-dialog small,.tvo-org-item-dialog small{color:var(--org-muted)}
.tvo-org-dialog button,.tvo-org-item-dialog button{font:inherit;font-size:12px;background:#242b38;color:var(--org-text);border:1px solid #3b4659;border-radius:6px;min-height:32px;padding:6px 10px;cursor:pointer}.tvo-org-dialog button:hover,.tvo-org-item-dialog button:hover{background:#303b4f;border-color:#8696c0}.tvo-org-dialog button:disabled,.tvo-org-item-dialog button:disabled{opacity:.4;cursor:default}.tvo-org-dialog button:focus-visible,.tvo-org-dialog input:focus-visible,.tvo-org-dialog textarea:focus-visible,.tvo-org-dialog select:focus-visible,.tvo-org-item-dialog :focus-visible{outline:2px solid #c0c9ff;outline-offset:3px}.tvo-org-dialog button.tvo-org-primary,.tvo-org-item-dialog button.tvo-org-primary{background:#a7b4ff;color:#151b30;border-color:#a7b4ff;font-weight:700}
.tvo-org-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:1px solid var(--org-line)}.tvo-org-header p{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:var(--org-muted);margin:0 0 5px}.tvo-org-header span{font-size:12px;color:#bdc8dc}.tvo-org-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.tvo-org-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 24px;background:#171c25;border-bottom:1px solid var(--org-line)}.tvo-org-toolbar p{font-size:12px;color:var(--org-muted);margin:0}.tvo-org-status{padding:9px 24px!important;margin:0!important;font-size:12px;color:#b8c7e8;background:#19212b}.tvo-org-status[data-error="true"]{color:#ffc2b8;background:#3b2428}
.tvo-org-main{display:grid;grid-template-columns:minmax(0,1fr) 300px;min-height:calc(100% - 172px)}.tvo-org-work{min-width:0;padding:22px}.tvo-org-session{min-width:0;padding:24px 18px;background:#171c25;border-left:1px solid var(--org-line)}.tvo-org-session>p{font-size:12px;color:var(--org-muted)}.tvo-org-session>button{width:100%;margin:7px 0}.tvo-org-session h3{margin-top:18px}.tvo-org-next{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#22293d;border:1px solid #454f73;border-left:3px solid #a7b4ff;border-radius:8px;padding:16px 18px}.tvo-org-next p{font-size:13px}.tvo-org-next small{font-size:11px}.tvo-org-next button{flex-shrink:0}.tvo-org-eyebrow{display:block;color:#b9c3ff;font-size:10px;text-transform:uppercase;letter-spacing:.13em;margin-bottom:6px}.tvo-org-board-heading{display:flex;justify-content:space-between;align-items:center;margin:25px 0 14px;gap:15px}.tvo-org-board-heading p{font-size:12px;color:var(--org-muted);margin:4px 0 0}.tvo-org-board{display:grid;grid-template-columns:repeat(5,minmax(170px,1fr));gap:10px;overflow-x:auto;padding-bottom:12px;align-items:start}.tvo-org-column{background:#161a22;min-height:180px;border:1px solid #2b3240;border-radius:8px;padding:10px}.tvo-org-column>h3{display:flex;justify-content:space-between;color:#c8d2e3;margin:0 2px 14px}.tvo-org-column>h3 span{font-size:10px;border-radius:4px;padding:1px 5px;background:#30394b;color:#bdc7d9}.tvo-org-card{border:1px solid #353d4d;border-radius:7px;padding:10px;background:#202631;margin-bottom:9px}.tvo-org-card:last-child{margin-bottom:0}.tvo-org-card-meta{display:flex;align-items:baseline;justify-content:space-between;gap:7px;font-size:9px;color:#a6b5ce;margin-bottom:7px}.tvo-org-card-meta span{overflow-wrap:anywhere}.tvo-org-card-meta b{color:#cad1f4;font-size:9px;white-space:nowrap;font-weight:500}.tvo-org-card h4{overflow-wrap:anywhere}.tvo-org-card>p{font-size:11px;color:#b3bfd2;margin:9px 0;max-height:140px;overflow:auto}.tvo-org-card p.tvo-org-blocker{color:#efbc98;border-left:2px solid #b18363;padding-left:7px;font-size:10px}.tvo-org-card-actions{display:flex;gap:4px;flex-wrap:wrap;margin:10px 0}.tvo-org-card-actions button{font-size:10px;padding:3px 6px;min-height:27px}.tvo-org-stage-label{display:flex!important;align-items:center;justify-content:space-between;gap:9px;font-size:10px!important;color:var(--org-muted);margin:0!important}.tvo-org-stage-label select{font-size:10px!important;min-height:26px;padding:2px 5px!important;width:auto!important}
.tvo-org-dialog label,.tvo-org-item-dialog label{display:block;font-size:12px;color:#d6ddef;margin:16px 0 10px}.tvo-org-dialog input,.tvo-org-dialog textarea,.tvo-org-dialog select,.tvo-org-item-dialog input,.tvo-org-item-dialog textarea,.tvo-org-item-dialog select{display:block;width:100%;border:1px solid #3c485b;background:#111721;color:var(--org-text);font:inherit;font-size:12px;padding:9px 10px;border-radius:6px;margin-top:6px}.tvo-org-dialog textarea,.tvo-org-item-dialog textarea{resize:vertical;min-height:82px;line-height:1.5}.tvo-org-dialog select,.tvo-org-item-dialog select{white-space:normal}.tvo-org-dialog .tvo-org-checkbox,.tvo-org-item-dialog .tvo-org-checkbox{display:flex;align-items:flex-start;gap:9px;font-size:11px}.tvo-org-checkbox input{width:auto;margin:2px 0 0;flex-shrink:0}.tvo-org-target{padding:12px;border:1px solid #384052;border-radius:6px;background:#202737;margin:18px 0}.tvo-org-target h3{margin:0;font-size:10px;text-transform:uppercase;color:#a8b7d6}.tvo-org-target h3:not(:first-child){margin-top:14px}.tvo-org-target p{font-size:12px}.tvo-org-started{font-size:10px!important;color:#96a6c2!important}.tvo-org-help,.tvo-org-empty{font-size:11px!important;color:#a4b0c4!important}.tvo-org-empty{padding:9px 0}.tvo-org-evidence{padding:0;list-style:none;margin:8px 0}.tvo-org-evidence li{margin:4px 0}.tvo-org-evidence button{max-width:100%;text-align:left;overflow-wrap:anywhere;font-size:10px;padding:3px 6px;min-height:26px;color:#c5cfff;background:#202942}
.tvo-org-history{margin-top:24px;border-top:1px solid var(--org-line);padding-top:18px}.tvo-org-history>h2{margin-bottom:12px}.tvo-org-history details{border:1px solid #303a4b;border-radius:6px;background:#1b222d;margin-top:8px}.tvo-org-history summary{cursor:pointer;padding:12px;font-size:12px}.tvo-org-history summary span{font-weight:600}.tvo-org-history summary small{display:block;margin:4px 0 0 17px;font-size:10px}.tvo-org-history dl{padding:0 14px;margin:5px 0 12px}.tvo-org-history dt{font-size:10px;text-transform:uppercase;color:#a9b7d1;margin-top:12px}.tvo-org-history dd{margin:4px 0;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.tvo-org-history .tvo-org-evidence{margin:8px 14px 14px}.tvo-org-item-dialog{width:min(600px,94vw);max-height:90vh;padding:24px;overflow:auto}.tvo-org-item-dialog fieldset{border:1px solid #354054;border-radius:6px;margin:16px 0;padding:0 12px 10px}.tvo-org-item-dialog legend{font-size:12px;padding:0 5px}.tvo-org-item-dialog .tvo-org-actions{justify-content:flex-end;margin-top:20px}.tvo-org-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tvo-org-dependencies{max-height:170px;overflow:auto}.tvo-org-dependencies label{margin:8px 0}.tvo-org-item-dialog [role="alert"]{color:#ffc2b8;font-size:12px}.tvo-org-window-chrome{display:none!important}body.tvo-org-window{margin:0;overflow:hidden}.tvo-org-window .tvo-org-dialog{position:fixed;inset:0;width:100vw;max-width:100vw;height:100vh;max-height:100vh;border:0;border-radius:0;margin:0}
@media(max-width:1100px){.tvo-org-main{grid-template-columns:minmax(0,1fr) 270px}.tvo-org-work{padding:16px}.tvo-org-next{display:block}.tvo-org-next button{margin-top:12px}.tvo-org-board{grid-template-columns:repeat(5,185px)}}@media(max-width:760px){.tvo-org-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}.tvo-org-header,.tvo-org-toolbar{padding:14px;align-items:flex-start;flex-direction:column;gap:12px}.tvo-org-main{display:flex;flex-direction:column}.tvo-org-session{border-left:0;border-top:1px solid var(--org-line);padding:20px}.tvo-org-work{padding:14px}.tvo-org-board{grid-template-columns:repeat(5,210px)}.tvo-org-status{padding:9px 14px!important}.tvo-org-board-heading{align-items:flex-start}.tvo-org-board-heading button{flex-shrink:0}.tvo-org-board-heading p{max-width:230px}.tvo-org-item-dialog{padding:18px}.tvo-org-two{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.tvo-org-dialog *,.tvo-org-item-dialog *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* THEORY-VISION-B13-DYNAMIC-ORGANIZER-v1-CSS-END */

/* THEORY-VISION-B13-JOURNAL-LAYOUT-GUARD-v1-BEGIN */
/* Keep the Logging Journal section menu outside the geometry changed by
   journal visibility toggles. Hidden journal modules must reserve no layout. */
body.tv-utility-ui .layout-journal #journalPane {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
body.tv-utility-ui .layout-journal #journalPane > .tv-journal-nav {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  align-self: start;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 32 !important;
  margin: 0 !important;
}
body.tv-utility-ui .layout-journal #journalPane > :is(.calendar-column,.journal-editor,.activity-column) {
  grid-row: 2;
  min-height: 0;
}
body.tv-utility-ui .layout-journal #journalPane > .journal-module-hidden {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}
#journalPane #tv08SpreadsheetPanel[hidden],
#journalPane #tv08TimedPanel[hidden],
#journalPane #tv08NotesPanel[hidden],
#journalPane #dayActivityGrid[hidden] {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}
@media (max-width: 1100px) {
  body.tv-utility-ui .layout-journal #journalPane {
    min-height: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  body.tv-utility-ui .layout-journal #journalPane > .tv-journal-nav {
    position: sticky !important;
    top: 0 !important;
  }
}
@media (max-width: 760px) {
  .layout-journal #journalPane {
    min-height: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
}
@media (max-height: 520px) {
  body.tv-utility-ui .layout-journal #journalPane > .tv-journal-nav {
    position: sticky !important;
    top: 0 !important;
  }
}
/* THEORY-VISION-B13-JOURNAL-LAYOUT-GUARD-v1-END */

/* THEORY-VISION-B13-JOURNAL-SECTION-NAV-REPAIR-CSS-v1-BEGIN */
/* Section buttons navigate inside the journal instead of handing scroll to the
   outer application shell. Keep scroll chaining bounded to journal surfaces. */
body.tv-utility-ui .workspace.layout-journal,
body.tv-utility-ui .workspace.layout-journal #journalPane {
  min-height: 0;
  overscroll-behavior: none;
}
body.tv-utility-ui .workspace.layout-journal #journalPane > .tv-journal-nav {
  z-index: 40;
}
body.tv-utility-ui .workspace.layout-journal :is(.calendar-column,.journal-editor,.activity-column) {
  overscroll-behavior: contain;
  scroll-behavior: auto;
}
@media (min-width: 1101px) {
  body.tv-utility-ui .workspace.layout-journal,
  body.tv-utility-ui .workspace.layout-journal #journalPane {
    overflow: hidden !important;
  }
}
/* THEORY-VISION-B13-JOURNAL-SECTION-NAV-REPAIR-CSS-v1-END */

/* THEORY-VISION-B13-P55-PORTFOLIO-TOOLS-v1-CSS-BEGIN */
.tvo-p55-dialog{width:min(760px,94vw);max-height:88vh;border:1px solid color-mix(in srgb,currentColor 25%,transparent);border-radius:18px;padding:0;background:var(--panel,#111722);color:inherit;box-shadow:0 24px 80px rgba(0,0,0,.42)}
.tvo-p55-dialog::backdrop{background:rgba(5,9,16,.72);backdrop-filter:blur(4px)}
.tvo-p55-shell{display:grid;grid-template-rows:auto minmax(0,1fr);max-height:88vh}.tvo-p55-shell>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid rgba(255,255,255,.12)}
.tvo-p55-shell>header p{margin:0;font-size:11px;letter-spacing:.12em;text-transform:uppercase;opacity:.66}.tvo-p55-shell>header h2{margin:3px 0 0;font-size:21px}.tvo-p55-shell>header button{font-size:24px;border:0;background:transparent;color:inherit;cursor:pointer}
.tvo-p55-body{overflow:auto;padding:20px;display:grid;gap:16px}.tvo-p55-lead{margin:0;line-height:1.55;opacity:.82}.tvo-p55-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}.tvo-p55-grid button,.tvo-p55-block-tools button,.tvo-p55-body button{min-height:36px;border-radius:9px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.06);color:inherit;padding:8px 11px;cursor:pointer}.tvo-p55-grid button:disabled{opacity:.45;cursor:not-allowed}.tvo-p55-primary{font-weight:700;border-color:currentColor!important}
.tvo-p55-body label{display:grid;gap:6px;font-size:13px}.tvo-p55-body input,.tvo-p55-body textarea,.tvo-p55-body select{width:100%;box-sizing:border-box;border:1px solid rgba(255,255,255,.16);border-radius:9px;background:rgba(0,0,0,.16);color:inherit;padding:9px 10px;font:inherit}.tvo-p55-body textarea{min-height:95px;resize:vertical}.tvo-p55-body fieldset{border:1px solid rgba(255,255,255,.13);border-radius:11px;padding:12px}.tvo-p55-periods{display:flex;gap:12px;flex-wrap:wrap}.tvo-p55-periods label{display:flex;grid-template-columns:auto auto;align-items:center;gap:6px}.tvo-p55-periods input{width:auto}.tvo-p55-row{display:grid;grid-template-columns:1fr 1fr 120px;gap:12px}
.tvo-p55-block-tools{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto}.tvo-p55-block-tools button{font-size:11px;min-height:28px;padding:4px 8px}.tvo-p55-evidence-list{display:grid;gap:8px}.tvo-p55-evidence-list button{text-align:left;display:grid;gap:3px}.tvo-p55-evidence-list span{font-size:12px;opacity:.72}
.tvo-p55-pdf-host{position:relative}.tvo-p55-pdf-print{margin:4px 6px 7px 0;border:1px solid rgba(127,127,127,.35);border-radius:8px;background:rgba(127,127,127,.12);color:inherit;padding:6px 10px;font:inherit;cursor:pointer}.tvo-p55-pdf-host>.tvo-p55-pdf-print{position:relative;z-index:2}
@media(max-width:640px){.tvo-p55-row{grid-template-columns:1fr}.tvo-p55-dialog{width:96vw}.tvo-p55-body{padding:14px}.tvo-p55-block-tools{width:100%;margin-left:0}}
@media print{.tvo-p55-pdf-print,.tvo-p55-block-tools,#tvoP55LogBtn,#tvoP55SiteBtn{display:none!important}}
/* THEORY-VISION-B13-P55-PORTFOLIO-TOOLS-v1-CSS-END */

/* THEORY-VISION-B13-P56-BOOK-GENERATOR-CSS-v1-BEGIN */
#tvoP56BookBtn{position:fixed;right:18px;bottom:18px;z-index:13000;border:1px solid #7566ed;background:#17162e;color:#f1efff;padding:10px 14px;border-radius:999px;font-weight:800;box-shadow:0 10px 34px #0008;cursor:pointer}#tvoP56BookBtn:hover,#tvoP56BookBtn:focus{background:#26224a;outline:2px solid #8d82ff;outline-offset:2px}
#tvoP56BookWrap{position:fixed;inset:0;z-index:14000;background:#02040ab8;backdrop-filter:blur(8px);overflow:auto;padding:clamp(18px,5vw,60px)}#tvoP56BookPanel{width:min(820px,100%);margin:auto;background:#0d1420;color:#eef3ff;border:1px solid #34445d;border-radius:18px;padding:22px;box-shadow:0 24px 100px #000c}#tvoP56BookPanel header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}#tvoP56BookPanel header small{letter-spacing:.12em;color:#77d9cb;font-weight:800}#tvoP56BookPanel h2{font-size:clamp(2rem,5vw,3.5rem);margin:.15em 0}#tvoP56Close{font-size:30px;line-height:1;border:0;background:transparent;color:#eef3ff;cursor:pointer}#tvoP56BookPanel label{display:block;font-weight:750;margin-top:14px}#tvoP56BookPanel textarea,#tvoP56BookPanel select,#tvoP56BookPanel input{width:100%;margin-top:6px;border:1px solid #40516c;background:#09101a;color:#eef3ff;border-radius:9px;padding:11px;font:inherit}#tvoP56BookPanel textarea{resize:vertical}.p56row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.p56actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:18px}.p56actions button{border:0;border-radius:9px;padding:11px 14px;font-weight:850;cursor:pointer}.p56actions button:first-child{background:#eef4ff;color:#09101a}#tvoP56Fund{background:#5f50e7;color:white}#tvoP56Build{background:#55cbb6;color:#07110f}.p56lead,#tvoP56Status{color:#b7c4d7}#tvoP56QuoteBox{margin-top:16px;padding:14px;border:1px solid #34445d;border-radius:12px;background:#101b29;display:grid;gap:5px}#tvoP56QuoteBox[hidden]{display:none}.p56artifact{display:block;margin:8px 0;padding:10px 12px;border:1px solid #49617e;border-radius:9px;color:#cbdfff;text-decoration:none}.p56artifact:hover{text-decoration:underline}@media(max-width:640px){.p56row{grid-template-columns:1fr}#tvoP56BookBtn{right:10px;bottom:10px}}
/* THEORY-VISION-B13-P56-BOOK-GENERATOR-CSS-v1-END */

/* TVO LOGGING JOURNAL SCROLLERS 1.0 BEGIN */
/* Layout-only repair: never hide, clone, reorder or replace Journal modules. */
body.tv-utility-ui .workspace.layout-journal {
  min-height:0!important;
  overflow:hidden!important;
}
@media (min-width:1101px) {
  body.tv-utility-ui .workspace.layout-journal #journalPane {
    display:grid!important;
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    min-width:0!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    overflow:hidden!important;
    align-content:stretch!important;
  }
  body.tv-utility-ui .workspace.layout-journal #journalPane > .tv-journal-nav {
    grid-row:1!important;
    grid-column:1/-1!important;
    align-self:start;
    min-width:0;
    max-width:100%;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  body.tv-utility-ui .workspace.layout-journal #journalPane > :is(.calendar-column,.journal-editor,.activity-column):not(.journal-module-hidden) {
    grid-row:2!important;
    min-width:0!important;
    min-height:0!important;
    height:100%!important;
    max-height:100%!important;
    overflow-y:scroll!important;
    overflow-x:auto!important;
    overscroll-behavior:contain!important;
    scroll-behavior:auto!important;
    scrollbar-gutter:stable!important;
  }
}
/* Window widths at or below 1100px use a single journal scroller so sections
   cannot disappear beneath a one-column viewport or a compact toolbar. */
@media (max-width:1100px) {
  body.tv-utility-ui .workspace.layout-journal #journalPane {
    display:block!important;
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    min-width:0!important;
    overflow-y:scroll!important;
    overflow-x:hidden!important;
    scrollbar-gutter:stable!important;
    overscroll-behavior:contain!important;
  }
  body.tv-utility-ui .workspace.layout-journal #journalPane > .tv-journal-nav {
    position:sticky!important;
    top:0!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
  }
  body.tv-utility-ui .workspace.layout-journal #journalPane > :is(.calendar-column,.journal-editor,.activity-column):not(.journal-module-hidden) {
    display:block;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
  }
  body.tv-utility-ui .workspace.layout-journal #journalPane .saved-notes {
    max-height:min(40vh,400px);
    overflow-y:auto!important;
  }
}
/* Preserve notebook readability and make text-entry scroll independently. */
body.tv-utility-ui .workspace.layout-journal #journalPane :is(input,select,textarea) { max-width:100%; }
body.tv-utility-ui .workspace.layout-journal #journalPane textarea {
  overflow-y:auto!important;
  resize:vertical;
}
body.tv-utility-ui .workspace.layout-journal #journalPane :is(.day-activity-grid,.journal-media-gallery,.journal-album-toolbar) {
  min-width:0;
  max-width:100%;
  overflow-x:auto;
}
body.tv-utility-ui .workspace.layout-journal #journalPane > :is(.calendar-column,.journal-editor,.activity-column),
body.tv-utility-ui .workspace.layout-journal #journalPane,
body.tv-utility-ui .workspace.layout-journal #journalPane .saved-notes {
  scrollbar-width:auto;
  scrollbar-color:#8a98ac transparent;
}
body.tv-utility-ui .workspace.layout-journal #journalPane :is(.calendar-column,.journal-editor,.activity-column)::-webkit-scrollbar,
body.tv-utility-ui .workspace.layout-journal #journalPane::-webkit-scrollbar,
body.tv-utility-ui .workspace.layout-journal #journalPane .saved-notes::-webkit-scrollbar {
  width:12px;
  height:12px;
}
body.tv-utility-ui .workspace.layout-journal #journalPane :is(.calendar-column,.journal-editor,.activity-column)::-webkit-scrollbar-thumb,
body.tv-utility-ui .workspace.layout-journal #journalPane::-webkit-scrollbar-thumb,
body.tv-utility-ui .workspace.layout-journal #journalPane .saved-notes::-webkit-scrollbar-thumb {
  background:#8a98ac;
  border:3px solid transparent;
  background-clip:padding-box;
  border-radius:12px;
}
body.tv-utility-ui .workspace.layout-journal #tvoJournalRevealAll {
  flex:0 0 auto;
  white-space:nowrap;
}
/* TVO LOGGING JOURNAL SCROLLERS 1.0 END */

/* TVO LOGGING JOURNAL COMPACT 1.1 BEGIN */
/* Layout only: preserve every Journal DOM node, handler, record and user preference. */
body.tv-utility-ui .workspace.layout-journal { min-height:0!important; overflow:hidden!important; }
body.tv-utility-ui .workspace.layout-journal #journalPane {
  display:grid!important;
  position:relative!important;
  grid-template-columns:32px minmax(185px,220px) minmax(0,1fr) minmax(215px,260px)!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  min-height:0!important;
  min-width:0!important;
  height:100%!important;
  max-height:100%!important;
  overflow:hidden!important;
  align-content:stretch!important;
  padding:0!important;
}
body.tv-utility-ui .workspace.layout-journal #journalPane > .tv-journal-nav {
  grid-column:1/-1!important;
  grid-row:1!important;
  min-width:0!important;
  width:100%!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  position:relative!important;
  top:auto!important;
  z-index:3!important;
}
body.tv-utility-ui .workspace.layout-journal #journalPane > #tvoJournalCalendarTab {
  grid-column:1!important;
  grid-row:2!important;
  position:relative;
  z-index:2;
  align-self:stretch;
  justify-self:stretch;
  min-width:0;
  padding:10px 6px;
  border:0;
  border-right:1px solid var(--line,#d5dee8);
  background:var(--paper,#ecf3f8);
  color:var(--ink,#17324f);
  font:600 11px/1.3 system-ui,sans-serif;
  writing-mode:vertical-rl;
  text-orientation:mixed;
  cursor:pointer;
}
body.tv-utility-ui .workspace.layout-journal #journalPane > #tvoJournalCalendarTab:hover,
body.tv-utility-ui .workspace.layout-journal #journalPane > #tvoJournalCalendarTab:focus-visible { background:var(--blue-soft,#dfeeff); }
body.tv-utility-ui .workspace.layout-journal #journalPane > #tvoJournalCalendarTab:focus-visible {outline:2px solid var(--blue,#165f9a);outline-offset:-3px;}
body.tv-utility-ui .workspace.layout-journal #journalPane > :is(.calendar-column,.journal-editor,.activity-column):not(.journal-module-hidden) {
  grid-row:2!important;
  height:100%!important;
  min-height:0!important;
  min-width:0!important;
  max-height:100%!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
body.tv-utility-ui .workspace.layout-journal #journalPane > .calendar-column {grid-column:2!important;padding:10px!important;}
body.tv-utility-ui .workspace.layout-journal #journalPane > .journal-editor {grid-column:3!important;padding:12px 18px!important;}
body.tv-utility-ui .workspace.layout-journal #journalPane > .activity-column {grid-column:4!important;padding:12px!important;}
/* The tab collapses the calendar without changing the Journal's saved visibility preference. */
body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) {grid-template-columns:32px minmax(0,1fr) minmax(215px,260px)!important;}
body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) > .calendar-column {display:none!important;}
body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) > .journal-editor {grid-column:2!important;}
body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) > .activity-column {grid-column:3!important;}
body.tv-utility-ui .workspace.layout-journal #journalPane.tvo-jc-timeline-hidden:not(.tvo-jc-collapsed):not(.tvo-jc-native-hidden) {grid-template-columns:32px minmax(185px,220px) minmax(0,1fr)!important;}
body.tv-utility-ui .workspace.layout-journal #journalPane.tvo-jc-timeline-hidden:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) {grid-template-columns:32px minmax(0,1fr)!important;}
/* Smaller, readable calendar. Preserve its date picker and list of saved notes. */
body.tv-utility-ui #journalPane > .calendar-column .journal-brand {margin:0 0 7px;}
body.tv-utility-ui #journalPane > .calendar-column .journal-brand h1 {font-size:17px!important;line-height:1.25!important;margin:2px 0 3px!important;}
body.tv-utility-ui #journalPane > .calendar-column .journal-brand p {font-size:10px!important;line-height:1.35!important;margin:3px 0 6px!important;}
body.tv-utility-ui #journalPane > .calendar-column .calendar-toolbar {grid-template-columns:26px minmax(0,1fr) 26px!important;margin:5px 0 5px!important;gap:2px!important;}
body.tv-utility-ui #journalPane > .calendar-column .calendar-toolbar strong {font-size:11px!important;}
body.tv-utility-ui #journalPane > .calendar-column .calendar-toolbar button {min-height:26px!important;padding:2px!important;font-size:15px!important;}
body.tv-utility-ui #journalPane > .calendar-column .calendar-weekdays,
body.tv-utility-ui #journalPane > .calendar-column .calendar-grid {gap:1px!important;}
body.tv-utility-ui #journalPane > .calendar-column .calendar-weekdays span {font-size:9px!important;padding:3px 0!important;}
body.tv-utility-ui #journalPane > .calendar-column .calendar-day {min-height:27px!important;font-size:10px!important;padding:2px!important;border-radius:4px!important;}
body.tv-utility-ui #journalPane > .calendar-column #journalTodayBtn {margin-top:7px!important;padding:5px 7px!important;min-height:27px!important;}
body.tv-utility-ui #journalPane > .calendar-column .saved-notes {margin-top:12px!important;padding-top:10px!important;}
body.tv-utility-ui #journalPane > .calendar-column .saved-notes-heading h2 {font-size:13px!important;}
body.tv-utility-ui #journalPane > .calendar-column .saved-notes-list button {min-height:30px!important;font-size:11px!important;padding:5px!important;}
body.tv-utility-ui #journalPane > .journal-editor .journal-header {gap:9px!important;margin-bottom:9px!important;}
body.tv-utility-ui #journalPane > .journal-editor .journal-header h2 {font-size:19px!important;margin:2px 0!important;}
body.tv-utility-ui #journalPane > .journal-editor :is(.day-planner,.progress-report) {padding:12px!important;margin:10px 0!important;}
body.tv-utility-ui #journalPane > .journal-editor :is(.day-planner,.progress-report) h3 {font-size:17px!important;}
body.tv-utility-ui #journalPane > .journal-editor textarea {overflow-y:auto!important;max-width:100%;resize:vertical;}
body.tv-utility-ui #journalPane > .journal-editor :is(.day-activity-grid,.journal-media-gallery,.journal-album-toolbar) {min-width:0;max-width:100%;overflow-x:auto;}
body.tv-utility-ui #journalPane > .activity-column .activity-heading h2 {font-size:17px!important;margin:3px 0!important;}
body.tv-utility-ui #journalPane > .activity-column .activity-heading p {font-size:11px!important;margin:4px 0 10px!important;}
body.tv-utility-ui #journalPane > .activity-column :is(p,li) {overflow-wrap:anywhere;}
body.tv-utility-ui #journalPane > .calendar-column,
body.tv-utility-ui #journalPane > .journal-editor,
body.tv-utility-ui #journalPane > .activity-column {scrollbar-width:auto;scrollbar-color:#8a98ac transparent;}
@media (min-width:850px) and (max-width:1149px) {
 body.tv-utility-ui .workspace.layout-journal #journalPane,
 body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) {grid-template-columns:32px minmax(0,1fr) minmax(195px,26%)!important;}
 body.tv-utility-ui .workspace.layout-journal #journalPane.tvo-jc-timeline-hidden {grid-template-columns:32px minmax(0,1fr)!important;}
 body.tv-utility-ui .workspace.layout-journal #journalPane > .journal-editor,
 body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) > .journal-editor {grid-column:2!important;}
 body.tv-utility-ui .workspace.layout-journal #journalPane > .activity-column,
 body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) > .activity-column {grid-column:3!important;}
 body.tv-utility-ui .workspace.layout-journal #journalPane > .calendar-column:not(.journal-module-hidden) {
   grid-column:2!important;grid-row:2!important;
   position:absolute!important;z-index:4!important;top:0!important;left:0!important;
   width:min(230px,calc(100% - 12px))!important;height:100%!important;
   background:var(--panel,#fff)!important;box-shadow:5px 8px 24px #0003;
   border:1px solid var(--line,#cad1d9);
   display:block!important;
 }
 body.tv-utility-ui .workspace.layout-journal #journalPane > .calendar-column .saved-notes {
   display:block!important;grid-column:auto!important;grid-row:auto!important;
   max-height:190px!important;overflow-y:auto!important;
 }
 body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) > .calendar-column {display:none!important;}
}
@media (max-width:849px) {
 body.tv-utility-ui .workspace.layout-journal #journalPane,
 body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden),
 body.tv-utility-ui .workspace.layout-journal #journalPane.tvo-jc-timeline-hidden {
   display:block!important;overflow-y:auto!important;overflow-x:hidden!important;
   height:100%!important;max-height:100%!important;
 }
 body.tv-utility-ui .workspace.layout-journal #journalPane > .tv-journal-nav {
   position:sticky!important;top:0!important;width:100%!important;overflow-x:auto!important;
 }
 body.tv-utility-ui .workspace.layout-journal #journalPane > #tvoJournalCalendarTab {
   display:block!important;width:100%!important;min-height:32px!important;height:auto!important;
   writing-mode:horizontal-tb!important;padding:7px 12px!important;text-align:left!important;
 }
 body.tv-utility-ui .workspace.layout-journal #journalPane > .calendar-column:not(.journal-module-hidden) {
   display:block!important;height:auto!important;max-height:390px!important;overflow-y:auto!important;
   position:relative!important;width:min(245px,100%)!important;
 }
 body.tv-utility-ui .workspace.layout-journal #journalPane:is(.tvo-jc-collapsed,.tvo-jc-native-hidden) > .calendar-column {display:none!important;}
 body.tv-utility-ui .workspace.layout-journal #journalPane > .journal-editor:not(.journal-module-hidden) {
   display:block!important;height:auto!important;max-height:none!important;
   overflow:visible!important;padding:11px!important;
 }
 body.tv-utility-ui .workspace.layout-journal #journalPane > .activity-column:not(.journal-module-hidden) {
   display:block!important;height:auto!important;max-height:330px!important;overflow-y:auto!important;
 }
}
/* TVO LOGGING JOURNAL COMPACT 1.1 END */

/* TVO MATHMOTION V2 COMPACT 1.0 BEGIN */
/* Applies only to the native Motion V2 workspace. Legacy/other panes are unchanged. */
#workspace.layout-mathmotion #mathmotionPane:has(#p72Workspace:not([hidden])) {
  min-height:0!important; overflow-y:auto!important; overflow-x:hidden!important;
  overscroll-behavior-y:contain; scrollbar-gutter:stable;
}
#workspace.layout-mathmotion #mathmotionPane:has(#p72Workspace:not([hidden])) > .mathmotion-header{
  box-sizing:border-box; min-height:0; flex:0 0 auto; padding:7px 15px!important;
  gap:9px; align-items:center;
}
#workspace.layout-mathmotion #mathmotionPane:has(#p72Workspace:not([hidden])) > .mathmotion-header h1{
  font-size:clamp(16px,1.45vw,21px)!important; line-height:1.1; margin:0;
}
#workspace.layout-mathmotion #mathmotionPane:has(#p72Workspace:not([hidden])) > .mathmotion-header p{display:none;}
#workspace.layout-mathmotion #p72Workspace:not([hidden]){
  box-sizing:border-box!important;width:100%;min-width:0!important;max-width:100%!important;
  max-height:none!important;min-height:0!important;overflow:visible!important;
  padding:10px 12px 16px!important;border-radius:10px!important;
}
#p72Workspace #tvmmViewbar10{
  display:flex;align-items:center;gap:7px;flex-wrap:wrap;
  padding:7px 9px;margin-bottom:9px;border:1px solid #344962;border-radius:9px;
  color:#dce9f7;background:#18253a;font:12px/1.35 system-ui,sans-serif;
}
#p72Workspace #tvmmViewbar10 .tvmm-viewbar-title{font-weight:700;margin-right:5px;}
#p72Workspace #tvmmViewbar10 button{
  border:1px solid #4b647e;border-radius:7px;background:#253751;
  color:#e8f2ff;padding:5px 9px;min-height:29px;cursor:pointer;font:inherit;
}
#p72Workspace #tvmmViewbar10 button:hover,#p72Workspace #tvmmViewbar10 button:focus-visible{border-color:#8db9f5;outline-offset:2px;}
#p72Workspace #tvmmViewbar10 .tvmm-viewbar-hint{margin-left:auto;color:#acbdd4;font-size:11px;}
#workspace.layout-mathmotion #p72Workspace > .p72-toolbar{
  position:sticky;top:0;z-index:8;margin-bottom:9px!important;
  display:flex!important;align-items:center;gap:6px!important;
  padding:7px 9px!important;border:1px solid #344962;border-radius:9px;background:#111c2d!important;
}
#workspace.layout-mathmotion #p72Workspace > .p72-toolbar button{min-height:30px;padding:5px 8px;font-size:11px;}
#workspace.layout-mathmotion #p72Workspace > .p72-toolbar input[type='text']{
  flex:1 1 145px;max-width:230px;min-width:100px;
}
#workspace.layout-mathmotion #p72Workspace > #p793Status{
  position:static!important;display:block!important;z-index:auto!important;
  font-size:11px!important;line-height:1.3!important;padding:7px 9px!important;
  margin:0 0 9px!important;max-height:94px;overflow-y:auto;
}
#workspace.layout-mathmotion #p72Workspace > .p72-main{
  display:grid!important;
  grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr)!important;
  align-items:start!important;gap:10px!important;min-width:0!important;margin:0!important;
}
#workspace.layout-mathmotion #p72Workspace .p72-main > .p72-card{
  min-width:0!important;max-width:100%;box-sizing:border-box;
  padding:11px!important;border-radius:9px!important;
}
#workspace.layout-mathmotion #p72Workspace .p72-main > .tvmm-asset-panel{
  max-height:min(66vh,650px)!important;overflow-y:auto!important;
  overscroll-behavior:contain;scrollbar-gutter:stable;
}
#workspace.layout-mathmotion #p72Workspace .p72-main > .p72-preview{
  min-width:0!important;position:sticky;top:65px;align-self:start;
}
#workspace.layout-mathmotion #p72Workspace .p72-main > .p72-preview video{
  width:100%!important;max-width:100%;max-height:min(43vh,450px)!important;
  aspect-ratio:16/9;object-fit:contain;
}
#workspace.layout-mathmotion #p72Workspace .p72-main > #p72Inspector{
  min-width:0!important;min-height:245px!important;max-height:min(66vh,650px)!important;
  overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
#workspace.layout-mathmotion #p72Workspace:not(.tvmm-assets-collapsed) > .p72-main{
  grid-template-columns:minmax(185px,.65fr) minmax(290px,1.25fr) minmax(260px,.95fr)!important;
}
#workspace.layout-mathmotion #p72Workspace.tvmm-assets-collapsed .p72-main > .tvmm-asset-panel{display:none!important;}
#workspace.layout-mathmotion #p72Workspace.tvmm-inspector-collapsed .p72-main > #p72Inspector{display:none!important;}
#workspace.layout-mathmotion #p72Workspace.tvmm-inspector-collapsed.tvmm-assets-collapsed > .p72-main{grid-template-columns:minmax(0,1fr)!important;}
#workspace.layout-mathmotion #p72Workspace.tvmm-inspector-collapsed:not(.tvmm-assets-collapsed) > .p72-main{
  grid-template-columns:minmax(185px,.55fr) minmax(0,1.45fr)!important;
}
#workspace.layout-mathmotion #p72Workspace > .p72-bottom{
  box-sizing:border-box;min-width:0!important;margin:11px 0 0!important;
  padding:11px!important;border-radius:9px!important;scroll-margin-top:54px;
}
#workspace.layout-mathmotion #p72Workspace #p72Timeline,
#workspace.layout-mathmotion #p72Workspace .p72-track{
  min-width:0!important;max-width:100%!important;
}
#workspace.layout-mathmotion #p72Workspace .p72-track{
  display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;
  scrollbar-width:auto!important;scrollbar-gutter:stable;padding-bottom:15px!important;
}
#workspace.layout-mathmotion #p72Workspace .p72-clip{flex:0 0 auto!important;max-width:270px;}
#workspace.layout-mathmotion #p72Workspace .p72-docks{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important;margin-top:10px!important;
}
#workspace.layout-mathmotion #p72Workspace .p72-docks > .p72-card{min-width:0!important;}
#workspace.layout-mathmotion #p72Workspace .p72-assets{max-height:min(38vh,380px)!important;overflow:auto!important;}
#workspace.layout-mathmotion #p72Workspace #p72Inspector :is(input,textarea,select){max-width:100%;box-sizing:border-box;}
#workspace.layout-mathmotion #p72Workspace:fullscreen{
  padding:12px!important;height:100dvh!important;overflow-y:auto!important;
}
@media(max-width:1150px){
 #workspace.layout-mathmotion #p72Workspace:not(.tvmm-assets-collapsed) > .p72-main{
  grid-template-columns:minmax(190px,.5fr) minmax(0,1fr)!important;
 }
 #workspace.layout-mathmotion #p72Workspace:not(.tvmm-assets-collapsed) > .p72-main > #p72Inspector{grid-column:1/-1;}
}
@media(max-width:820px){
 #workspace.layout-mathmotion #p72Workspace > .p72-main,
 #workspace.layout-mathmotion #p72Workspace:not(.tvmm-assets-collapsed) > .p72-main,
 #workspace.layout-mathmotion #p72Workspace.tvmm-inspector-collapsed:not(.tvmm-assets-collapsed) > .p72-main{
  grid-template-columns:minmax(0,1fr)!important;
 }
 #workspace.layout-mathmotion #p72Workspace .p72-main > .p72-preview{position:static;top:auto;}
 #workspace.layout-mathmotion #p72Workspace .p72-main > #p72Inspector{grid-column:auto!important;max-height:360px!important;}
 #workspace.layout-mathmotion #p72Workspace .p72-main > .tvmm-asset-panel{max-height:360px!important;}
 #workspace.layout-mathmotion #p72Workspace .p72-docks{grid-template-columns:minmax(0,1fr)!important;}
 #workspace.layout-mathmotion #mathmotionPane > .mathmotion-header{flex-direction:row!important;}
 #p72Workspace #tvmmViewbar10 .tvmm-viewbar-hint{display:none;}
}
/* TVO MATHMOTION V2 COMPACT 1.0 END */

/* TVO STEM LEARNING ORBITAL 1.0 BEGIN */
/* Scoped to STEM Learning Studio: preserve Research overlays, lessons, journal, editor and motion workspaces. */
body.tv-utility-ui #tutorialPane { min-width:0; background:linear-gradient(160deg,#eff4f9 0%,#f6f8fc 75%,#eef3fa 100%); }
body.tv-utility-ui #tutorialPane > .tutorial-header { border-bottom:1px solid #25415c; padding:11px 19px; gap:10px; }
body.tv-utility-ui #tutorialPane > .tutorial-header h1 { font-size:clamp(19px,2vw,25px); }
body.tv-utility-ui #tutorialPane > .tutorial-header p { font-size:11px; max-width:620px; }
body.tv-utility-ui #tutorialPane .tutorial-header-tools { gap:5px; }
body.tv-utility-ui #tutorialPane .tutorial-research-launch { padding:5px 9px; }
body.tv-utility-ui #tutorialPane .tvo-stem-hub { --stem-text:#172b44; color:var(--stem-text); margin:12px 16px 8px; min-width:0; isolation:isolate; box-sizing:border-box; }
body.tv-utility-ui #tutorialPane .tvo-stem-hub * {box-sizing:border-box;}
body.tv-utility-ui #tutorialPane .stem-orbit-hero {position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,34%);min-height:234px;overflow:hidden;border-radius:18px;border:1px solid #315271;box-shadow:0 16px 35px #19324d18;background:radial-gradient(circle at 82% 52%,#26537b 0%,#102b49 27%,#0d1a32 74%),linear-gradient(125deg,#162f55,#0a1328);color:#f7fbff;}
body.tv-utility-ui #tutorialPane .stem-orbit-hero::before {content:"";position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(#bddbff70 1px,transparent 1.3px),radial-gradient(#dee9ff67 1px,transparent 1.2px);background-size:61px 51px,113px 91px;background-position:15px 9px,39px 31px;opacity:.44;}
body.tv-utility-ui #tutorialPane .stem-orbit-copy {position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;gap:9px;padding:28px clamp(20px,3.4vw,43px);min-width:0;}
body.tv-utility-ui #tutorialPane .stem-kicker {font:700 10px/1.2 system-ui;letter-spacing:.17em;text-transform:uppercase;color:#b6dbff;}
body.tv-utility-ui #tutorialPane .stem-orbit-copy h2 {font:500 clamp(22px,2.65vw,36px)/1.12 Georgia,serif;letter-spacing:-.02em;margin:0;color:#fbfdff;max-width:650px;}
body.tv-utility-ui #tutorialPane .stem-orbit-copy p {font:13px/1.6 system-ui;margin:0;color:#cfdef2;max-width:570px;}
body.tv-utility-ui #tutorialPane .stem-hero-actions {display:flex;gap:8px;flex-wrap:wrap;margin-top:6px;}
body.tv-utility-ui #tutorialPane .stem-orbit-sky {position:relative;z-index:1;overflow:hidden;display:grid;place-items:center;min-height:210px;filter:drop-shadow(0 0 18px #69baff32);}
body.tv-utility-ui #tutorialPane .stem-orbit-sky::after {content:"";position:absolute;width:14%;aspect-ratio:1;border-radius:50%;background:#b5deff24;box-shadow:0 0 85px 32px #64acf93a;}
body.tv-utility-ui #tutorialPane .stem-orbit-center {position:relative;z-index:2;display:grid;place-items:center;width:70px;height:70px;border-radius:50%;border:1px solid #93cfff7d;background:radial-gradient(circle,#326a97aa,#102841);box-shadow:0 0 46px #8ac8ff50,inset 0 0 21px #84cbf43d;color:#ddf2ff;font:56px Georgia,serif;}
body.tv-utility-ui #tutorialPane .stem-orbit-band {position:absolute;left:50%;top:50%;width:min(94%,370px);aspect-ratio:1;border:1px solid #c0deff32;border-radius:50%;--tilt:60deg;transform:translate(-50%,-50%) rotate(var(--tilt));animation:stem-orbital-sky var(--duration,40s) linear infinite;pointer-events:none;}
body.tv-utility-ui #tutorialPane .stem-orbit-band.orbit-1 {width:min(74%,300px);--tilt:10deg;border-color:#88d5f23c;animation-direction:reverse;}
body.tv-utility-ui #tutorialPane .stem-orbit-band.orbit-2 {width:min(58%,230px);--tilt:-28deg;border-color:#fcdd956b;}
body.tv-utility-ui #tutorialPane .stem-orbit-band.orbit-3 {width:min(89%,345px);--tilt:89deg;animation-direction:reverse;}
body.tv-utility-ui #tutorialPane .stem-orbit-symbol {position:absolute;left:50%;top:0;transform:translate(-50%,-50%) rotate(calc(-1 * var(--phase)));background:#123657e8;border:1px solid #609ec56e;color:#dcf6ff;border-radius:999px;padding:4px 8px;font:15px/1.1 Georgia,serif;white-space:nowrap;box-shadow:0 0 19px #85c4ff30;}
@keyframes stem-orbital-sky {from{transform:translate(-50%,-50%) rotate(var(--tilt));}to{transform:translate(-50%,-50%) rotate(calc(var(--tilt) + 360deg));}}
body.tv-utility-ui #tutorialPane .stem-motion-paused .stem-orbit-band {animation-play-state:paused!important;}
body.tv-utility-ui #tutorialPane .stem-start-body {padding:15px 4px 3px;}
body.tv-utility-ui #tutorialPane .stem-start-intro {margin:0 8px 12px;display:block;}
body.tv-utility-ui #tutorialPane .stem-eyebrow {font:700 10px/1.2 system-ui;letter-spacing:.14em;color:#4e6683;}
body.tv-utility-ui #tutorialPane .stem-start-intro h3 {font:500 21px/1.3 Georgia,serif;color:#19314e;margin:5px 0 0;}
body.tv-utility-ui #tutorialPane .stem-route-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
body.tv-utility-ui #tutorialPane button.stem-route {display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:4px 11px;text-align:left;padding:14px;border:1px solid #cfdae8;border-radius:14px;background:#fff;color:#19334e;box-shadow:0 4px 13px #1b304510;min-height:105px;white-space:normal;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;}
body.tv-utility-ui #tutorialPane button.stem-route:hover {transform:translateY(-2px);border-color:#72a5d5;box-shadow:0 9px 23px #1742701b;}
body.tv-utility-ui #tutorialPane button.stem-route.is-active {border-color:#4a8ab8;box-shadow:0 0 0 2px #8ebbe646,0 5px 18px #1b304512;background:linear-gradient(135deg,#f4faff,#fff);}
body.tv-utility-ui #tutorialPane .stem-route-icon {grid-row:span 3;display:grid;place-items:center;background:#e6f1fb;border:1px solid #c5def2;border-radius:12px;width:44px;height:47px;font:700 18px Georgia,serif;color:#1c628f;}
body.tv-utility-ui #tutorialPane .stem-route strong {font-size:14px;line-height:1.3;}
body.tv-utility-ui #tutorialPane .stem-route small {font-size:11px;color:#58708b;line-height:1.3;}
body.tv-utility-ui #tutorialPane .stem-route-arrow {font-size:11px;color:#226492;font-weight:700;}
body.tv-utility-ui #tutorialPane .stem-starter-work {display:grid;grid-template-columns:minmax(265px,.8fr) minmax(0,1.2fr);gap:12px;margin:14px 0 0;align-items:stretch;}
body.tv-utility-ui #tutorialPane .stem-steps,body.tv-utility-ui #tutorialPane .stem-code-card {min-width:0;border:1px solid #d2dfec;border-radius:15px;background:#fff;box-shadow:0 5px 18px #12294410;overflow:hidden;}
body.tv-utility-ui #tutorialPane .stem-steps {padding:17px 18px;}
body.tv-utility-ui #tutorialPane .stem-work-title {color:#1c3655;font:500 20px Georgia,serif;margin:7px 0;}
body.tv-utility-ui #tutorialPane .stem-work-summary {color:#4d667f;font-size:12px;margin:0 0 13px;line-height:1.45;}
body.tv-utility-ui #tutorialPane .stem-steps-list {margin:0 0 14px;padding-left:23px;display:grid;gap:10px;color:#263f58;font:12px/1.5 system-ui;}
body.tv-utility-ui #tutorialPane .stem-steps-list li::marker {color:#2379ab;font-weight:700;}
body.tv-utility-ui #tutorialPane .stem-work-actions {display:flex;gap:7px;flex-wrap:wrap;}
body.tv-utility-ui #tutorialPane .stem-code-card {display:flex;flex-direction:column;background:#0d1b2e;color:#edf5ff;border-color:#2b4b69;min-height:330px;}
body.tv-utility-ui #tutorialPane .stem-code-head {display:flex;align-items:center;justify-content:space-between;padding:9px 13px;gap:12px;color:#adcee8;font:700 10px system-ui;letter-spacing:.12em;}
body.tv-utility-ui #tutorialPane .stem-code-textarea {width:100%;min-height:240px;flex:1;resize:vertical;box-sizing:border-box;border:0;border-top:1px solid #2a465f;border-bottom:1px solid #2a465f;background:#0b1727;color:#e2f1ff;outline-offset:-2px;padding:14px;font:12px/1.6 ui-monospace,Consolas,monospace;tab-size:2;}
body.tv-utility-ui #tutorialPane .stem-code-note {color:#a9bdd1;margin:8px 13px 12px;font:11px/1.45 system-ui;}
body.tv-utility-ui #tutorialPane button.stem-primary,body.tv-utility-ui #tutorialPane button.stem-secondary {font:600 11px/1.3 system-ui;border-radius:8px;min-height:33px;padding:7px 11px;cursor:pointer;}
body.tv-utility-ui #tutorialPane button.stem-primary {background:#1b6a99;color:#fff;border:1px solid #367eae;}
body.tv-utility-ui #tutorialPane button.stem-secondary {background:#f4f8fd;color:#1e4d77;border:1px solid #b8cddd;}
body.tv-utility-ui #tutorialPane .stem-orbit-hero button.stem-secondary,body.tv-utility-ui #tutorialPane .stem-code-card button.stem-secondary {background:#1d3d5c;color:#e1f3ff;border:1px solid #47718f;}
body.tv-utility-ui #tutorialPane #stemHubStatus10 {padding:9px 12px;margin:11px 0 0;color:#345574;background:#e8f1f9;border-left:3px solid #6ca7cd;border-radius:7px;font:12px/1.4 system-ui;}
body.tv-utility-ui #tutorialPane #stemHubStatus10.stem-error {border-color:#c47158;background:#fff4ef;color:#943b2e;}
body.tv-utility-ui #tutorialPane #tvLearnNav {scroll-margin-top:16px;}
body.tv-utility-ui #tutorialPane .tvo-stem-hub button:focus-visible,body.tv-utility-ui #tutorialPane .tvo-stem-hub textarea:focus-visible {outline:3px solid #77b9f2;outline-offset:2px;}
body.tv-utility-ui #tutorialPane.tv-research-open #tvoStemHub10 {display:none!important;}
@media(max-width:1000px){body.tv-utility-ui #tutorialPane .stem-orbit-hero {grid-template-columns:minmax(0,1fr) minmax(170px,30%);}body.tv-utility-ui #tutorialPane .stem-orbit-copy{padding:24px;}body.tv-utility-ui #tutorialPane .stem-starter-work{grid-template-columns:1fr;}body.tv-utility-ui #tutorialPane .stem-code-card{min-height:290px;}}
@media(max-width:700px){body.tv-utility-ui #tutorialPane .tvo-stem-hub{margin:8px;}body.tv-utility-ui #tutorialPane .stem-orbit-hero{display:block;min-height:240px;}body.tv-utility-ui #tutorialPane .stem-orbit-copy{padding:23px 20px;background:#0c1c31b8;}body.tv-utility-ui #tutorialPane .stem-orbit-sky{position:absolute;right:-80px;top:0;bottom:0;width:250px;opacity:.22;}body.tv-utility-ui #tutorialPane .stem-route-cards{grid-template-columns:minmax(0,1fr);}body.tv-utility-ui #tutorialPane button.stem-route{min-height:85px;}body.tv-utility-ui #tutorialPane .stem-starter-work{display:block;}body.tv-utility-ui #tutorialPane .stem-code-card{margin-top:12px;}body.tv-utility-ui #tutorialPane .stem-orbit-copy h2{font-size:26px;}}
@media(prefers-reduced-motion:reduce){body.tv-utility-ui #tutorialPane .stem-orbit-band{animation:none!important;}body.tv-utility-ui #tutorialPane button.stem-route{transition:none!important;transform:none!important;}}
/* TVO STEM LEARNING ORBITAL 1.0 END */

/* TVO RESEARCH HEADER RESTORE 1.0 BEGIN */
/* Keep Research in the actual top-level workspace navigation. All other tabs
   retain their current compact/symbol-only behavior. */
header.topbar .workspace-tabs > #tvResearchTab {
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  position:relative!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:94px!important;
  max-width:none!important;
  height:34px!important;
  min-height:34px!important;
  box-sizing:border-box!important;
  padding:0 10px!important;
  gap:6px!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  border-bottom:2px solid #67a8d6!important;
}
/* Override only the accessibility-preserving, icon-only display rule on this tab. */
body header.topbar .workspace-tabs > #tvResearchTab .tab-label,
body header.topbar .workspace-tabs > button#tvResearchTab[data-tvo-symbol-only="true"] .tab-label {
  display:inline!important;
  position:static!important;
  width:auto!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  clip:auto!important;
  clip-path:none!important;
  overflow:visible!important;
  font:600 11px/1.1 system-ui,sans-serif!important;
  white-space:nowrap!important;
}
header.topbar .workspace-tabs > #tvResearchTab .tab-symbol { display:inline-flex!important; align-items:center; justify-content:center; width:16px!important; min-width:16px!important; height:17px!important; max-width:16px!important; }
header.topbar .workspace-tabs > #tvResearchTab .tab-symbol svg { width:16px!important;height:16px!important; }
header.topbar .workspace-tabs > #tvResearchTab[aria-pressed="true"] { background:#24597b!important; color:#fff!important; border-color:#9bd7ff!important; }
header.topbar .workspace-tabs > #tvResearchTab:focus-visible { outline:2px solid #a1ddff!important;outline-offset:2px!important; }
@media(max-width:680px) { header.topbar .workspace-tabs > #tvResearchTab{min-width:87px!important;padding-inline:7px!important;} }
/* TVO RESEARCH HEADER RESTORE 1.0 END */

