/* Layout variables. Color, type, and material tokens live in styles.css. */
:root {
  --note-body-width: 70%;
  --note-body-size: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
dialog:not([open]) { display: none; }
html, body { width: 100%; height: 100%; margin: 0; }
body { width: 133.333vw; height: 133.333vh; overflow: hidden; color: var(--ink); background: var(--surface-canvas); zoom: .75; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-width, 195px) 4px var(--list-width, 340px) 4px minmax(0, 1fr);
  /* The root in pwa.css handles safe areas. This margin is the design inset. */
  width: calc(100% - 37.333px);
  height: calc(100% - 37.333px);
  min-height: 0;
  margin: 18.667px;
  overflow: hidden;
  border: 1px solid var(--separator);
  border-radius: 18px;
  background: var(--list);
}
.app-shell.is-sidebar-collapsed { grid-template-columns: 56px 0 var(--list-width, 340px) 4px minmax(0,1fr); }
.app-shell.is-sidebar-collapsed .sidebar-resizer { width: 0; min-width: 0; pointer-events: none; }
.pane-resizer { position: relative; z-index: 2; width: 4px; min-width: 4px; cursor: col-resize; touch-action: none; outline: 0; }
.pane-resizer::after { position: absolute; top: 0; bottom: 0; left: 1px; width: 2px; content: ""; background: transparent; transition: background var(--motion-fade-duration) ease; }
.pane-resizer:hover::after, .pane-resizer:focus-visible::after { background: var(--cyan); }
body.is-resizing-pane, body.is-resizing-pane * { cursor: col-resize !important; user-select: none !important; }
.sidebar { display: flex; min-width: 0; flex-direction: column; overflow: hidden; padding: 22px 12px 25px 5px; background: var(--sidebar); }
.sidebar-header { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; margin: 0 8px 18px 12px; }
.sidebar-brand { min-width: 0; overflow: hidden; color: var(--label); font: 650 18px/1.25 var(--font-sans); letter-spacing: -0.035em; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-collapse-button { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; padding: 3px; border: 0; border-radius: 7px; color: var(--secondary-label); background: transparent; cursor: pointer; }
.sidebar-collapse-button:hover { color: var(--label); background: var(--surface-control); }
.all-notes-link, .folder-row, .trash-link, .settings-link {
  display: flex; align-items: center; width: 100%; min-width: 0; height: 39px; padding: 0 10px; border: 0; border-radius: 3px; color: var(--secondary-label); background: transparent; text-align: left; font-size: 15px; cursor: pointer;
}
.all-notes-link { gap: 11px; padding-left: 12px; color: var(--label); font-size: 18px; }
.all-notes-link img { display: block; width: 22px; height: 24px; flex: 0 0 auto; object-fit: contain; }
.trash-link svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.all-notes-link:hover, .folder-row:hover, .trash-link:hover, .settings-link:hover { background: var(--surface-editor); color: var(--label); }
.search-nav-button { color: var(--secondary-label); }
.search-nav-icon { display: block; width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.folders-heading { display: flex; align-items: center; justify-content: space-between; height: 33px; margin: 3px 9px 0 12px; color: var(--secondary-label); font: 600 15px/1.2 var(--font-sans); }
.folders-heading button { display: grid; width: 27px; height: 27px; place-items: center; padding: 0; border: 0; border-radius: 4px; color: var(--secondary-label); background: transparent; font-size: 22px; font-weight: 300; cursor: pointer; }
.folders-heading button:hover { color: var(--cyan); background: var(--surface-editor); }
.folder-list { display: flex; flex-direction: column; gap: 0; }
.folder-row { gap: 14px; height: 38px; padding-left: 12px; font-size: 16px; }
.folder-row img { display: block; width: 20px; height: 15px; flex: 0 0 auto; object-fit: contain; }
.folder-row.is-active { color: var(--label); }
.folder-row.is-drop-target { outline: 1px solid var(--cyan); background: var(--fill-selection); }
.folder-row.is-nested { margin-left: 16px; width: calc(100% - 16px); }
.folder-count { margin-left: auto; color: var(--secondary-label); font-size: 13px; font-variant-numeric: tabular-nums; }
.trash-link { gap: 10px; margin-top: 10px; color: var(--secondary-label); }
.trash-link svg { color: var(--secondary-label); }
.sidebar-bottom { display: flex; flex-direction: column; margin-top: auto; color: var(--secondary-label); }
.workspace-caption { padding: 0 12px 5px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.archive-notes { margin: 0 0 2px; color: var(--secondary-label); font: 500 15px/1.2 var(--font-sans); }
.sidebar-bottom .archive-notes,
.sidebar-bottom .settings-link { color: var(--secondary-label); }
.sidebar-bottom .archive-notes:hover,
.sidebar-bottom .settings-link:hover { color: var(--secondary-label); }
.archive-notes svg, .settings-link svg { display: none; }
.settings-link { height: 32px; padding-left: 12px; color: var(--secondary-label); font: 500 15px/1.2 var(--font-sans); }
.settings-link svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }

.list-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border-left: 0; background: var(--list); }
.list-header { position: relative; flex: 0 0 auto; padding: 25px 22px 8px; }
.list-heading-row { display: flex; align-items: center; gap: 10px; }
.list-heading-row h1 { flex: 1; min-width: 0; margin: 0; overflow: hidden; color: var(--label); font: 700 27px/1.35 var(--font-sans); letter-spacing: -0.035em; text-overflow: ellipsis; white-space: nowrap; }
.list-total { color: var(--secondary-label); font: 400 15px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.sidebar-toggle-icon { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.list-create-note-button { display: grid; width: 28px; height: 28px; flex: 0 0 auto; align-self: center; place-items: center; padding: 0; border: 0; border-radius: 6px; color: var(--secondary-label); background: transparent; cursor: pointer; }
.list-create-note-button:hover { color: var(--label); background: var(--surface-control); }
.list-create-note-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-field { display: flex; align-items: center; gap: 7px; height: 31px; margin-top: 6px; padding: 0 8px; border: 1px solid var(--separator); border-radius: 4px; color: var(--secondary-label); background: var(--surface-editor); }
.search-field > span { font-size: 18px; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--label); background: transparent; font-size: 13px; }
.search-field button { border: 0; color: var(--secondary-label); background: transparent; font-size: 18px; cursor: pointer; }
.mobile-menu-button { display: none; }
.note-list { min-height: 0; flex: 1; overflow: auto; padding: 0 8px 18px; scrollbar-color: var(--separator) transparent; scrollbar-width: thin; }
#note-list { view-transition-name: arbor-note-list; }
.note-group-title { margin: 15px 0 0; padding: 4px 10px 5px; color: var(--label); font: 650 19px/1.35 var(--font-sans); letter-spacing: -0.035em; }
.note-row { display: block; width: 100%; min-width: 0; min-height: 0; padding: 11px 22px 13px; border: 0; color: var(--label); background: transparent; text-align: left; cursor: default; transition: background var(--motion-fade-duration) ease, box-shadow var(--motion-fade-duration) ease; }
#note-list .note-row,
#note-list .note-row *,
#folder-tree .folder-row,
#folder-tree .folder-row-label,
#folder-tree .folder-row-count,
#folder-tree .folder-row .folder-glyph { -webkit-user-select: none; user-select: none; }
#folder-tree .folder-row input,
#folder-tree .folder-row textarea,
#folder-tree .folder-row [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
.note-row, .note-card, .folder-row { -webkit-user-select: none; user-select: none; }
.note-row:hover { background: var(--surface-control); box-shadow: inset 3px 0 var(--system-blue); }
.note-row.is-selected { background: var(--surface-control); box-shadow: inset 3px 0 var(--cyan); }
.note-row.is-selected:hover { background: var(--fill-selection); }
.note-row[draggable="true"] { cursor: default; }
.note-row.is-dragging { opacity: .42; }
.note-row-title { display: block; overflow: hidden; margin-bottom: 5px; color: var(--label); font-size: 16px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.note-row-excerpt { display: -webkit-box; overflow: hidden; color: var(--secondary-label); font-size: 14px; font-weight: 400; line-height: 1.38; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-overflow: ellipsis; white-space: normal; }
.note-row-excerpt[hidden] { display: none; }
.note-row-footer { display: flex; min-width: 0; align-items: center; gap: 8px; margin-top: 8px; }
.note-row-date { margin-left: auto; color: var(--secondary-label); font-size: 12px; line-height: 1.35; white-space: nowrap; }
.note-row-footer.is-unfiled .note-row-date { margin-left: 0; }
.note-row-folder { display: flex; min-width: 0; align-items: center; gap: 5px; color: var(--secondary-label); font: 13px/1.25 var(--font-sans); }
.note-row-folder img { display: block; width: 14px; height: 11px; flex: 0 0 auto; object-fit: contain; opacity: .9; }
.list-empty { margin: auto; padding: 26px; color: var(--muted); text-align: center; }
.list-empty strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 16px; }
.list-empty p { margin: 0 0 12px; font-size: 13px; }
.list-empty button { padding: 6px 12px; border: 1px solid var(--separator); border-radius: 4px; color: var(--label); background: var(--surface-editor); cursor: pointer; }
.list-message-retry { margin: 10px auto 0; }
.list-message-retry[hidden] { display: none; }
.list-message.is-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; border: 0 !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.note-skeleton-row { cursor: default; pointer-events: none; }
.note-skeleton-bar { display: block; max-width: 100%; height: .72em; border-radius: 999px; background: linear-gradient(90deg, rgba(128, 128, 128, .12) 20%, rgba(128, 128, 128, .21) 50%, rgba(128, 128, 128, .12) 80%); background-size: 220% 100%; animation: arbor-note-skeleton-shimmer 1.5s ease-in-out infinite; }
.note-skeleton-heading { display: flex; align-items: center; }
.note-skeleton-heading-bar { width: 74px; height: 1em; }
.note-skeleton-title { margin-bottom: 5px; }
.note-skeleton-title-bar { height: 1em; }
.note-skeleton-preview { display: block; }
.note-skeleton-preview-bar { height: .78em; }
.note-skeleton-date { display: flex; align-items: center; }
.note-skeleton-date-bar { height: .65em; }
@keyframes arbor-note-skeleton-shimmer { to { background-position: -220% 0; } }
.note-skeleton-row:nth-of-type(2) .note-skeleton-bar { animation-delay: 100ms; }
.note-skeleton-row:nth-of-type(3) .note-skeleton-bar { animation-delay: 200ms; }
.note-skeleton-row:nth-of-type(4) .note-skeleton-bar { animation-delay: 300ms; }
@media (prefers-reduced-motion: reduce) { .note-skeleton-bar { animation: none; background-position: 0 0; } }

.editor-panel { position: relative; display: flex; min-width: 0; height: 100%; flex-direction: column; margin: 0 0 0 0; overflow: hidden; border: 0; border-radius: 17px 17px 17px 17px; background: var(--paper); }
.editor-empty { display: grid; height: 100%; place-items: center; color: var(--tertiary-label); font-size: 14px; }
.editor-view { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.editor-empty { height: auto; min-height: 0; flex: 1 1 0; }
.note-workspace.editor-view { min-height: 0; height: auto; flex: 1 1 0; }
.editor-header { position: relative; display: flex; flex: 0 0 72px; align-items: center; justify-content: center; padding: 0 30px; }
.note-tab-strip { position: relative; display: flex; min-width: 0; min-height: 3.25rem; flex: 0 0 auto; align-items: stretch; overflow: hidden; padding: 0 var(--space-4); border: 0; background: var(--list); }
.note-tab-strip[hidden] { display: none; }
.note-tab-track { position: relative; display: flex; min-width: 0; min-height: 3.25rem; flex: 1 1 auto; align-items: center; gap: var(--space-3); overflow-x: auto; overflow-y: hidden; padding: 0 3.5rem 0 0; scrollbar-width: none; }
.note-tab-track::-webkit-scrollbar { display: none; }
.note-tab-track.is-overflowing { -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 4.5rem), transparent 100%); mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 4.5rem), transparent 100%); }
.note-tab-highlight { position: absolute; z-index: 0; top: 50%; left: 0; width: 0; height: 2.5rem; border-radius: var(--radius-xl); background: var(--surface-control); pointer-events: none; transform: translateX(var(--note-tab-highlight-x, 0px)) translateY(-50%); transition: transform 160ms cubic-bezier(.2, .8, .2, 1), width 160ms cubic-bezier(.2, .8, .2, 1); }
.note-tab-group { position: relative; z-index: 1; display: flex; min-width: 0; width: fit-content; max-width: min(20rem, 70vw); height: 2.5rem; flex: 0 0 auto; align-items: center; overflow: hidden; border-radius: var(--radius-xl); background: transparent; }
.note-tab { display: flex; min-width: 0; height: 100%; flex: 1 1 auto; align-items: center; gap: var(--space-2); padding: 0 var(--space-4); border: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--secondary-label); background: transparent; font: 500 var(--text-body-size)/var(--text-body-line) var(--font-sans); text-align: left; white-space: nowrap; cursor: default; transition: color var(--motion-fade-duration) ease; }
.note-tab-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.note-tab-group:hover .note-tab, .note-tab-group:focus-within .note-tab, .note-tab[aria-selected="true"] { color: var(--label); }
#note-tab-strip:has(.note-tab-group:hover) .note-tab-group.is-active:not(:hover) .note-tab,
#note-tab-strip:has(.note-tab-group:focus-within) .note-tab-group.is-active:not(:focus-within) .note-tab { color: var(--secondary-label); }
.note-tab:focus-visible { outline: none; }
.note-tab-close { display: grid; width: 2rem; min-width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center; align-self: center; margin-right: var(--space-2); padding: 0; border: 0; border-radius: var(--radius-xs); color: var(--secondary-label); background: transparent; font: 400 1.125rem/1 var(--font-sans); cursor: default; opacity: 0; pointer-events: none; visibility: hidden; transition: color var(--motion-fade-duration) ease, background-color var(--motion-fade-duration) ease, opacity var(--motion-fade-duration) ease; }
.note-tab-group.is-active .note-tab-close, .note-tab-group:hover .note-tab-close, .note-tab-group:focus-within .note-tab-close { opacity: 1; pointer-events: auto; visibility: visible; }
#note-tab-strip:has(.note-tab-group:hover) .note-tab-group.is-active:not(:hover) .note-tab-close { opacity: 0; pointer-events: none; visibility: hidden; }
#note-tab-strip:has(.note-tab-group:focus-within) .note-tab-group.is-active:not(:focus-within) .note-tab-close { opacity: 0; pointer-events: none; visibility: hidden; }
.note-tab-close:hover, .note-tab-close:focus-visible { color: var(--label); background: color-mix(in srgb, var(--label) 10%, transparent); outline: none; }
.note-tab-new { position: absolute; z-index: 3; top: 50%; right: var(--space-4); display: grid; width: 2.25rem; height: 2.25rem; place-items: center; padding: 0; transform: translateY(-50%); border: 0; border-radius: var(--radius-xl); color: var(--secondary-label); background: var(--list); cursor: default; }
.note-tab-new:hover, .note-tab-new:focus-visible { color: var(--label); background: var(--surface-control); outline: none; }
.note-tab-new svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.editor-date { transform: translateY(12px); color: var(--secondary-label); font-size: 14px; font-weight: 550; line-height: 1.4; text-align: center; cursor: default; }
.editor-date .editor-date-created { display: none; }
.editor-date:hover .editor-date-modified, .editor-date:focus-visible .editor-date-modified { display: none; }
.editor-date:hover .editor-date-created, .editor-date:focus-visible .editor-date-created { display: inline; color: var(--secondary-label); }
.note-actions-button { position: absolute; top: 50%; right: 16px; display: grid; width: 30px; height: 30px; place-items: center; padding: 0; transform: translateY(-50%); border: 0; border-radius: 8px; color: var(--secondary-label); background: transparent; cursor: pointer; }
.note-actions-button:hover, .note-actions-button[aria-expanded="true"] { color: var(--label); background: var(--surface-control); }
.note-actions-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.editor-scroll { min-height: 0; flex: 1; overflow: auto; padding: 11px 38px 40px; scrollbar-color: var(--separator) transparent; scrollbar-width: thin; }
.note-page { width: 100%; margin: 0 auto; }
.note-title { display: block; width: min(var(--note-body-width), 100%); min-height: 44px; margin: 0 auto 28px; padding: 0; resize: none; overflow: hidden; border: 0; border-radius: 0; outline: 0; color: var(--label); background: transparent; font: 700 31px/1.2 var(--font-sans); letter-spacing: var(--text-large-title-tracking); text-align: left; }
.note-title::placeholder { color: var(--secondary-label); }
.note-body { width: min(var(--note-body-width), 100%); min-height: 520px; margin: 0 auto; color: var(--label); font-size: var(--note-body-size); line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-body:focus { outline: 0; }
.note-body p { margin: 0 0 22px; }
.note-body h2, .note-body h3 { margin: 26px 0 23px; color: var(--label); font-size: 22px; font-weight: 650; line-height: 1.3; }
.note-body h2:first-child, .note-body h3:first-child { margin-top: 0; }
.note-body .md-line { display: block; margin: 0; }
.note-body a { color: var(--label); }
.note-action-menu { position: fixed; z-index: 80; top: 0; left: 0; display: flex; width: min(230px, calc(100vw - 20px)); flex-direction: column; padding: 5px; border: 1px solid var(--separator); border-radius: 10px; background: var(--surface-editor); box-shadow: 0 12px 34px #0009; }
.note-action-menu label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 9px; color: var(--secondary-label); font-size: 12px; }
.note-action-menu select { max-width: 125px; border: 0; color: var(--label); background: var(--surface-control); font-size: 12px; }
.note-action-menu button { min-height: 34px; padding: 8px 9px; border: 0; border-radius: 6px; color: var(--label); background: transparent; text-align: left; font-size: 13px; cursor: pointer; }
.note-action-menu button:hover { background: var(--surface-control); }
.note-action-menu button:focus-visible, .note-action-menu select:focus-visible { outline: 2px solid var(--system-blue); outline-offset: 1px; }
.correction-mark { border-radius: 3px; color: inherit; text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: color-mix(in srgb, var(--secondary-label) 84%, transparent); text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: default; }
.correction-mark:hover, .correction-mark:focus { background: transparent; outline: none; }
.correction-popover { position: fixed; z-index: 110; display: flex; width: min(320px, calc(100vw - 20px)); max-width: min(92vw, 520px); flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; border: 1px solid color-mix(in srgb, var(--secondary-label) 48%, transparent); border-radius: 12px; color: var(--label); background: var(--surface-elevated); box-shadow: 0 10px 28px rgb(0 0 0 / 34%); opacity: 0; pointer-events: none; transform: translate(-50%, -100%) translateY(-3px) scale(.985); transition: opacity 140ms ease-in, transform 140ms cubic-bezier(.4, 0, 1, 1), visibility 0s linear 140ms; }
.correction-popover[data-placement="bottom"] { transform: translateX(-50%) translateY(3px) scale(.985); }
.correction-popover.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translate(-50%, -100%) translateY(0) scale(1); transition: opacity 180ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1), visibility 0s; }
.correction-popover[data-placement="bottom"].is-open { transform: translateX(-50%) translateY(0) scale(1); }
.correction-popover[hidden] { display: none; }
.correction-copy { display: grid; gap: 4px; }
.correction-term { color: var(--label); font: 600 15px/1.3 var(--font-sans); }
.correction-message { color: var(--secondary-label); font: 14px/1.4 var(--font-sans); }
.correction-options { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 2px; }
.correction-option, .correction-ignore, .correction-add-dictionary { min-height: 34px; padding: 6px 9px; border: 0; border-radius: 7px; color: var(--label); background: transparent; font: 500 14px/1.25 var(--font-sans); white-space: nowrap; cursor: default; }
.correction-option:hover, .correction-option:focus-visible, .correction-option[aria-selected="true"], .correction-ignore:hover, .correction-ignore:focus-visible { background: var(--surface-control); outline: none; }
.correction-option:focus-visible, .correction-ignore:focus-visible { box-shadow: inset 0 0 0 1px var(--focus-ring); }
.correction-actions { display: flex; align-items: center; gap: 5px; margin: 0 -12px -12px; padding: 7px 9px; border-top: 1px solid var(--separator); }
.correction-popover[data-kind="spelling"] .correction-copy { display: none; }
.correction-popover[data-kind="spelling"] .correction-actions { margin: -12px -12px 0; border-top: 0; border-bottom: 1px solid var(--separator); }
.correction-ignore, .correction-add-dictionary { color: var(--secondary-label); }
.correction-add-dictionary { margin-left: auto; }
.correction-add-dictionary:hover, .correction-add-dictionary:focus-visible { color: var(--label); background: var(--surface-control); outline: none; }
.correction-add-dictionary:focus-visible { box-shadow: inset 0 0 0 1px var(--focus-ring); }
.correction-actions button[hidden] { display: none; }
.correction-announcement { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.personal-dictionary-add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.settings-content #personal-dictionary-input { width: 100%; max-width: none; }
.personal-dictionary-add-row button { min-width: 54px; border: 1px solid var(--separator); border-radius: 8px; color: var(--label); background: var(--surface-control); }
.personal-dictionary-status { margin: 8px 0 0; color: var(--secondary-label); font-size: 13px; line-height: 1.45; }
.personal-dictionary-status[data-state="error"] { color: var(--system-orange, #ff9f0a); }
.personal-dictionary-entries { display: grid; gap: 4px; max-height: 190px; margin: 10px 0 0; padding: 0; overflow: auto; list-style: none; }
.personal-dictionary-entry { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--label); font-size: 14px; }
.personal-dictionary-remove { border: 0; color: var(--secondary-label); background: transparent; font-size: 13px; cursor: pointer; }
.personal-dictionary-remove:hover, .personal-dictionary-remove:focus-visible { color: var(--label); }
.personal-dictionary-empty { color: var(--secondary-label); font-size: 13px; }
.selection-review-action, .selection-review-panel { position: fixed; z-index: 112; color: var(--label); font-family: var(--font-sans); }
.selection-review-action { min-height: 34px; padding: 7px 11px; border: 1px solid var(--separator); border-radius: 9px; background: var(--surface-elevated); box-shadow: 0 6px 20px rgb(0 0 0 / 30%); font-size: 13px; font-weight: 550; white-space: nowrap; cursor: default; transform: translate(-50%, -100%); transition: opacity var(--motion-fade-duration) ease, background-color var(--motion-fade-duration) ease; }
.selection-review-action[data-placement="bottom"] { transform: translate(-50%, 0); }
.selection-review-action:hover { background: var(--surface-control); }
.selection-review-action:focus-visible, .selection-review-close:focus-visible, .selection-review-accept:focus-visible, .selection-review-accept-all:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.selection-review-action[hidden], .selection-review-panel[hidden] { display: none; }
.selection-review-panel { display: flex; width: min(420px, calc(100vw - 24px)); max-height: min(68vh, 560px); flex-direction: column; overflow: hidden; border: 1px solid color-mix(in srgb, var(--secondary-label) 38%, transparent); border-radius: 13px; background: var(--surface-elevated); box-shadow: 0 12px 34px rgb(0 0 0 / 38%); opacity: 0; pointer-events: none; transform: translateX(-50%); transition: opacity var(--motion-fade-duration) ease; }
.selection-review-panel.is-open { opacity: 1; pointer-events: auto; }
.selection-review-header { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px 8px; }
.selection-review-header h2 { margin: 0; color: var(--label); font-size: 15px; font-weight: 650; line-height: 1.3; }
.selection-review-close { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; padding: 0; border: 0; border-radius: 7px; color: var(--secondary-label); background: transparent; font: 22px/1 var(--font-sans); cursor: default; }
.selection-review-close:hover { color: var(--label); background: var(--surface-control); }
.selection-review-status { margin: 0; padding: 2px 13px 11px; color: var(--secondary-label); font-size: 13px; line-height: 1.4; }
.selection-review-status[data-state="no-suggestion"], .selection-review-status[data-state="accepted"] { color: var(--label); }
.selection-review-results { min-height: 0; overflow: auto; padding: 0 11px 9px; }
.selection-review-entry { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--separator); border-radius: 9px; background: color-mix(in srgb, var(--surface-control) 52%, transparent); }
.selection-review-entry + .selection-review-entry { margin-top: 8px; }
.selection-review-entry-label { margin: 0; color: var(--secondary-label); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.selection-review-original, .selection-review-replacement { margin: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.selection-review-original { color: var(--secondary-label); }
.selection-review-replacement { color: var(--label); }
.selection-review-accept, .selection-review-accept-all { min-height: 32px; padding: 6px 10px; border: 0; border-radius: 7px; color: var(--label); background: var(--surface-control); font: 550 12px/1.2 var(--font-sans); cursor: default; }
.selection-review-accept { justify-self: start; }
.selection-review-accept:hover, .selection-review-accept-all:hover { filter: brightness(1.14); }
.selection-review-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 9px 12px 12px; border-top: 1px solid var(--separator); }
.selection-review-actions[hidden], .selection-review-accept-all[hidden] { display: none; }
@media (max-width: 560px) {
  .selection-review-panel { width: min(360px, calc(100vw - 20px)); max-height: min(62vh, 520px); }
  .selection-review-action { min-height: 40px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .selection-review-action, .selection-review-panel { transition: none !important; }
}
@media (max-width: 560px) {
  .correction-popover { max-width: calc(100vw - 20px); }
  .correction-option, .correction-ignore, .correction-add-dictionary { min-height: 40px; padding-inline: 10px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .correction-popover { transition: none; }
}
.note-context-menu, .note-folder-submenu { position: fixed; z-index: 82; display: flex; width: min(13.5rem, calc(100vw - 1rem)); max-height: min(22rem, calc(100dvh - 1rem)); flex-direction: column; gap: var(--space-1); padding: var(--space-1); border-radius: var(--radius-lg); box-shadow: 0 .5rem 1.25rem rgb(0 0 0 / 42%); }
.note-context-menu { border: 1px solid var(--separator); background: var(--surface-editor); }
.note-context-menu[hidden], .note-folder-submenu[hidden] { display: none; }
.context-menu-item, .note-folder-item { display: flex; width: 100%; min-width: 0; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--row-pointer-compact); padding: var(--space-1) var(--space-2); border: 0; border-radius: var(--radius-sm); color: var(--label); background: transparent; text-align: left; font: 500 var(--text-callout-size)/var(--text-callout-line) var(--font-sans); cursor: default; }
.context-menu-item:hover, .context-menu-item:focus-visible { background: var(--surface-control); outline: none; }
.context-menu-item svg { display: block; width: 1rem; height: 1rem; flex: 0 0 1rem; fill: none; stroke: var(--secondary-label); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.note-folder-submenu { overflow-y: auto; border: 1px solid var(--surface-editor); background: var(--surface-control); }
.note-folder-item { padding-right: var(--space-2); font-weight: 450; }
.note-folder-item:hover, .note-folder-item:focus-visible { background: color-mix(in srgb, var(--label) 10%, var(--surface-control)); outline: none; }
.note-folder-item-count { flex: 0 0 auto; color: var(--secondary-label); font: 500 var(--text-footnote-size)/1.2 var(--font-sans); }
.note-folder-empty { padding: var(--space-2); color: var(--secondary-label); font-size: var(--text-subheadline-size); }
.back-button { display: none; }

.folder-dialog, .settings-dialog, .quick-dialog { color: var(--ink); background: var(--modal); }
.folder-dialog { width: min(380px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--separator); border-radius: 9px; box-shadow: 0 24px 80px #000b; }
.folder-dialog::backdrop, .settings-dialog::backdrop, .quick-dialog::backdrop { background: var(--surface-canvas); backdrop-filter: blur(6px); }
.folder-dialog form { position: relative; padding: 28px; }
.folder-dialog h2 { margin: 0 0 20px; font: 700 22px var(--font-mono); }
.folder-archive-dialog { width: min(410px, calc(100vw - 32px)); }
.folder-archive-copy { margin: 0 0 18px; color: var(--secondary-label); font-size: 14px; line-height: 1.5; }
.folder-dialog .folder-archive-skip { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; color: var(--label); font-size: 13px; }
.folder-archive-skip input[type="checkbox"] { flex: 0 0 15px; width: 15px; height: 15px; margin: 0; padding: 0; accent-color: var(--system-blue); }
.folder-archive-actions { display: flex; gap: 8px; }
.folder-archive-actions button { flex: 1 1 0; min-height: 38px; border: 0; border-radius: 4px; font: 500 13px var(--font-sans); cursor: pointer; }
.folder-archive-actions .dialog-submit { width: auto; }
.folder-dialog-cancel { color: var(--label); background: var(--surface-control); }
.folder-dialog label { display: block; margin-bottom: 7px; color: var(--secondary-label); font-size: 12px; }
.folder-dialog input:not([type="checkbox"]) { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--separator); border-radius: 4px; color: var(--label); background: var(--surface-control); }
.dialog-error { min-height: 15px; margin: 5px 0; color: var(--system-red); font-size: 11px; }
.dialog-submit { width: 100%; height: 38px; border: 0; border-radius: 4px; color: var(--label); background: var(--fill-selection); font-size: 13px; cursor: pointer; }
.dialog-close { position: absolute; top: 10px; right: 12px; border: 0; color: var(--secondary-label); background: transparent; font-size: 23px; cursor: pointer; }
.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; }
.quick-dialog { position: fixed; top: 23.1%; left: 50%; width: min(80vw, 1320px); max-width: none; max-height: none; margin: 0; padding: 0; overflow: visible; transform: translateX(-50%) scale(.75); border: 0; border-radius: 0; background: transparent; }
.quick-dialog-bar { display: flex; width: 100%; height: 112px; align-items: center; gap: 18px; margin: 0; padding: 0 42px; border: 1px solid var(--separator); border-radius: 25px; background: var(--surface-editor); box-shadow: 0 26px 80px #0009; transition: height var(--motion-duration-short) var(--ease-standard); }
.quick-dialog-bar input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--label); background: transparent; font: 500 38px/1.2 var(--font-sans); letter-spacing: var(--text-large-title-tracking); }
.quick-dialog-bar input::placeholder { color: var(--secondary-label); opacity: 1; }
.quick-dialog-bar input::-webkit-search-cancel-button { display: none; }
.capture-dialog .quick-dialog-bar { height: auto; min-height: 112px; align-items: center; padding-top: 26px; padding-bottom: 26px; }
.capture-dialog .quick-dialog-bar textarea { display: block; width: 100%; min-width: 0; min-height: 1.2em; max-height: 3.6em; padding: 0; overflow-x: hidden; overflow-y: auto; border: 0; outline: 0; color: var(--label); background: transparent; font: 500 38px/1.2 var(--font-sans); letter-spacing: var(--text-large-title-tracking); resize: none; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: none; transition: height var(--motion-duration-short) var(--ease-standard); }
.capture-dialog .quick-dialog-bar textarea::-webkit-scrollbar { display: none; }
.capture-dialog .quick-dialog-bar textarea::placeholder { color: var(--secondary-label); opacity: 1; }
.quick-dialog-bar svg, .search-page-form svg { width: 31px; height: 31px; flex: 0 0 auto; fill: none; stroke: var(--secondary-label); stroke-width: 2.1; stroke-linecap: round; }
.capture-dialog .quick-dialog-bar { padding-left: 42px; }
.search-dialog-bar { padding-left: 32px; }
.search-dialog-bar { position: relative; }
.search-prompt { position: absolute; top: 50%; left: 82px; overflow: hidden; color: var(--secondary-label); font: 500 38px/1.2 var(--font-sans); letter-spacing: var(--text-large-title-tracking); opacity: 1; pointer-events: none; transform: translateY(-50%); transition: opacity var(--motion-duration) var(--ease-standard), transform var(--motion-duration) var(--ease-standard); white-space: nowrap; }
.search-prompt.is-fading { opacity: 0; transform: translateY(calc(-50% - 8px)); }
.search-prompt[hidden] { display: none; }
.search-suggestions { position: absolute; top: 122px; left: 0; right: 0; max-height: min(55vh, 620px); overflow: auto; border: 1px solid var(--separator); border-radius: 18px; background: var(--surface-editor); box-shadow: 0 24px 64px #000a; scrollbar-color: var(--separator) transparent; scrollbar-width: thin; }
.search-suggestions[hidden] { display: none; }
.search-suggestion { display: block; width: 100%; padding: 13px 24px; border: 0; border-bottom: 1px solid var(--separator); color: var(--label); background: transparent; text-align: left; cursor: pointer; transition: background-color var(--motion-fade-duration) ease; }
.search-suggestion:last-child { border-bottom: 0; }
.search-suggestion:hover, .search-suggestion.is-active { background: var(--fill-selection); }
.search-suggestion-title { display: block; overflow: hidden; color: var(--label); font-size: 22px; font-weight: 650; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestion-title mark, .search-suggestion-excerpt mark { color: inherit; background: var(--fill-selection); }
.search-suggestion-excerpt { display: block; overflow: hidden; margin-top: 3px; color: var(--secondary-label); font-size: 18px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestion-footer { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.search-suggestion-folder { display: flex; align-items: center; gap: 4px; color: var(--secondary-label); font: 14px/1.25 var(--font-mono); }
.search-suggestion-folder img { width: 19px; height: 14px; object-fit: contain; }
.search-suggestion-date { margin-left: auto; color: var(--secondary-label); font-size: 14px; }
.search-suggestions-empty { padding: 18px 24px; color: var(--secondary-label); font-size: 15px; }
.editor-formatting-tools button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 0; border-radius: 5px; color: var(--secondary-label); background: transparent; cursor: pointer; font-size: 14px; }
.editor-formatting-tools button:hover { color: var(--label); background: var(--surface-control); }
.editor-formatting-tools button:active { background: var(--surface-control); }
.editor-formatting-tools code { font-size: 11px; }
.format-divider { width: 1px; height: 19px; margin: 0 5px; background: var(--surface-control); }
.editor-formatting-tools { position: absolute; z-index: 4; right: 50%; bottom: 17px; display: flex; visibility: hidden; align-items: center; gap: 3px; padding: 5px 7px; opacity: 0; pointer-events: none; transform: translateX(50%) translateY(6px); transition: opacity var(--motion-fade-duration) ease, transform var(--motion-fade-duration) var(--ease-standard), visibility 0s linear var(--motion-fade-duration); border: 1px solid var(--separator); border-radius: 999px; background: var(--surface-editor); box-shadow: 0 10px 32px #0008; backdrop-filter: blur(14px); }
.editor-panel.is-writing .editor-formatting-tools { visibility: visible; opacity: 1; pointer-events: auto; transform: translateX(50%) translateY(0); transition-delay: 0s; }
.editor-panel.is-writing .editor-scroll { padding-bottom: 85px; }
.editor-formatting-tools button { width: 32px; height: 32px; }
.search-page-view { position: absolute; z-index: 6; inset: 0; overflow: auto; padding: clamp(80px, 9vh, 156px) 0 45px; background: var(--surface-editor); }
.search-page-new-note { position: absolute; top: 16px; right: 18px; display: grid; width: 52px; height: 52px; place-items: center; padding: 0; border: 0; border-radius: 8px; color: var(--secondary-label); background: var(--surface-sidebar-solid); cursor: pointer; }
.search-page-new-note:hover { color: var(--label); background: var(--surface-control); }
.search-page-new-note svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.search-page-content { width: min(80%, 1040px); margin: 0 auto; }
.search-page-form { display: flex; align-items: center; gap: 16px; min-height: 80px; margin: 0; }
.search-page-icon { display: grid; width: 72px; height: 72px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: var(--label); background: var(--surface-sidebar-solid); }
.search-page-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-page-input-shell { display: flex; min-width: 0; flex: 1; align-items: center; min-height: 72px; padding: 0 20px; border-radius: 9px; background: var(--surface-sidebar-solid); }
.search-page-form input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--label); background: transparent; font: 620 36px/1.2 var(--font-sans); letter-spacing: -0.03em; }
.search-page-form input::placeholder { color: var(--tertiary-label); }
.search-page-count { min-height: 18px; margin: 13px 0 10px 88px; color: var(--secondary-label); font-size: 16px; line-height: 1.4; }
.search-page-results { width: calc(100% - 88px); margin: 0 0 0 88px; }
.search-page-row { display: block; width: 100%; min-height: 84px; padding: 11px 0 10px; border: 0; border-radius: 4px; color: var(--label); background: transparent; text-align: left; cursor: pointer; transition: background-color var(--motion-fade-duration) ease, outline-color var(--motion-fade-duration) ease, box-shadow var(--motion-fade-duration) ease; }
.search-page-row:hover { background: var(--surface-editor); }
.search-page-row.is-active { outline: 1px solid var(--system-blue); outline-offset: -1px; background: var(--fill-selection); box-shadow: inset 4px 0 var(--cyan); }
.search-page-row.is-active .search-page-row-meta, .search-page-row.is-active .search-page-row-folder { color: var(--system-blue); }
.search-page-row.is-active .search-page-row-date { color: var(--label); }
.search-page-row-title { display: block; overflow: hidden; margin-bottom: 2px; font-size: 15px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.search-page-row-title mark, .search-page-row-excerpt mark { color: var(--highlight-text); background: var(--highlight); }
.search-page-row-meta { display: flex; gap: 5px; overflow: hidden; color: var(--secondary-label); font-size: 13px; line-height: 1.3; white-space: nowrap; }
.search-page-row-date { flex: 0 0 auto; color: var(--secondary-label); }
.search-page-row-excerpt { overflow: hidden; text-overflow: ellipsis; }
.search-page-row-folder { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--secondary-label); font: 12px/1.25 var(--font-mono); }
.search-page-row-folder img { width: 20px; height: 15px; flex: 0 0 auto; object-fit: contain; }
.search-page-empty { padding: 14px 12px; color: var(--secondary-label); font-size: 14px; }

/* Keep the CloudKit client on the same workspace layout as the local preview. */
#demo-badge, #app-frame .browser-tools, #folder-tree .folder-row-count { display: none !important; }
#note-pane { padding: 0; overflow: hidden; background: var(--paper); }
#note-workspace.note-workspace { border: 0; border-radius: 0; background: transparent; }
#note-workspace .editor-header { min-height: 72px; flex: 0 0 72px; justify-content: center; padding: 0 30px; }
#note-pane.has-open-tabs { border-left: 0; background: var(--list); }
#note-pane.has-open-tabs #note-workspace { background: var(--list); }
#note-pane.has-open-tabs .note-tab-strip { min-height: calc(3.25rem + var(--space-3)); margin-bottom: 16px; padding-top: var(--space-3); background: var(--list); }
#note-pane.has-open-tabs .editor-header { margin: 0 var(--space-4); border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: var(--paper); }
#note-pane.has-open-tabs .editor-scroll { margin: 0 var(--space-4) var(--space-4); border-radius: 0 0 var(--radius-xl) var(--radius-xl); background: var(--paper); }
#modified-at { display: block; max-width: calc(100% - 220px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translateY(12px); }
#back-to-list-button { display: none !important; }
#save-state {
  position: absolute;
  right: 22px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 96px;
  color: var(--secondary-label);
  font: 500 12px/1.2 var(--font-text);
  letter-spacing: -0.01em;
  transition: color var(--motion-fade-duration) ease;
  white-space: nowrap;
  pointer-events: none;
}
#save-state .save-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tertiary-label); transition: background-color var(--motion-fade-duration) ease; }
#save-state.is-saved .save-dot { background: var(--system-green); }
#save-state.is-dirty .save-dot { background: var(--system-orange); }
#save-state.is-saving .save-dot { background: var(--system-orange); animation: save-pulse 1.1s ease-in-out infinite; }
#save-state.is-error { color: var(--system-red); }
#save-state.is-error .save-dot { background: var(--system-red); animation: none; }
@keyframes save-pulse { 50% { opacity: .35; } }
.draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(var(--note-body-width), 100%);
  margin: 0 auto 18px;
  padding: 8px 8px 8px 12px;
  border-radius: 8px;
  color: var(--label);
  background: var(--surface-control);
  font-size: 13px;
  line-height: 1.35;
}
.draft-banner p { margin: 0; }
.draft-banner button {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  color: var(--system-red);
  background: transparent;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
}
.draft-banner button:hover { background: var(--fill-secondary, rgba(120, 120, 128, 0.2)); }
#note-workspace .editor-scroll { width: 100%; max-width: none; align-self: stretch; padding: 11px 38px 40px; }
#note-page { width: 100%; margin: 0 auto; }
#note-title { width: min(var(--note-body-width), 100%); margin: 0 auto 28px; }
#rich-editor { position: relative; min-height: 300px; }
#rich-editor .note-body { width: min(var(--note-body-width), 100%); margin: 0 auto; }
#empty-state { min-height: 0; border: 0; border-radius: 0; background: transparent; }
#note-list .note-row { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 2px; align-items: baseline; margin: 3px 0; padding: 11px 10px 10px; border: 1px solid transparent; border-radius: 11px; }
#note-list .note-row:hover { background: var(--surface-control); box-shadow: none; }
#note-list .note-row.is-selected, #note-list .note-row.is-selected:hover { border-color: transparent; background: var(--surface-editor); box-shadow: none; }
#note-list .note-row-title { grid-column: 1 / -1; margin-bottom: 2px; font-size: 14px; font-weight: 650; line-height: 1.35; }
#note-list .note-card-detail, #note-list .note-row-footer { display: contents; }
#note-list .note-row-date { grid-column: 1; grid-row: 2; margin: 0; color: var(--label); font: 560 12px/1.35 var(--font-sans); }
#note-list .note-card-preview { grid-column: 2; grid-row: 2; }
#note-list .note-row-folder { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; color: var(--secondary-label); font: 11px/1.25 var(--font-sans); }
#note-list .note-row-folder img { width: 12px; height: 10px; }
#sidebar .settings-link { height: 32px; padding-left: 12px; background: transparent; }
@media (max-width: 760px) {
  #note-pane { padding: 0; }
  #note-pane.has-open-tabs .note-tab-strip { min-height: calc(var(--hit-touch) + var(--space-2)); margin-bottom: var(--space-2); padding-top: var(--space-2); }
  #note-pane.has-open-tabs .editor-header { margin-inline: var(--space-2); }
  #note-pane.has-open-tabs .editor-scroll { margin: 0 var(--space-2) var(--space-2); }
  #note-workspace .editor-header { min-height: 45px; flex-basis: 45px; padding: 6px 10px; }
  #back-to-list-button { display: block !important; }
  #modified-at { max-width: calc(100% - 168px); transform: none; }
  .note-actions-button { right: 12px; }
  #save-state { right: 12px; }
  #note-workspace .editor-scroll { padding: 8px 22px 30px; }
  #note-title, #rich-editor .note-body { width: 100%; }
}
.note-body ul, .note-body ol { margin: 0 0 20px; padding-left: 1.35em; }
.note-body ul li[data-indent-level="1"] { list-style-type: circle; }
.note-body ul li[data-indent-level="2"] { list-style-type: square; }
.note-body ol li[data-indent-level="1"] { list-style-type: lower-alpha; }
.note-body ol li[data-indent-level="2"] { list-style-type: lower-roman; }
.note-body li { padding-left: 2px; }
.note-body li + li { margin-top: 4px; }
.note-body li input[type="checkbox"] { margin: 0 7px 0 0; accent-color: var(--cyan); }
.note-body blockquote { margin: 0 0 18px; padding-left: 14px; border-left: 2px solid var(--separator); color: var(--secondary-label); }
.note-body code { padding: 1px 4px; border-radius: 3px; color: var(--label); background: var(--surface-control); font: .88em var(--font-mono); }
.note-body strong { color: var(--label); }
.note-body s, .note-body del, .note-body strike { color: var(--secondary-label); }
.note-body p:empty::after { content: "\00a0"; }
.note-body input[type="checkbox"]:checked + span { color: var(--secondary-label); text-decoration: line-through; }

.settings-dialog { display: grid; grid-template-columns: 21.4% minmax(0,1fr); width: min(1140px, 60vw); height: min(710px, 54vh); min-width: 640px; min-height: 400px; max-width: none; max-height: none; padding: 0; overflow: hidden; border: 1px solid var(--separator); border-radius: 18px; box-shadow: 0 35px 100px #000a; }
.settings-nav { padding: 23px 30px; background: var(--surface-sidebar-solid); }
.settings-nav h2 { margin: 0 0 20px; color: var(--label); font: 700 28px/1.3 var(--font-sans); letter-spacing: var(--text-title1-tracking); }
.settings-nav nav { display: flex; flex-direction: column; gap: 5px; margin-right: -16px; }
.settings-tab { min-height: 44px; padding: 0; border: 0; color: var(--secondary-label); background: transparent; text-align: left; font-size: 20px; white-space: nowrap; cursor: pointer; }
.settings-tab.is-active { color: var(--label); }
.settings-tab:hover { color: var(--label); }
.settings-content { min-width: 0; padding: 7.5vh 7%; overflow: auto; background: var(--surface-editor); }
.settings-content .setting-group { margin: 0 0 24px; }
.settings-content .setting-label { margin: 0 0 8px; color: var(--secondary-label); font-size: 15px; }
.settings-content p, .settings-content .setting-value { margin: 0; color: var(--label); font-size: 15px; line-height: 1.5; }
.settings-content input { width: 158px; height: 33px; padding: 0 8px; border: 1px solid var(--separator); border-radius: 6px; color: var(--label); background: var(--surface-control); font-size: 14px; }
.settings-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 420px; margin-top: 20px; color: var(--label); font-size: 15px; line-height: 1.4; }
.settings-content input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; padding: 0; border: 0; background: transparent; accent-color: var(--cyan); }
.settings-content button { min-height: 32px; padding: 0 10px; border: 1px solid var(--separator); border-radius: 5px; color: var(--label); background: var(--surface-control); cursor: pointer; }
.settings-content .setting-link { border: 0; color: var(--system-blue); background: transparent; padding: 0; text-decoration: underline; }
.settings-content .settings-reset { margin-top: 10px; }
.settings-content .appearance-controls { max-width: 420px; }
.settings-content .setting-range-label { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 21px 0 7px; color: var(--label); font-size: 14px; }
.settings-content .setting-range-label output { color: var(--secondary-label); font-variant-numeric: tabular-nums; }
.settings-content input[type="range"] { display: block; width: min(340px, 100%); height: 20px; padding: 0; border: 0; border-radius: 0; background: transparent; accent-color: var(--cyan); }
.settings-content #reset-appearance-button { margin-top: 20px; }
.toast { position: fixed; z-index: 30; right: 25px; bottom: 24px; display: flex; align-items: center; gap: 16px; max-width: calc(100vw - 30px); padding: 10px 13px; border: 1px solid var(--separator); border-radius: 5px; color: var(--label); background: var(--surface-editor); box-shadow: 0 8px 30px #0008; font-size: 12px; }
.toast button { padding: 4px 0; border: 0; color: var(--system-blue); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }

@media (max-width: 1050px) {
  .sidebar { padding-right: 7px; padding-left: 7px; }
  .list-header { padding-right: 17px; padding-left: 17px; }
  .note-group-title { padding-right: 17px; padding-left: 17px; }
  .note-row { padding-right: 17px; padding-left: 17px; }
  .settings-dialog { grid-template-columns: 21.4% minmax(0,1fr); }
  .settings-nav { padding-right: 20px; padding-left: 20px; }
  .settings-content { padding: 60px 40px; }
  .search-page-content { width: min(80vw, 1100px); }
}
@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
    margin: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: 13px;
  }
  .app-shell.is-sidebar-collapsed { grid-template-columns: 1fr; }
  .pane-resizer { display: none; }
  .sidebar { position: absolute; z-index: 10; top: 8px; bottom: 8px; left: 8px; display: none; width: 220px; border-radius: 12px; box-shadow: 10px 0 35px #000a; }
  .sidebar-collapse-button { display: none; }
  .app-shell.sidebar-open .sidebar { display: flex; }
  .list-panel { border-left: 0; }
  .list-header { padding-left: 49px; }
  .mobile-menu-button { position: absolute; top: 21px; left: 13px; display: block; width: 26px; height: 26px; border: 0; color: var(--secondary-label); background: transparent; font-size: 16px; }
  .editor-panel { display: none; position: absolute; z-index: 5; inset: 0; margin: 0; border-radius: 12px; }
  .app-shell.mobile-editor-open .editor-panel { display: block; }
  .app-shell.mobile-editor-open .list-panel { display: none; }
  .back-button { position: absolute; left: 11px; display: block; border: 0; color: var(--secondary-label); background: transparent; font-size: 27px; }
  .editor-scroll { padding: 8px 22px 30px; }
  .note-title { font-size: 25px; }
  .note-title, .note-body { width: 100%; }
  .note-body { font-size: var(--note-body-size); }
  .settings-dialog { grid-template-columns: 155px minmax(0,1fr); width: calc(100vw - 24px); height: min(620px, calc(100dvh - 24px)); min-width: 0; min-height: 0; border-radius: 13px; }
  .settings-nav { padding: 20px 13px; }
  .settings-nav h2 { font-size: 20px; }
  .settings-tab { min-height: 38px; font-size: 15px; }
  .settings-content { padding: 39px 22px; }
  .settings-content p, .settings-content .setting-value { font-size: 13px; }
  .quick-dialog { width: calc(100vw - 56px); }
  .search-prompt { left: 72px; font-size: 22px; }
  .search-suggestions { top: 94px; max-height: min(55vh, 520px); }
  .search-suggestion { padding: 11px 16px; }
  .search-suggestion-title { font-size: 19px; }
  .search-suggestion-excerpt { font-size: 16px; }
  .quick-dialog-bar { height: 78px; gap: 11px; padding: 0 20px; border-radius: 18px; }
  .capture-dialog .quick-dialog-bar { min-height: 78px; padding-top: 18px; padding-bottom: 18px; }
  .capture-dialog .quick-dialog-bar textarea { font-size: 22px; }
  .quick-dialog-bar input { font-size: 22px; }
  .quick-dialog-bar svg { width: 23px; height: 23px; }
  .search-page-view { padding-top: 22px; }
  .app-frame .search-page-view { padding-top: 22px; }
  .search-page-new-note { top: 8px; right: 10px; width: 36px; height: 36px; }
  .search-page-content { width: calc(100% - 32px); }
  .app-frame .search-page-content { width: calc(100% - 32px); }
  .search-page-form { min-height: 50px; gap: 9px; }
  .app-frame .search-page-form { min-height: 50px; gap: 9px; }
  .search-page-icon { width: 42px; height: 42px; }
  .search-page-icon svg { width: 22px; height: 22px; }
  .app-frame .search-page-icon { width: 42px; height: 42px; }
  .app-frame .search-page-icon svg { width: 22px; height: 22px; }
  .search-page-input-shell { min-height: 48px; padding-inline: 12px; }
  .app-frame .search-page-input-shell { min-height: 48px; padding-inline: 12px; }
  .search-page-form input { font-size: 20px; }
  .app-frame .search-page-form input { font-size: 20px; }
  .search-page-count { margin-left: 51px; }
  .app-frame .search-page-count { margin-left: 51px; }
  .search-page-results { width: calc(100% - 51px); margin-left: 51px; }
  .app-frame .search-page-results { width: calc(100% - 51px); margin-left: 51px; }
  .search-page-row { padding-right: 7px; padding-left: 7px; }
  .app-shell.is-search-expanded { grid-template-columns: minmax(0,1fr); }
  .app-shell.is-search-expanded .sidebar, .app-shell.is-search-expanded .list-panel { display: none; }
  .app-shell.is-search-expanded .editor-panel { display: block; position: absolute; z-index: 8; inset: 0; grid-column: auto; border: 0; border-radius: 12px; }
  .editor-formatting-tools { bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* CloudKit client markup aliases for the shared web workspace layout. */
.app-frame { grid-template-columns: var(--sidebar-width, 195px) 4px var(--list-width, 340px) 4px minmax(0,1fr); }
.app-frame.is-sidebar-collapsed { grid-template-columns: 56px 0 var(--list-width, 340px) 4px minmax(0,1fr); }
.app-frame.is-sidebar-collapsed .sidebar-resizer { width: 0; min-width: 0; pointer-events: none; }
.section-label-row { display: flex; align-items: center; justify-content: space-between; height: 33px; margin: 3px 9px 0 12px; color: var(--secondary-label); font: 600 15px/1.2 var(--font-sans); }
.all-notes { display: flex; align-items: center; gap: 11px; height: 39px; padding-left: 12px; color: var(--label); font-size: 16px; }
.all-notes img { display: block; width: 22px; height: 24px; object-fit: contain; }
.folder-row { color: light-dark(#3a3a3c, #c7c7cc); }
.folder-row .folder-glyph { opacity: 0.7; }
.folder-row.is-selected, .folder-row.is-active { color: var(--label); font-weight: 600; }
.folder-row.is-selected .folder-glyph, .folder-row.is-active .folder-glyph { opacity: 1; }
.browser-tools { display: flex; gap: 8px; margin-top: 13px; }
.search-launch-button { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--separator); border-radius: 5px; color: var(--secondary-label); background: var(--surface-editor); text-align: left; font-size: 13px; cursor: pointer; }
.search-launch-button:hover { color: var(--label); background: var(--surface-editor); }
.search-launch-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.search-launch-button kbd { margin-left: auto; color: var(--secondary-label); font: 11px var(--font-mono); }
.note-browser { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border-left: 1px solid var(--separator); background: var(--list); }
.browser-header { flex: 0 0 auto; padding: 18px 17px 8px; }
.note-count { color: var(--secondary-label); font-size: 13px; font-variant-numeric: tabular-nums; }
.note-card { cursor: default; }
.note-card-title { font-size: 15px; font-weight: 700; }
.note-card-detail { display: contents; }
.note-card-preview { display: block; overflow: hidden; color: light-dark(#6e6e73, #a3a3a8); font-size: 12px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.note-card-folder img { width: 20px; height: 15px; }
.note-card-date { margin-left: auto; color: var(--secondary-label); font: 12px/1.35 var(--font-text); }
.note-workspace { display: flex; height: 100%; min-height: 0; flex-direction: column; border-radius: 20px; background: var(--surface-sidebar-solid); }
.note-document { width: 100%; max-width: none; padding-top: 10px; }
.note-page { position: relative; width: 100%; margin: 0 auto; }
.note-title-input { font-family: var(--font-text); }
.rich-editor { position: relative; min-height: 300px; }
.note-body { max-width: none; outline: 0; }
.note-body:focus { outline: 0; }
.editor-date .editor-date-created { display: none; }
.editor-date:hover .editor-date-modified, .editor-date:focus-visible .editor-date-modified { display: none; }
.editor-date:hover .editor-date-created, .editor-date:focus-visible .editor-date-created { display: inline; color: var(--secondary-label); }
.search-launch-button, .new-note-button { min-height: 34px; }
.new-note-button { flex: 0 0 auto; }
.quick-dialog-bar input, .quick-dialog-bar textarea, .search-prompt { font-family: var(--font-text); }
.quick-dialog-bar textarea { display: block; width: 100%; min-width: 0; max-height: 3.8em; resize: none; overflow-y: auto; border: 0; outline: 0; color: var(--label); background: transparent; font-size: 28px; line-height: 1.27; }
.quick-dialog-bar textarea::placeholder { color: var(--secondary-label); }
.search-prompt { font-size: 26px; }
.note-action-menu[hidden], .note-context-menu[hidden], .note-folder-submenu[hidden] { display: none; }
.editor-formatting-tools { position: absolute; z-index: 7; right: 50%; bottom: 17px; display: flex; visibility: hidden; align-items: center; gap: 3px; padding: 5px 7px; opacity: 0; pointer-events: none; transform: translateX(50%) translateY(6px); transition: opacity var(--motion-fade-duration) ease, transform var(--motion-fade-duration) var(--ease-standard), visibility 0s linear var(--motion-fade-duration); border: 1px solid var(--separator); border-radius: 999px; background: var(--surface-editor); box-shadow: 0 10px 32px #0008; backdrop-filter: blur(14px); }
.editor-panel.is-writing .editor-formatting-tools { visibility: visible; opacity: 1; pointer-events: auto; transform: translateX(50%) translateY(0); transition-delay: 0s; }
.editor-formatting-tools button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 5px; color: var(--secondary-label); background: transparent; cursor: pointer; }
.editor-formatting-tools button:hover { color: var(--label); background: var(--surface-control); }
.format-divider { width: 1px; height: 19px; margin: 0 5px; background: var(--surface-control); }
.app-frame .search-page-view { position: absolute; z-index: 6; inset: 0; overflow: auto; padding: clamp(80px, 9vh, 156px) 0 45px; background: var(--surface-editor); }
.app-frame .search-page-content { width: min(80%, 1040px); margin: 0 auto; }
.app-frame .search-page-form { display: flex; align-items: center; gap: 16px; min-height: 80px; margin: 0; }
.app-frame .search-page-icon svg { width: 31px; height: 31px; fill: none; stroke: var(--label); stroke-width: 1.8; }
.app-frame .search-page-input-shell { min-height: 72px; background: var(--surface-sidebar-solid); }
.app-frame .search-page-form input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--label); background: transparent; font: 620 36px/1.2 var(--font-sans); letter-spacing: -0.03em; }
.app-frame .search-page-count { margin-left: 88px; font-size: 16px; }
.app-frame .search-page-results { width: calc(100% - 88px); margin: 0 0 0 88px; }
.settings-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 32px; background: var(--surface-canvas); backdrop-filter: blur(8px); }
.settings-window { display: grid; width: min(1120px, 100%); height: min(760px, calc(100vh - 64px)); grid-template-columns: 260px minmax(0,1fr); overflow: hidden; border: 1px solid var(--separator); border-radius: 20px; background: var(--surface-editor); box-shadow: 0 30px 100px #0008; }
.settings-navigation { padding: 23px 20px; border-right: 1px solid var(--separator); background: var(--surface-canvas); }
.settings-navigation h2 { margin: 0; color: var(--label); font: 600 25px/1.2 var(--font-mono); }
.settings-sections { display: grid; gap: 4px; }
.settings-sections button { min-height: 38px; padding: 7px 9px; border: 0; border-radius: 8px; color: var(--secondary-label); background: transparent; cursor: pointer; text-align: left; font-size: 15px; transition: color var(--motion-fade-duration) ease, background-color var(--motion-fade-duration) ease; }
.settings-sections button:hover, .settings-sections button.is-selected { color: var(--label); background: var(--surface-control); }
.settings-close { display: none; }
.settings-content { overflow: auto; padding: 65px clamp(30px,5vw,70px); }
.settings-content section[hidden] { display: none; }
.settings-field { margin-bottom: 25px; }
.settings-field-label, .settings-field label { display: block; margin-bottom: 8px; color: var(--secondary-label); font-size: 13px; }
.settings-description { color: var(--secondary-label); font-size: 14px; line-height: 1.55; }
.setting-range-label { display: flex !important; justify-content: space-between; gap: 20px; margin: 21px 0 7px !important; color: var(--label) !important; font-size: 14px !important; }
.setting-range-label output { color: var(--secondary-label); }
.settings-content input[type="range"] { display: block; width: min(340px,100%); height: 20px; accent-color: var(--cyan); }
.settings-content input:not([type="range"]) { width: min(100%,270px); min-height: 34px; padding: 6px 10px; border: 1px solid var(--separator); border-radius: 8px; color: var(--label); background: var(--surface-control); }
.settings-auth-row { display: flex; min-height: 32px; flex-wrap: wrap; align-items: center; gap: 12px; }
.settings-auth-row .connection-line { margin: 0; }
.settings-auth-row .auth-buttons { display: flex; align-items: center; gap: 10px; }
.setup-screen { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--surface-canvas); }
.setup-screen[hidden] { display: none; }


/* Materials, hairlines, and hit targets. Type roles below match the notes mockup:
   Geist Mono for the list title, section headers, sidebar labels, and folder chips;
   Geist Sans for note titles, body, and navigation names. */
.sidebar {
  background: var(--material-sidebar);
  -webkit-backdrop-filter: var(--material-filter);
  backdrop-filter: var(--material-filter);
}
.list-header,
.browser-header,
.editor-header {
  background: var(--material-toolbar);
  -webkit-backdrop-filter: var(--material-filter);
  backdrop-filter: var(--material-filter);
}
.editor-formatting-tools,
.settings-window,
.settings-navigation,
.quick-dialog-bar,
.search-suggestions,
.note-action-menu,
.folder-dialog,
.settings-dialog {
  background: var(--material-chrome);
  -webkit-backdrop-filter: var(--material-filter);
  backdrop-filter: var(--material-filter);
}
.settings-backdrop,
.folder-dialog::backdrop,
.settings-dialog::backdrop,
.quick-dialog::backdrop {
  background: var(--scrim);
}
.app-shell {
  border-color: var(--separator);
  border-width: var(--hairline);
}
.list-panel,
.editor-panel,
.note-browser,
.sidebar {
  border-color: var(--separator);
}
.list-panel,
.editor-panel,
.note-browser {
  border-left-width: var(--hairline);
}

.list-heading-row h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: -0.035em;
  color: var(--label);
}
.browser-title-row h1 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: -0.035em;
  color: var(--label);
}
.note-title,
.note-title-input,
#note-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--label);
}
.note-title::placeholder,
.note-title-input::placeholder {
  color: var(--placeholder-text);
}
.note-body,
#rich-editor .note-body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--note-body-size);
  line-height: 1.42;
  letter-spacing: 0;
  color: var(--label);
}
.note-body h2,
.note-body h3 {
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--label);
}
.note-body a { color: inherit; }
.note-body code,
code,
kbd,
samp,
.demo-editor-content code {
  font-family: var(--font-mono);
}
.note-group-title,
.date-group-title {
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.035em;
  color: var(--label);
}
.all-notes,
.all-notes-link {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--label);
}
.folder-row,
.settings-sections button,
.settings-tab {
  font-family: var(--font-sans);
  font-weight: 520;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
}
.note-row-title,
.note-card-title,
#note-list .note-row-title {
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--label);
}
.note-row-excerpt,
.note-card-preview,
.search-page-row-excerpt,
.search-suggestion-excerpt {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
  color: light-dark(#6e6e73, #a3a3a8);
}
.note-row-date,
.note-card-date,
#note-list .note-row-date,
.search-suggestion-date,
.search-page-row-date {
  font-family: var(--font-sans);
  font-weight: 560;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--label);
}
.workspace-caption,
.settings-launcher,
.eyebrow,
.note-count,
.list-total,
.note-row-folder,
.note-card-folder,
.search-page-row-folder,
.search-suggestion-folder,
#note-list .note-row-folder,
.folder-count,
.folder-row-count,
.setup-steps > div > span {
  font-family: var(--font-mono);
}
.workspace-caption,
.eyebrow {
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--secondary-label);
}
.note-count,
.list-total {
  font-weight: 400;
  font-size: 15px;
  line-height: 1;
  color: var(--secondary-label);
}
.note-row-folder,
.note-card-folder,
.search-page-row-folder,
.search-suggestion-folder,
#note-list .note-row-folder,
.folder-count,
.folder-row-count {
  font-weight: 400;
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--secondary-label);
}
.editor-date,
#modified-at,
.modified-at {
  font-family: var(--font-sans);
  font-weight: 550;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--secondary-label);
}
.settings-navigation h2,
.settings-heading-row h2,
.settings-nav h2,
.folder-dialog h2 {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--label);
}
.quick-dialog-bar input,
.quick-dialog-bar textarea,
.search-prompt {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--label);
}
.search-prompt { color: var(--placeholder-text); }
.quick-dialog-bar input::placeholder,
.quick-dialog-bar textarea::placeholder { color: var(--placeholder-text); }
.search-field input,
.search-launch-button,
.search-box input {
  font-family: var(--font-text);
  font-size: var(--text-callout-size);
  line-height: var(--text-callout-line);
  letter-spacing: var(--text-callout-tracking);
}
.settings-content select,
.settings-field select,
#theme-select {
  width: min(100%, calc(270 / 16 * 1rem));
  min-height: var(--row-pointer);
  padding: var(--space-1) var(--space-3);
  border: var(--hairline) solid var(--separator);
  border-radius: var(--radius-sm);
  color: var(--label);
  background: var(--surface-control);
  font-family: var(--font-text);
  font-size: var(--text-callout-size);
  line-height: var(--text-callout-line);
}
.card-star,
.note-actions .icon-button.is-starred,
.note-actions .icon-button.is-starred svg { color: var(--action-pin); }

