:root {
  color-scheme: light;
  --canvas: #f5f5f7;
  --surface: #fff;
  --raised: #f5f5f7;
  --hover: #f0f0f2;
  --selected: #e9e9ec;
  --ink: #111111;
  --muted: #666666;
  --quiet: #8e8e93;
  --line: #e5e5e7;
  --control: #d1d1d1;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --round-small: .5rem;
  --round-control: .6875rem;
  --round-panel: .9375rem;
  --round-window: 1.1875rem;
  --float-shadow: 0 14px 48px rgb(17 17 17 / .12), 0 2px 6px rgb(17 17 17 / .05);
  --hit: 2.25rem;
  --hit-compact: 2rem;
  --type-ui: .8125rem;
  --type-meta: .75rem;
  --type-body: .9375rem;
  --stroke-icon: 1.5;
  accent-color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 3.4rem;
  padding: var(--space-1) clamp(1rem, 3vw, 2.5rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 750; font-size: 1.72rem; letter-spacing: -.08em; line-height: 1; padding-right: .08em; }
.brand span { display: inline-block; animation: ring 4s ease-in-out 1; }
.brand span + span { animation-delay: .12s; }
@keyframes ring { 0%, 8%, 25%, 100% { transform: none; } 16% { transform: translateY(-.07em) rotate(-9deg); } }
@media (prefers-reduced-motion: reduce) { .brand span { animation: none; } }
#account { display: flex; gap: var(--space-1); align-items: center; min-width: 0; font-size: .83rem; }
.account-name { margin-inline-end: .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#notice { width: max-content; max-width: min(42rem, calc(100% - 2rem)); padding: .45rem .8rem; margin: .65rem auto 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--round-control);
  font-size: .86rem; overflow-wrap: anywhere; }
#notice.error { border-color: var(--ink); }
main { max-width: 106rem; padding: clamp(1rem, 2.35vw, 2.5rem); margin: 0 auto; }
.workspace { display: grid; grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr); gap: clamp(1rem, 2vw, 1.7rem); align-items: start; }
.stack { display: grid; gap: var(--space-4); min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--round-panel);
  padding: clamp(1rem, 2vw, 1.45rem); min-width: 0; }
.access { max-width: 27rem; margin: min(10vh, 5.25rem) auto; }
.access.panel, .access > .panel { padding: clamp(1.3rem, 4vw, 2rem); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 2.65vw, 2.45rem); line-height: 1.1; letter-spacing: -.045em; text-wrap: balance;
  overflow-wrap: anywhere; }
h1, h2, h3 { font-weight: 620; }
h2 { font-size: 1.3125rem; letter-spacing: -.025em; overflow-wrap: anywhere; }
h3 { font-size: 1.03125rem; letter-spacing: -.012em; overflow-wrap: anywhere; }
p { overflow-wrap: anywhere; white-space: pre-wrap; }
small, .muted { color: var(--muted); font-size: .82rem; }
form { display: grid; gap: var(--space-3); min-width: 0; }
.form-feedback { padding: .55rem .65rem; background: var(--raised); border-radius: var(--round-control); font-size: .86rem; }
label { display: grid; gap: var(--space-1); min-width: 0; font-size: var(--type-ui); font-weight: 530; }
input, select, textarea, button { font: inherit; }
input, textarea, select { padding: .48rem .6rem; border: 1px solid var(--control); border-radius: var(--round-control);
  min-width: 0; width: 100%; max-width: 100%; color: inherit; background: var(--surface); }
textarea { resize: vertical; min-height: 4.5rem; }
button, .button { min-block-size: var(--hit); padding: .35rem .65rem; background: var(--surface);
  border: 1px solid var(--control); border-radius: var(--round-control); color: inherit; cursor: pointer;
  justify-self: start; font-size: var(--type-ui); font-weight: 530; white-space: nowrap; }
