Files
rustpad/static/css/styles.css
T

4060 lines
66 KiB
CSS

:root {
color-scheme: dark;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-synthesis: none;
background: #0b0d11;
color: #f4f6f8;
--bg: #0b0d11;
--surface: #11141a;
--surface-2: #151922;
--surface-3: #1a1f29;
--border: #272d38;
--border-strong: #343c49;
--text: #f4f6f8;
--muted: #929cab;
--muted-2: #697383;
--accent: #7c68ee;
--accent-hover: #8d79f8;
--accent-soft: #272246;
--danger: #ff7b91;
--success: #40d3a3;
}
* {
box-sizing: border-box;
}
html {
min-width: 320px;
background: var(--bg);
}
body {
min-height: 100vh;
margin: 0;
background: var(--bg);
color: var(--text);
}
button,
input,
select,
textarea {
font: inherit;
}
button,
a,
input,
select,
textarea {
-webkit-tap-highlight-color: transparent;
}
button {
cursor: pointer;
}
button:disabled {
cursor: wait;
opacity: .65;
}
a {
color: inherit;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.brand {
color: var(--text);
font-weight: 700;
text-decoration: none;
letter-spacing: -.02em;
}
.site-header {
width: min(720px, calc(100% - 32px));
min-height: 64px;
margin: 0 auto;
display: flex;
align-items: center;
border-bottom: 1px solid var(--border);
}
.home-layout {
width: min(520px, calc(100% - 32px));
margin: 0 auto;
padding: 72px 0;
}
.home-intro {
margin-bottom: 28px;
}
.home-intro h1 {
margin: 0;
font-size: clamp(2rem, 7vw, 3rem);
letter-spacing: -.04em;
}
.home-intro p {
margin: 10px 0 0;
color: var(--muted);
line-height: 1.6;
}
.panel {
border: 1px solid var(--border);
border-radius: 12px;
background: var(--surface);
}
.create-panel {
padding: 24px;
}
#create-form {
display: grid;
gap: 20px;
padding-top: 22px;
}
.field {
display: grid;
gap: 8px;
}
.field label {
color: #dce1e8;
font-size: .86rem;
font-weight: 750;
}
.label-row,
.field-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.label-row span,
.field-meta,
.field small {
color: var(--muted-2);
font-size: .73rem;
}
input,
select {
border: 1px solid var(--border-strong);
outline: none;
background: #0e1116;
color: var(--text);
}
input {
width: 100%;
min-height: 46px;
padding: 0 13px;
border-radius: 10px;
}
input:focus,
select:focus,
textarea:focus {
border-color: #7567db;
outline: 1px solid #7567db;
outline-offset: 1px;
}
.password-input {
position: relative;
}
.password-input input {
padding-right: 72px;
}
.text-button {
position: static;
transform: none;
border: 0;
background: transparent;
color: #a99ef8;
padding: 4px 2px;
font-size: .78rem;
}
.text-button:hover {
color: #c3bbff;
}
.password-toggle {
position: absolute;
top: 50%;
right: 8px;
transform: translateY(-50%);
padding: 7px;
}
[hidden] {
display: none !important;
}
.form-message {
min-height: 1.2em;
margin: -5px 0 0;
font-size: .8rem;
}
.error {
color: var(--danger);
}
.primary-button,
.secondary-button,
.inline-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 40px;
border-radius: 8px;
font-weight: 650;
text-decoration: none;
}
.primary-button {
width: 100%;
border: 1px solid #8372ef;
background: var(--accent);
color: white;
padding: 0 16px;
}
.primary-button:hover {
background: var(--accent-hover);
}
.secondary-button {
border: 1px solid var(--border-strong);
background: var(--surface-2);
color: #d2d8e1;
padding: 0 13px;
}
.secondary-button:hover {
border-color: #4b5565;
background: var(--surface-3);
}
.inline-button {
width: auto;
margin-top: 18px;
padding: 0 16px;
}
.app-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
min-height: 70px;
padding: 0 20px;
border-bottom: 1px solid var(--border);
background: #0d1015;
}
.app-header__main,
.header-actions {
display: flex;
align-items: center;
gap: 14px;
min-width: 0;
}
.header-divider {
width: 1px;
height: 30px;
background: var(--border);
}
.document-heading {
min-width: 0;
}
.document-heading h1 {
overflow: hidden;
margin: 0;
font-size: 1rem;
white-space: nowrap;
text-overflow: ellipsis;
}
.document-url {
overflow: hidden;
max-width: 360px;
margin: 3px 0 0;
color: var(--muted-2);
font-size: .72rem;
white-space: nowrap;
text-overflow: ellipsis;
}
.status {
display: inline-flex;
align-items: center;
gap: 8px;
min-height: 34px;
padding: 0 8px;
color: var(--muted);
font-size: .78rem;
}
.status__dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: #e3a94d;
}
.status__dot.is-online {
background: var(--success);
}
.status__dot.is-offline {
background: var(--danger);
}
.editor-layout {
position: relative;
display: grid;
grid-template-columns: minmax(0, 1fr) 0;
height: calc(100vh - 70px);
overflow: hidden;
transition: grid-template-columns .18s ease;
}
.history-open .editor-layout {
grid-template-columns: minmax(0, 1fr) 340px;
}
.editor-panel {
display: grid;
grid-template-rows: auto minmax(0, 1fr) auto;
min-width: 0;
background: var(--surface);
}
.editor-toolbar {
display: flex;
align-items: center;
gap: 8px;
min-height: 52px;
padding: 8px 12px;
border-bottom: 1px solid var(--border);
background: #101319;
}
.toolbar-group,
.view-switch {
display: inline-flex;
align-items: center;
gap: 4px;
padding-right: 8px;
border-right: 1px solid var(--border);
}
.toolbar-group:last-child,
.view-switch {
padding-right: 0;
border-right: 0;
}
.toolbar-fill {
flex: 1;
}
.editor-toolbar button,
.editor-toolbar select {
min-height: 34px;
border: 1px solid transparent;
border-radius: 7px;
background: transparent;
color: #b8c0cc;
padding: 0 9px;
font-size: .78rem;
}
.editor-toolbar button:hover,
.editor-toolbar select:hover {
border-color: var(--border);
background: var(--surface-2);
color: white;
}
.editor-toolbar select {
border-color: var(--border);
background: #11151c;
}
.view-switch {
padding: 3px;
border: 1px solid var(--border);
border-radius: 9px;
background: #0d1015;
}
.view-switch button.active {
background: var(--surface-3);
color: white;
}
.workspace {
display: grid;
min-height: 0;
background: #0e1116;
}
.workspace.view-split {
grid-template-columns: 1fr 1fr;
}
.workspace.view-edit {
grid-template-columns: 1fr;
}
.workspace.view-preview {
grid-template-columns: 1fr;
}
.workspace.view-edit .preview-column,
.workspace.view-preview .editor-column {
display: none;
}
.editor-column,
.preview-column {
display: grid;
grid-template-rows: 30px minmax(0, 1fr);
min-width: 0;
min-height: 0;
}
.preview-column {
border-left: 1px solid var(--border);
}
.column-label {
display: flex;
align-items: center;
padding: 0 18px;
border-bottom: 1px solid #202631;
background: #10141a;
color: var(--muted-2);
font-size: .7rem;
font-weight: 750;
letter-spacing: .08em;
text-transform: uppercase;
}
textarea {
display: block;
width: 100%;
height: 100%;
min-height: 0;
resize: none;
padding: 24px;
border: 0;
outline: none;
background: #0d1015;
color: #edf1f6;
font: 400 17px/1.72 ui-monospace, SFMono-Regular, Consolas, monospace;
caret-color: #9b89ff;
}
textarea::placeholder {
color: #515a68;
}
textarea::selection {
background: rgba(124, 104, 238, .35);
}
.preview {
overflow: auto;
min-height: 0;
padding: 24px;
color: #dce2eb;
line-height: 1.72;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
margin: 1.25em 0 .5em;
letter-spacing: -.03em;
}
.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
margin-top: 0;
}
.markdown-body h1 {
font-size: 2rem;
}
.markdown-body h2 {
font-size: 1.5rem;
}
.markdown-body p {
margin: .72em 0;
}
.markdown-body code {
padding: .16em .36em;
border: 1px solid #303745;
border-radius: 5px;
background: #1a2029;
}
.markdown-body pre {
overflow: auto;
padding: 16px;
border: 1px solid var(--border);
border-radius: 10px;
background: #0a0d12;
}
.markdown-body pre code {
padding: 0;
border: 0;
background: transparent;
}
.markdown-body blockquote {
margin: 1em 0;
padding: .2em 1em;
border-left: 3px solid var(--accent);
color: #abb5c3;
}
.markdown-body a {
color: #aa9df8;
}
.markdown-body hr {
border: 0;
border-top: 1px solid var(--border);
}
.editor-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
min-height: 38px;
padding: 0 16px;
border-top: 1px solid var(--border);
color: var(--muted-2);
font-size: .72rem;
}
.document-stats {
display: flex;
gap: 14px;
}
.history-panel {
position: relative;
width: 340px;
overflow: hidden;
border-left: 1px solid var(--border);
background: #101319;
transform: translateX(100%);
transition: transform .18s ease;
}
.history-panel.open {
transform: translateX(0);
}
.history-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 18px;
}
.history-help {
margin: 0;
padding: 0 18px 16px;
border-bottom: 1px solid var(--border);
color: var(--muted);
font-size: .8rem;
line-height: 1.5;
}
.icon-button {
display: grid;
place-items: center;
width: 34px;
height: 34px;
border: 1px solid var(--border);
border-radius: 8px;
background: transparent;
color: #c5ccd6;
font-size: 1.2rem;
}
.history-list {
overflow: auto;
height: calc(100vh - 185px);
padding: 10px 18px 24px;
}
.revision {
position: relative;
display: grid;
grid-template-columns: 12px 1fr;
gap: 10px;
padding: 13px 0;
}
.revision::after {
content: "";
position: absolute;
top: 25px;
bottom: -13px;
left: 5px;
width: 1px;
background: var(--border);
}
.revision:last-child::after {
display: none;
}
.revision__marker {
position: relative;
z-index: 1;
width: 11px;
height: 11px;
margin-top: 3px;
border: 2px solid #8b7af4;
border-radius: 50%;
background: #101319;
}
.revision time {
display: block;
color: #d1d7df;
font-size: .8rem;
}
.revision small {
display: block;
margin-top: 4px;
color: var(--muted-2);
}
.revision button {
margin-top: 10px;
border: 0;
background: transparent;
color: #9e92f5;
padding: 0;
font-size: .76rem;
font-weight: 750;
}
.empty {
padding: 28px 0;
color: var(--muted-2);
text-align: center;
font-size: .82rem;
}
dialog {
width: min(420px, calc(100% - 24px));
padding: 0;
border: 0;
background: transparent;
color: inherit;
}
dialog::backdrop {
background: rgba(4, 6, 9, .82);
}
.dialog-panel {
display: grid;
gap: 12px;
padding: 24px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--surface);
text-align: left;
}
.dialog-panel input {
margin-top: 6px;
}
.dialog-panel .primary-button {
margin-top: 2px;
}
.dialog-link {
color: var(--muted);
font-size: .78rem;
}
.toast {
position: fixed;
right: 20px;
bottom: 20px;
z-index: 20;
padding: 11px 14px;
border: 1px solid var(--border-strong);
border-radius: 10px;
background: #171b23;
color: #e6eaf0;
font-size: .8rem;
opacity: 0;
transform: translateY(8px);
pointer-events: none;
transition: .16s ease;
}
.toast.visible {
opacity: 1;
transform: translateY(0);
}
.error-page {
display: grid;
place-items: center;
min-height: 100vh;
padding: 24px;
text-align: center;
}
.error-page h1 {
margin: 0;
font-size: clamp(2rem, 6vw, 4rem);
letter-spacing: -.05em;
}
.error-page p {
color: var(--muted);
}
@media (max-width: 980px) {
.app-header {
align-items: flex-start;
min-height: auto;
padding: 12px 14px;
}
.app-header__main,
.header-actions {
flex-wrap: wrap;
}
.editor-layout {
height: calc(100vh - 92px);
}
.toolbar-settings {
display: none;
}
.history-open .editor-layout {
grid-template-columns: minmax(0, 1fr);
}
.history-panel {
position: absolute;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
}
}
@media (max-width: 720px) {
.site-header,
.home-layout {
width: min(100% - 24px, 520px);
}
.document-url,
.header-divider {
display: none;
}
.home-layout {
padding: 44px 0;
}
.app-header {
gap: 10px;
}
.status {
display: none;
}
.editor-toolbar {
overflow-x: auto;
flex-wrap: nowrap;
}
.toolbar-fill {
display: none;
}
.workspace.view-split {
grid-template-columns: 1fr;
}
.workspace.view-split .preview-column {
display: none;
}
.view-switch button[data-view="split"] {
display: none;
}
.preview-column {
border-left: 0;
}
textarea,
.preview {
padding: 18px;
}
.editor-footer {
align-items: flex-start;
flex-direction: column;
justify-content: center;
gap: 2px;
padding: 7px 12px;
}
}
@media (max-width: 480px) {
.create-panel {
padding: 20px;
}
.header-actions {
gap: 6px;
}
.secondary-button {
min-height: 36px;
padding: 0 10px;
font-size: .75rem;
}
.history-panel {
width: 100%;
}
}
.markdown-toggle {
border: 1px solid var(--border) !important;
}
.markdown-toggle.active {
background: var(--surface-3) !important;
color: white !important;
}
.preview--raw {
white-space: pre-wrap;
overflow-wrap: anywhere;
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.workspace-page {
width: min(1100px, calc(100% - 32px));
margin: 0 auto;
padding: 44px 0 80px;
}
.workspace-top {
display: flex;
align-items: end;
justify-content: space-between;
gap: 24px;
padding-bottom: 24px;
border-bottom: 1px solid var(--border);
}
.workspace-top h2 {
margin: 0;
font-size: 2rem;
}
.workspace-top p {
margin: 7px 0 0;
color: var(--muted);
}
.notes-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 12px;
padding-top: 20px;
}
.note-card {
min-height: 130px;
padding: 18px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface);
text-decoration: none;
transition: border-color .15s, background .15s;
}
.note-card:hover {
border-color: var(--border-strong);
background: var(--surface-2);
}
.note-card h3 {
margin: 0;
font-size: 1rem;
}
.note-card p {
margin: 36px 0 0;
color: var(--muted);
font-size: .75rem;
}
.dialog-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
.inline-button {
width: auto;
padding-inline: 18px;
}
.error-card {
width: min(560px, 100%);
padding: 32px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--surface);
}
.error-code {
margin: 0 0 10px;
color: var(--muted-2);
font: 700 .78rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
letter-spacing: .12em;
}
.error-card h1 {
font-size: clamp(1.8rem, 6vw, 3rem);
}
.error-card>p:not(.error-code) {
max-width: 46ch;
margin: 14px auto 0;
line-height: 1.6;
}
.error-actions {
display: flex;
justify-content: center;
gap: 8px;
margin-top: 24px;
}
@media (max-width: 480px) {
.error-card {
padding: 24px 18px;
}
.error-actions {
flex-direction: column;
}
.error-actions .inline-button {
width: 100%;
}
}
/* Home: standalone note and workspace are separate choices. */
.home-layout--wide {
width: min(1040px, calc(100% - 32px));
}
.create-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 20px;
align-items: start;
}
.create-panel__heading {
margin-bottom: 22px;
}
.create-panel__heading h2 {
margin: 0;
font-size: 1.35rem;
}
.create-panel__heading p {
margin: 7px 0 0;
color: var(--muted);
line-height: 1.5;
}
.create-panel form {
display: grid;
gap: 18px;
}
.create-panel .primary-button {
width: 100%;
}
@media (max-width: 760px) {
.home-layout--wide {
width: min(100% - 24px, 560px);
}
.create-grid {
grid-template-columns: 1fr;
}
}
/* Collaborative editor additions */
.editor-shell {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
min-height: 0;
overflow: hidden;
background: #0d1015;
}
.line-gutter {
width: 62px;
overflow: hidden;
padding: 24px 8px 24px 0;
border-right: 1px solid var(--border);
color: var(--muted-2);
font: 400 17px/1.72 ui-monospace, SFMono-Regular, Consolas, monospace;
text-align: right;
user-select: none;
}
.line-gutter div {
height: 1.72em;
padding-right: 8px;
}
.hide-editor-line-numbers .editor-shell {
grid-template-columns: 0 minmax(0, 1fr);
}
.hide-editor-line-numbers .line-gutter {
width: 0;
padding: 0;
border: 0;
}
.editor-shell textarea {
padding-left: 18px;
}
.line-toggle {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--muted);
font-size: .78rem;
white-space: nowrap;
}
.line-toggle input {
width: auto;
min-height: auto;
margin: 0;
accent-color: var(--accent);
}
.user-color-control {
position: relative;
display: inline-flex;
align-items: center;
}
.user-chip {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 4px 6px;
border: 0;
border-radius: 7px;
background: transparent;
color: #dce2eb;
font: inherit;
font-size: .78rem;
}
.user-chip:hover,
.user-chip:focus-visible {
background: var(--surface-2);
outline: none;
}
.user-chip__dot {
width: 10px;
height: 10px;
flex: 0 0 auto;
border: 1px solid color-mix(in srgb, var(--owner, var(--accent)) 72%, white);
border-radius: 50%;
background: var(--owner, var(--accent));
box-shadow: 0 0 0 2px color-mix(in srgb, var(--owner, var(--accent)) 18%, transparent);
}
.user-color-picker {
position: absolute;
top: calc(100% + 4px);
left: 0;
width: 1px;
height: 1px;
padding: 0;
border: 0;
opacity: 0;
pointer-events: none;
}
.dialog-copy {
margin: 0 0 4px;
color: var(--muted);
line-height: 1.5;
}
.history-header h2 {
margin: 0;
}
.history-header p {
margin: 4px 0 0;
color: var(--muted-2);
font-size: .75rem;
}
.revision__marker {
border-color: var(--owner, #8b7af4);
background: var(--owner, #8b7af4);
}
.revision__meta {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 8px;
}
.revision__meta strong {
font-size: .82rem;
}
.revision__snippet {
margin: 8px 0 0;
color: var(--muted);
font-size: .76rem;
line-height: 1.45;
}
.revision__preview {
max-height: 180px;
overflow: auto;
margin-top: 10px;
padding: 10px;
border: 1px solid var(--border);
border-radius: 7px;
background: #0b0e13;
color: #c9d0da;
font: .72rem/1.5 ui-monospace, monospace;
white-space: pre-wrap;
}
.revision button+button {
margin-left: 12px;
}
.mermaid {
overflow: auto;
padding: 12px;
border: 1px solid var(--border);
border-radius: 10px;
background: #0a0d12;
}
@media (max-width: 720px) {
.line-gutter {
width: 48px;
padding-top: 18px;
font-size: 15px;
}
.editor-shell textarea {
padding: 18px 12px;
font-size: 15px;
}
.user-color-control {
display: none;
}
}
.markdown-body img {
display: block;
max-width: 100%;
height: auto;
margin: 16px auto;
border-radius: 10px;
}
.markdown-body a {
overflow-wrap: anywhere;
}
.public-page {
min-height: 100vh;
background: var(--background);
}
.public-header__actions {
display: flex;
align-items: center;
gap: 12px;
}
.public-header {
position: sticky;
top: 0;
z-index: 5;
display: flex;
align-items: center;
justify-content: space-between;
min-height: 64px;
padding: 0 max(20px, calc((100vw - 900px) / 2));
border-bottom: 1px solid var(--border);
background: rgba(13, 16, 21, .92);
backdrop-filter: blur(12px);
}
.public-document {
width: min(900px, calc(100% - 32px));
margin: 0 auto;
padding: 56px 0 96px;
}
.public-document>h1 {
margin: 0;
font-size: clamp(2rem, 6vw, 4rem);
line-height: 1.08;
}
.public-meta {
margin: 12px 0 36px;
color: var(--muted);
font-size: .8rem;
}
.public-content {
min-height: 240px;
padding: 32px 32px 32px 62px;
border: 1px solid var(--border);
border-radius: 14px;
background: var(--surface);
}
.public-content img {
cursor: zoom-in;
}
.public-page.hide-preview-line-numbers .public-content {
padding-left: 32px;
}
@media (max-width: 600px) {
.public-document {
padding-top: 32px;
}
.public-content {
padding: 20px 20px 20px 52px;
}
.public-page.hide-preview-line-numbers .public-content {
padding-left: 20px;
}
}
/* Layout safeguards and home footer */
.app-header__main,
.document-heading {
min-width: 0;
}
.document-url {
overflow-wrap: anywhere;
}
.home-page {
display: flex;
min-height: 100vh;
flex-direction: column;
}
.home-page .home-layout {
flex: 1 0 auto;
}
.home-footer {
flex: 0 0 auto;
width: min(1040px, calc(100% - 32px));
margin: auto auto 28px;
padding-top: 24px;
color: var(--muted-2);
font-size: .76rem;
text-align: center;
}
.home-footer__inner {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
flex-wrap: wrap;
}
.home-footer__separator {
color: var(--border-strong);
}
.home-footer .text-button {
font-size: inherit;
text-decoration: underline;
text-underline-offset: 3px;
}
.home-footer a {
color: var(--muted);
text-decoration: none;
}
.home-footer a:hover {
color: white;
}
.home-header {
border-bottom-color: rgba(195, 91, 54, .28);
background: linear-gradient(135deg, rgba(126, 48, 27, .28), rgba(51, 25, 18, .08) 58%, transparent);
}
.home-brand {
background: linear-gradient(110deg, #f0aa74 0%, #cf633d 48%, #8f3827 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
@media (max-width: 760px) {
.home-footer {
width: min(100% - 24px, 560px);
margin-bottom: 20px;
}
}
/* Show an author once at the start of each contiguous ownership block. */
.line-gutter div {
position: relative;
}
.line-owner-label {
position: absolute;
left: 7px;
top: 50%;
max-width: 88px;
overflow: hidden;
padding: 2px 6px;
border: 1px solid color-mix(in srgb, var(--owner) 65%, transparent);
border-radius: 999px;
background: color-mix(in srgb, var(--owner) 18%, #0d1015);
color: #eef1f5;
font: 600 10px/1.2 system-ui, sans-serif;
text-overflow: ellipsis;
white-space: nowrap;
transform: translateY(-50%);
}
@media (min-width: 721px) {
.line-gutter {
width: 132px;
}
}
@media (max-width: 720px) {
.line-owner-label {
display: none;
}
}
/* Compact line numbers; author labels sit over the edited text, not in the gutter. */
.line-gutter {
width: 48px;
}
.line-gutter div {
position: static;
}
.owner-labels {
position: absolute;
z-index: 2;
top: 0;
right: 12px;
left: 48px;
height: 100%;
overflow: hidden;
pointer-events: none;
}
.owner-label {
position: absolute;
right: 8px;
max-width: min(180px, 45%);
overflow: hidden;
padding: 2px 7px;
border: 1px solid color-mix(in srgb, var(--owner) 62%, transparent);
border-radius: 999px;
background: color-mix(in srgb, var(--owner) 18%, #0d1015);
color: #eef1f5;
font: 600 10px/1.25 system-ui, sans-serif;
opacity: .82;
text-overflow: ellipsis;
white-space: nowrap;
}
.hide-editor-line-numbers .owner-labels {
left: 0;
}
.line-owner-label {
display: none !important;
}
@media (min-width: 721px) {
.line-gutter {
width: 48px;
}
}
@media (max-width: 720px) {
.line-gutter {
width: 42px;
}
.owner-labels {
left: 42px;
right: 4px;
}
}
/* The rust gradient belongs only to the wordmark. */
.home-header {
background: transparent;
}
/* Editor display preferences and author overlay */
.editor-shell {
position: relative;
}
.owner-labels {
z-index: 4;
top: 0;
bottom: 0;
height: auto;
}
.owner-line {
position: absolute;
right: 0;
left: 0;
height: var(--editor-line-height, 31px);
border-left: 3px solid var(--owner);
background: transparent;
}
.owner-label {
z-index: 1;
transform: translateY(2px);
}
.editor-controls {
display: inline-flex;
align-items: center;
gap: 7px;
}
.editor-controls label {
display: inline-flex;
align-items: center;
gap: 4px;
color: var(--muted);
font-size: .72rem;
}
.editor-controls select {
width: auto;
min-height: 30px;
padding: 3px 24px 3px 7px;
border-radius: 6px;
font-size: .74rem;
}
.editor-workspace-font-system textarea,
.editor-workspace-font-system .preview {
font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.editor-workspace-font-serif textarea,
.editor-workspace-font-serif .preview {
font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
}
.editor-workspace-font-arial textarea,
.editor-workspace-font-arial .preview {
font-family: Arial, Helvetica, sans-serif;
}
.editor-workspace-font-georgia textarea,
.editor-workspace-font-georgia .preview {
font-family: Georgia, "Times New Roman", serif;
}
.editor-workspace-font-mono textarea,
.editor-workspace-font-mono .preview {
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.compact-editor .editor-toolbar {
min-height: 42px;
padding-top: 5px;
padding-bottom: 5px;
}
.compact-editor .column-label {
min-height: 30px;
font-size: .68rem;
}
.compact-editor textarea,
.compact-editor .preview {
padding-top: 14px;
padding-bottom: 14px;
font-size: calc(var(--editor-font-size, 18px) - 2px);
line-height: 1.45;
}
.workspace textarea,
.workspace .preview {
font-size: var(--editor-font-size, 18px);
}
@media (max-width: 900px) {
.editor-controls {
order: 3;
width: 100%;
}
.editor-toolbar {
flex-wrap: wrap;
}
}
.editor-shell textarea {
white-space: pre;
overflow: auto;
overflow-wrap: normal;
word-break: normal;
}
/* Keep line numbers exactly aligned with the logical text lines. */
.line-gutter {
box-sizing: border-box;
font-size: var(--editor-font-size, 18px);
line-height: normal;
}
.line-gutter div {
box-sizing: border-box;
padding-right: 8px;
line-height: inherit;
}
.compact-editor .line-gutter {
font-size: calc(var(--editor-font-size, 18px) - 2px);
}
/* Image crop/resize dialog. */
.image-editor-dialog {
width: min(920px, calc(100% - 28px));
max-width: none;
padding: 0;
border: 1px solid var(--border);
border-radius: 14px;
background: #11151b;
color: #eef2f7;
}
.image-editor-dialog::backdrop {
background: rgba(4, 6, 9, .78);
backdrop-filter: blur(4px);
}
.image-editor-panel {
display: grid;
gap: 16px;
padding: 18px;
}
.image-editor-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 18px;
}
.image-editor-head h2 {
margin: 0;
}
.image-editor-head p {
margin: 5px 0 0;
color: var(--muted);
}
.image-crop-stage {
display: grid;
place-items: center;
min-height: 360px;
max-height: 58vh;
overflow: hidden;
border: 1px solid var(--border);
border-radius: 10px;
background: #080b10;
}
.image-crop-stage canvas {
display: block;
max-width: 100%;
max-height: 58vh;
cursor: grab;
touch-action: none;
}
.image-crop-stage canvas:active {
cursor: grabbing;
}
.image-editor-controls {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
}
.image-editor-controls label {
display: grid;
gap: 6px;
color: var(--muted);
font-size: .78rem;
}
.image-editor-controls select,
.image-editor-controls input {
width: 100%;
}
.image-editor-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
}
@media (max-width: 680px) {
.image-editor-controls {
grid-template-columns: 1fr;
}
.image-crop-stage {
min-height: 260px;
}
}
/* Wider published page workspace. */
.public-header {
padding-inline: max(20px, calc((100vw - 1180px) / 2));
}
.public-document {
width: min(1180px, calc(100% - 32px));
}
.public-content {
padding: clamp(24px, 4vw, 52px);
}
/* Preview and attachment management */
.preview {
overscroll-behavior: contain;
scrollbar-gutter: stable;
}
.markdown-body img {
display: block;
width: auto;
max-width: 100%;
height: auto;
object-fit: contain;
border-radius: 8px;
}
.workspace.view-preview .markdown-body img {
max-height: calc(100vh - 210px);
}
.note-card-wrap {
position: relative;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--surface);
overflow: hidden;
}
.note-card-wrap .note-card {
border: 0;
border-radius: 0;
}
.note-card-title {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.protect-badge,
.file-flag {
display: inline-flex;
padding: 3px 7px;
border: 1px solid var(--border-strong);
border-radius: 999px;
color: var(--muted);
font-size: .68rem;
white-space: nowrap;
}
.file-flag.detached {
border-color: rgba(255, 123, 145, .45);
color: var(--danger);
}
.note-delete-button {
width: 100%;
min-height: 36px;
border: 0;
border-top: 1px solid var(--border);
background: transparent;
color: var(--danger);
}
.danger-button {
color: var(--danger);
}
.dialog-check {
display: flex;
align-items: center;
gap: 9px;
color: var(--muted);
font-size: .82rem;
}
.dialog-check input {
width: auto;
min-height: auto;
}
.footer-link {
border: 0;
background: transparent;
color: var(--muted);
padding: 0;
font-size: inherit;
text-decoration: underline;
text-underline-offset: 2px;
}
.files-dialog {
overflow: hidden;
}
.files-panel {
grid-template-rows: auto minmax(0, 1fr);
min-height: min(590px, calc(100vh - 28px));
max-height: calc(100vh - 28px);
}
.files-list {
min-height: 0;
overflow-y: auto;
overscroll-behavior: contain;
scrollbar-gutter: stable;
}
.files-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 18px;
}
.files-head h2,
.files-head p {
margin: 0;
}
.files-head p {
margin-top: 5px;
color: var(--muted);
font-size: .8rem;
}
.files-list {
display: grid;
gap: 9px;
overflow: auto;
min-height: 80px;
}
.file-row {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 12px;
padding: 12px;
border: 1px solid var(--border);
border-radius: 9px;
background: #0e1116;
}
.file-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 650;
}
.file-meta {
margin-top: 4px;
color: var(--muted-2);
font-size: .72rem;
}
.file-actions {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 6px;
}
.file-actions button {
min-height: 30px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface-2);
color: var(--text);
padding: 0 8px;
font-size: .72rem;
}
@media (max-width: 620px) {
.file-row {
grid-template-columns: 1fr;
}
.file-actions {
justify-content: flex-start;
}
}
.files-panel {
min-height: 0;
height: min(590px, calc(100vh - 28px));
}
.files-list {
align-content: start;
}
.file-row {
align-items: start;
}
.file-row-main {
min-width: 0;
}
.file-actions {
align-items: center;
align-self: start;
flex-wrap: nowrap;
}
.file-actions button {
min-height: 34px;
height: 34px;
white-space: nowrap;
}
.file-code {
grid-column: 1 / -1;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px;
align-items: stretch;
}
.file-code[hidden] {
display: none;
}
.file-code textarea {
width: 100%;
min-height: 76px;
max-height: 150px;
resize: vertical;
box-sizing: border-box;
font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.file-code button {
align-self: stretch;
min-width: 74px;
}
.file-delete {
color: var(--danger) !important;
border-color: color-mix(in srgb, var(--danger) 45%, var(--border)) !important;
}
@media (max-width: 760px) {
.file-actions {
flex-wrap: wrap;
justify-content: flex-start;
}
.file-code {
grid-template-columns: 1fr;
}
}
.notes-toolbar {
display: flex;
align-items: center;
gap: 10px;
margin-top: 18px;
padding-bottom: 14px;
border-bottom: 1px solid var(--border);
}
.notes-toolbar__label {
color: var(--muted);
font-size: .82rem;
font-weight: 600;
}
.workspace-actions {
display: flex;
align-items: center;
gap: 10px;
}
.notes-view-switch {
display: inline-flex;
padding: 3px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
}
.notes-view-switch button {
min-height: 32px;
padding: 0 11px;
border: 0;
border-radius: 6px;
background: transparent;
color: var(--muted);
}
.notes-view-switch button.active {
background: var(--surface-3);
color: var(--text);
}
.note-card {
display: block;
min-width: 0;
}
.note-card-title {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 10px;
min-width: 0;
}
.note-card-title h3 {
min-width: 0;
overflow-wrap: anywhere;
word-break: break-word;
line-height: 1.4;
}
.note-card p {
overflow-wrap: anywhere;
}
.notes-table {
display: block;
padding-top: 20px;
}
.notes-table-scroll {
width: 100%;
overflow-x: auto;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface);
}
.notes-table table {
width: 100%;
min-width: 680px;
border-collapse: collapse;
}
.notes-table th,
.notes-table td {
padding: 13px 15px;
border-bottom: 1px solid var(--border);
text-align: left;
vertical-align: middle;
}
.notes-table th {
color: var(--muted);
font-size: .72rem;
text-transform: uppercase;
letter-spacing: .05em;
}
.notes-table tbody tr:last-child td {
border-bottom: 0;
}
.notes-table tbody tr:hover {
background: var(--surface-2);
}
.note-table-link {
display: block;
max-width: 52ch;
color: var(--text);
font-weight: 650;
text-decoration: none;
overflow-wrap: anywhere;
}
.note-table-link:hover {
text-decoration: underline;
}
.note-status {
color: var(--muted);
font-size: .75rem;
}
.notes-table-actions {
width: 1%;
white-space: nowrap;
text-align: right !important;
}
.note-delete-button--inline {
width: auto;
min-height: 32px;
padding: 0 10px;
border: 1px solid var(--border);
border-radius: 6px;
}
@media (max-width: 700px) {
.workspace-top {
align-items: flex-start;
}
.workspace-actions {
align-items: stretch;
flex-direction: column-reverse;
}
.notes-view-switch button {
flex: 1;
}
}
.note-card-meta {
display: grid;
gap: 5px;
margin-top: 28px;
color: var(--muted);
font-size: .75rem;
}
.note-card p {
margin-top: 0;
}
.note-author {
color: var(--muted);
overflow-wrap: anywhere;
}
.note-delete-button:disabled {
cursor: not-allowed;
color: var(--muted-2);
opacity: .55;
}
.notes-view-switch button {
cursor: pointer;
}
.notes-view-switch button.active {
cursor: default;
}
/* Preview editing and source line numbers. */
.preview {
position: relative;
padding: 12px 24px 12px 62px;
line-height: 1.32;
}
.preview-source-line {
position: relative;
min-height: 1.32em;
}
.preview-source-line::before {
content: attr(data-source-line);
position: absolute;
top: 0;
left: var(--preview-line-left, -50px);
width: 32px;
color: #596270;
text-align: right;
font: 400 .72rem/1.32 ui-monospace, SFMono-Regular, Consolas, monospace;
user-select: none;
}
.preview-editable {
border-radius: 4px;
outline: none;
cursor: text;
}
.preview-editable:hover {
background: rgba(255, 255, 255, .025);
}
.preview-editable:focus {
background: rgba(124, 104, 238, .08);
box-shadow: 0 0 0 1px rgba(124, 104, 238, .25);
}
.markdown-body p {
margin: .18em 0;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
margin: .48em 0 .18em;
}
.markdown-body blockquote {
margin: .3em 0;
}
.markdown-body ul,
.markdown-body ol {
margin: .22em 0;
}
.compact-editor .preview {
line-height: 1.24;
}
.hide-preview-line-numbers .preview {
padding-left: 24px;
}
.hide-preview-line-numbers .preview-source-line::before {
display: none;
}
.markdown-body .table-wrap {
overflow-x: auto;
margin: .7em 0;
}
.markdown-body table {
width: 100%;
border-collapse: collapse;
}
.markdown-body th,
.markdown-body td {
padding: .55em .7em;
border: 1px solid var(--border);
vertical-align: top;
}
.markdown-body th {
background: var(--surface-2);
color: var(--text);
}
.markdown-body mark {
padding: .05em .18em;
border-radius: 3px;
background: #6d5b16;
color: #fff2a8;
}
.markdown-body sub,
.markdown-body sup {
line-height: 0;
}
.markdown-body dl {
margin: .7em 0;
}
.markdown-body dt {
font-weight: 750;
}
.markdown-body dd {
margin: .25em 0 .65em 1.5em;
color: #b9c2cf;
}
/* Task-list layout. Keep the checkbox in the same marker gutter as a bullet. */
.markdown-body .task-list-item {
position: relative;
display: block;
min-height: 1.32em;
margin: 0;
padding: 0;
line-height: 1.32;
list-style: none;
}
.markdown-body .task-checkbox {
position: absolute;
top: 0;
left: -1.45em;
appearance: none;
box-sizing: border-box;
width: 1em;
min-width: 1em;
max-width: 1em;
height: 1em;
min-height: 1em;
max-height: 1em;
margin: .14em 0 0;
padding: 0;
border: 1px solid #707887;
border-radius: 2px;
background: var(--surface-2);
box-shadow: none;
cursor: pointer;
}
.markdown-body .task-checkbox:checked {
border-color: var(--accent);
background-color: var(--accent);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 6.5 4.7 9 10 3'/%3E%3C/svg%3E");
background-position: center;
background-repeat: no-repeat;
background-size: .78em .78em;
}
.markdown-body .task-checkbox:focus {
outline: none;
}
.markdown-body .task-checkbox:focus-visible {
box-shadow: 0 0 0 2px rgba(124, 104, 238, .3);
}
.markdown-body .task-list-item>.list-item-content {
display: block;
min-width: 0;
margin: 0;
padding: 0;
line-height: inherit;
}
.markdown-body .task-list-item>ul,
.markdown-body .task-list-item>ol {
min-width: 0;
}
.compact-editor .markdown-body .task-list-item {
min-height: 1.24em;
line-height: 1.24;
}
.markdown-body .footnotes {
margin-top: 1.5em;
color: var(--muted);
font-size: .88em;
}
.markdown-body .footnotes ol {
padding-left: 1.5em;
}
.markdown-body .footnote-backref {
text-decoration: none;
}
.shortcuts-panel {
width: 100%;
}
.shortcut-grid {
display: grid;
grid-template-columns: max-content 1fr;
gap: 10px 18px;
align-items: center;
}
.shortcut-grid kbd {
padding: 5px 8px;
border: 1px solid var(--border-strong);
border-bottom-width: 2px;
border-radius: 6px;
background: #0d1015;
color: #e6eaf0;
font: 600 .76rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.shortcut-grid span {
color: #c3cad4;
font-size: .82rem;
}
@media (max-width: 520px) {
.shortcut-grid {
grid-template-columns: 1fr;
gap: 5px;
}
.shortcut-grid span {
margin-bottom: 7px;
}
}
.footer-left,
.footer-right {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.footer-status.status {
min-height: 0;
padding: 0;
font-size: inherit;
}
.markdown-more {
position: relative;
}
.markdown-more>summary {
display: flex;
align-items: center;
min-height: 34px;
padding: 0 9px;
border: 1px solid transparent;
border-radius: 7px;
color: #b8c0cc;
font-size: .78rem;
list-style: none;
cursor: pointer;
}
.markdown-more>summary::-webkit-details-marker {
display: none;
}
.markdown-more>summary:hover,
.markdown-more[open]>summary {
border-color: var(--border);
background: var(--surface-2);
color: white;
}
.markdown-more-menu {
position: absolute;
top: calc(100% + 8px);
left: 0;
z-index: 30;
display: grid;
grid-template-columns: repeat(2, minmax(120px, 1fr));
gap: 4px;
width: 290px;
padding: 8px;
border: 1px solid var(--border-strong);
border-radius: 9px;
background: #11151c;
box-shadow: 0 14px 40px rgba(0, 0, 0, .4);
}
.editor-toolbar .markdown-more-menu button {
justify-content: flex-start;
text-align: left;
}
.hljs {
color: #d7dae0;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
color: #c792ea;
}
.hljs-string,
.hljs-attr {
color: #c3e88d;
}
.hljs-number,
.hljs-symbol {
color: #f78c6c;
}
.hljs-comment {
color: #697383;
font-style: italic;
}
.public-content .task-checkbox {
pointer-events: auto;
}
@media (max-width:720px) {
.footer-left,
.footer-right {
flex-wrap: wrap
}
.markdown-more-menu {
position: fixed;
left: 12px;
right: 12px;
top: auto;
bottom: 58px;
width: auto;
}
}
.public-task-toggle {
display: inline-flex;
align-items: center;
gap: 7px;
color: var(--muted);
font-size: .76rem;
white-space: nowrap;
}
.public-task-toggle input {
width: 15px;
min-height: 15px;
height: 15px;
margin: 0;
accent-color: var(--accent);
}
.public-page .preview-source-line {
cursor: default;
}
.public-page .task-checkbox:not(:disabled) {
cursor: pointer;
}
.public-page .task-checkbox:disabled {
cursor: not-allowed;
opacity: .55;
}
.identity-actions,
.identity-links {
display: flex;
gap: 10px;
align-items: center;
flex-wrap: wrap;
}
.identity-actions .primary-button {
flex: 1 0 100%;
}
.identity-panel {
position: relative;
}
.identity-panel__close {
position: absolute;
top: 14px;
right: 14px;
}
.identity-links {
justify-content: space-between;
}
.identity-links .text-button {
padding: 3px 0;
}
.auth-panel {
display: grid;
gap: 12px;
padding-top: 14px;
border-top: 1px solid var(--border);
}
.auth-panel h3 {
margin: 0;
}
.auth-panel label {
display: grid;
gap: 6px;
}
/* Account footer and authentication dialog. */
.home-footer {
width: min(1040px, calc(100% - 32px));
margin: auto auto 24px;
padding-top: 24px;
color: var(--muted);
font-size: .78rem;
}
.home-footer__inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding-top: 18px;
border-top: 1px solid var(--border);
}
.home-footer__account {
display: inline-flex;
align-items: center;
gap: 8px;
}
.home-footer__user {
color: var(--text);
font-weight: 600;
}
.home-footer__author {
margin-left: auto;
}
.footer-action {
min-height: 34px;
padding: 0 12px;
border: 1px solid var(--border);
border-radius: 8px;
background: transparent;
color: var(--muted);
font: inherit;
cursor: pointer;
}
.footer-action:hover {
border-color: var(--border-strong);
background: var(--surface-2);
color: var(--text);
}
.footer-action--primary {
border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
color: #d9d2ff;
}
.app-dialog {
width: min(440px, calc(100% - 28px));
padding: 0;
border: 0;
background: transparent;
}
.app-dialog::backdrop {
background: rgba(4, 6, 10, .72);
backdrop-filter: blur(3px);
}
.identity-panel {
position: relative;
display: grid;
gap: 18px;
width: 100%;
padding: 28px;
}
.identity-panel__header {
padding-right: 38px;
}
.identity-panel__header h2 {
margin: 0 0 7px;
}
.identity-panel__header p {
margin: 0;
}
.identity-fields {
display: grid;
gap: 14px;
}
.identity-fields label {
display: grid;
gap: 7px;
color: var(--muted);
font-size: .78rem;
}
.modal-close {
position: absolute;
top: 12px;
right: 12px;
display: grid;
width: 34px;
height: 34px;
padding: 0;
place-items: center;
border: 1px solid transparent;
border-radius: 8px;
background: transparent;
color: var(--muted);
font: 400 1.45rem/1 system-ui;
cursor: pointer;
}
.modal-close:hover {
border-color: var(--border);
background: var(--surface-2);
color: white;
}
.identity-links {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.identity-links .text-button {
padding: 2px 0;
}
.form-message.success {
color: #8ed9a4;
}
@media (max-width: 600px) {
.home-footer__inner {
align-items: stretch;
flex-direction: column;
text-align: center;
}
.home-footer__account {
justify-content: center;
}
.home-footer__author {
margin-left: 0;
}
.identity-panel {
padding: 24px 20px 20px;
}
.identity-links {
align-items: flex-start;
flex-direction: column;
}
}
.home-footer__account[hidden],
.footer-action[hidden],
.identity-links [hidden],
.identity-fields [hidden],
.auth-panel[hidden] {
display: none !important;
}
.system-dialog-panel {
position: relative;
}
.dialog-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 4px;
}
.secondary-button,
.danger-button {
min-height: 42px;
padding: 0 16px;
border: 1px solid var(--border);
border-radius: 9px;
background: var(--surface-2);
color: var(--text);
font: inherit;
cursor: pointer;
}
.secondary-button:hover {
border-color: var(--muted);
}
.danger-button {
border-color: #7f3340;
background: #6e2935;
color: white;
}
.danger-button:hover {
background: #7c3040;
}
/* Native hidden must win over component display declarations. */
[hidden] {
display: none !important;
}
.identity-panel #auth-panel:not([hidden]) {
margin-top: 4px;
}
.identity-panel #nickname:disabled {
opacity: .55;
cursor: not-allowed;
}
#resources-dialog {
width: min(760px, calc(100% - 28px));
max-width: 760px;
}
.resources-panel {
position: relative;
box-sizing: border-box;
width: 100%;
min-width: 0;
max-height: 80vh;
overflow-x: hidden;
overflow-y: auto;
}
.resources-panel__header {
min-width: 0;
padding-right: 38px;
}
.resources-panel__header h2 {
margin: 0 0 7px;
overflow-wrap: anywhere;
}
.resources-panel__header p {
margin: 0;
overflow-wrap: anywhere;
}
.resources-list {
display: grid;
min-width: 0;
gap: 10px;
margin-top: 18px;
}
.resource-row {
display: flex;
min-width: 0;
justify-content: space-between;
gap: 16px;
align-items: center;
padding: 12px;
border: 1px solid var(--border);
border-radius: 10px;
}
.resource-row> :first-child {
min-width: 0;
}
.resource-row a {
display: block;
max-width: 100%;
font-weight: 700;
overflow-wrap: anywhere;
word-break: break-word;
}
.resource-row small {
display: block;
max-width: 100%;
margin-top: 4px;
color: var(--muted-2);
overflow-wrap: anywhere;
}
.resource-actions {
display: flex;
flex: 0 0 auto;
gap: 8px;
flex-wrap: wrap;
}
.resource-actions button {
padding: 7px 10px;
}
@media (max-width:640px) {
.resource-row {
align-items: flex-start;
flex-direction: column
}
.resource-actions {
width: 100%
}
}
.resource-main {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
width: 100%;
}
.resource-inline {
width: 100%;
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--border);
}
.resource-password-form label {
display: grid;
gap: 6px;
font-size: .8rem;
}
.resource-password-form input {
width: 100%;
}
.resource-inline-help {
margin: 6px 0 0;
color: var(--muted);
font-size: .75rem;
}
.resource-inline-message {
margin: 8px 0 0;
}
.resource-inline-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 10px;
}
.resource-delete-confirm>p:first-child {
margin: 0;
}
@media (max-width: 640px) {
.resource-main {
align-items: flex-start;
flex-direction: column;
}
.resource-actions {
width: 100%;
}
}
.resource-row {
align-items: stretch;
flex-direction: column;
}
/* Stable scrolling and collapsible Markdown sections. */
.editor-shell {
width: 100%;
max-width: 100%;
}
.editor-shell textarea {
min-width: 0;
max-width: 100%;
overscroll-behavior: contain;
overflow-anchor: none;
}
.line-gutter {
position: relative;
z-index: 5;
flex: none;
}
.preview,
.editor-shell textarea {
scrollbar-gutter: stable;
}
.markdown-details {
margin: .65em 0;
border: 1px solid var(--border);
border-radius: 8px;
background: rgba(255, 255, 255, .015);
}
.markdown-details>summary {
padding: .55em .8em;
color: var(--text);
font-weight: 650;
cursor: pointer;
user-select: none;
}
.markdown-details[open]>summary {
border-bottom: 1px solid var(--border);
}
.markdown-details__content {
padding: .35em .8em .7em;
}
.markdown-details__content> :first-child {
margin-top: 0;
}
.markdown-details__content> :last-child {
margin-bottom: 0;
}
/* Full-height editor: keep header/footer visible and scroll only the work area. */
.pad-page {
height: 100dvh;
min-height: 0;
overflow: hidden;
display: grid;
grid-template-rows: auto minmax(0, 1fr);
}
.pad-page .app-header {
min-width: 0;
}
.pad-page .editor-layout {
height: auto;
min-height: 0;
overflow: hidden;
}
.pad-page .editor-panel {
min-height: 0;
overflow: hidden;
}
.pad-page .workspace {
min-height: 0;
overflow: hidden;
}
.pad-page .editor-column,
.pad-page .preview-column,
.pad-page .editor-shell {
min-height: 0;
overflow: hidden;
}
.pad-page .editor-shell textarea,
.pad-page .preview {
height: 100%;
min-height: 0;
overflow: auto;
}
.pad-page .editor-footer {
position: relative;
z-index: 8;
flex: none;
background: var(--surface);
}
@media (max-width: 980px) {
.pad-page .editor-layout {
height: auto;
}
}
/* A collapsible section has one source-line marker; its rendered Markdown does not repeat line numbers inside. */
.markdown-details__content .preview-source-line::before {
display: none;
}
.markdown-details__content {
overflow: visible;
}
.markdown-details__content pre {
overflow: auto;
}
/* Ephemeral room presence and chat */
.room-details {
position: relative;
display: inline-block;
}
.room-details>summary {
display: inline-flex;
align-items: center;
gap: 6px;
cursor: pointer;
color: var(--text);
list-style: none;
}
.room-details>summary::-webkit-details-marker {
display: none;
}
.chat-unread {
min-width: 17px;
height: 17px;
padding: 0 5px;
border-radius: 999px;
background: var(--accent);
color: #fff;
font-size: 10px;
line-height: 17px;
text-align: center;
}
.room-popover {
position: absolute;
bottom: calc(100% + 10px);
left: 0;
z-index: 40;
display: grid;
grid-template-columns: 150px minmax(280px, 380px);
width: min(560px, calc(100vw - 24px));
max-height: min(430px, 70vh);
overflow: hidden;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface);
box-shadow: 0 18px 50px rgb(0 0 0 / .38);
color: var(--text);
}
.room-users {
padding: 14px;
overflow: auto;
border-right: 1px solid var(--border);
}
.room-users strong,
.room-chat__head strong {
display: block;
margin-bottom: 8px;
font-size: .75rem;
}
.room-users ul {
display: grid;
gap: 7px;
margin: 0;
padding: 0;
list-style: none;
}
.room-users li {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--muted);
}
.room-chat {
display: grid;
grid-template-rows: auto minmax(120px, 1fr) auto;
min-height: 280px;
}
.room-chat__head {
padding: 12px 14px 8px;
border-bottom: 1px solid var(--border);
}
.room-chat__head strong {
margin: 0;
}
.room-chat__head span {
color: var(--muted-2);
font-size: .66rem;
}
.chat-messages {
display: flex;
flex-direction: column;
gap: 8px;
overflow-y: auto;
padding: 12px 14px;
}
.chat-message {
margin: 0;
overflow-wrap: anywhere;
line-height: 1.35;
}
.chat-message strong {
margin-right: 6px;
color: var(--text);
}
.chat-message span {
color: var(--muted);
}
.chat-empty {
margin: auto;
color: var(--muted-2);
}
.chat-form {
display: grid;
grid-template-columns: 1fr auto;
gap: 8px;
padding: 10px;
border-top: 1px solid var(--border);
}
.chat-form input {
min-width: 0;
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface-2);
color: var(--text);
}
.chat-form button {
padding: 8px 12px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--accent);
color: #fff;
cursor: pointer;
}
@media (max-width: 700px) {
.room-popover {
grid-template-columns: 1fr;
left: auto;
right: -120px;
}
.room-users {
max-height: 110px;
border-right: 0;
border-bottom: 1px solid var(--border);
}
}
.room-user {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.room-user__dot {
width: 9px;
height: 9px;
flex: 0 0 auto;
border-radius: 50%;
background: var(--owner, var(--accent));
box-shadow: 0 0 0 2px color-mix(in srgb, var(--owner, var(--accent)) 18%, transparent);
}
.room-user>span:last-child {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.chat-message a {
color: var(--accent);
text-decoration: underline;
text-underline-offset: 2px;
overflow-wrap: anywhere;
}
.chat-message a:hover {
filter: brightness(1.15);
}
/* Sharing panel */
.share-panel {
display: grid;
gap: 18px;
}
.share-panel-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
}
.share-panel-head h3,
.share-section h4 {
margin: 0;
}
.share-panel-head p {
margin: 4px 0 0;
color: var(--muted);
}
.share-section {
display: grid;
gap: 10px;
padding: 14px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface);
}
.share-form-grid {
display: grid;
grid-template-columns: minmax(220px, 1fr) minmax(140px, auto) auto;
gap: 10px;
align-items: end;
}
.share-form-grid label {
display: grid;
gap: 5px;
}
.share-link-form {
grid-template-columns: minmax(140px, auto) minmax(110px, 140px) auto auto;
}
.share-forever {
display: flex !important;
align-items: center;
gap: 7px !important;
min-height: 38px;
white-space: nowrap;
}
.share-forever input {
width: auto;
}
.share-list {
display: grid;
gap: 8px;
}
.share-list-row {
display: grid;
grid-template-columns: minmax(180px, 1fr) auto auto;
gap: 8px;
align-items: center;
padding: 9px 0;
border-top: 1px solid var(--border);
}
.share-list-row:first-child {
border-top: 0;
}
.share-list-row strong,
.share-list-row small {
display: block;
overflow-wrap: anywhere;
}
.share-list-row small {
color: var(--muted);
margin-top: 2px;
}
.share-role {
color: var(--muted);
font-size: .82rem;
}
.share-link-row {
grid-template-columns: minmax(170px, 1fr) minmax(130px, auto) 100px auto auto auto;
}
.share-link-row input,
.share-link-row select {
min-width: 0;
}
.share-empty {
margin: 0;
color: var(--muted);
}
@media (max-width:800px) {
.share-form-grid,
.share-link-form,
.share-list-row,
.share-link-row {
grid-template-columns: 1fr;
align-items: stretch;
}
.share-panel-head {
flex-direction: column;
}
.share-panel-head>button {
align-self: flex-end;
}
}
/* Share dialog */
.share-dialog {
width: min(900px, calc(100% - 28px));
max-width: 900px;
max-height: min(88dvh, 860px);
padding: 0;
overflow: hidden;
}
.share-dialog::backdrop {
background: rgb(0 0 0 / .68);
backdrop-filter: blur(3px);
}
.share-dialog .share-panel {
display: grid;
grid-template-rows: auto minmax(0, 1fr) auto;
max-height: min(88dvh, 860px);
gap: 0;
}
.share-dialog .share-panel-head {
padding: 20px 22px 16px;
border-bottom: 1px solid var(--border);
background: var(--surface);
}
.share-dialog .share-panel-head strong {
color: var(--text);
}
.share-dialog-body {
display: grid;
gap: 16px;
padding: 18px 22px 22px;
overflow-y: auto;
background: color-mix(in srgb, var(--surface) 92%, black);
}
.share-dialog-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 64px;
padding: 12px 22px;
border-top: 1px solid var(--border);
background: var(--surface);
}
.share-dialog-footer .form-message {
margin: 0;
}
.dialog-close {
width: 34px;
height: 34px;
flex: 0 0 auto;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface-2);
color: var(--muted);
font-size: 1.35rem;
line-height: 1;
cursor: pointer;
}
.dialog-close:hover {
color: var(--text);
border-color: var(--border-strong);
}
.share-section {
padding: 16px;
background: var(--surface);
}
.share-section-head h4 {
margin: 0;
}
.share-section-head p {
margin: 4px 0 2px;
color: var(--muted);
font-size: .82rem;
}
.share-form-grid label>span:not(.sr-only),
.share-link-row label>span:not(.sr-only) {
color: var(--muted);
font-size: .76rem;
}
.share-dialog select {
width: 100%;
min-height: 42px;
padding: 0 38px 0 12px;
border: 1px solid var(--border-strong);
border-radius: 8px;
background-color: #10141a;
color: var(--text);
appearance: none;
background-image: linear-gradient(45deg, transparent 50%, #9aa3b2 50%), linear-gradient(135deg, #9aa3b2 50%, transparent 50%);
background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
background-size: 5px 5px, 5px 5px;
background-repeat: no-repeat;
cursor: pointer;
}
.share-dialog select:hover {
border-color: #596273;
}
.share-dialog select:focus {
border-color: #7567db;
box-shadow: 0 0 0 3px rgb(117 103 219 / .18);
outline: none;
}
.share-dialog input[type="text"],
.share-dialog input[type="number"] {
min-height: 42px;
border-radius: 8px;
padding: 0 12px;
}
.share-hours-field {
display: grid;
grid-template-columns: minmax(70px, 1fr) auto;
align-items: center;
min-height: 42px;
border: 1px solid var(--border-strong);
border-radius: 8px;
background: #10141a;
overflow: hidden;
}
.share-hours-field:focus-within {
border-color: #7567db;
box-shadow: 0 0 0 3px rgb(117 103 219 / .18);
}
.share-hours-field input {
width: 100%;
min-width: 0;
border: 0 !important;
background: transparent;
box-shadow: none !important;
outline: 0 !important;
}
.share-hours-field span {
padding: 0 11px;
color: var(--muted);
font-size: .76rem;
}
.share-list-row {
min-height: 58px;
padding: 10px 0;
}
.share-list-identity {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.share-avatar {
display: grid;
place-items: center;
width: 34px;
height: 34px;
flex: 0 0 auto;
border-radius: 50%;
background: color-mix(in srgb, var(--accent) 20%, var(--surface-2));
color: #d8d3ff;
font-weight: 700;
}
.share-list-identity>div,
.share-link-info {
min-width: 0;
}
.share-row-actions {
display: flex;
gap: 7px;
justify-content: flex-end;
}
.compact-button {
min-height: 36px;
padding: 7px 11px;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (max-width: 800px) {
.share-dialog {
width: calc(100% - 16px);
max-height: calc(100dvh - 16px);
}
.share-dialog .share-panel {
max-height: calc(100dvh - 16px);
}
.share-dialog .share-panel-head,
.share-dialog-body,
.share-dialog-footer {
padding-left: 14px;
padding-right: 14px;
}
.share-dialog-footer {
align-items: stretch;
flex-direction: column;
}
.share-dialog-footer>button {
align-self: flex-end;
}
.share-row-actions {
justify-content: stretch;
}
.share-row-actions button {
flex: 1;
}
}
/* Refined sharing dialog and shared-resource attribution. */
.share-dialog {
border: 1px solid var(--border-strong);
border-radius: 18px;
background: var(--surface);
box-shadow: 0 28px 90px rgb(0 0 0 / .58);
}
.share-dialog .share-panel {
overflow: hidden;
border-radius: inherit;
}
.share-dialog .share-panel-head {
border-radius: 18px 18px 0 0;
}
.share-dialog-footer {
border-radius: 0 0 18px 18px;
}
.share-dialog-body {
scrollbar-gutter: stable;
}
.share-section {
border-radius: 12px;
box-shadow: inset 0 1px 0 rgb(255 255 255 / .025);
}
.resource-copy {
min-width: 0;
}
.resource-title-line {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
min-width: 0;
}
.resource-title-line a {
min-width: 0;
}
.resource-shared-badge {
display: inline-flex;
align-items: center;
min-height: 22px;
padding: 3px 8px;
border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
border-radius: 999px;
background: color-mix(in srgb, var(--accent) 12%, transparent);
color: color-mix(in srgb, var(--accent) 70%, white);
font-size: .68rem;
font-weight: 650;
line-height: 1.2;
}
.resource-row--shared {
border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
background: color-mix(in srgb, var(--accent) 4%, transparent);
}
@media (max-width: 640px) {
.share-dialog,
.share-dialog .share-panel,
.share-dialog .share-panel-head,
.share-dialog-footer {
border-radius: 14px;
}
.share-dialog .share-panel-head {
border-radius: 14px 14px 0 0;
}
.share-dialog-footer {
border-radius: 0 0 14px 14px;
}
}
/* Markdown alerts. */
.markdown-body .markdown-alert {
margin: 1em 0;
padding: .8em 1em;
border: 1px solid;
border-left-width: 4px;
border-radius: 8px;
}
.markdown-body .markdown-alert> :first-child {
margin-top: 0;
}
.markdown-body .markdown-alert> :last-child {
margin-bottom: 0;
}
.markdown-body .markdown-alert--success {
border-color: #2f855a;
background: rgba(47, 133, 90, .14);
}
.markdown-body .markdown-alert--info {
border-color: #3182ce;
background: rgba(49, 130, 206, .14);
}
.markdown-body .markdown-alert--warning {
border-color: #d69e2e;
background: rgba(214, 158, 46, .14);
}
.markdown-body .markdown-alert--danger {
border-color: #c53030;
background: rgba(197, 48, 48, .14);
}
/* Fenced code line numbers for every language: ```lang=, ```lang=101, ```= or ```=101. */
.markdown-body pre.code-with-lines code {
counter-reset: none;
}
.markdown-body pre.code-with-lines .code-line {
display: block;
min-height: 1.35em;
padding-left: 4.6em;
position: relative;
white-space: pre;
}
.markdown-body pre.code-with-lines .code-line::before {
content: attr(data-line);
position: absolute;
left: 0;
width: 3.4em;
padding-right: .8em;
border-right: 1px solid var(--border);
color: var(--muted-2);
text-align: right;
user-select: none;
}
/* Generated table of contents. */
.markdown-body .markdown-toc {
margin: 1em 0;
padding: .8em 1em;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface-2);
}
.markdown-body .markdown-toc ol {
margin: 0;
padding-left: 1.4em;
}
.markdown-body .markdown-toc li {
margin: .25em 0;
}
.markdown-body .markdown-toc .toc-level-2 {
margin-left: 1em;
}
.markdown-body .markdown-toc .toc-level-3 {
margin-left: 2em;
}
.markdown-body .markdown-toc .toc-level-4,
.markdown-body .markdown-toc .toc-level-5,
.markdown-body .markdown-toc .toc-level-6 {
margin-left: 3em;
}
/* Nested Markdown lists keep markers and source-line numbers in separate gutters. */
.markdown-body ul,
.markdown-body ol {
padding-left: 1.75em;
}
.markdown-body .list-source-line::before {
right: auto;
}
.markdown-body .list-item-content {
min-width: 0;
overflow-wrap: anywhere;
word-break: break-word;
}
.markdown-body .contains-task-items>.task-list-item {
list-style: none;
}
/* Keep the editor gutter inside the mobile workspace. */
@media (max-width: 720px) {
.pad-page .editor-shell {
grid-template-columns: 38px minmax(0, 1fr);
min-width: 0;
max-width: 100%;
}
.pad-page .line-gutter {
width: 38px;
min-width: 0;
padding-right: 0;
overflow: hidden;
}
.pad-page .line-gutter div {
padding-right: 6px;
}
.pad-page .owner-labels {
left: 38px;
}
.pad-page.hide-editor-line-numbers .editor-shell {
grid-template-columns: 0 minmax(0, 1fr);
}
}
.emoji-picker {
position: relative;
}
.emoji-picker > summary {
display: flex;
align-items: center;
min-height: 34px;
padding: 0 9px;
border: 1px solid transparent;
border-radius: 7px;
color: #b8c0cc;
font-size: .78rem;
list-style: none;
cursor: pointer;
white-space: nowrap;
}
.emoji-picker > summary::-webkit-details-marker {
display: none;
}
.emoji-picker > summary:hover,
.emoji-picker[open] > summary {
border-color: var(--border);
background: var(--surface-2);
color: white;
}
.emoji-picker-panel {
position: absolute;
top: calc(100% + 8px);
left: 0;
z-index: 40;
width: min(360px, calc(100vw - 24px));
padding: 10px;
border: 1px solid var(--border-strong);
border-radius: 10px;
background: #11151c;
box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
.emoji-search {
width: 100%;
min-height: 36px;
margin: 0 0 8px;
}
.emoji-categories {
display: flex;
gap: 3px;
padding-bottom: 7px;
overflow-x: auto;
scrollbar-width: thin;
}
.editor-toolbar .emoji-category,
.editor-toolbar .emoji-item {
display: grid;
place-items: center;
flex: 0 0 auto;
padding: 0;
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.editor-toolbar .emoji-category {
width: 31px;
min-height: 31px;
border-color: transparent;
font-size: 1rem;
}
.editor-toolbar .emoji-category[aria-pressed="true"] {
border-color: var(--border-strong);
background: var(--surface-2);
}
.emoji-grid {
display: grid;
grid-template-columns: repeat(8, minmax(0, 1fr));
gap: 3px;
max-height: 290px;
overflow-y: auto;
overscroll-behavior: contain;
}
.editor-toolbar .emoji-item {
width: 100%;
min-height: 38px;
border-color: transparent;
font-size: 1.45rem;
line-height: 1;
}
.editor-toolbar .emoji-item:hover,
.editor-toolbar .emoji-item:focus-visible {
border-color: var(--border);
background: var(--surface-2);
transform: scale(1.08);
}
.emoji-empty {
margin: 18px 0 10px;
color: var(--muted);
text-align: center;
font-size: .82rem;
}
@media (max-width: 720px) {
.emoji-picker-panel {
position: fixed;
left: 12px;
right: 12px;
top: auto;
bottom: 58px;
width: auto;
}
.emoji-grid {
grid-template-columns: repeat(7, minmax(0, 1fr));
max-height: min(45vh, 320px);
}
}
.share-link-info {
display: grid;
gap: 6px;
}
.share-link-inline {
display: grid;
grid-template-columns: minmax(180px, 1fr) auto;
gap: 7px;
align-items: center;
margin-top: 3px;
}
.share-link-inline input {
width: 100%;
min-width: 0;
min-height: 36px;
padding: 0 10px;
border: 1px solid var(--border-strong);
border-radius: 7px;
background: #10141a;
color: var(--text);
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: .76rem;
}
.share-link-legacy {
color: var(--warning, #d6a84b) !important;
}
@media (max-width: 800px) {
.share-link-inline {
grid-template-columns: 1fr;
}
}