.quick-dialog[open] { animation: arbor-fade var(--motion-duration) var(--ease-standard); }
.note-workspace.note-entering { animation: arbor-note-enter var(--motion-fade-duration) ease-out both; }
.quick-dialog-bar,
.capture-dialog .quick-dialog-bar textarea {
  transition-duration: var(--motion-duration-short);
  transition-timing-function: var(--ease-standard);
}
.search-prompt {
  transition-duration: var(--motion-duration);
  transition-timing-function: var(--ease-standard);
}
@keyframes arbor-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes arbor-note-enter { from { opacity: 0; } to { opacity: 1; } }

.all-notes:hover,
.all-notes-link:hover,
.folder-row:hover,
.trash-link:hover,
.settings-link:hover,
.settings-launcher:hover,
.settings-sections button:hover {
  background: var(--surface-control);
  color: var(--label);
}
#note-list .note-row:hover,
.note-card:hover {
  background: var(--surface-control);
  box-shadow: none;
}
.all-notes.is-selected,
.all-notes-link.is-selected {
  background: transparent;
  color: var(--label);
  box-shadow: none;
}
.settings-sections button.is-selected {
  background: transparent;
  color: var(--label);
  box-shadow: none;
}
.folder-row.is-selected,
.folder-row.is-active {
  background: transparent;
  color: var(--label);
  box-shadow: none;
}
#note-list .note-row.is-selected,
#note-list .note-row.is-selected:hover,
.note-card.is-selected {
  background: var(--surface-editor);
  color: var(--label);
  box-shadow: none;
}
.search-page-form input,
.app-frame .search-page-form input {
  font-family: var(--font-sans);
  font-weight: 620;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.035em;
  color: var(--label);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .all-notes img,
  :root:not([data-theme="dark"]) .all-notes-link img { filter: brightness(0); }
}
:root[data-theme="light"] .all-notes img,
:root[data-theme="light"] .all-notes-link img { filter: brightness(0); }