button:hover { background: var(--hover); }
button:disabled { cursor: default; opacity: .42; }
button.primary { color: var(--surface); background: var(--ink); border-color: var(--ink); }
button.primary:hover { background: #444; }
:focus-visible { outline: 2px solid #4f4f4f; outline-offset: 3px; }
.icon { width: 1.125rem; height: 1.125rem; flex: none; fill: none; stroke: currentColor; stroke-width: var(--stroke-icon);
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.icon-button, .icon-label { display: inline-flex; align-items: center; justify-content: center; min-block-size: var(--hit);
  gap: .4rem; position: relative; white-space: nowrap; }
.icon-button { width: var(--hit); flex: 0 0 var(--hit); padding: 0; border-color: transparent; background: transparent; }
summary:is(.icon-button, .icon-label) { list-style: none; cursor: pointer; }
summary:is(.icon-button, .icon-label)::-webkit-details-marker { display: none; }
summary.icon-button:hover { background: var(--hover); border-radius: var(--round-control); }
.icon-button:is([aria-pressed="true"], [aria-expanded="true"]), .icon-label[aria-pressed="true"] { background: var(--hover); }
.icon-button:disabled:hover { background: transparent; }
.links { display: grid; gap: .35rem; }
.links button { width: 100%; text-align: left; white-space: normal; border-color: transparent; overflow-wrap: anywhere; }
.links button[aria-current="true"] { background: var(--raised); font-weight: 680; }
.list { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.list > li { display: flex; justify-content: space-between; align-items: center; gap: .65rem; min-width: 0; flex-wrap: wrap; padding: .64rem 0; border-top: 1px solid #e5e5e5; }
.list a { color: #161616; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.row select { width: auto; }
.check { display: flex; align-items: start; gap: .55rem; font-weight: normal; overflow-wrap: anywhere; }
.check input { width: auto; margin-top: .35rem; flex: none; }
fieldset { display: grid; gap: .5rem; min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--round-control); }
.threads { max-height: min(29rem, 50vh); overflow: auto; overscroll-behavior: contain; }
.threads article { margin: 0; border-bottom: 1px solid var(--line); padding: .6rem .25rem .7rem; }
.threads article:last-child { border-bottom: 0; }
.threads article p { margin-top: .18rem; }
details > summary { cursor: pointer; font-weight: 570; }
details > summary:not(.icon-button,.icon-label) { list-style: none; padding-block: .25rem; }
details > summary:not(.icon-button,.icon-label)::-webkit-details-marker { display: none; }
details > summary:not(.icon-button,.icon-label)::before { content: ''; display: inline-block; inline-size: .38rem; block-size: .38rem;
  margin-inline: .2rem .56rem; border-inline-end: 1.5px solid; border-block-end: 1.5px solid;
  vertical-align: .13em; transform: rotate(-45deg); transition: transform .14s ease; }
details[open] > summary:not(.icon-button,.icon-label)::before { transform: translateY(-.12rem) rotate(45deg); }
@media (prefers-reduced-motion: reduce) { details > summary:not(.icon-button,.icon-label)::before { transition: none; } }
details form { margin-top: var(--space-3); }
.time-machine > p { margin-top: .75rem; }
.timeline { list-style: none; padding: 0 0 0 .7rem; margin: .9rem 0 0 .3rem; border-left: 1px solid #ccc; }
.timeline li + li { margin-top: .3rem; }
.timeline a { display: grid; position: relative; gap: .12rem; padding: .45rem .55rem; color: inherit;
  border-radius: var(--round-control); text-decoration: none; overflow-wrap: anywhere; font-size: .88rem; }
.timeline :is(li,a,strong,small) { min-inline-size: 0; max-inline-size: 100%; }
.timeline a::before { content: ''; position: absolute; left: -1.02rem; top: .95rem;
  width: .48rem; height: .48rem; background: #fff; border: 1px solid #555; border-radius: 50%; }
.timeline a:hover, .timeline a[aria-current="true"] { background: var(--hover); }
.timeline a[aria-current="true"]::before { background: #262626; }
.project-stand { scroll-margin-top: 1rem; padding: clamp(1.2rem, 3vw, 2.35rem); }
.project-stand h2 { overflow-wrap: anywhere; }
.project-stand > a { color: inherit; justify-self: start; }
.chat-content { margin-top: var(--space-3); gap: var(--space-3); }
.chat-content > [role="status"]:empty { display: none; }
.chat-switch { display: flex; gap: .2rem; align-items: center; padding: .2rem; background: var(--raised);
  border-radius: .8rem; justify-self: start; }
.chat-switch [aria-pressed="true"] { background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.chat-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.4rem), 1fr)); gap: var(--space-2); }
.chat-person { width: 100%; display: grid; gap: .35rem; justify-items: center; overflow-wrap: anywhere;
  border-color: var(--line); white-space: normal; }
.chat-person[aria-current="true"] { background: var(--raised); border-color: var(--control); }
.group-person { border: 1px solid var(--line); border-radius: var(--round-control); padding: .55rem; cursor: pointer; }
.group-person:has(input:checked) { background: var(--raised); border-color: var(--muted); }
.group-person input { width: auto; margin: 0; accent-color: var(--ink); }
.chat-avatar { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--raised); color: var(--ink); font-size: .83rem; font-weight: 650; }
.chat-dialog { border-top: 1px solid var(--line); padding-top: var(--space-3); min-width: 0; gap: var(--space-2); }
.chat-dialog h3 { overflow-wrap: anywhere; }
.chat-composer { border: 1px solid var(--control); border-radius: 1rem; padding: .33rem; gap: .24rem; background: var(--surface); }
.chat-composer textarea { padding: .55rem .65rem; border: 0; background: transparent; resize: vertical; min-height: 3.2rem; }
.chat-composer textarea::placeholder { color: var(--muted); opacity: 1; }
.chat-composer .list:empty { display: none; }
.composer-actions { display: flex; gap: .1rem; align-items: center; }
.composer-actions [type="submit"] { margin-inline-start: auto; border-radius: 100%; }
.reference-picker .reference-content { padding: .35rem .55rem .55rem; margin: 0; }
.chat-composer [aria-label="Ausgewählte Anhänge"] { overflow-wrap: anywhere; }
.chat-attachments { display: grid; gap: .4rem; margin-top: .5rem; }
.chat-attachment { display: grid; gap: .2rem; padding: .55rem; border: 1px solid #ccc; border-radius: .5rem;
  background: #fff; color: inherit; overflow-wrap: anywhere; }
.chat-attachment img { display: block; max-width: 100%; max-height: 12rem; object-fit: contain; border-radius: .3rem; }
.reference-details { flex: 1 0 100%; }
.reference-details summary { font-size: .88rem; }
.reference-content { margin: .65rem 0 0; }
.reference-content a { color: inherit; overflow-wrap: anywhere; }
.reference-source { display: grid; gap: .2rem; padding: .5rem .65rem; border: 1px solid #dedede; border-radius: .5rem; }
.published-block { gap: .55rem; scroll-margin-block: .75rem; }
.published-block > .reference-details { justify-self: start; max-width: 100%; }
.published-block > .reference-details > summary { color: var(--muted); font-size: .8rem; font-weight: 560; }
.published-block > .reference-details:open > summary,
.published-block > .reference-details > summary:hover { color: var(--ink); }
.published-block.study-reference-target { outline: 2px solid #555; outline-offset: .35rem; border-radius: .2rem; }
.message-references { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .55rem; }
.message-references a { color: inherit; background: #fff; border: 1px solid #ccc; border-radius: .4rem;
  padding: .15rem .45rem; overflow-wrap: anywhere; font-size: .88rem; }
.referenced-message { outline: 2px solid #555; outline-offset: -2px; }
[data-document]:focus { outline: 2px solid #555; outline-offset: 2px; }
.study-published { gap: clamp(1.3rem, 3vw, 2.25rem); }
.study-block-rendered { margin: 0; min-width: 0; }
.study-title { font-size: clamp(1.5rem, 3.4vw, 2.55rem); white-space: pre-wrap; line-height: 1.13; letter-spacing: -.04em; }
.study-subtitle { color: #555; font-size: 1.08rem; }
.study-text { display: grid; gap: .7rem; }
.study-text :is(ul, ol) { margin: 0; padding-inline-start: 1.7rem; }
.study-block-rendered img { display: block; max-width: 100%; max-height: 65vh; object-fit: contain; }
.study-block-rendered figcaption { color: #555; font-size: .9rem; margin-top: .35rem; overflow-wrap: anywhere; }
.study-editor-body { margin-top: var(--space-3); }
.study-edit-controls { border: 0; padding: 0; }
.study-canvas { gap: 0; }
.study-drop { min-height: 1rem; display: grid; align-items: center; border-radius: .35rem; }
.study-drop::before { content: ''; display: block; height: 2px; margin-inline: .25rem; border-radius: 1rem; }
.study-canvas[data-dragging] .study-drop { background: var(--canvas); }
.study-canvas[data-dragging] .study-drop::before { background: var(--control); }
.study-canvas[data-dragging] .study-drop.drag-over::before { background: var(--ink); height: 3px; }
.study-canvas[data-dragging] .study-drop:only-child { min-height: 2.5rem; }
.study-block-editor { border: 1px solid var(--line); border-radius: .85rem; padding: .7rem; gap: .4rem; }
.study-block-editor:has(.block-fields[open]) { border-color: var(--control); }
.block-top { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.block-top h3 { margin-inline-end: auto; color: var(--muted); }
.study-block-preview { padding: .35rem .2rem; min-width: 0; }
.study-move { display: inline-grid; place-items: center; min-width: var(--hit); min-height: var(--hit);
  cursor: grab; color: var(--muted); }
.study-move:active { cursor: grabbing; }
.block-menu { position: relative; }
.block-menu-actions { position: absolute; z-index: 2; right: 0; width: max-content; padding: .3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; box-shadow: var(--float-shadow); gap: .15rem; }
.block-menu-actions button { width: 100%; justify-content: flex-start; border-color: transparent; }
.block-fields summary { padding: 0 .35rem; color: var(--muted); font-size: .82rem; }
.block-fields[open] summary { color: var(--ink); }
.block-settings { margin-top: .45rem; }
.draft-save { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.study-draft-actions { border-top: 1px solid var(--line); padding-top: .65rem; }
.study-toolbox, .editor-tools { display: flex; align-items: center; gap: var(--space-1); }
.editor-tools { max-width: 100%; padding: .15rem; }
.study-toolbox button { justify-content: flex-start; }
.study-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .55rem; }
.study-media-grid button { width: 100%; white-space: normal; overflow-wrap: anywhere; }
.study-media-grid button[aria-pressed="true"] { background: #eee; border-color: #222; }
.study-media-grid img { display: block; width: 100%; height: 5rem; object-fit: contain; margin-bottom: .4rem; }
.study-editor[open] ~ .panel { display: none; }
.study-tile-row { --tile-columns: 1; --tile-gap: .8rem; display: grid;
  grid-template-columns: repeat(var(--tile-columns), minmax(0, 1fr)); gap: var(--tile-gap);
  container-type: inline-size; align-items: start; }
.study-tile-row[data-columns="2"] { --tile-columns: 2; }
.study-tile-row[data-columns="3"] { --tile-columns: 3; }
.study-tile { background: #eee; border: 1px solid #ddd; border-radius: .55rem; padding: .8rem; gap: .45rem; }
.study-tile[data-style="metric"] { background: #e5e5e5; }
.study-tile[data-style="highlight"] { background: #ddd; border-color: #999; }
.study-tile[data-style="assessment"] { background: #f5f5f5; border-inline-start: .25rem solid #666; }
.study-tile[data-style="recommendation"] { background: #f5f5f5; border-block-start: .25rem solid #222; }
.study-tile[data-transparent="true"] { background: transparent; border: 0; border-radius: 0; padding: 0; }
.study-tile figure { margin: 0; min-width: 0; }
.study-tile-eyebrow { font-size: .78rem; }
.study-tile-heading { font-weight: 700; }
.study-tile:is([data-style="metric"], [data-style="highlight"]) > .study-tile-heading {
  font-size: clamp(1.2rem, 3vw, 1.7rem); line-height: 1.1;
}
.study-tile-picture { position: relative; aspect-ratio: var(--tile-ratio, 1.5); }
@container (inline-size > 0px) {
  .study-tile-picture { block-size: calc((100cqi - (var(--tile-columns) - 1) * var(--tile-gap)) /
    var(--tile-columns) / var(--tile-ratio, 1.5)); }
}
.study-tile-picture img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; max-height: none; }
.study-tile-picture[data-fit="contain"] img { object-fit: contain; }
.study-tile-picture[data-position="top"] img { object-position: center top; }
.study-tile-picture[data-position="bottom"] img { object-position: center bottom; }
.tile-editor { padding: .55rem .7rem; border: 1px solid #ddd; border-radius: .5rem; }
.tile-editor-fields { margin-top: .6rem; gap: .65rem; }
.study-tabular { display: grid; gap: .55rem; }
.study-table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; overscroll-behavior-inline: contain; }
.study-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .93rem; }
.study-table caption { caption-side: bottom; text-align: start; padding-top: .45rem; color: #555; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.study-table :is(th, td) { border: 1px solid #ccc; padding: .45rem .55rem; vertical-align: top;
  text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.study-table thead th { background: #eee; }
.study-table [data-align="center"] { text-align: center; }
.study-table [data-align="right"] { text-align: right; }
.editor-table :is(th, td) { padding: .25rem; }
.editor-table :is(thead th:first-child, tbody th) { width: 2.5rem; text-align: center; }
.editor-table textarea { display: block; min-height: 3.3rem; padding: .3rem .35rem; text-align: inherit; }
.editor-table textarea:is([data-marks="1"], [data-marks="3"]) { font-weight: 650; }
.editor-table textarea:is([data-marks="2"], [data-marks="3"]) { font-style: italic; }
.editor-tools button[aria-pressed="true"] { background: var(--raised); border-color: var(--muted); }
.table-column-settings { display: grid; gap: .55rem; margin-block: .55rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
.table-column { padding: .55rem; border: 1px solid #ddd; border-radius: .5rem; gap: .45rem; }
.table-column h4 { margin: 0; }
.table-clipboard { margin-top: .55rem; }
.study-chart { gap: .6rem; }
.study-chart canvas { display: block; width: 100%; height: clamp(13rem, 55vw, 18rem); border: 1px solid #ddd;
  border-radius: .45rem; background: #fff; cursor: pointer; }
.chart-point { min-height: 1.5em; }
.chart-plot { position: relative; min-width: 0; }
.chart-tooltip { position: absolute; max-width: min(16rem,calc(100% - .5rem)); pointer-events: none;
  background: var(--ink); color: var(--surface); border-radius: var(--round-small); padding: .32rem .5rem;
  overflow-wrap: anywhere; font-size: var(--type-meta); box-shadow: 0 3px 12px #1112; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .25rem .95rem; list-style: none; margin: 0;
  padding: 0; font-size: .83rem; }
.chart-legend li { display: flex; gap: .35rem; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.chart-swatch { --swatch: #222; flex: none; width: .8rem; height: .65rem; border-radius: .1rem; background: var(--swatch); }
.chart-swatch[data-series="1"] { --swatch: #656565; }
.chart-swatch[data-series="2"] { --swatch: #909090; }
.chart-swatch[data-series="3"] { --swatch: #b9b9b9; }
.study-chart[data-chart-kind="line"] .chart-swatch { background: transparent; width: 1.1rem; height: 0;
  border-top: 2px solid var(--swatch); }
.study-chart[data-chart-kind="line"] .chart-swatch:is([data-series="1"],[data-series="3"]) { border-top-style: dashed; }
.study-chart[data-chart-kind="line"] .chart-swatch[data-series="2"] { border-top-style: dotted; }
.chart-axis-settings { margin-top: .55rem; gap: .6rem; }
.chart-error { font-size: .9rem; font-weight: 600; border: 1px solid #777; border-radius: .4rem; padding: .45rem .55rem; }
@media (max-width: 600px) {
  .study-tile-row[data-columns] { --tile-columns: 1; }
}
.mobile-only, .mobile-navigation { display: none; }
.project-workspace {
  --left-track: clamp(11.5rem, 16vw, 15.5rem);
  --right-track: clamp(18rem, 25vw, 23rem);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'study';
}
.project-workspace:has(.time-machine[open]) {
  grid-template-columns: var(--left-track) minmax(0, 1fr);
  grid-template-areas: 'history study';
}
.project-workspace:has(.project-chat[open]) {
  grid-template-columns: minmax(0, 1fr) var(--right-track);
  grid-template-areas: 'study conversation';
}
.project-workspace:has(.time-machine[open]):has(.project-chat[open]) {
  grid-template-columns: var(--left-track) minmax(0, 1fr) var(--right-track);
  grid-template-areas: 'history study conversation';
}
.project-workspace > #pane-studie { grid-area: study; width: min(100%, 59rem); justify-self: center; }
.project-workspace > #pane-zeit { grid-area: history; }
.project-workspace > #pane-chat { grid-area: conversation; }
.project-workspace > #pane-zeit,
.project-workspace > #pane-chat { position: sticky; top: 1rem; max-height: calc(100dvh - 2rem); overflow-y: auto; }
.project-workspace > #pane-zeit:not(:has(.time-machine[open])),
.project-workspace > #pane-chat:not(:has(.project-chat[open])) { display: none; }
.project-workspace > #pane-zeit { padding: .75rem .65rem; }
.chat-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--round-panel);
  padding: 1rem; min-width: 0; }
.project-heading { display: flex; justify-content: space-between; align-items: start; gap: var(--space-3);
  padding: .4rem .25rem .15rem; }
.project-intro { min-width: 0; display: grid; gap: var(--space-2); }
.project-intro h1 { text-wrap: wrap; }
.project-intro p { color: var(--muted); max-width: 62ch; }
.project-actions, .panel-switches { display: flex; align-items: center; gap: .18rem; flex: none; }
.project-picker .panel { padding: 0; border: 0; background: none; }
.project-picker .panel > h2 { display: none; }
.study-palette { display: none; }
.tool-area { gap: var(--space-2); }
.study-palette .study-toolbox { flex-direction: column; align-items: stretch; }
.study-palette .study-toolbox button { width: 100%; border-color: transparent; background: transparent; }
.study-palette .study-toolbox button:hover { background: var(--hover); }
.project-workspace:has(#study-tools:not([hidden]) .study-editor[open]) .project-stand { display: none; }
@media (min-width: 901px) {
  .project-workspace:has(#study-tools:not([hidden]) .study-editor[open]) .study-palette:not(:empty) { display: block; }
  .project-workspace:has(#study-tools:not([hidden]) .study-editor[open]) .time-machine:has(+ .study-palette:not(:empty)) {
    display: none;
  }
}

.sheet { width: min(33rem, calc(100% - 2rem)); max-block-size: min(84dvh, 42rem); color: var(--ink);
  background: var(--surface); border: 1px solid var(--control); border-radius: 1.3rem;
  padding: 0; box-shadow: var(--float-shadow); overflow: hidden; }
.sheet.study-media { width: min(43rem, calc(100% - 2rem)); }
.sheet[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.sheet::backdrop { background: rgb(0 0 0 / .24); }
.sheet-header { display: flex; justify-content: space-between; align-items: center; min-width: 0;
  padding: .65rem .85rem .55rem 1.15rem; border-bottom: 1px solid var(--line); }
.sheet-body { min-height: 0; padding: 1rem 1.15rem; overflow: auto; overscroll-behavior: contain; align-content: start; }
.sheet-grip { display: none; }
.sheet-body > :is(form, details) { margin: 0; }
.sheet-body [role="status"]:empty { display: none; }
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .sheet, .mobile-navigation { background: rgb(255 255 255 / .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .sheet, .mobile-navigation { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (pointer: coarse) { :root { --hit: 2.75rem; } }

@media (max-width: 900px), (max-width: 1080px) and (pointer: coarse) {
  body:has(.project-workspace) { display: flex; flex-direction: column; height: 100vh;
    height: min(100dvh, var(--loop-visual-height, 100dvh)); }
  .topbar { flex: none; min-height: 3.25rem; padding-top: max(.25rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
  :root { --hit: 2.75rem; }
  main:has(.project-workspace) { width: 100%; margin: 0; min-height: 0; padding: 0; flex: 1; display: grid;
    grid-template-rows: minmax(0, 1fr) auto; }
  .workspace { grid-template-columns: 1fr; }
  .project-workspace { display: block; overflow-y: auto; padding-block: .8rem 1.15rem;
    padding-inline: max(.85rem, env(safe-area-inset-left)) max(.85rem, env(safe-area-inset-right)); }
  .project-workspace > :is(#pane-zeit, #pane-chat) { position: static; max-height: none; overflow: visible; }
  .project-workspace > :is(#pane-studie, #pane-chat, #pane-zeit) { margin-inline: auto; max-width: 51rem; }
  .project-workspace[data-mobile-pane="chat"] > #pane-chat { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 100%; }
  .project-chat { height: 100%; }
  .chat-content { display: flex; flex-direction: column; min-height: calc(100% - var(--space-3)); }
  .chat-switch { align-self: start; }
  .chat-dialog:not([hidden]) { display: flex; flex-direction: column; flex: 1; }
  .chat-dialog form { margin-top: auto; padding-top: .35rem; }
  .project-workspace .time-machine { display: block !important; }
  .project-workspace .study-palette { display: none !important; }
  .project-workspace[data-mobile-pane="zeit"] > :not(#pane-zeit),
  .project-workspace[data-mobile-pane="studie"] > :not(#pane-studie),
  .project-workspace[data-mobile-pane="chat"] > :not(#pane-chat),
  .project-workspace .desktop-only { display: none; }
  .mobile-only { display: block; }
  .mobile-only.icon-label { display: inline-flex; }
  .mobile-navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem;
    width: min(27rem, calc(100% - 1.5rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
    justify-self: center; margin: .2rem 0 max(.48rem, env(safe-area-inset-bottom)); padding: .26rem;
    border: 1px solid var(--line); border-radius: 1.15rem; box-shadow: 0 3px 18px rgb(0 0 0 / .1); }
  .mobile-navigation button { display: grid; justify-items: center; align-content: center; gap: .1rem; width: 100%;
    min-height: 44px; border-color: transparent; padding: .26rem .1rem; background: none; font-size: .72rem; }
  .mobile-navigation button[aria-current="page"] { background: var(--raised); font-weight: 690; color: var(--ink); }
  .mobile-navigation .icon { width: 1rem; height: 1rem; }
  .project-heading { padding: .1rem 0; }
  .project-stand { padding: clamp(1rem, 3vw, 1.75rem); }
  .study-toolbox { max-width: 100%; padding: .16rem; }
  .study-toolbox > button { width: var(--hit); flex: none; padding: 0; justify-content: center; }
  .study-toolbox > button > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden;
    clip-path: inset(50%); }
  .study-toolbox .block-menu-actions { right: auto; left: 0; }
  .sheet, .sheet.study-media { inset: auto 0 0; width: 100%; max-width: 100%; margin: 0 auto;
    block-size: min(58dvh, var(--loop-visual-height, 100dvh)); max-block-size: 100dvh;
    border-radius: 1.45rem 1.45rem 0 0; transform: translateY(var(--sheet-pull, 0)); }
  .sheet[open] { grid-template-rows: auto auto minmax(0, 1fr); }
  .sheet[data-height="full"] { block-size: min(89dvh, var(--loop-visual-height, 100dvh)); }
  .sheet-grip { display: grid; place-items: center; justify-self: stretch; width: 100%; padding: 0; min-height: 44px;
    border: 0; border-radius: 0; background: transparent; touch-action: none; cursor: ns-resize; }
  .sheet-grip:hover { background: none; }
  .sheet-grip > span { width: 2.45rem; height: .26rem; border-radius: 1rem; background: #929292; }
  .sheet-header { padding: 0 max(.65rem, env(safe-area-inset-right)) .55rem max(1.1rem, env(safe-area-inset-left)); }
  .sheet-body { padding-left: max(1.05rem, env(safe-area-inset-left)); padding-right: max(1.05rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .timeline a { min-height: 44px; }
  .links { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
  input, textarea, select { font-size: 16px; }
}

/* Dossier workspace */
body:has(.project-workspace) { background: #fdfdfd; }
body:has(.project-workspace) .topbar { min-height: 3.15rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { border-radius: .36rem; margin-inline-end: .38rem; }
main:has(.project-workspace) { max-width: none; padding: 0; }
.project-workspace {
  --rail-track: clamp(7.25rem, 11vw, 10.6rem);
  --left-track: clamp(9.5rem, 15.5vw, 14.75rem);
  --right-track: clamp(16rem, 25vw, 25rem);
  gap: 0;
  grid-template-columns: var(--rail-track) minmax(0, 1fr);
  grid-template-areas: 'rail study';
  min-height: calc(100dvh - 3.2rem);
}
.project-workspace:has(.time-machine[open]) {
  grid-template-columns: var(--rail-track) var(--left-track) minmax(0, 1fr);
  grid-template-areas: 'rail history study';
}
.project-workspace:has(.project-chat[open]) {
  grid-template-columns: var(--rail-track) minmax(0, 1fr) var(--right-track);
  grid-template-areas: 'rail study conversation';
}
.project-workspace:has(.time-machine[open]):has(.project-chat[open]) {
  grid-template-columns: var(--rail-track) var(--left-track) minmax(0, 1fr) var(--right-track);
  grid-template-areas: 'rail history study conversation';
}
.workspace-rail { grid-area: rail; position: sticky; top: 0; display: grid; gap: .12rem; padding: .85rem .5rem;
  align-content: start; border-inline-end: 1px solid var(--line); background: #fafafa;
  min-height: calc(100dvh - 3.2rem); min-width: 0; }
.workspace-rail button { width: 100%; justify-content: flex-start; border-color: transparent; background: transparent;
  gap: .4rem; padding-inline: .32rem; font-size: .77rem; font-weight: 520; }
.workspace-rail button:hover { background: var(--raised); }
.workspace-rail .icon { width: 1rem; height: 1rem; }
.project-workspace > #pane-zeit { padding: 1.05rem .65rem; top: 0; min-inline-size: 0; }
.project-workspace > #pane-zeit h2 { font-size: .86rem; font-weight: 650; }
.project-workspace > #pane-studie { width: min(100%, 71rem); padding: .8rem clamp(.8rem, 1.7vw, 1.8rem) 2rem; }
.project-heading { padding: 0 0 .5rem; border-bottom: 1px solid #eee; gap: .35rem; }
.project-intro { gap: .15rem; }
.project-intro h1 { font-size: 1rem; line-height: 1.45; letter-spacing: -.012em; font-weight: 620; }
.project-intro small { font-size: .73rem; overflow-wrap: anywhere; }
.project-intro p { font-size: .82rem; }
.project-actions { gap: .02rem; }
.project-actions .icon-button { width: var(--hit); }
.project-actions .mobile-only { display: none; }
.project-heading .panel-switches { gap: 0; }
.project-stand { box-shadow: none; border: 0; border-radius: 0; padding: 0; background: transparent; gap: .65rem; }
.stand-meta { font-size: .74rem; }
.study-published { gap: .15rem; }
.published-block { position: relative; border-radius: .72rem; padding: .7rem 3.8rem .7rem .6rem; margin-inline: -.6rem; gap: .3rem; }
.project-workspace[data-review-editing="true"] .published-block:has(.block-suggest) {
  padding-inline-end: 5.55rem;
}
.published-block[data-block-kind="title"] { padding-block: .45rem .1rem; }
.published-block[data-block-kind="subtitle"] { padding-block: .4rem .7rem; }
.study-title { font-size: clamp(1.65rem, 2.15vw, 1.875rem); font-weight: 620; letter-spacing: -.033em; }
.study-subtitle { color: var(--muted); font-size: .94rem; }
.study-text { gap: 1rem; }
.study-text h4 { margin: 0 0 -.65rem; font-size: .92rem; font-weight: 680; }
.study-text p { font-size: var(--type-body); line-height: 1.5; }
.published-block:focus-within, .project-workspace[data-review-editing="true"] .published-block:hover {
  background: #f3f3f3;
}
.block-review-actions { display: flex; position: absolute; top: -.05rem; right: .15rem; gap: .05rem; align-items: center;
  border-radius: .6rem; background: rgb(250 250 250 / .95); }
.block-review-actions button { width: 1.75rem; min-block-size: 1.75rem; flex-basis: 1.75rem; }
.block-review-actions .block-suggest { display: none; }
.project-workspace[data-review-editing="true"] .block-review-actions .block-suggest { display: inline-flex; }
@media (hover: hover) and (pointer: fine) {
  .block-review-actions { opacity: 0; pointer-events: none; }
  .published-block:is(:hover, :focus-within) .block-review-actions {
    opacity: 1; pointer-events: auto;
  }
}
.inline-review { margin-top: .4rem; padding: .7rem; background: #fff; border: 1px solid var(--line);
  border-radius: .7rem; }
.inline-review:has(dialog) { margin: 0; padding: 0; border: 0; }
.inline-review-preview:empty { display: none; }
.dossier-links { border-top: 1px solid var(--line); padding-top: .55rem; }
.dossier-links .reference-details { flex: 0 1 auto; }
.study-editor:not([open]) { padding: .25rem 0; background: none; border: 0; }
.project-workspace > #pane-chat { top: 0; border: 0; border-inline-start: 1px solid var(--line); border-radius: 0;
  padding: .55rem .7rem .85rem; min-height: calc(100dvh - 3.2rem); max-height: 100dvh; }
.communication-heading { flex-wrap: nowrap; gap: .15rem; margin-bottom: .36rem; }
.communication-heading h2 { margin-inline-end: auto; font-size: .86rem; font-weight: 620; }
.project-workspace[data-right-mode="review"] .project-chat { display: none; }
.project-workspace:not([data-right-mode="review"]) .review-panel { display: none; }
.review-panel { gap: .7rem; min-height: min(31rem, calc(100dvh - 7rem)); grid-template-rows: auto minmax(0, 1fr) auto; }
.review-tabs { display: flex; gap: .2rem; padding: .2rem; background: var(--raised); border-radius: .65rem; }
.review-tabs button { flex: 1 1 0; min-width: 0; padding-inline: .15rem; border: 0; background: none; font-size: .78rem; }
.review-tabs [aria-pressed="true"] { background: white; box-shadow: 0 1px 4px #0001; }
.review-stream { gap: .35rem; align-content: start; }
.review-context { display: flex; align-items: center; justify-content: space-between; gap: .3rem; }
.review-context button { min-height: 1.75rem; padding: .2rem .45rem; font-size: .74rem; }
.review-rows { gap: .35rem; }
.review-card { gap: .4rem; padding: .5rem .4rem .6rem; border-bottom: 1px solid var(--line); font-size: .82rem; }
.review-card-header, .review-identify { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.review-card-header { justify-content: space-between; }
.review-identify strong, .review-identify small { display: block; overflow-wrap: anywhere; }
.review-identify small, .review-state, .review-snippet small { font-size: .72rem; }
.review-avatar { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; flex: none;
  border-radius: 50%; background: #ededed; font-size: .65rem; font-weight: 650; }
.review-diff { white-space: pre-wrap; overflow-wrap: anywhere; }
.review-diff del { background: #eee; color: #4c4c4c; text-decoration-thickness: .09em; }
.review-diff ins { background: #e0e0e0; color: #161616; text-decoration: none; border-bottom: 1px solid #666; }
.review-diff del + ins { margin-inline-start: .24em; }
.review-recent { gap: .3rem; padding-top: .55rem; }
.review-recent > button { border: 0; padding-inline: .3rem; }
.review-actions { gap: .3rem; }
.review-actions button:not(.icon-button) { min-height: 2rem; font-size: .74rem; padding: .26rem .4rem; }
.review-composer { position: sticky; bottom: 0; background: #fff; padding: .36rem 0; }
.review-composer:empty { display: none; }
.review-composer form { padding: .36rem; border: 1px solid var(--line); border-radius: .72rem; gap: .35rem; }
.review-composer textarea { border: 0; resize: vertical; min-height: 3rem; }
.review-composer button[type="submit"] { justify-self: end; }
.documents-sheet { width: min(48rem, calc(100% - 2rem)); }
.file-toolbar { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.file-toolbar > input { flex: 1 0 12rem; }
.file-toolbar > .row { flex-wrap: nowrap; gap: .15rem; }

.project-workspace[data-review-editing="true"] [data-paragraph-target] { cursor: text; }
.paragraph-review-target { outline: 1px solid #777; outline-offset: 4px; border-radius: .35rem; }
.project-workspace[data-review-editing="true"] [data-paragraph-target]:hover { outline: 1px solid #d7d7d7;
  outline-offset: 3px; border-radius: .38rem; }
[data-editing-paragraph="true"] { min-height: var(--paragraph-min-height); outline: 1px solid #777 !important;
  outline-offset: 5px; border-radius: .35rem; white-space: pre-wrap; }
[data-editing-paragraph] del { color: #555; background: #eaeaea; text-decoration-thickness: .09em; }
[data-editing-paragraph] ins { background: #e3e3e3; text-decoration: none; border-bottom: 1px solid #777; }
[data-editing-paragraph] del + ins { margin-inline-start: .19em; }
.paragraph-tools-host { position: absolute; inset: var(--paragraph-toolbar-top) 2.1rem auto auto; z-index: 2; }
.paragraph-tools { display: flex; align-items: center; gap: .08rem; position: relative;
  transform: translateY(-77%); background: #fff; border: 1px solid var(--line); border-radius: .68rem;
  box-shadow: 0 2px 6px #0002; }
.paragraph-tools button { width: 1.75rem; min-block-size: 1.75rem; flex-basis: 1.75rem; }
.paragraph-feedback { position: absolute; inset: auto 0 100% auto; width: max-content; max-width: 15rem;
  padding: .35rem .55rem; font-size: .78rem; background: #fff; border: 1px solid var(--control); border-radius: .42rem; }

.floating-file[data-floating="true"] { position: fixed; inset: auto; margin: 0; min-width: 0; max-width: none;
  left: var(--floating-x); top: var(--floating-y); width: var(--floating-w); height: var(--floating-h);
  max-block-size: none; border-color: var(--line); border-radius: var(--round-window); }
.floating-file .sheet-header { gap: var(--space-1); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); }
.floating-file[data-floating="true"] .sheet-header { cursor: move; touch-action: none; user-select: none; }
.floating-file .sheet-header h2 { margin-inline-end: auto; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  font-size: .94rem; min-width: 0; }
.floating-file .sheet-header a { color: inherit; text-decoration: none; }
.floating-file[data-floating="true"] .sheet-header :is(button,a).icon-button { min-height: 1.85rem; width: 1.85rem; flex-basis: 1.85rem; }
.floating-file[data-gesturing] iframe { pointer-events: none; }
.floating-file .sheet-body { gap: .52rem; padding: .58rem .68rem .48rem; background: rgb(255 255 255 / .65); }
.window-edge { position: absolute; display: none; z-index: 7; touch-action: none; }
.floating-file[data-floating="true"] .window-edge { display: block; }
.window-edge:is([data-edge="n"],[data-edge="s"]) { inset-inline: 12px; height: 6px; cursor: ns-resize; }
.window-edge:is([data-edge="e"],[data-edge="w"]) { inset-block: 12px; width: 6px; cursor: ew-resize; }
.window-edge:is([data-edge="nw"],[data-edge="ne"],[data-edge="sw"],[data-edge="se"]) { width: 13px; height: 13px; }
.window-edge:is([data-edge="n"],[data-edge="nw"],[data-edge="ne"]) { top: 0; }
.window-edge:is([data-edge="s"],[data-edge="sw"],[data-edge="se"]) { bottom: 0; }
.window-edge:is([data-edge="w"],[data-edge="sw"],[data-edge="nw"]) { left: 0; }
.window-edge:is([data-edge="e"],[data-edge="se"],[data-edge="ne"]) { right: 0; }
.window-edge:is([data-edge="nw"],[data-edge="se"]) { cursor: nwse-resize; }
.window-edge:is([data-edge="ne"],[data-edge="sw"]) { cursor: nesw-resize; }
.window-edge[data-edge="se"]::after { content: ''; position: absolute; width: 8px; height: 8px; inset: auto 2px 2px auto;
  background: repeating-linear-gradient(135deg, transparent 0 2px, #999 2px 3px); clip-path: polygon(100% 0,100% 100%,0 100%); }
.file-toolbar { gap: .38rem; }
.documents-sheet .file-toolbar { position: sticky; top: -.58rem; z-index: 4; background: #fff; padding-block: .15rem; }
.file-toolbar > input { flex: 1 1 8rem; min-width: 7rem; font-size: .82rem; }
.file-toolbar > .row select { font-size: .78rem; }
.file-toolbar .icon-button { width: 2rem; min-height: 2rem; flex-basis: 2rem; }
.file-toolbar :is(input,select) { padding-block: .34rem; }
.file-library-items { display: grid; list-style: none; margin: 0; padding: 0; gap: .48rem; }
[data-view="grid"] .file-library-items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.1rem), 1fr)); }
.file-item { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--round-small); background: var(--surface); }
[data-view="list"] .file-item { border-color: transparent; border-block-end-color: var(--line); }
.file-open { border: 0; padding: var(--space-1); min-width: 0; width: 100%; display: grid; justify-content: stretch; gap: var(--space-1);
  background: none; text-align: start; }
.file-thumb { display: grid; place-items: center; min-width: 0; height: 4.45rem; border-radius: .34rem;
  background: #f5f5f5; overflow: hidden; }
.file-thumb img { display: block; height: 100%; width: 100%; object-fit: contain; }
.file-type-symbol { display: grid; place-items: center; color: var(--muted); font-size: .58rem; }
.file-type-symbol .icon { width: 1.58rem; height: 1.58rem; }
.file-caption { display: grid; align-content: start; gap: .14rem; min-width: 0; padding: 0 1.5rem .03rem .11rem; }
.file-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  white-space: normal; overflow-wrap: anywhere; font-size: .73rem; font-weight: 570; line-height: 1.14; height: 2.28em; }
.file-caption small { overflow: hidden; text-overflow: ellipsis; font-size: .65rem; white-space: nowrap; }
.file-menu { position: absolute; inset: auto .16rem .15rem auto; }
.file-menu[open] { z-index: 3; }
.file-menu summary { min-height: 1.55rem; width: 1.55rem; }
.file-menu-items { position: absolute; inset: auto 0 100% auto; width: max-content; background: white; border: 1px solid var(--line);
  border-radius: .55rem; padding: .26rem; gap: .15rem; box-shadow: var(--float-shadow); }
.file-item:first-of-type .file-menu-items { inset: 100% 0 auto auto; }
.file-menu-items :is(button,a) { justify-self: stretch; justify-content: start; font-size: .74rem; min-height: 1.85rem; border: 0; padding: .26rem .42rem; }
[data-view="list"] .file-open { grid-template-columns: 2.5rem minmax(0, 1fr); align-items: center; }
[data-view="list"] .file-thumb { height: 2.35rem; }
[data-view="list"] .file-name { height: auto; }
.file-library-footer { display: flex; align-items: center; justify-content: space-between; gap: .7rem;
  position: sticky; bottom: -.48rem; padding: .28rem .15rem; background: #fff; z-index: 1; }
.file-library-footer:has(+ .file-upload[open]) { position: static; }
.file-library-footer button { font-size: .76rem; }
.file-action { text-decoration: none; }
.file-action:hover { background: var(--hover); }
.file-preview-stage { display: grid; position: relative; height: clamp(9rem, 30dvh, 29rem); min-width: 0; }
.preview-sheet[data-floating="true"] .file-preview-stage { height: max(9rem, calc(var(--floating-h) - 14rem)); }
.file-preview-media { display: grid; position: relative; place-items: center; min-height: 0; min-width: 0; overflow: hidden; }
.file-preview-media > :is(img, iframe) { position: absolute; inset: 0; width: 100%; height: 100%; }
.file-preview-media > img { object-fit: contain; }
.file-preview-media > iframe { border: 0; background: #f3f3f3; }
.file-preview-stage > button { position: absolute; top: 50%; transform: translateY(-50%); border-radius: 50%; background: white;
  box-shadow: 0 1px 4px #0002; min-block-size: 1.7rem; width: 1.7rem; }
.file-preview-stage > button:first-of-type { left: .05rem; }
.file-preview-stage > button:last-of-type { right: .05rem; }
.file-preview-stage > button:disabled { visibility: hidden; }
.file-preview-tabs { display: flex; gap: .18rem; padding: .12rem; background: #f5f5f5; border-radius: .53rem; }
.file-preview-tabs button { padding: .18rem .35rem; border: 0; min-block-size: 1.55rem; font-size: .7rem; background: transparent; }
.file-preview-tabs [aria-pressed="true"] { background: #e9e9e9; }
.file-preview-details { gap: .4rem; font-size: .78rem; min-width: 0; }
.file-metadata { display: grid; margin: 0; gap: .08rem; }
.file-metadata > div { display: grid; grid-template-columns: minmax(5.6rem,.8fr) 1.6fr; gap: .35rem; padding: .19rem 0; border-bottom: 1px solid #ededed; }
.file-metadata dt { color: var(--muted); }
.file-metadata dd { margin: 0; overflow-wrap: anywhere; }
.file-reference-list { gap: .35rem; }
.file-reference-list a { color: inherit; overflow-wrap: anywhere; }
.file-toolbar > select { max-width: min(100%, 13rem); font-size: .78rem; }

.structure-sheet { width: min(71rem, calc(100% - 2rem)); height: min(84dvh, 51rem); max-block-size: 90dvh; background: var(--surface); }
.structure-sheet .sheet-body { gap: .65rem; container-type: inline-size; }
.structure-sheet :is(button, select, input) { font-size: .81rem; }
.structure-context { position: sticky; top: -1rem; z-index: 2; padding-block: .3rem;
  background: var(--surface); font-size: .82rem; gap: .42rem .65rem; }
.structure-context > .muted { border: 1px solid var(--line); border-radius: 2rem; padding: .12rem .48rem; }
.structure-context > button { margin-inline-start: auto; }
.structure-context-historical { background: #242424; color: #fff; padding-inline: .55rem; border-radius: .4rem; }
.structure-context-historical > .muted { color: #fff; border-color: #777; }
.structure-context-historical > button { color: var(--ink); }
.historical-gantt { border: 2px solid #333; padding: .65rem; border-radius: .6rem;
  background: #f5f5f5; gap: .36rem; font-size: .82rem; }
.historical-gantt > button, .gantt-branch-preview > button { justify-self: start; }
.gantt-branch-preview { padding-block-start: .45rem; gap: .42rem; border-block-start: 1px solid #bbb; }
.gantt-branch-preview form .check { font-weight: 650; }
.structure-history-event { display: grid; grid-template-columns: minmax(0,1fr); border-inline-start: 2px solid transparent; }
.structure-history-event > button { max-inline-size: 100%; min-inline-size: 0; white-space: normal; overflow-wrap: anywhere; }
.structure-history-event small { overflow-wrap: anywhere; }
.structure-history-event[data-abandoned] { border-inline-start: 2px dashed #929292; }
.structure-history-event[data-abandoned] > button { color: #646464; }
.structure-history-event[data-abandoned] > button:is(:hover,:focus-visible) { color: var(--ink); }
.structure-history-event small { padding-inline-start: .38rem; color: var(--muted); }
.gantt-unavailable { background: #eaeaea; color: #575757; padding: .42rem .55rem; border-radius: .42rem; }
.gantt-conflict { background: #fff2e9; color: #713316; border-inline-start: 3px solid #b75c32; }
.gantt-conflict ul { margin: 0; padding-inline-start: 1.15rem; }
.gantt-branch-source { font-weight: 650; }
.structure-branch-hint { margin-block: .35rem; }
.structure-toolbar { gap: .2rem; border-bottom: 1px solid var(--line); padding-bottom: .38rem; }
.structure-toolbar > button { border-color: transparent; }
.segments { display: flex; min-width: 0; overflow: auto; gap: var(--space-1); padding: var(--space-1); background: var(--raised);
  border: 1px solid var(--line); border-radius: var(--round-control); }
.segments > button { flex: none; min-height: var(--hit-compact); padding: .2rem .55rem; border: 1px solid transparent; border-radius: var(--round-small); background: transparent; }
.segments > button[aria-pressed="true"] { background: var(--surface); border-color: var(--line); box-shadow: 0 1px 2px #1111; color: var(--ink); }
.segments > button:hover { background: var(--hover); }
.structure-row-label > [aria-current="true"] { background: var(--selected); font-weight: 590; }
.planning-zoom { flex-wrap: nowrap; gap: var(--space-1); }
.planning-zoom output { min-width: 3.25rem; text-align: center; font-size: var(--type-meta); font-variant-numeric: tabular-nums; }
.structure-controls { align-items: center; gap: .45rem; }
.structure-controls label:first-child { display: flex; align-items: center; gap: .38rem; }
.structure-controls select { min-width: 6rem; }
.structure-feedback { color: var(--muted); font-size: .78rem; }
.structure-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: .7rem; align-items: start; }
.structure-layout-gantt { grid-template-columns: minmax(0,1fr) clamp(13.5rem,24%,17rem); }
.structure-layout > :first-child { min-width: 0; }
.structure-rows, .structure-connections, .structure-hints, .structure-event-list { list-style: none; padding: 0; margin: 0; min-width: 0; }
.structure-rows > li + li { border-top: 1px solid #f0f0f0; }
.structure-row-label { display: flex; align-items: center; gap: var(--space-1); position: relative; min-height: 36px; min-width: 0;
  border-radius: var(--round-small); padding-inline-start: min(24%, calc(var(--structure-depth) * var(--space-3))); }
.structure-row-label:hover { background: var(--hover); }
.structure-row-label > button { padding: .14rem .34rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 0; text-align: start; min-height: 1.85rem; background: transparent; }
.structure-row-label > small { flex: none; color: var(--muted); font-size: .67rem; }
.structure-row-label > .structure-twist { display: grid; place-items: center; width: 1.65rem; flex: none; text-align: center; }
.structure-drag { color: var(--muted); cursor: grab; padding: .25rem; margin-inline-start: auto; }
.structure-row-label[data-drop="before"] { box-shadow: inset 0 2px #565656; }
.structure-row-label[data-drop="inside"] { border-radius: .45rem; background: var(--raised); }
.structure-detail { align-content: start; border: 1px solid var(--line); border-radius: .7rem; padding: .72rem;
  font-size: .83rem; gap: .5rem; min-width: 0; }
.structure-detail > .row { min-width: 0; }
.structure-detail button:not(.icon-button), .structure-controls button { white-space: normal; overflow-wrap: anywhere; text-align: start; }
.structure-actions { gap: .26rem; }
.structure-editor { border-top: 1px solid var(--line); padding-top: .58rem; gap: .42rem; }
.structure-timing { display: grid; gap: .45rem; min-width: 0; }
.structure-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,8.6rem),1fr)); gap: .45rem; }
.structure-fields label { min-width: 0; }
.structure-fields select { width: 100%; }
.structure-connections > li { display: flex; gap: .3rem; align-items: center; margin-block: .18rem; }
.structure-connections > li > button:first-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: start; }
.structure-task-meta { display: flex; flex-wrap: wrap; justify-content: space-between; padding: .1rem .4rem .45rem 2rem;
  gap: .2rem .55rem; font-size: .73rem; color: var(--muted); }
.structure-hints { gap: .36rem; }
.structure-hints li { border: 1px solid var(--line); border-radius: .6rem; padding: .6rem; gap: .25rem; font-size: .8rem; }
.structure-hints li > button { justify-self: start; font-weight: 650; }
.structure-history { margin-block-start: .6rem; font-size: .77rem; }
.structure-event-list > li { display: grid; gap: .16rem; padding-block: .38rem; }
.structure-event-list button { padding: .22rem .35rem; border-color: transparent; text-align: start; font-size: .72rem; }
.gantt-scroll { overflow-x: auto; margin: 0; padding: .25rem; }
.gantt-grid { --gantt-label-width: 10.5rem; display: grid;
  grid-template-columns: var(--gantt-label-width) minmax(var(--gantt-track,560px),1fr);
  min-width: calc(var(--gantt-label-width) + var(--gantt-track,560px) + .4rem); gap: 0 .4rem; align-items: start; font-size: .74rem; }
.gantt-structure-label { font-weight: 610; color: var(--muted); padding-inline: .35rem; }
.gantt-labels, .gantt-structure-label { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface); }
.gantt-labels { box-shadow: 1px 0 var(--line); }
.gantt-grid > svg, .gantt-grid .structure-row-label { width: 100%; }
.gantt-grid .structure-row-label { height: 36px; border-bottom: 1px solid var(--line); }
.gantt-grid .structure-row-label small { display: none; }
.gantt-axis { position: relative; height: 3.6rem; }
.gantt-axis span { position: absolute; color: var(--muted); white-space: nowrap; }
.gantt-years { position: absolute; inset: 0 0 auto; height: 1.15rem; }
.gantt-years .gantt-year { padding-inline-start: .3rem; color: var(--ink); font-weight: 620; }
.gantt-years .gantt-year-before { translate: -100% 0; padding-inline: 0 .3rem; }
.gantt-year-mark { position: absolute; top: 0; bottom: 0; border-inline-start: 1px solid #9c9c9c; }
.gantt-year-line { stroke: #9c9c9c; stroke-width: 1; vector-effect: non-scaling-stroke; }
.gantt-date-label { top: 1.15rem; }
.gantt-guide { stroke: #e8e8e8; }
.gantt-today { stroke: #8e8e93; stroke-width: 1; stroke-dasharray: 3 3; }
.gantt-axis .gantt-today-label { top: 2.24rem; translate: -50% 0; padding-inline: .28rem; background: var(--selected); border-radius: .27rem; }
.gantt-axis-short-first-year { height: 4.75rem; }
.gantt-axis-short-first-year .gantt-years { height: 2.3rem; }
.gantt-axis-short-first-year .gantt-year:nth-child(2) { top: 1.15rem; }
.gantt-axis-short-first-year .gantt-date-label { top: 2.3rem; }
.gantt-axis-short-first-year .gantt-today-label { top: 3.39rem; }
.gantt-dependencies { fill: none; stroke: #707070; stroke-width: 1.25; }
.gantt-point, .gantt-bar { fill: #505050; }
.gantt-summary { fill: #bdbdbd; }
.gantt-interactive { cursor: pointer; }
.gantt-interactive:hover { fill: #181818; }
.gantt-workspace { gap: .1rem; }
.sheet-body .gantt-shift-feedback { display: block; height: 1.5em; font-size: .74rem;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sheet-body .gantt-shift-feedback:empty { display: block; }
.gantt-ghosts { pointer-events: none; fill: #f6f6f6; fill-opacity: .82; stroke: #202020; stroke-width: 1.5; stroke-dasharray: 4 2; }
.gantt-pending { fill: #fafafa; stroke: #202020; stroke-width: 1.6; stroke-dasharray: 4 2; }
.gantt-preview-dependencies { fill: none; stroke-width: 2; pointer-events: none; }
.gantt-preview-connection { stroke: #454545; }
.gantt-preview-conflict { stroke: #b75c32; }
.planning-date-fields { display: grid; grid-column: 1 / -1; gap: .42rem;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,8.6rem),1fr)); }
.planning-date-fields > :is(.check,.planning-date-hint) { grid-column: 1 / -1; }
.planning-date-hint { font-size: .78rem; }
.gantt-draft-notice { font-size: .8rem; padding: .32rem .5rem; background: #f4f4f4; border-radius: .55rem; }
.gantt-shift-table { overflow-x: auto; }
.gantt-shift-table table { border-collapse: collapse; width: 100%; font-size: .75rem; }
.gantt-shift-table :is(th,td) { border-bottom: 1px solid var(--line); padding: .28rem; text-align: start; }
.structure-editor h4 { margin: 0; }
.planning-tools { align-content: start; justify-items: start; padding: .55rem; gap: .32rem;
  background: #f4f4f4; border-radius: .58rem; }
.planning-tools .muted { font-size: .76rem; }
.planning-tools button[aria-pressed="true"] { background: #e5e5e5; border-color: #888; }
.planning-tool-row, .planning-inline-actions { gap: var(--space-1); }
.planning-overflow { display: none; position: relative; }
.planning-overflow-items { position: absolute; z-index: 3; inset: 100% 0 auto auto; padding: var(--space-2);
  gap: var(--space-1); width: max-content; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--round-control); box-shadow: var(--float-shadow); }
.planning-overflow-items button { width: 100%; justify-content: start; text-align: start; }
.gantt-hints > div { border-block-start: 1px solid var(--line); padding-block-start: var(--space-1); gap: var(--space-1); }
.gantt-hints > div > button { border-color: transparent; padding-inline: 0; }
.gantt-conflict-review h4 { margin: 0; }
.planning-calendar { gap: .48rem; }
.calendar-layout:has(> section.structure-detail) { grid-template-columns: minmax(0,1fr) minmax(15rem,.39fr); align-items: start; gap: .7rem; }
.calendar-toolbar { justify-content: space-between; }
.calendar-toolbar h3 { font-size: 1rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border-inline-start: 1px solid var(--line);
  border-top: 1px solid var(--line); border-radius: .6rem; overflow: clip; }
.calendar-weekday, .calendar-cell { border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.calendar-weekday { padding: .35rem; background: #f4f4f4; font-size: .73rem; font-weight: 650; text-align: center; }
.calendar-cell { min-height: 5.75rem; padding: .22rem; background: #fff; }
.calendar-cell[data-outside] { background: var(--raised); color: var(--muted); }
.calendar-day-line { justify-content: space-between; gap: .15rem; }
.structure-sheet .calendar-day { min-width: 1.6rem; min-height: 1.6rem; padding: .1rem .22rem; justify-content: center;
  border: 0; border-radius: .35rem; font-size: .75rem; }
.calendar-day[aria-current="date"] { box-shadow: inset 0 0 0 1px #969696; }
.calendar-day[aria-pressed="true"] { color: white; background: #272727; }
.calendar-count { font-size: .69rem; min-width: 1rem; text-align: center; background: #e9e9e9; border-radius: 1rem; }
.calendar-entries { display: grid; gap: .2rem; margin-top: .2rem; }
.structure-sheet .calendar-entry, .structure-sheet .calendar-entries > button { justify-content: start; display: block; min-width: 0;
  min-height: 1.35rem; padding: .12rem .24rem; text-align: start; border: 0; border-radius: .28rem; font-size: .7rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #efefef; }
.calendar-entry[data-kind="milestone"]::before { content: '◆ '; }
.structure-sheet .calendar-entry[aria-pressed="true"] { color: white; background: #222; }
.calendar-day-agenda { grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap: .3rem; }
.calendar-day-agenda > h4, .calendar-day-agenda > p { grid-column: 1 / -1; margin: 0; font-size: .77rem; }
.structure-sheet .calendar-day-agenda .calendar-entry { white-space: normal; overflow-wrap: anywhere; min-height: 2rem; }
@container (max-width: 850px) {
  .calendar-layout:has(> section.structure-detail) { grid-template-columns: minmax(0,1fr); }
  .planning-inline-actions { display: none; }
  .planning-overflow { display: block; }
}
@container (max-width: 690px) {
  .structure-layout { grid-template-columns: minmax(0,1fr); }
  .calendar-cell { min-height: 2.85rem; }
  .calendar-entries { display: none; }
  .calendar-day-line { display: grid; gap: .08rem; justify-content: normal; justify-items: center; }
}
.network-plan { gap: .56rem; }
.network-guide { font-size: .78rem; }
.network-scroll { overflow: auto; max-height: min(42dvh, 28rem); border: 1px solid var(--line);
  border-radius: .72rem; background: #f7f7f7; }
.network-scroll:focus-visible { outline: 2px solid #555; outline-offset: 2px; }
.network-scroll[data-panning] { cursor: grabbing; user-select: none; }
.network-scale { position: relative; overflow: clip; }
.network-canvas { position: relative; transform-origin: top left; }
.network-canvas > svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.network-edge { fill: none; stroke-linejoin: round; }
.network-edge-standard { stroke: #777; stroke-width: 1.4; }
.network-edge-related { stroke: #151515; stroke-width: 1.65; }
.network-arrow-standard { fill: #777; }
.network-arrow-related { fill: #151515; }
.network-canvas > .network-card { position: absolute; width: 182px; height: 80px; display: grid; justify-content: stretch;
  align-content: center; gap: .16rem; padding: .38rem .55rem; text-align: start; line-height: 1.15; border-radius: .62rem; }
.network-card > strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; white-space: normal; }
.network-card > small, .network-kind { font-size: .68rem; color: var(--muted); }
.network-kind { display: flex; align-items: center; gap: .35rem; }
.network-kind > i { display: block; flex: 0 0 .54rem; width: .54rem; height: .54rem; border: 1px solid #666; border-radius: .12rem; }
.network-card[data-kind="milestone"] .network-kind > i { border-radius: 0; transform: rotate(45deg) scale(.86); background: #555; }
.network-card[data-related] { border-color: #747474; }
.network-card[data-archived] { border-style: dashed; }
.network-card[aria-pressed="true"] { border-color: #222; background: #ececec; box-shadow: inset 0 0 0 1px #222; }
.network-inspector { font-size: .8rem; }
.network-inspector > button { justify-self: start; }
.network-neighbours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.network-neighbours .stack { gap: .25rem; }
.network-neighbours h4 { margin: 0; font-size: .77rem; }
.network-connections { list-style: none; padding: 0; margin: 0; display: grid; justify-items: start; gap: .28rem; }
.design-overview { width: min(62rem,calc(100% - 2rem)); border-radius: var(--round-window); background: var(--surface); }
.design-overview .sheet-body { grid-template-columns: repeat(auto-fit,minmax(min(100%,23rem),1fr)); gap: var(--space-3); }
.design-specimen { border: 1px solid var(--line); border-radius: var(--round-panel); padding: var(--space-3); gap: var(--space-2); }
.design-swatches, .design-icons { display: grid; grid-template-columns: repeat(auto-fit,minmax(4rem,1fr)); gap: var(--space-2); }
.design-icons > span { display: grid; justify-items: center; padding-block: var(--space-1); }
.design-icons small, .design-swatches small { font-size: .68rem; }
.design-swatch { display: block; height: 1.6rem; border: 1px solid var(--line); border-radius: var(--round-small); }
.design-files { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: var(--space-2); }
.design-files img { max-width: 100%; }
.design-specimen .study-chart canvas { height: 12rem; }
.design-specimen .segments { flex-wrap: wrap; }

@media (max-width: 900px), (max-width: 1080px) and (pointer: coarse) {
  .project-workspace { min-height: 0; }
  .project-workspace > #pane-studie { padding: 0 0 1rem; }
  .project-heading { flex-wrap: wrap; column-gap: .7rem; }
  .project-actions { max-width: 100%; }
  .project-actions .mobile-only { display: inline-flex; }
  .project-workspace > #pane-chat { border-inline-start: 0; padding: .4rem .1rem; min-height: 100%; }
  .project-workspace[data-right-mode="review"] .review-panel { grid-column: 1; min-height: 100%; }
  .review-composer { bottom: -.15rem; }
  .review-recent { display: none; }
  .block-review-actions { top: -.04rem; right: 0; opacity: 1; }
  .block-review-actions button { width: 2.75rem; min-block-size: 2.75rem; flex-basis: 2.75rem; }
  .published-block { padding-inline-end: 5.65rem; }
  .project-workspace[data-review-editing="true"] .published-block:has(.block-suggest) {
    padding-top: 2.8rem;
    padding-inline-end: .6rem;
  }
  .sheet.documents-sheet { width: 100%; }
  .sheet.floating-file { width: 100%; }
  .floating-file .window-expand { display: none; }
  .floating-file .sheet-body { padding-inline: max(.7rem, env(safe-area-inset-left)) max(.7rem, env(safe-area-inset-right));
    padding-bottom: max(.65rem, env(safe-area-inset-bottom)); }
  .file-toolbar input, .file-toolbar select { font-size: 1rem; }
  .file-item .file-menu summary { min-height: 2.75rem; width: 2.75rem; }
  .file-item .file-caption { padding-inline-end: 2.55rem; }
  .file-preview-tabs button { min-height: 2.75rem; }
  .file-preview-stage > button { min-height: 2.75rem; width: 2.75rem; }
  .paragraph-tools button { width: 2.75rem; min-block-size: 2.75rem; flex-basis: 2.75rem; }
  .sheet.structure-sheet { width: 100%; height: min(58dvh, var(--loop-visual-height, 100dvh)); }
  .sheet.structure-sheet[data-height="full"] { height: min(89dvh, var(--loop-visual-height, 100dvh)); }
  .structure-layout { grid-template-columns: minmax(0, 1fr); }
  .structure-sheet :is(button,select) { min-height: 2.75rem; }
  .structure-sheet .calendar-day { min-height: 2.5rem; width: 100%; }
  .structure-sheet .calendar-day-agenda .calendar-entry { min-height: 2.75rem; }
  .structure-row-label > .structure-twist { width: 2.75rem; }
  .structure-drag { display: none; }
  .sheet.design-overview { width: 100%; border-end-start-radius: 0; border-end-end-radius: 0; }
  .gantt-grid { --gantt-label-width: 8.5rem; }
  .gantt-grid .structure-row-label button { min-height: 1.95rem; }
}
