/* ========================================================================== draft The editor, its chrome, suggestions and comments, and the sidebar, on supram's tokens. Unlayered: it wins over supram's layers, and a host's own unlayered rules written after it win over this. ========================================================================== */ /* ── Layout ───────────────────────────────────────────────────────────── */ .draft-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; } @media (min-width: 62rem) { .draft-layout.with-sidebar { grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); transition: grid-template-columns 0.25s ease; } /* the assistant in use: the pane takes the room the conversation and the work need */ .draft-layout.with-sidebar:has(draft-sidebar.wide) { grid-template-columns: minmax(0, 1fr) minmax(28rem, 36rem); } } draft-editor, draft-line, draft-text, draft-sidebar { display: block; position: relative; } /* a few paragraphs of rich text (a brief, a plan): the host sizes the box */ .ProseMirror.text > :last-child { margin-bottom: 0; } /* room for the handles and the margin actions in the gutter; less of it on a phone */ .draft-gutter { --draft-gutter: 2rem; padding-inline-start: var(--draft-gutter); } @media (max-width: 40rem) { .draft-gutter { --draft-gutter: 1.2rem; } .sec-head .sec-handle { left: -1.2rem; } .draft-sidebar { position: static; max-height: none; } .draft-sidebar .chat { min-height: 16rem; } } /* ── The surface ──────────────────────────────────────────────────────── */ .ProseMirror { outline: none; white-space: pre-wrap; word-wrap: break-word; } .ProseMirror .is-empty::before, .ProseMirror.line:empty::before, .ProseMirror.line > p.is-empty::before { content: attr(data-placeholder); float: left; height: 0; color: var(--muted); font-style: italic; font-weight: var(--weight-regular); text-transform: none; letter-spacing: 0; pointer-events: none; } .ProseMirror.line > p { margin: 0; max-inline-size: none; } .ProseMirror-selectednode { outline: 3px solid var(--link); outline-offset: 2px; } .ProseMirror .code .ProseMirror-selectednode, .ProseMirror-gapcursor { outline: none; } .ProseMirror p { margin: 0 0 var(--space-2); max-inline-size: var(--measure); } .ProseMirror li > p { margin: 0 0 0.2rem; } .ProseMirror ul, .ProseMirror ol { margin: 0 0 var(--space-2); padding-inline-start: 1.5em; max-inline-size: var(--measure); } .ProseMirror li ul, .ProseMirror li ol { margin-bottom: 0; } .ProseMirror dl { margin: 0 0 var(--space-2); max-inline-size: var(--measure); } .ProseMirror dt { font-weight: var(--weight-bold); } .ProseMirror dd { margin: 0 0 0.6rem var(--space-3); } /* inline semantics */ .ProseMirror dfn { font-style: normal; font-weight: var(--weight-bold); text-decoration: underline; text-decoration-color: var(--ok); text-decoration-thickness: 0.15em; text-underline-offset: 0.15em; } .ProseMirror a.dfn-ref { color: inherit; text-decoration-color: var(--link); text-decoration-thickness: 0.15em; text-underline-offset: 0.15em; } .ProseMirror a.dfn-ref[data-uri] { text-decoration-color: var(--ok); } .ProseMirror a.dfn-ref[data-ref]::after { content: attr(data-ref); font-size: 0.65em; vertical-align: super; color: var(--muted); margin-left: 0.15em; font-family: var(--font-mono); } .ProseMirror a.ref { color: var(--link); text-decoration: none; font-family: var(--font-mono); font-size: 0.92em; } .ProseMirror a.ref::before { content: '['; } .ProseMirror a.ref::after { content: ']'; } .ProseMirror a[href]:not(.ref):not(.dfn-ref) { color: var(--link); } .ProseMirror code { background: var(--subtle); padding: 0.1em 0.35em; font-size: 0.92em; } .ProseMirror .tiptap-mathematics-render { cursor: pointer; padding: 0 0.1em; } .ProseMirror .tiptap-mathematics-render:hover { background: var(--surface); } .ProseMirror .tiptap-mathematics-render--editable:empty::before, .ProseMirror [data-type='block-math']:empty::before { content: 'math'; color: var(--muted); font-style: italic; } .ProseMirror [data-type='block-math'] { display: block; margin: 0 0 var(--space-2); text-align: center; } /* ── Sections ─────────────────────────────────────────────────────────── */ .sec { position: relative; } .sec-head { position: relative; } .sec-head .title { min-width: 0; font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); text-wrap: pretty; overflow-wrap: anywhere; } .sec-head .title.d0 { font-size: var(--text-xl); margin: var(--space-6) 0 var(--space-2); padding-bottom: var(--space-1); border-bottom: 1px solid var(--hairline); } .sec-head .title.d1 { font-size: var(--text-lg); margin: var(--space-4) 0 var(--space-1); } .sec-head .title.d2, .sec-head .title.d3, .sec-head .title.d4 { font-size: var(--text-md); margin: var(--space-3) 0 var(--space-1); } .sec-head .sec-handle { position: absolute; left: -1.7rem; top: 0.35em; width: 1.1rem; text-align: center; cursor: grab; opacity: 0; font-size: 1rem; color: var(--muted); user-select: none; transition: opacity var(--duration) var(--ease); } .sec-head:hover .sec-handle, .sec-head:focus-within .sec-handle { opacity: 1; } /* the anchor and the remove button float over the title's bottom edge on hover, taking no width from it */ .sec-head .sec-chrome { position: absolute; right: 0; bottom: -0.2rem; display: inline-flex; align-items: baseline; gap: 0.6rem; padding: 0 0.3rem; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity var(--duration) var(--ease); } .sec-head:hover .sec-chrome, .sec-head:focus-within .sec-chrome { pointer-events: auto; } .sec-head:hover .sec-chrome, .sec-head:focus-within .sec-chrome { opacity: 1; } .sec-head .anchor { font: var(--text-xs) var(--font-mono); color: var(--muted); display: inline-flex; align-items: baseline; gap: 0.1rem; } .sec-head .anchor input { border: 0; border-bottom: 1px solid var(--hairline); font: inherit; width: 7rem; max-width: 30vw; padding: 0; background: transparent; color: var(--muted); } /* the word target, beside the anchor */ .sec-head .target { font: var(--text-xs) var(--font-mono); color: var(--muted); display: inline-flex; align-items: baseline; gap: 0.25rem; } .sec-head .target input { border: 0; border-bottom: 1px solid var(--hairline); font: inherit; width: 3.6rem; padding: 0; background: transparent; color: var(--muted); text-align: right; -moz-appearance: textfield; appearance: textfield; } .sec-head .target input::-webkit-outer-spin-button, .sec-head .target input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } .sec-head .remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: var(--text-sm) var(--font-sans); padding: 0 0.2rem; } .sec-head .remove:hover { color: var(--on-glass); background: var(--accent); } .add-sections { display: flex; flex-wrap: nowrap; align-items: center; gap: 1.2rem; margin: var(--space-1) 0 var(--space-3); overflow: hidden; } .add-sections[hidden] { display: none; } .add-section { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0.2rem 0; white-space: nowrap; flex: none; } .add-section:hover { color: var(--fg); text-decoration: underline; text-decoration-thickness: 0.15em; text-decoration-color: var(--warn); } /* ── Drag handle ──────────────────────────────────────────────────────── */ .drag-handle { position: absolute; width: 1.1rem; text-align: center; cursor: grab; font-size: 1rem; line-height: 1.2; color: var(--muted); user-select: none; z-index: 5; } .drag-handle:hover { color: var(--fg); } .drag-handle:active { cursor: grabbing; } /* ── Code ─────────────────────────────────────────────────────────────── */ .code { position: relative; margin: 0 0 0.2rem; background: var(--subtle); border-inline-start: 1px solid var(--hairline); max-width: 100%; } .code-head { display: flex; justify-content: flex-end; padding: 0.15rem 0.4rem 0; } .code-head input { font: var(--text-xs) var(--font-mono); border: 0; border-bottom: 1px solid var(--hairline); width: 6rem; text-align: right; background: transparent; padding: 0; color: var(--muted); opacity: 0.5; } .code:hover .code-head input, .code:focus-within .code-head input { opacity: 1; } .code pre { margin: 0; padding: var(--space-1) var(--space-2) var(--space-2); font: var(--text-sm) / var(--leading-snug) var(--font-mono); white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; tab-size: 2; background: transparent; } .code pre code { font: inherit; white-space: inherit; word-break: inherit; display: block; min-height: 1.4em; background: transparent; padding: 0; } .after-btn { display: block; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0.1rem 0.6rem; margin: 0 0 0.6rem; opacity: 0; transition: opacity var(--duration) var(--ease); } .code:hover .after-btn, .code:focus-within .after-btn { opacity: 1; } .after-btn:hover { color: var(--fg); } /* ── Figures ──────────────────────────────────────────────────────────── */ figure.figure { margin: 0 0 var(--space-2); max-inline-size: var(--measure); } figure.figure .empty { border: 2px dashed var(--hairline); padding: var(--space-3); text-align: center; color: var(--muted); } figure.figure .meta { display: grid; gap: 0.3rem; margin-top: 0.4rem; font-size: var(--text-sm); } figure.figure .meta input[type='text'] { border: 0; border-bottom: 2px solid var(--hairline); font: inherit; padding: 0.1rem 0; width: 100%; background: transparent; } figure.figure .meta .row { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; } figure.figure .remove { border: 1px solid var(--hairline); background: transparent; font: inherit; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; padding: 0.1rem 0.5rem; cursor: pointer; } figure.figure .remove:hover { background: var(--accent); color: var(--on-glass); } figure.figure .status { color: var(--accent-text); } figure.figure figcaption { margin-top: 0.4rem; min-height: 1.4em; font-size: var(--text-sm); color: var(--muted); } .ProseMirror figure.figure.is-empty::before { content: none; } .ProseMirror figure.figure.is-empty figcaption::before { content: 'Caption (optional)'; float: left; height: 0; color: var(--muted); font-style: italic; pointer-events: none; } /* ── Outline notes: what a section will say, not prose yet ───────────── */ .ProseMirror :is(p, ul, ol)[data-outline] { color: var(--muted); font-style: italic; border-inline-start: 1px dashed var(--hairline); padding-inline-start: 0.7rem; margin-inline-start: -0.8rem; } /* a list of points: the sentences a paragraph will make, in order */ .ProseMirror :is(ul, ol)[data-outline] { padding-inline-start: 2rem; } .ProseMirror :is(p, ul, ol)[data-outline]::before { content: 'outline'; display: block; font: var(--weight-semibold) 0.65rem var(--font-sans); font-style: normal; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--muted); line-height: 1.2; margin-bottom: 0.1rem; } /* ── Suggestions & comments in the text ───────────────────────────────── */ /* a proposal, until taken or dropped: on the selection wash, nothing else drawn around it */ .ProseMirror ins { background: var(--selection-wash); color: inherit; text-decoration: none; } .ProseMirror del { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 0.1em; } /* a block carrying the mark: the mark wraps the block's element, and the wash runs a little past its edges */ .ProseMirror :is(ins, del):has(> :is(p, ul, ol, dl, div, section, figure, pre, .code, .sec, .ditem, li)) { display: block; background: var(--selection-wash); box-shadow: 0 0 0 0.5rem var(--selection-wash); margin-bottom: var(--space-2); } .ProseMirror del:has(> :is(p, ul, ol, dl, div, section, figure, pre, .code, .sec, .ditem, li)) { background: transparent; box-shadow: none; text-decoration: none; } .ProseMirror del:has(> :is(p, ul, ol, dl, div, section, figure, pre, .code, .sec, .ditem, li)) > * { text-decoration: line-through; text-decoration-thickness: 0.1em; opacity: 0.7; } .ProseMirror [data-node-deletion] { text-decoration: line-through; } .ProseMirror span[data-type='modification'] { text-decoration: underline dotted var(--muted); text-decoration-thickness: 0.12em; text-underline-offset: 0.15em; background: var(--selection-wash); } .ProseMirror mark.comment { background: var(--ok-wash); color: inherit; border-bottom: 1px solid var(--ok); } /* --- the assistant picker (draft-assistant-picker) and the style picker (draft-style-picker) --- */ dialog.draft-assistant-picker, dialog.draft-style-picker { margin: auto; border: 1px solid var(--hairline); padding: 0; max-width: 34rem; width: calc(100vw - 2rem); max-height: calc(100vh - 2rem); overflow: auto; background: var(--surface); color: var(--fg); } dialog.draft-assistant-picker::backdrop, dialog.draft-style-picker::backdrop { background: rgb(0 0 0 / 0.5); } dialog.draft-assistant-picker form, dialog.draft-style-picker form { display: grid; gap: var(--space-2); padding: var(--space-3); } dialog.draft-assistant-picker h2, dialog.draft-style-picker h2 { font-size: var(--text-lg); } dialog.draft-assistant-picker fieldset, dialog.draft-style-picker fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--space-1); } dialog.draft-assistant-picker .choice, dialog.draft-style-picker .choice { display: flex; gap: 0.6rem; align-items: baseline; cursor: pointer; } dialog.draft-assistant-picker .fields, dialog.draft-style-picker .fields { display: grid; gap: 0.4rem; margin: 0 0 var(--space-1) 1.6rem; } dialog.draft-assistant-picker .fields label, dialog.draft-style-picker .fields label { display: grid; gap: 0.2rem; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; } dialog.draft-assistant-picker .fields label.inline, dialog.draft-style-picker .fields label.inline { display: flex; gap: 0.4rem; align-items: center; text-transform: none; letter-spacing: 0; font-weight: var(--weight-regular); font-size: var(--text-sm); } dialog.draft-assistant-picker input[type='text'], dialog.draft-assistant-picker input[type='url'], dialog.draft-assistant-picker input[type='password'], dialog.draft-assistant-picker select, dialog.draft-style-picker select, dialog.draft-style-picker textarea { font: var(--weight-regular) var(--text-sm) var(--font-sans); border: 1px solid var(--hairline); background: var(--bg); color: var(--fg); padding: 0.3rem 0.5rem; width: 100%; } /* the halfmind addresses, folded away */ dialog.draft-assistant-picker details.advanced { display: grid; gap: 0.4rem; } dialog.draft-assistant-picker details.advanced summary { cursor: pointer; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--muted); } /* Check: the button, then what each road answered */ dialog.draft-assistant-picker .check { display: grid; gap: 0.3rem; justify-items: start; } dialog.draft-assistant-picker .report { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; font-size: var(--text-xs); } dialog.draft-assistant-picker .report li::before { content: '✓'; display: inline-block; width: 1.1rem; color: var(--ok); font-weight: var(--weight-semibold); } dialog.draft-assistant-picker .report li.bad::before { content: '✕'; color: var(--accent); } dialog.draft-assistant-picker .actions, dialog.draft-style-picker .actions { display: flex; gap: 0.5rem; justify-content: flex-end; } dialog.draft-style-picker { max-width: 40rem; } dialog.draft-style-picker > form > label, dialog.draft-style-picker .knobs > label { display: grid; gap: 0.2rem; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; } dialog.draft-style-picker .knobs { display: grid; gap: var(--space-2); } dialog.draft-style-picker .knobs[hidden] { display: none; } dialog.draft-style-picker .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--space-2); } dialog.draft-style-picker .row > label { display: grid; gap: 0.2rem; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; } dialog.draft-style-picker .checks { display: flex; flex-wrap: wrap; gap: var(--space-2); } dialog.draft-style-picker .checks label { display: flex; gap: 0.4rem; align-items: center; font: var(--weight-regular) var(--text-sm) var(--font-sans); letter-spacing: 0; text-transform: none; } dialog.draft-style-picker textarea { resize: vertical; font-family: var(--font-sans); } /* ── Floating chrome: bubble, menus, prompts ──────────────────────────── */ .chrome { position: absolute; inset: 0 auto auto 0; width: 0; height: 0; } .bubble, .menu, .prompt, .math-edit { position: absolute; z-index: 20; background: var(--surface); color: var(--fg); border: 1px solid var(--hairline); font: var(--weight-regular) var(--text-sm) var(--font-sans); text-transform: none; letter-spacing: 0; line-height: 1.3; text-decoration: none; } .bubble { display: flex; gap: 0.15rem; padding: 0.2rem; } .bubble button { font-weight: var(--weight-bold); } .menu { min-width: 15rem; max-width: 24rem; margin-top: 0.3rem; } .menu .item { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.35rem 0.6rem; cursor: pointer; border-bottom: 1px solid var(--hairline); } .menu .item:last-child { border-bottom: 0; } .menu .item.on, .menu .item:hover { background: var(--fg); color: var(--bg); } .menu .item.head, .menu .item.quote { cursor: default; background: var(--subtle); } .menu .item.head:hover, .menu .item.quote:hover { background: var(--subtle); color: inherit; } .menu .item.danger:hover { background: var(--accent); } .menu .item .label { font-weight: var(--weight-bold); font-size: inherit; letter-spacing: 0; text-transform: none; } .menu .item.head .label { font-size: var(--text-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; } .menu .item .hint { color: var(--muted); font-size: var(--text-xs); } .menu .item.on .hint, .menu .item:hover .hint { color: inherit; } .menu .item .hint.mono { font-family: var(--font-mono); } .prompt, .math-edit { margin-top: 0.3rem; padding: 0.6rem; display: grid; gap: 0.5rem; min-width: 18rem; } .prompt label, .math-edit label { display: grid; gap: 0.3rem; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; } .prompt input, .prompt textarea, .math-edit textarea { font: var(--weight-regular) var(--text-sm) var(--font-sans); letter-spacing: 0; text-transform: none; padding: 0.25rem 0.4rem; border: 1px solid var(--hairline); background: var(--bg); color: var(--fg); width: 100%; } .math-edit textarea { font-family: var(--font-mono); min-height: 2rem; width: 22rem; max-width: 100%; } .prompt .row, .math-edit .row { display: flex; gap: 0.4rem; justify-content: flex-end; } /* ── Buttons ──────────────────────────────────────────────────────────── */ /* supram's .btn family does the work (heavy for the one major action, quiet with an icon for the rest); only the editor's own accents live here. */ .bubble button.active { background: var(--fg); border-color: var(--fg); color: var(--bg); } .draft-sidebar button.link { border: 0; background: transparent; padding: 0; color: var(--link); font: var(--weight-regular) var(--text-sm) var(--font-sans); cursor: pointer; } .draft-sidebar button.link:hover { color: var(--link-hover); } .draft-sidebar .btn.chip { font-weight: var(--weight-regular); white-space: normal; text-align: start; } .btn.ok:hover:not(:disabled) { background: var(--ok); border-color: var(--ok); color: var(--on-glass); } .btn.no:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--on-glass); } /* ── A switch: a mode that is on or off, drawn as one ────────────────── */ .draft-switch { display: inline-flex; align-items: center; gap: 0.4rem; border: 0; background: transparent; color: var(--muted); padding: 0.2rem 0.3rem; font: var(--weight-regular) var(--text-sm) / 1 var(--font-sans); letter-spacing: 0; text-transform: none; white-space: nowrap; cursor: pointer; } .draft-switch .switch-track { box-sizing: border-box; position: relative; width: 1.7rem; height: 0.9rem; border: 1px solid var(--muted); background: var(--bg); transition: background 0.15s, border-color 0.15s; } .draft-switch .switch-knob { position: absolute; top: 1px; left: 1px; width: 0.65rem; height: 0.65rem; background: var(--muted); transition: transform 0.15s, background 0.15s; } .draft-switch:hover { color: var(--fg); } .draft-switch[aria-checked='true'] { color: var(--fg); } .draft-switch[aria-checked='true'] .switch-track { background: var(--fg); border-color: var(--fg); } .draft-switch[aria-checked='true'] .switch-knob { transform: translateX(0.8rem); background: var(--bg); } .draft-switch:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; } /* ── The margin: accept / reject beside a clicked suggestion ──────────── */ .margin-actions { position: absolute; left: calc(0.15rem - var(--draft-gutter, 2rem)); z-index: 15; display: flex; flex-direction: column; gap: 0.15rem; background: var(--bg); } /* ── The sidebar ─────────────────────────────────────────────────────── */ .draft-sidebar { background: var(--surface); border: 1px solid var(--hairline); display: flex; flex-direction: column; max-height: calc(100dvh - 2rem); position: sticky; top: 1rem; font-size: var(--text-sm); } /* the tabs sit on the page's white; the open one is cut from the pane's surface and joins it */ .draft-sidebar { container-type: inline-size; } .draft-sidebar .tabs { display: flex; align-items: stretch; gap: 0.25rem; padding: 0.4rem 0.4rem 0; background: var(--bg); border-bottom: 1px solid var(--hairline); } .draft-sidebar .tab { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; background: transparent; color: var(--muted); padding: 0.5rem 0.5rem; font: var(--weight-semibold) var(--text-xs) / 1.2 var(--font-sans); letter-spacing: var(--tracking-caps); text-transform: uppercase; white-space: nowrap; cursor: pointer; } .draft-sidebar .tab .icon { flex: none; } .draft-sidebar .tab .text { overflow: hidden; text-overflow: ellipsis; } .draft-sidebar .tab:hover { color: var(--fg); } .draft-sidebar .tab.on { color: var(--fg); background: var(--surface); border-color: var(--hairline); } /* one panel and nothing else: no tab row */ .draft-sidebar .tabs:has(> .tab:only-child) { display: none; } /* too narrow for icons and names both: the icons, with the names in the tooltips */ @container (max-width: 27rem) { .draft-sidebar .tab .text { display: none; } } .draft-sidebar .tab .badge { display: inline-grid; place-items: center; min-width: 1.4em; padding: 0 0.35em; border-radius: 1em; background: var(--accent); color: var(--on-glass); font-size: 0.85em; } .draft-sidebar .pane { padding: var(--space-2); overflow: auto; display: flex; flex-direction: column; gap: var(--space-2); min-height: 0; } .draft-sidebar .spacer { flex: 1; } .draft-sidebar .row { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; } .draft-sidebar .muted { color: var(--muted); } .draft-sidebar .small { font-size: var(--text-xs); } .draft-sidebar p { margin: 0; } .draft-sidebar .label { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; } .draft-sidebar .section-head { display: flex; align-items: center; gap: 0.4rem; margin-top: var(--space-1); padding-bottom: 0.2rem; border-bottom: 1px solid var(--hairline); } .draft-sidebar .cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); } .draft-sidebar .card { background: var(--bg); border: 1px solid var(--hairline); padding: var(--space-1) var(--space-2); cursor: pointer; display: grid; gap: 0.3rem; } .draft-sidebar .card:hover { border-color: var(--hairline); } .draft-sidebar .card.comment.resolved { opacity: 0.6; } .draft-sidebar .card-head { display: flex; align-items: center; gap: 0.4rem; } .draft-sidebar .kind { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; } .draft-sidebar .who { font-size: var(--text-xs); color: var(--muted); } .draft-sidebar .who.assistant::before { content: '✦ '; color: var(--link); } .draft-sidebar .stamp { font-size: var(--text-xs); color: var(--muted); } .draft-sidebar .diff { line-height: 1.4; } .draft-sidebar .diff del { background: var(--accent-wash); color: var(--accent-text); text-decoration: line-through; margin-right: 0.3rem; } .draft-sidebar .diff ins { background: var(--ok-wash); color: var(--fg); text-decoration: none; } .draft-sidebar .diff .mod { font-family: var(--font-mono); font-size: var(--text-xs); background: var(--warn-wash); color: var(--fg); padding: 0 0.3rem; } .draft-sidebar .note { color: var(--muted); font-style: italic; } .draft-sidebar .quote { color: var(--muted); font-size: var(--text-xs); border-inline-start: 2px solid var(--hairline); padding-inline-start: 0.5rem; } .draft-sidebar .reply { padding-inline-start: 0.5rem; border-inline-start: 2px solid var(--hairline); } .draft-sidebar .reply-form { display: flex; gap: 0.3rem; } .draft-sidebar .reply-form input, .draft-sidebar .ask textarea { font: var(--weight-regular) var(--text-sm) var(--font-sans); border: 1px solid var(--hairline); background: var(--bg); color: var(--fg); padding: 0.3rem 0.5rem; width: 100%; resize: vertical; } /* the conversation */ .draft-sidebar .chat { min-height: 24rem; } .draft-sidebar .chat-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: var(--space-1); min-height: 10rem; } .draft-sidebar .msg { padding: var(--space-1) var(--space-2); max-width: 95%; display: grid; gap: 0.3rem; } .draft-sidebar .msg .text { white-space: pre-wrap; } .draft-sidebar .msg.user { align-self: flex-end; background: var(--fg); color: var(--bg); } .draft-sidebar .msg.user .stamp { color: inherit; opacity: 0.6; text-align: right; } .draft-sidebar .msg.assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--hairline); border-inline-start: 1px solid var(--link); } .draft-sidebar .outcome { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; } .draft-sidebar .outcome .count { font-size: var(--text-xs); font-weight: var(--weight-semibold); } .draft-sidebar .failed { font-size: var(--text-xs); width: 100%; } .draft-sidebar .failed ul { margin: 0.2rem 0 0; padding-inline-start: 1.2em; } .draft-sidebar .quick { display: flex; flex-wrap: wrap; gap: 0.3rem; } .draft-sidebar .ask { display: grid; gap: 0.4rem; } .draft-sidebar .dots { display: inline-flex; gap: 0.25rem; } /* --- the assistant at work: who, for how long, the steps, the words so far --- */ .draft-sidebar .thinking { display: grid; gap: 0.4rem; max-width: 100%; width: 100%; } .draft-sidebar .thinking .head { display: flex; align-items: center; gap: 0.6rem; min-height: 1.6rem; } .draft-sidebar .thinking .head .who { font-size: var(--text-xs); } .draft-sidebar .thinking .since { color: var(--muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; } .draft-sidebar .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; font-size: var(--text-xs); } .draft-sidebar .step { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0.5rem; align-items: baseline; color: var(--muted); } .draft-sidebar .step .at { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; } .draft-sidebar .step .text { min-width: 0; overflow-wrap: anywhere; } .draft-sidebar .step.current { color: var(--fg); } .draft-sidebar .step.current .at { color: var(--link); } .draft-sidebar .step.failed .text { color: var(--accent); } .draft-sidebar .step .tool { font-weight: var(--weight-semibold); color: var(--fg); } .draft-sidebar .step .result { display: block; color: var(--muted); padding-inline-start: 0.6rem; border-inline-start: 1px solid var(--hairline); margin-top: 0.1rem; } .draft-sidebar .thinking .reply-so-far, .draft-sidebar .thinking-text, .draft-sidebar .activity .raw { display: grid; gap: 0.25rem; } .draft-sidebar .thinking .reply-so-far .label, .draft-sidebar .thinking-text summary, .draft-sidebar .activity summary { font-size: var(--text-xs); color: var(--muted); text-transform: none; letter-spacing: normal; cursor: default; } .draft-sidebar .stream { margin: 0; max-height: 11rem; overflow: auto; font: var(--weight-regular) var(--text-xs) var(--font-mono); line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); background: var(--surface); padding: 0.35rem 0.5rem; border: 1px solid var(--hairline); } .draft-sidebar .thinking .stream { color: var(--fg); } .draft-sidebar .activity { font-size: var(--text-xs); } .draft-sidebar .activity[open] { display: grid; gap: 0.3rem; } .draft-sidebar .activity .stream { max-height: 16rem; } .draft-sidebar .pin.on { color: var(--link); } .draft-sidebar .dots i { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--muted); animation: draft-blink 1s infinite; } .draft-sidebar .dots i:nth-child(2) { animation-delay: 0.2s; } .draft-sidebar .dots i:nth-child(3) { animation-delay: 0.4s; } @keyframes draft-blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } } /* ── The margin: comments beside the text they are on ─────────────────── */ /* A zero-size anchor at the text's right edge (--notes-left, where the blocks stop). The editor sets --notes-room to how far the notes may reach before the next thing (a sidebar, the window's edge) and --notes-host to the text's own width. */ .margin-notes { position: absolute; top: 0; left: var(--notes-left, 100%); width: 0; height: 0; } /* clamped: author and the first two lines */ .margin-note { position: absolute; top: 0; left: 0.6rem; width: min(16rem, max(3.5rem, calc(var(--notes-room, 0px) - 0.6rem))); background: var(--surface); color: var(--muted); padding: 0.15rem 0.5rem 0.25rem; font: var(--weight-regular) var(--text-xs) var(--font-sans); line-height: 1.35; letter-spacing: 0; text-transform: none; cursor: pointer; z-index: 14; overflow-wrap: anywhere; } .margin-note .note-head { display: flex; align-items: center; gap: 0.4rem; min-width: 0; } .margin-note .who { font-weight: var(--weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .margin-note .who.assistant::before { content: '✦ '; color: var(--link); } .margin-note .stamp { color: var(--muted); } .margin-note .spacer { flex: 1; } .margin-note .note-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } /* in full: the caret is in its text, or the note was clicked; wider than the room allows, it comes over the text's edge rather than past the sidebar */ .margin-note.on { width: 16rem; translate: min(0px, calc(var(--notes-room, 0px) - 16.6rem)) 0; z-index: 16; color: var(--fg); font-size: var(--text-sm); padding: 0.4rem 0.6rem 0.5rem; border: 1px solid var(--hairline); cursor: default; display: grid; gap: 0.3rem; } .margin-note.on .note-text { display: block; overflow: visible; } .margin-note .reply { color: var(--muted); } .margin-note .reply .who { display: inline; white-space: normal; } .margin-note .reply-form { display: flex; gap: 0.3rem; } .margin-note .reply-form input { flex: 1; min-width: 0; font: inherit; border: 1px solid var(--hairline); background: var(--bg); color: var(--fg); padding: 0.2rem 0.4rem; } .margin-note button.link { border: 0; background: transparent; padding: 0; color: var(--link); font: var(--weight-regular) var(--text-sm) var(--font-sans); cursor: pointer; justify-self: start; } .margin-note button.link:hover { color: var(--link-hover); } /* no room beside the text (a phone): only the one in full, under its line, over the text */ .margin-notes.narrow .margin-note.on { left: auto; right: 0.5rem; translate: none; width: min(16rem, calc(var(--notes-host, 20rem) - 1rem)); } /* the text a note in full is about */ .ProseMirror mark.comment.on { background: var(--ok); color: var(--on-ok); } /* a slim column (under 12rem beside the text): a third line, no stamp */ draft-editor[data-notes='slim'] .margin-note:not(.on) .note-text { -webkit-line-clamp: 3; } /* ── The count: words and characters, a note at the bottom left of the screen ── */ .draft-counts { position: fixed; left: 0.75rem; bottom: 0.6rem; z-index: 12; display: flex; flex-wrap: wrap; gap: 0 1rem; max-width: calc(100vw - 1.5rem); padding: 0.15rem 0.5rem; background: var(--bg); /* opaque: on a phone it sits over the text */ color: var(--muted); font: var(--weight-regular) var(--text-xs) var(--font-sans); letter-spacing: 0; text-transform: none; line-height: 1.5; font-variant-numeric: tabular-nums; white-space: nowrap; } .draft-counts .count-label { margin-inline-end: 0.4rem; font-size: 0.65rem; font-weight: var(--weight-semibold); letter-spacing: 0.06em; text-transform: uppercase; } /* against a target: a thin rule under the line fills as the words come; past it, the accent */ .draft-counts .count.targeted { position: relative; padding-bottom: 3px; } .draft-counts .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--hairline); overflow: hidden; } .draft-counts .bar i { position: absolute; inset: 0 auto 0 0; background: var(--ok); } .draft-counts .count.over { color: var(--fg); } .draft-counts .count.over .bar i { background: var(--accent); } /* ── Tooltips: the name and the shortcut, drawn by the page (tooltip.ts) ── */ .draft-tip { position: fixed; z-index: 60; display: none; align-items: baseline; gap: 0.35rem; max-width: 22rem; padding: 0.3rem 0.55rem; background: var(--fg); color: var(--bg); font: var(--weight-regular) var(--text-xs) var(--font-sans); letter-spacing: 0; text-transform: none; line-height: 1.35; pointer-events: none; } .draft-tip.on { display: flex; flex-wrap: wrap; } .draft-tip .tip-name { font-weight: var(--weight-semibold); } .draft-tip kbd { font: var(--weight-regular) 0.7rem var(--font-mono); padding: 0 0.3rem; border: 1px solid rgb(255 255 255 / 0.4); border-radius: 2px; line-height: 1.3; white-space: nowrap; } .draft-tip .tip-rest { flex-basis: 100%; opacity: 0.8; } /* ── Section headings: the number before the title, the words against the target after it ── */ .sec-head { display: flex; align-items: baseline; gap: 0.6rem; } .sec-head .title { flex: 1 1 auto; } .sec-head .sec-num, .sec-head .sec-count { color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-regular); letter-spacing: var(--tracking-wide); white-space: nowrap; user-select: none; } .sec-head .sec-num:empty, .sec-head .sec-count:empty { display: none; } .sec-head .sec-count { margin-left: auto; } /* ── The asks in the text: the section at work, the proposals stepped through, the group heads ── */ /* a section at work: a thin ink line moving beside its heading */ .sec-head.working .title { flex: 0 1 auto; } .sec-head.working::after { content: ''; display: block; flex: 1 1 2rem; height: 2px; margin-left: 0.6rem; align-self: center; background: linear-gradient(90deg, var(--link) 0 30%, color-mix(in oklab, var(--link) 12%, var(--bg)) 30% 100%); background-size: 300% 100%; animation: draft-slide 1.6s linear infinite; } @keyframes draft-slide { from { background-position: 100% 0; } to { background-position: -100% 0; } } /* a note at work (one paragraph asked about): its wash breathes */ .ProseMirror p.working { background: var(--selection-wash); animation: draft-breathe 1.6s ease-in-out infinite; } @keyframes draft-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } } /* the proposal the keyboard is on: a one-pixel outline, set off from the wash (a decoration: on the block, or on the text of a change within one) */ .ProseMirror .focus { outline: 1px solid var(--fg); outline-offset: 0.5rem; } /* a group head before the first proposal of an ask: what was asked, who, how long, take all, drop all */ .draft-group { display: flex; align-items: baseline; gap: var(--space-2); font-size: var(--text-sm); color: var(--muted); margin: var(--space-2) 0 var(--space-3); user-select: none; } .draft-group b { color: var(--fg); font-weight: var(--weight-semibold); white-space: nowrap; } .draft-group .of { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .draft-group .acts { margin-left: auto; display: flex; gap: 0.3rem; flex: none; } /* the margin: who is at work, for how long, with Stop */ .margin-note.at-work { color: var(--fg); background: transparent; cursor: default; display: grid; gap: 0.15rem; } .margin-note.at-work .since { color: var(--muted); margin-left: 0.35rem; } .margin-note.at-work .step { display: block; color: var(--muted); } .margin-note.at-work .stop { justify-self: start; margin-top: 0.25rem; } /* the margin: an ask's reply at its proposals, the receipt folded under it */ .margin-note.receipt { background: var(--surface); } .margin-note.receipt .note-head .who::before { content: ''; display: inline-block; width: 0.4rem; height: 0.4rem; background: var(--link); margin-right: 0.35rem; vertical-align: 0.05em; } .margin-note.receipt.failed .note-head .who::before, .margin-note.receipt.stopped .note-head .who::before { background: var(--muted); } .margin-note.receipt.on { width: 18rem; translate: min(0px, calc(var(--notes-room, 0px) - 18.6rem)) 0; } .margin-note.receipt .receipt-fold { font-size: var(--text-xs); color: var(--muted); } .margin-note.receipt .receipt-fold summary { cursor: pointer; } .margin-note.receipt .steps { list-style: none; margin: 0.3rem 0 0; padding: 0; display: grid; gap: 0.15rem; } .margin-note.receipt .step { display: flex; gap: 0.4rem; } .margin-note.receipt .step .at { flex: none; font-family: var(--font-mono); color: var(--muted); } .margin-note.receipt .step.failed .text, .margin-note.receipt .step.error .text { color: var(--accent-text); } .margin-note.receipt .step .tool { font-family: var(--font-mono); } .margin-note.receipt .step .result { color: var(--muted); } .margin-note.receipt .raw { margin-top: 0.3rem; } .margin-note.receipt .raw .stream { max-height: 12rem; overflow: auto; font-size: 0.7rem; white-space: pre-wrap; background: var(--bg); padding: 0.3rem; margin: 0.2rem 0 0; }