@media (pointer: fine) {
  .all-notes,
  .all-notes-link,
  .folder-row,
  .settings-link,
  .trash-link,
  .settings-sections button {
    min-height: var(--row-pointer-compact);
  }
  .sidebar-collapse-button,
  .icon-button,
  .folders-heading button {
    min-width: var(--row-pointer);
    min-height: var(--row-pointer);
  }
}

@media (pointer: coarse) {
  .all-notes,
  .all-notes-link,
  .folder-row,
  .settings-link,
  .trash-link,
  .settings-sections button,
  .settings-tab,
  .sidebar-collapse-button,
  .icon-button,
  .folders-heading button,
  #theme-select {
    min-height: var(--hit-touch);
    height: auto;
  }
  .sidebar-collapse-button,
  .icon-button,
  .folders-heading button {
    min-width: var(--hit-touch);
  }
  .note-tab-strip,
  .note-tab,
  .note-tab-close { min-height: var(--hit-touch); }
  .note-tab-close { min-width: var(--hit-touch); }
}
@media (max-width: 760px) {
  .note-title,
  .note-title-input,
  #note-title {
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -0.025em;
  }
  .list-heading-row h1,
  .browser-title-row h1,
  .settings-navigation h2,
  .settings-heading-row h2,
  .settings-nav h2 {
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -0.03em;
  }
  .quick-dialog-bar input,
  .quick-dialog-bar textarea,
  .search-prompt {
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: var(--motion-fade-duration) !important;
    animation-iteration-count: 1 !important;
    transition-duration: var(--motion-fade-duration) !important;
    transition-property: opacity, color, background-color, border-color, outline-color !important;
  }
  .correction-popover { transition: none !important; }
  .quick-dialog[open],
  .note-workspace.note-entering { animation-name: arbor-fade; }
}

