/* The look, in the tokens' words. Every value that is a choice — a colour, a space, a radius, a size — is a var(--…) from /tokens.css, which design/tokens.json compiles to at boot; `bun run lint:design` refuses a raw colour here. Light and dark are the tokens' business, not this file's. */ /* ── The page ───────────────────────────────────────────────────────── */ *, *::before, *::after { box-sizing: border-box; } html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } body { margin: 0; background: var(--color-bg); color: var(--color-fg); font: var(--text-base) / var(--leading-body) var(--font-sans); -webkit-font-smoothing: antialiased; } h1, h2, p { margin: 0; } a { color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; } code, kbd, .mono { font-family: var(--font-mono); font-size: 0.88em; } kbd { display: inline-block; padding: 0 0.35em; border: 1px solid var(--color-line); border-bottom-width: 2px; border-radius: var(--radius-sm); color: var(--color-muted); font-size: var(--text-xs); line-height: 1.6; } :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; } [hidden] { display: none !important; } .muted { color: var(--color-muted); } .small { font-size: var(--text-sm); } .pad { padding: var(--space-2) var(--space-3); } .row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; } .row.center { justify-content: center; } .pill { display: inline-block; padding: 0 0.5rem; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); border: 1px solid var(--color-line); border-radius: var(--radius-pill); } svg { flex: none; } /* ── Controls: at least 44px on a side where a finger meets them ───── */ .input { min-width: 0; min-height: var(--size-tap); padding: 0 var(--space-3); font: inherit; font-size: max(16px, var(--text-base)); color: inherit; background: var(--color-bg); border: 1px solid var(--color-line); border-radius: var(--radius-md); } .input::placeholder { color: var(--color-muted); } .button { min-height: var(--size-tap); padding: 0 var(--space-4); font: inherit; font-weight: 600; color: var(--color-accent-fg); background: var(--color-accent); border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); } .button:hover { filter: brightness(1.08); } .button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; } .button-quiet { color: var(--color-muted); background: transparent; padding: 0 var(--space-3); } .button-quiet:hover { color: var(--color-fg); background: var(--color-hover); filter: none; } .button-big { min-height: 3rem; padding: 0 var(--space-5); font-size: var(--text-lg); } .button-wide { width: 100%; } .icon-button { display: inline-grid; place-items: center; width: var(--size-tap); height: var(--size-tap); padding: 0; color: var(--color-muted); background: transparent; border: 0; border-radius: var(--radius-md); cursor: pointer; text-decoration: none; } .icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .icon-button:hover, .icon-button.is-on { color: var(--color-fg); background: var(--color-hover); } .icon-button.is-on { color: var(--color-accent); } .icon-button.danger:hover { color: var(--color-danger); } form { margin: 0; } /* ── The shell: notes | the note | its links ─────────────────────────── */ .app-page { height: 100dvh; overflow: hidden; } .shell { display: grid; grid-template-columns: var(--size-left) minmax(0, 1fr) var(--size-right); height: 100dvh; } .shell[data-has-right="false"] { grid-template-columns: var(--size-left) minmax(0, 1fr); } .left, .right { min-height: 0; background: var(--color-surface); overflow-y: auto; overscroll-behavior: contain; } .left { display: flex; flex-direction: column; border-right: 1px solid var(--color-line); } .right { border-left: 1px solid var(--color-line); padding: var(--space-3) var(--space-4) var(--space-6); } .center { display: flex; flex-direction: column; min-width: 0; min-height: 0; } /* The left. */ .left-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) var(--space-2) 0 var(--space-4); } .brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-fg); font-weight: 700; letter-spacing: -0.01em; text-decoration: none; min-height: var(--size-tap); } .brand svg { width: 22px; height: 22px; color: var(--color-accent); } .actions { display: flex; gap: var(--space-1); padding: var(--space-2) var(--space-3); } .actions form:first-child { flex: 1; } .find { position: relative; margin: 0 var(--space-3) var(--space-2); } .find > svg { position: absolute; left: var(--space-3); top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--color-muted); stroke-width: 2; pointer-events: none; } .input-find { width: 100%; padding-left: 2.1rem; padding-right: 3rem; background: var(--color-bg); } .find .hint { position: absolute; right: var(--space-2); top: 50%; transform: translateY(-50%); cursor: pointer; } .files { flex: 1; padding: 0 var(--space-2) var(--space-4); } .section { margin: var(--space-4) var(--space-2) var(--space-1); color: var(--color-muted); font-size: var(--text-xs); font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; } .count { margin-left: 0.3em; font-weight: 500; letter-spacing: 0; opacity: 0.8; } .file-list { list-style: none; margin: 0; padding: 0; } .file { display: flex; align-items: baseline; gap: var(--space-2); min-height: 2.25rem; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); color: var(--color-fg); text-decoration: none; line-height: var(--leading-tight); align-items: center; } .file:hover { background: var(--color-hover); } .file.is-active { background: var(--color-active); font-weight: 600; } .file-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .file-when { color: var(--color-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; } .tag-cloud { display: flex; flex-wrap: wrap; gap: var(--space-1); padding: var(--space-1) var(--space-2); } .left-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: var(--space-1); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border-top: 1px solid var(--color-line); background: var(--color-surface); } .you { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-muted); font-size: var(--text-sm); } /* The toolbar above the note. */ .toolbar { display: flex; align-items: center; gap: var(--space-2); min-height: 3.25rem; padding: var(--space-1) var(--space-3); border-bottom: 1px solid var(--color-line); } .crumbs { display: flex; align-items: center; gap: var(--space-2); flex: 1; min-width: 0; font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; } .crumbs a { color: var(--color-muted); text-decoration: none; } .crumbs a:hover { color: var(--color-fg); } .crumb-here { color: var(--color-fg); overflow: hidden; text-overflow: ellipsis; } .tools { display: flex; align-items: center; gap: var(--space-1); } .status { min-width: 4.5rem; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem; } .status[data-kind="error"] { color: var(--color-danger); } .segmented { display: inline-flex; padding: 2px; margin-right: var(--space-2); border: 1px solid var(--color-line); border-radius: var(--radius-md); } .segmented button { min-height: 2.25rem; padding: 0 var(--space-3); font: inherit; font-size: var(--text-sm); color: var(--color-muted); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; } .segmented button:hover { color: var(--color-fg); } .segmented button[aria-pressed="true"] { color: var(--color-fg); background: var(--color-hover); font-weight: 600; } .only-narrow, .only-narrow-right { display: none; } /* ── The note: a title, then the words and the reading view ──────────── */ .editor { flex: 1; min-height: 0; display: flex; } .sheet { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; } .title-input { width: 100%; margin: 0; padding: var(--space-5) max(var(--space-5), calc((100% - var(--size-read)) / 2)) var(--space-2); font: 700 var(--text-2xl) / var(--leading-tight) var(--font-sans); letter-spacing: -0.02em; color: var(--color-fg); background: transparent; border: 0; outline: 0; } .title-input:focus-visible { outline: 0; box-shadow: inset 3px 0 0 var(--color-accent); } .panes { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); } .panes[data-mode="split"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .panes[data-mode="split"] .source, .panes[data-mode="split"] .preview { padding-inline: var(--space-5); } .sheet:has(.panes[data-mode="split"]) .title-input { padding-inline: var(--space-5); } .panes[data-mode="split"] .preview { border-left: 1px solid var(--color-line); } .panes[data-mode="read"] .source, .panes[data-mode="edit"] .preview { display: none; } .source { width: 100%; height: 100%; margin: 0; padding: var(--space-3) max(var(--space-5), calc((100% - var(--size-read)) / 2)) 40vh; resize: none; font: 1.0625rem / 1.7 var(--font-sans); tab-size: 2; color: var(--color-fg); background: transparent; border: 0; outline: 0; caret-color: var(--color-accent); } .source:focus-visible { outline: 0; } .source::placeholder { color: var(--color-muted); } .preview { min-height: 0; overflow-y: auto; padding: var(--space-3) max(var(--space-5), calc((100% - var(--size-read)) / 2)) 40vh; } /* ── Markdown, read ───────────────────────────────────────────────────── */ .md { font-size: 1.0625rem; line-height: 1.7; overflow-wrap: anywhere; } .md > :first-child { margin-top: 0; } .md p, .md ul, .md ol, .md pre, .md blockquote, .md .callout, .md .table { margin: 0 0 var(--space-4); } .md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { margin: var(--space-5) 0 var(--space-2); line-height: var(--leading-tight); letter-spacing: -0.015em; scroll-margin-top: var(--space-4); } .md h1 { font-size: 1.85rem; } .md h2 { font-size: 1.45rem; } .md h3 { font-size: 1.2rem; } .md h4, .md h5, .md h6 { font-size: 1rem; } .md ul, .md ol { padding-left: 1.5rem; } .md li { margin: 0.15rem 0; } .md li > ul, .md li > ol { margin: 0.15rem 0 0; } .md li::marker { color: var(--color-muted); } .md li.task { list-style: none; margin-left: -1.5rem; display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline; } .md li.task > ul, .md li.task > ol { flex-basis: 100%; padding-left: 3rem; } .check { flex: none; position: relative; top: 0.18em; width: 1.05rem; height: 1.05rem; padding: 0; border: 1.5px solid var(--color-muted); border-radius: 4px; background: transparent; cursor: pointer; } .check::after { content: ""; position: absolute; inset: -0.7rem; } .check[aria-checked="true"] { background: var(--color-accent); border-color: var(--color-accent); } .check[aria-checked="true"]::before { content: ""; position: absolute; left: 0.3rem; top: 0.08rem; width: 0.3rem; height: 0.58rem; border: solid var(--color-accent-fg); border-width: 0 2px 2px 0; transform: rotate(45deg); } .md .done { color: var(--color-muted); text-decoration: line-through; } .md code { padding: 0.1em 0.35em; color: var(--color-code-fg); background: var(--color-code-bg); border-radius: var(--radius-sm); } .md pre { padding: var(--space-3) var(--space-4); overflow-x: auto; background: var(--color-code-bg); border-radius: var(--radius-md); line-height: 1.55; } .md pre code { padding: 0; color: var(--color-fg); background: none; } .md blockquote { padding: 0 0 0 var(--space-4); color: var(--color-muted); border-left: 3px solid var(--color-line); } .md blockquote > :last-child, .md .callout > :last-child { margin-bottom: 0; } .md hr { margin: var(--space-5) 0; border: 0; border-top: 1px solid var(--color-line); } .md mark { padding: 0 0.15em; color: var(--color-fg); background: var(--color-mark-bg); border-radius: 3px; } .md del { color: var(--color-muted); } .md a { text-decoration: none; } .md a:hover { text-decoration: underline; } .wikilink { font-weight: 550; } .unresolved { color: var(--color-link-missing); text-decoration: underline dashed 1px; text-underline-offset: 0.2em; } .tag { display: inline-flex; align-items: center; padding: 0.05em 0.55em; color: var(--color-tag-fg); background: var(--color-tag-bg); border-radius: var(--radius-pill); font-size: 0.875em; text-decoration: none; line-height: 1.6; } .tag:hover { text-decoration: none; filter: brightness(1.06); } .tag-cloud .tag { min-height: 1.75rem; } .md .table { overflow-x: auto; } .md table { border-collapse: collapse; min-width: 50%; font-size: 0.95em; } .md th, .md td { padding: var(--space-2) var(--space-3); border: 1px solid var(--color-line); text-align: left; vertical-align: top; } .md th { background: var(--color-surface); font-weight: 650; } .callout { padding: var(--space-3) var(--space-4); color: var(--color-callout-info); border-left: 3px solid currentColor; border-radius: var(--radius-sm); background: color-mix(in srgb, currentColor 9%, transparent); } .callout > :not(.callout-title) { color: var(--color-fg); } .callout-title { margin: 0 0 var(--space-1) !important; font-weight: 650; } .callout-tip, .callout-success { color: var(--color-callout-tip); } .callout-warning, .callout-question, .callout-todo { color: var(--color-callout-warning); } .callout-danger, .callout-bug, .callout-failure { color: var(--color-callout-danger); } .callout-quote, .callout-example, .callout-abstract { color: var(--color-accent); } /* ── The right: graph, backlinks, links, outline ─────────────────────── */ .panel { padding: var(--space-2) 0 var(--space-3); border-bottom: 1px solid var(--color-line); } .panel:last-child { border-bottom: 0; } .panel .section { margin: var(--space-2) 0; } .local-graph { display: block; width: 100%; height: 11rem; border-radius: var(--radius-md); background: var(--color-bg); touch-action: none; } .link-list { list-style: none; margin: 0; padding: 0; } .link-list li { display: grid; padding: var(--space-1) 0; } .link-list a { text-decoration: none; font-weight: 550; min-height: 1.75rem; display: inline-flex; align-items: center; } .link-list a:hover { text-decoration: underline; } .context { color: var(--color-muted); font-size: var(--text-sm); line-height: 1.45; } .outline { list-style: none; margin: 0; padding: 0; font-size: var(--text-sm); } .outline .depth-1 { padding-left: 0.9rem; } .outline .depth-2 { padding-left: 1.8rem; } .outline .depth-3, .outline .depth-4, .outline .depth-5 { padding-left: 2.7rem; } .outline a { display: block; padding: 0.2rem 0; color: var(--color-muted); text-decoration: none; } .outline a:hover { color: var(--color-fg); } .meta p { margin: 0 0 var(--space-1); } /* ── Pages without a note ─────────────────────────────────────────────── */ .empty-state { margin: auto; max-width: 30rem; padding: var(--space-6) var(--space-4); text-align: center; display: grid; gap: var(--space-4); justify-items: center; } .empty-state h1 { font-size: var(--text-xl); } .mark { color: var(--color-accent); } .mark svg { width: 56px; height: 56px; } .results { overflow-y: auto; padding: var(--space-5) max(var(--space-5), calc((100% - var(--size-read)) / 2)) var(--space-6); } .results-head { font-size: var(--text-xl); margin-bottom: var(--space-4); } .hits { list-style: none; margin: 0; padding: 0; } .hits a { display: grid; gap: var(--space-1); padding: var(--space-3); margin: 0 calc(-1 * var(--space-3)); border-radius: var(--radius-md); color: var(--color-fg); text-decoration: none; } .hits a:hover { background: var(--color-hover); } .hits mark { color: var(--color-fg); background: var(--color-mark-bg); border-radius: 3px; } .graph-stage { position: relative; flex: 1; min-height: 0; } .big-graph { display: block; width: 100%; height: 100%; touch-action: none; } .graph-help { position: absolute; left: var(--space-4); bottom: var(--space-3); pointer-events: none; } /* Signed out. */ .landing-page { min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(60rem 30rem at 50% -10%, var(--color-active), transparent 70%), var(--color-bg); } .landing { padding: var(--space-6) var(--space-4); } .landing-card { max-width: 30rem; display: grid; gap: var(--space-4); justify-items: center; text-align: center; } .landing-card h1 { font-size: 2.5rem; letter-spacing: -0.03em; } .lede { font-size: var(--text-lg); color: var(--color-muted); } /* Sign up, log in, account. */ .auth { width: min(24rem, 100%); justify-items: stretch; text-align: left; } .auth h1 { font-size: var(--text-2xl); text-align: center; } .auth .mark { justify-self: center; } .auth > p { text-align: center; } .field { display: grid; gap: var(--space-1); font-weight: 600; font-size: var(--text-sm); } .field .input { width: 100%; font-weight: 400; } .auth-error { padding: var(--space-2) var(--space-3); color: var(--color-danger); border: 1px solid currentColor; border-radius: var(--radius-md); text-align: center; } .settings { display: grid; gap: var(--space-3); max-width: 24rem; margin-top: var(--space-5); padding-top: var(--space-2); border-top: 1px solid var(--color-line); } .button-danger { background: var(--color-danger); color: var(--color-bg); } /* ── Overlays: the switcher, [[ completion, the toast ─────────────────── */ .palette { position: fixed; inset: 0; z-index: 30; display: grid; justify-items: center; align-items: start; padding: 12vh var(--space-4) var(--space-4); background: var(--color-scrim); } .palette-box { width: min(38rem, 100%); overflow: hidden; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-lg); box-shadow: 0 24px 64px var(--color-shadow); } .palette-input { width: 100%; min-height: 3.25rem; padding: 0 var(--space-4); border: 0; border-bottom: 1px solid var(--color-line); border-radius: 0; background: transparent; outline: 0; } .palette-list { list-style: none; margin: 0; padding: var(--space-2); max-height: min(24rem, 55vh); overflow-y: auto; } .palette-item, .palette-empty { display: flex; align-items: center; min-height: var(--size-tap); padding: 0 var(--space-3); border-radius: var(--radius-md); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .palette-item[aria-selected="true"] { background: var(--color-active); } .palette-item.is-create { color: var(--color-accent); font-weight: 600; } .palette-help { display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; padding: var(--space-2) var(--space-4); border-top: 1px solid var(--color-line); } .suggest { position: fixed; z-index: 20; list-style: none; margin: 0; padding: var(--space-1); min-width: 14rem; max-width: min(24rem, calc(100vw - 1rem)); background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md); box-shadow: 0 12px 32px var(--color-shadow); } .suggest-item { padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .suggest-item[aria-selected="true"] { background: var(--color-active); } .scrim { display: none; } /* A word from the last request, shown once, gone in a moment. */ .toast { position: fixed; z-index: 40; left: 50%; bottom: var(--space-5); transform: translateX(-50%); max-width: calc(100% - 2 * var(--space-4)); padding: var(--space-3) var(--space-4); color: var(--color-toast-fg); background: var(--color-toast-bg); border-radius: var(--radius-pill); box-shadow: 0 8px 24px var(--color-shadow); animation: toast 6s forwards; } @keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } } /* ── Narrower: the links slide in from the right ──────────────────────── */ @media (max-width: 1250px) { .shell, .shell[data-has-right="true"] { grid-template-columns: var(--size-left) minmax(0, 1fr); } .right { position: fixed; z-index: 15; top: 0; right: 0; bottom: 0; width: min(var(--size-right), 88vw); transform: translateX(100%); transition: transform 0.2s ease; box-shadow: 0 0 40px var(--color-shadow); } .shell[data-open="right"] .right { transform: none; } .only-narrow-right { display: inline-grid; } .scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 12; background: var(--color-scrim); } } /* ── A phone: the notes slide in from the left, one pane at a time ────── */ @media (max-width: 900px) { .shell, .shell[data-has-right="true"], .shell[data-has-right="false"] { grid-template-columns: minmax(0, 1fr); } .left { position: fixed; z-index: 15; top: 0; left: 0; bottom: 0; width: min(var(--size-left), 88vw); transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 0 0 40px var(--color-shadow); } .shell[data-open="left"] .left { transform: none; } .only-narrow { display: inline-grid; } .only-wide { display: none; } .panes[data-mode="split"] { grid-template-columns: minmax(0, 1fr); } .panes[data-mode="split"] .preview { display: none; } .status { min-width: 0; max-width: 6rem; } .toolbar { padding: var(--space-1); gap: var(--space-1); } .segmented { margin-right: 0; } .segmented button { min-height: 2.5rem; } .title-input, .sheet:has(.panes[data-mode="split"]) .title-input, .panes[data-mode] .source, .panes[data-mode] .preview, .results { padding-inline: var(--space-4); } .title-input { font-size: var(--text-xl); padding-top: var(--space-4); } } @media (max-width: 520px) { .toolbar .crumbs { display: none; } .tools { flex: 1; justify-content: flex-end; } } /* Motion is a courtesy: whoever asked for less gets none. */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } .toast { animation: none; } }