/* ARB-88: keep date swaps and pane motion continuous without animating on first paint. */
#modified-at.editor-date {
  display: inline-grid;
  justify-items: center;
  white-space: nowrap;
}
#modified-at .editor-date-modified,
#modified-at .editor-date-created {
  display: block;
  grid-area: 1 / 1;
  transition: opacity var(--motion-fade-duration) ease, transform var(--motion-fade-duration) var(--ease-standard);
}
#modified-at .editor-date-created {
  opacity: 0;
  transform: translateY(3px);
}
#modified-at:hover .editor-date-modified,
#modified-at:focus .editor-date-modified {
  opacity: 0;
  transform: translateY(-3px);
}
#modified-at:hover .editor-date-created,
#modified-at:focus .editor-date-created {
  opacity: 1;
  transform: none;
}
#modified-at:focus-visible {
  outline: 2px solid var(--system-blue);
  outline-offset: 4px;
  border-radius: var(--radius-xs);
}
.mobile-sidebar-scrim { display: none; }
@media (min-width: 761px) {
  .app-frame.is-motion-ready {
    transition: grid-template-columns var(--motion-duration-short) var(--ease-standard);
  }
  .app-frame.is-motion-ready .sidebar-brand,
  .app-frame.is-motion-ready .nav-row > span,
  .app-frame.is-motion-ready .folders-heading > span,
  .app-frame.is-motion-ready .folder-row-label,
  .app-frame.is-motion-ready .folder-count,
  .app-frame.is-motion-ready .settings-link > span { transition: opacity var(--motion-fade-duration) ease, max-width var(--motion-duration-short) var(--ease-standard); }
  .app-frame.is-sidebar-collapsed .sidebar { padding-right: 4px; padding-left: 4px; }
  .app-frame.is-sidebar-collapsed .sidebar-header { position: relative; justify-content: center; gap: 0; margin-right: 0; margin-left: 0; }
  .app-frame.is-sidebar-collapsed .sidebar-brand,
  .app-frame.is-sidebar-collapsed .nav-row > span,
  .app-frame.is-sidebar-collapsed .folders-heading > span,
  .app-frame.is-sidebar-collapsed .folder-row-label,
  .app-frame.is-sidebar-collapsed .folder-count,
  .app-frame.is-sidebar-collapsed .settings-link > span { width: 0; max-width: 0; flex: 0 0 0; overflow: hidden; opacity: 0; }
  .app-frame.is-sidebar-collapsed .side-top .nav-row,
  .app-frame.is-sidebar-collapsed .folder-row,
  .app-frame.is-sidebar-collapsed .settings-link { justify-content: center; gap: 0; padding-right: 0; padding-left: 0; }
  .app-frame.is-sidebar-collapsed .folders-heading { justify-content: center; margin-right: 0; margin-left: 0; }
  .app-frame.is-sidebar-collapsed .folder-row.is-nested { width: 100%; margin-left: 0; }
  .app-frame.is-sidebar-collapsed .folder-row { padding-left: 0 !important; }
  .app-frame.is-sidebar-collapsed .sidebar-brand { width: 34px; max-width: 34px; flex: 0 0 34px; overflow: visible; opacity: 1; }
  .app-frame.is-sidebar-collapsed .sidebar-brand img { transition: opacity var(--motion-fade-duration) ease; }
  .app-frame.is-sidebar-collapsed .sidebar-collapse-button {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    color: var(--secondary-label);
    background: transparent;
    transition: opacity var(--motion-fade-duration) ease;
  }
  .app-frame.is-sidebar-collapsed .sidebar-header:hover .sidebar-brand img,
  .app-frame.is-sidebar-collapsed .sidebar-header:has(.sidebar-collapse-button:focus-visible) .sidebar-brand img { opacity: 0; }
  .app-frame.is-sidebar-collapsed .sidebar-header:hover .sidebar-collapse-button,
  .app-frame.is-sidebar-collapsed .sidebar-collapse-button:focus-visible {
    opacity: 1;
    color: var(--secondary-label);
    background: transparent;
  }
  .app-frame.is-sidebar-collapsed .sidebar-collapse-button:hover { color: var(--secondary-label); background: transparent; }
  .app-frame.is-sidebar-collapsed .archive-notes::after,
  .app-frame.is-sidebar-collapsed .settings-link::after {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: var(--secondary-label);
    font: 600 13px/1 var(--font-sans);
  }
  .app-frame.is-sidebar-collapsed .archive-notes::after { content: "A"; }
  .app-frame.is-sidebar-collapsed .settings-link::after { content: "S"; }
}

/* Settings mockup: left section rail and focused, compact controls. */
.settings-navigation { display: flex; flex-direction: column; }
.settings-heading-row h2,
.settings-navigation h2 { font-family: var(--font-sans); font-weight: 650; letter-spacing: var(--text-title2-tracking); }
.settings-sections { gap: 8px; }
.settings-sections button { min-height: 40px; padding: 7px 9px; font-size: 16px; }
.settings-shortcut-link {
  min-height: 34px !important; margin-top: auto; padding: 0 9px !important; border: 0 !important;
  color: var(--secondary-label) !important; background: transparent !important; text-align: left;
  font: 13px var(--font-sans) !important; cursor: pointer;
}
.settings-shortcut-link:hover { color: var(--label) !important; background: var(--surface-control) !important; }
.settings-content { padding: 65px clamp(30px, 5vw, 70px); }
.settings-content section { max-width: none; }
.settings-field { margin: 0 0 24px; }
.settings-content .settings-choice-field { min-width: 0; padding: 0; border: 0; }
.settings-choice-field legend {
  margin: 0 0 8px; padding: 0; color: var(--secondary-label);
  font: 14px/1.4 var(--font-sans);
}
.settings-segment {
  display: inline-flex; max-width: 100%; flex-wrap: wrap; align-items: center; gap: 2px;
  padding: 3px; border: 0; border-radius: 9px; background: var(--surface-canvas);
}
.settings-content .settings-segment button {
  min-height: 30px; padding: 4px 9px; border: 0; border-radius: 6px;
  color: var(--label); background: transparent; font: 14px/1.2 var(--font-sans);
  white-space: nowrap; transition: color var(--motion-fade-duration) ease, background-color var(--motion-fade-duration) ease;
}
.settings-content .settings-segment button:hover { background: var(--surface-control); }
.settings-content .settings-segment button[aria-checked="true"] {
  background: var(--surface-control); box-shadow: 0 1px 3px rgb(0 0 0 / 22%);
}
.settings-content .settings-segment button:focus-visible,
.settings-sections button:focus-visible,
.settings-shortcut-link:focus-visible { outline: 2px solid var(--system-blue); outline-offset: 2px; }
.settings-content #settings-display-name { width: 158px; max-width: 100%; }
.settings-auth-row { gap: 10px; }
.settings-auth-row .connection-line { color: var(--label); font-size: 14px; }
.settings-billing-copy { margin: 0; color: var(--label); font-size: 14px; line-height: 1.55; }
.settings-plan { padding: 2px 6px; border-radius: 6px; color: var(--label); background: var(--surface-control); font-size: 13px; }
.settings-inline-link { color: var(--system-blue); text-decoration: underline; text-underline-offset: 2px; }
.settings-data-disclosure { margin-top: 32px; color: var(--secondary-label); font-size: 13px; line-height: 1.5; }
.settings-data-disclosure summary { width: fit-content; cursor: pointer; }
.settings-data-disclosure p { max-width: 690px; color: var(--secondary-label); font-size: 13px; line-height: 1.55; }
.settings-preview-field { margin-top: 24px; }
.settings-preview-field > .settings-field-label { margin-bottom: 8px; color: var(--secondary-label); font-size: 14px; }
.settings-note-preview {
  min-height: 200px; overflow: hidden; padding: 32px clamp(24px, 7vw, 68px); border-radius: 9px;
  background: var(--surface-canvas); color: var(--label);
}
.settings-note-preview h3,
.settings-note-preview p {
  width: min(var(--note-body-width), 100%); margin: 0 auto; font-family: var(--note-body-font, var(--font-sans));
}
.settings-note-preview h3 { margin-bottom: 19px; font-size: 26px; font-weight: 700; line-height: 1.25; }
.settings-note-preview p { font-size: var(--note-body-size); line-height: 1.45; }
#note-title { font-family: var(--note-header-font-current, var(--note-header-font-default, var(--font-sans))); }
#rich-editor .note-body { font-family: var(--note-body-font-current, var(--note-body-font-default, var(--font-sans))); }
.settings-note-preview h3 { font-family: var(--note-header-font-default, var(--font-sans)); }
.settings-note-preview p { font-family: var(--note-body-font-default, var(--font-sans)); }
:root[data-note-header-font="pixel"] #note-title,
:root[data-note-body-font="pixel"] #rich-editor .note-body,
:root[data-default-note-header-font="pixel"] .settings-note-preview h3,
:root[data-default-note-body-font="pixel"] .settings-note-preview p { font-variation-settings: "ELSH" 1; }

#note-pane { display: grid; grid-template-columns: minmax(0, 1fr) 0; grid-template-rows: minmax(0, 1fr); overflow: hidden; transition: grid-template-columns 200ms var(--ease-standard); }
.app-frame.has-about-note #note-pane { grid-template-columns: minmax(0, 1fr) min(420px, 45%); }
.note-editor-column { display: flex; grid-column: 1; grid-row: 1; min-width: 0; min-height: 0; height: 100%; flex-direction: column; overflow: hidden; }
.about-note-panel { display: flex; grid-column: 2; grid-row: 1; width: 100%; min-width: 0; max-width: none; height: 100%; flex-direction: column; overflow: hidden; border: 0; color: var(--label); background: var(--list); opacity: 0; pointer-events: none; transform: translateX(8px); transition: opacity 140ms ease, transform 180ms var(--ease-standard); }
.about-note-panel.is-open { opacity: 1; pointer-events: auto; transform: translateX(0); }
.about-note-panel[hidden] { display: none; }
.about-note-header { position: relative; display: flex; min-height: 72px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 12px 22px; }
.about-note-header h2 { min-width: 0; margin: 0 42px; color: var(--label); font: 650 22px/1.2 var(--font-sans); letter-spacing: -.035em; text-align: center; }
.about-note-header .about-note-close { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); }
.about-note-close { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 8px; color: var(--secondary-label); background: transparent; cursor: default; }
.about-note-close:hover, .about-note-close:focus-visible { color: var(--label); background: var(--surface-control); outline: none; }
.about-note-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; }
.about-note-content { min-width: 0; min-height: 0; flex: 1 1 auto; overflow: auto; padding: 0 22px 28px; scrollbar-width: thin; scrollbar-color: var(--separator) transparent; }
.about-note-tabs { display: flex; width: fit-content; align-items: center; justify-content: center; gap: 2px; margin: 0 auto 18px; padding: 3px; border-radius: 10px; background: var(--surface-editor); }
.about-note-tabs button { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 7px; color: var(--label); background: transparent; font: 500 14px/1.2 var(--font-sans); cursor: default; }
.about-note-tabs button[aria-selected="true"] { background: var(--surface-control); box-shadow: 0 1px 3px rgb(0 0 0 / 20%); }
.about-note-tabs button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.about-note-metrics { display: grid; gap: 15px; margin: 0; }
.about-note-metrics > div { display: grid; gap: 3px; }
.about-note-metrics dt, .about-note-data-section h3, .about-style-field legend { margin: 0; color: var(--secondary-label); font: 500 14px/1.35 var(--font-sans); }
.about-note-metrics dd { margin: 0; color: var(--label); font: 450 15px/1.4 var(--font-sans); overflow-wrap: anywhere; }
.about-note-data-section { margin-top: 20px; }
.about-note-data-section h3 { margin-bottom: 8px; }
.about-note-empty { padding: 13px 14px; border-radius: 10px; color: var(--secondary-label); background: color-mix(in srgb, var(--surface-control) 58%, transparent); font: 14px/1.45 var(--font-sans); }
.about-note-attachment-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.about-note-attachment { min-width: 0; padding: 10px; border-radius: 10px; color: var(--label); background: var(--surface-editor); }
.about-note-attachment-icon { display: grid; min-height: 96px; place-items: center; margin-bottom: 8px; border-radius: 7px; color: var(--secondary-label); background: var(--surface-control); font: 13px var(--font-mono); }
.about-note-attachment-name { overflow: hidden; color: var(--secondary-label); font: 12px/1.35 var(--font-sans); text-overflow: ellipsis; white-space: nowrap; }
.about-style-field { min-width: 0; margin: 0 0 23px; padding: 0; border: 0; }
.about-style-field legend { margin-bottom: 8px; }
.about-font-options { display: inline-flex; max-width: 100%; flex-wrap: wrap; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-editor); }
.about-font-options button { min-height: 36px; padding: 7px 11px; border: 0; border-radius: 7px; color: var(--label); background: transparent; font: 500 15px/1.2 var(--font-sans); cursor: default; }
.about-font-options button[data-font="serif"] { font-family: var(--font-serif); }
.about-font-options button[data-font="mono"] { font-family: var(--font-mono); }
.about-font-options button[data-font="pixel"] { font-family: var(--font-pixel); font-variation-settings: "ELSH" 1; }
.about-font-options button:hover { background: color-mix(in srgb, var(--surface-control) 62%, transparent); }
.about-font-options button[aria-checked="true"] { background: var(--surface-control); box-shadow: 0 1px 3px rgb(0 0 0 / 20%); }
.about-font-options button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.about-style-actions { display: inline-flex; align-items: center; gap: 2px; margin-top: 7px; padding: 3px; border-radius: 10px; background: var(--surface-editor); }
.about-style-actions[hidden] { display: none; }
.about-style-actions button { min-height: 38px; padding: 7px 14px; border: 0; border-radius: 8px; color: var(--label); background: transparent; font: 500 15px/1.2 var(--font-sans); cursor: default; }
.about-style-actions .about-make-default { color: white; background: var(--cyan); }
.about-style-actions .about-make-default:hover { filter: brightness(1.08); }
.about-style-actions .about-style-undo:hover, .about-style-actions .about-style-undo:focus-visible { background: var(--surface-control); }
.about-style-actions button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (max-width: 820px) {
  .app-frame.has-about-note #note-pane { grid-template-columns: minmax(0, 1fr); }
  .about-note-panel { position: absolute; z-index: 12; grid-column: 1; inset: 0 0 0 auto; width: 0; box-shadow: -16px 0 42px rgb(0 0 0 / 22%); }
  .about-note-panel.is-open { width: min(390px, 92%); }
}
@media (max-width: 560px) {
  .about-note-header { min-height: 60px; padding-inline: 15px; }
  .about-note-content { padding-inline: 15px; }
  .about-note-panel.is-open { width: min(360px, 96%); }
}
@media (max-width: 760px) {
  #note-pane { display: none; }
  .app-shell.mobile-editor-open #note-pane,
  .app-shell.is-search-expanded #note-pane { display: grid; }
}
@media (prefers-reduced-motion: reduce) { .about-note-panel { transition: none; transform: none; } }
/* Settings use the same quiet surfaces as the rest of the note workspace. */
.settings-content { padding: 34px clamp(20px, 4vw, 54px); }
.settings-content [data-settings-page] {
  display: grid;
  max-width: 760px;
  align-content: start;
  gap: 13px;
}
.settings-content [data-settings-page][hidden] { display: none; }
.settings-group {
  min-width: 0;
  padding: 17px 19px;
  border: 1px solid color-mix(in srgb, var(--separator) 62%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-editor) 72%, var(--surface-canvas));
}
.settings-group > h3 {
  margin: 0 0 13px;
  color: var(--label);
  font: 600 15px/1.3 var(--font-sans);
  letter-spacing: -.015em;
}
.settings-group > .settings-field:last-child,
.settings-group > .settings-choice-field:last-child,
.settings-group > .settings-preview-field:last-child { margin-bottom: 0; }
.settings-group .settings-choice-field {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--separator) 55%, transparent);
}
.settings-group .settings-choice-field:first-of-type { padding-top: 0; }
.settings-group .settings-choice-field:last-of-type { padding-bottom: 0; border-bottom: 0; }
.settings-group .settings-choice-field legend { flex: 0 0 auto; margin: 0; }
.settings-group .settings-segment { justify-self: end; }
.settings-group .settings-toggle-row {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid color-mix(in srgb, var(--separator) 55%, transparent);
  font-size: 14px;
}
.settings-group > h3 + .settings-toggle-row { padding-top: 0; border-top: 0; }
.settings-group .settings-toggle-row span { max-width: 34rem; }
.settings-group .settings-toggle-row span small { display: block; margin-top: 4px; color: var(--secondary-label); font-size: 12px; line-height: 1.45; }
.settings-group .settings-preview-field { margin: 0; }
.settings-group .settings-note-preview { min-height: 172px; }
.settings-group .personal-dictionary-settings { margin: 0; }
.settings-group .personal-dictionary-settings .settings-description { margin-top: 0; }
.settings-group .settings-auth-row { flex-wrap: wrap; }
.correction-applied-highlight {
  border-radius: 1px;
  background: color-mix(in srgb, var(--system-blue) 11%, transparent);
  box-shadow: inset 0 -1.5px 0 color-mix(in srgb, var(--system-blue) 78%, transparent);
  transition: background-color 250ms ease, box-shadow 250ms ease;
}
.correction-applied-highlight.is-reversible { cursor: pointer; }
.correction-applied-highlight.is-clearing {
  background-color: transparent;
  box-shadow: inset 0 -1.5px 0 transparent;
}
@media (prefers-reduced-motion: reduce) {
  .correction-applied-highlight { transition: none; }
}
@media (max-width: 760px) {
  .settings-content { padding: 20px 16px; }
  .settings-group { padding: 15px; }
  .settings-group .settings-choice-field { align-items: flex-start; flex-direction: column; }
  .settings-group .settings-segment { justify-self: start; }
}
#sidebar .sidebar-bottom > .archive-notes,
#sidebar .sidebar-bottom > .settings-link { color: var(--secondary-label); }
#sidebar .sidebar-bottom > .archive-notes:hover,
#sidebar .sidebar-bottom > .settings-link:hover { color: var(--secondary-label); }
.note-row-folder, #note-list .note-row-folder { font-family: var(--font-sans); }
#proofreading-sentence-capitalization { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; padding: 0; border: 0; background: transparent; }
@media (max-width: 760px) {
  .settings-content { padding: 32px 20px; }
  .settings-note-preview { min-height: 170px; padding: 24px 18px; }
  .settings-note-preview h3,
  .settings-note-preview p { width: 100%; }
}
@media (max-width: 480px) {
  .settings-shortcut-link { display: block; min-height: 30px !important; margin-top: 4px; padding-inline: 8px !important; }
  .settings-content { padding: 20px 17px; }
  .settings-choice-field { margin-bottom: 18px; }
}
@media (max-width: 760px) {
  .app-frame .mobile-sidebar-scrim {
    position: absolute;
    z-index: 9;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgb(0 0 0 / 48%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--motion-fade-duration) ease,
      visibility 0s linear var(--motion-duration-short);
  }
  .app-frame:not(.mobile-note-open) .sidebar {
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-8px);
    transition: opacity var(--motion-fade-duration) ease,
      transform var(--motion-duration-short) var(--ease-standard),
      visibility 0s linear var(--motion-duration-short);
  }
  .app-frame.sidebar-open .sidebar {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
  }
  .app-frame.sidebar-open .mobile-sidebar-scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
}
@media (max-width: 560px) {
  .app-frame .sidebar {
    position: fixed;
    z-index: 25;
    inset: 0 auto 0 0;
    width: min(82vw, 290px);
    border-radius: 0;
  }
  .app-frame .mobile-sidebar-scrim { z-index: 24; }
}
@media (prefers-reduced-motion: reduce) {
  .app-frame.is-motion-ready { transition-property: opacity !important; }
  .app-frame.is-motion-ready .list-panel,
  .app-frame.is-motion-ready .list-resizer {
    transition-property: opacity, visibility !important;
    transition-duration: var(--motion-fade-duration) !important;
  }
  .app-frame .sidebar,
  .app-frame .mobile-sidebar-scrim {
    transition-property: opacity, visibility !important;
    transition-duration: var(--motion-fade-duration) !important;
  }
}

/* Nov 20: keep the rail as the canvas layer, with one outer editor edge. */
body,
.app-shell { background: var(--surface-sidebar-solid); }
.app-shell { border-radius: 0 18px 18px 0; }
.sidebar-brand { display: flex; width: 34px; height: 34px; flex: 0 0 34px; align-items: center; justify-content: center; }
.sidebar-brand img { display: block; width: 29px; height: 29px; object-fit: contain; filter: invert(1); }
.app-shell[data-theme="light"] .sidebar-brand img,
html[data-theme="light"] .sidebar-brand img { filter: none; }
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .sidebar-brand img { filter: none; }
}
.app-shell.is-sidebar-collapsed .sidebar-brand { width: 34px; flex-basis: 34px; }

/* Navigation controls stay at the strip's leading edge; + follows the last tab. */
.note-tab-strip { gap: 9px; overflow: hidden; padding-inline: var(--space-4); }
.note-history-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.note-history-button {
  display: grid; width: 2.15rem; height: 2.15rem; flex: 0 0 auto; place-items: center;
  padding: 0; border: 0; border-radius: var(--radius-md); color: var(--secondary-label);
  background: transparent; cursor: pointer; transition: color var(--motion-fade-duration) ease, background-color var(--motion-fade-duration) ease;
}
.note-history-button:hover:not(:disabled), .note-history-button:focus-visible { color: var(--label); background: var(--surface-control); outline: none; }
.note-history-button:disabled { opacity: .38; cursor: default; }
.note-history-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.note-tab-track { gap: 0; padding: 0; }
.note-tab-list { position: relative; display: flex; width: max-content; min-width: 0; flex: 0 0 auto; align-items: center; gap: var(--space-3); }
.note-tab-track.is-overflowing { -webkit-mask-image: none; mask-image: none; }
.note-tab-new { position: relative; top: auto; right: auto; width: 2.25rem; height: 2.25rem; flex: 0 0 2.25rem; transform: none; cursor: pointer; }
.note-tab-close { margin-right: 4px; }
.note-tab-highlight { transition: transform 160ms ease-out, width 160ms ease-out; }

/* A single parent edge avoids the second rounded-card seam at the editor header. */
#note-pane { border-radius: 0; transition: grid-template-columns 220ms ease-out; }
.note-editor-column { background: var(--paper); }
.note-workspace.editor-view { border-radius: 0; }
.list-resizer::after { background: transparent !important; }
.list-panel { border-left: 0 !important; }
.sidebar { border-right: 0 !important; }
.editor-panel { border-left: 0 !important; }
.note-tab-strip,
#note-pane.has-open-tabs .note-tab-strip { border: 0; }
#note-pane.has-open-tabs .editor-header,
#note-pane.has-open-tabs .editor-scroll { margin-inline: 0; border-radius: 0; }
#note-pane.has-open-tabs .editor-header { background: var(--paper); }
#note-pane.has-open-tabs .editor-scroll { margin-bottom: 0; background: var(--paper); }
.about-note-panel { transform: none; transition: opacity 180ms ease; }
.about-note-panel.is-open { transform: none; }
.about-note-header h2 { width: 100%; margin: 0; text-align: center; }
.about-note-content { display: flex; flex-direction: column; }
.about-note-tabs { align-self: center; margin-inline: auto; }
.about-note-close { display: none; }
.note-row-folder, #note-list .note-row-folder { font-family: var(--font-sans); }

@media (prefers-reduced-motion: reduce) {
  #note-pane,
  .about-note-panel,
  .note-tab-highlight { transition: none; }
}
