:root {
    --paper: #fbf8f2;
    --ink: #1b2422;
    --secondary: #5e6862;
    --teal: #1e4d4a;
    --card: #ffffff;
    --border: #e6e0d2;
    --input: #f0eadc;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, sans-serif;
}

:root.dark {
    --paper: #101917;
    --ink: #e8efec;
    --secondary: #9ba8a3;
    --teal: #7fc4b8;
    --card: #17211f;
    --border: #2e3a36;
    --input: #1b2926;
}

body { margin: 0; }

button, input { font: inherit; }

button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--teal), transparent 45%);
    outline-offset: 3px;
}

.welcome {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 480px;
    min-height: 100vh;
    padding: 32px 28px;
    position: relative;
}

.welcome-content { display: grid; gap: 16px; margin: auto 0; }

h1 { font-family: Georgia, serif; font-size: clamp(42px, 12vw, 52px); line-height: 1; margin: 0; }

.nook-mark {
    height: 64px;
    width: 64px;
}

.promise, .eyebrow, .privacy, .copy-feedback { color: var(--secondary); line-height: 1.5; margin: 0; }
.beta { color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; margin: 0; text-transform: uppercase; }
.privacy { font-size: 13px; text-align: center; }
.compatibility { background: color-mix(in srgb, var(--teal), transparent 90%); border-radius: 10px; color: var(--ink); font-size: 14px; line-height: 1.45; margin: 0; padding: 10px 12px; }
.actions { display: grid; gap: 12px; margin-top: 16px; }

button, input { border-radius: 14px; box-sizing: border-box; min-height: 52px; padding: 12px 16px; }
button { background: var(--teal); border: 1px solid var(--teal); color: var(--paper); cursor: pointer; font-weight: 650; }
button:disabled { cursor: not-allowed; opacity: .45; }
.secondary { background: transparent; color: var(--teal); }
.text-button, .back, .theme-toggle { background: transparent; border-color: transparent; color: var(--teal); }
.text-button { font-weight: 500; }

.back, .theme-toggle {
    align-items: center;
    display: inline-flex;
    font-size: 24px;
    justify-content: center;
    min-height: 44px;
    padding: 8px;
    width: 44px;
}

.back { left: 20px; top: 24px; }
.welcome .back, .welcome .theme-toggle { position: absolute; }
.welcome .theme-toggle { right: 20px; top: 24px; }
.key-flow .welcome-content { margin-top: 112px; }
label { font-size: 14px; font-weight: 650; }
input { background: var(--input); border: 1px solid var(--border); color: var(--ink); }

.key-value {
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--ink);
    overflow-wrap: anywhere;
    padding: 14px;
}

.confirmation { align-items: center; display: flex; gap: 10px; }
.confirmation input { accent-color: var(--teal); min-height: 24px; min-width: 24px; padding: 0; }

.error {
    background: color-mix(in srgb, #b3261e, transparent 88%);
    border-radius: 10px;
    color: #b3261e;
    margin: 0;
    padding: 10px 12px;
}

@media (max-height: 680px) {
    .welcome-content, .key-flow .welcome-content { margin: 88px 0 32px; }
}

.sr-only { height: 1px; overflow: hidden; position: absolute; width: 1px; }
.workspace { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); min-height: 100vh; }
.notes-pane { box-sizing: border-box; min-height: 100vh; padding: 24px 20px 40px; position: relative; }
.detail-pane { border-left: 1px solid var(--border); min-height: 100vh; padding: 24px; }
.list-header, .editor-header { align-items: center; display: flex; gap: 8px; min-height: 44px; }
.app-brand { align-items: center; display: flex; gap: 10px; margin-right: auto; }
.app-brand-mark { height: 30px; width: 30px; }
.notes-title { font-family: Georgia, serif; font-size: 28px; margin: 0; }
.list-actions { align-items: center; display: flex; gap: 4px; }
.icon-button, .notes-button, .logout-button { align-items: center; background: transparent; border-color: transparent; color: var(--teal); display: inline-flex; justify-content: center; min-height: 44px; padding: 6px; }
.icon-button { min-width: 44px; }
.notes-button { font-weight: 650; padding-inline: 10px; }
.logout-button { min-width: 44px; }
.app-icon { fill: currentColor; height: 24px; width: 24px; }
.sync { color: var(--secondary); font-size: 12px; white-space: nowrap; }
.sync::before { background: var(--secondary); border-radius: 50%; content: ""; display: inline-block; height: 8px; margin-right: 6px; width: 8px; }
.sync.synced::before { background: #2e7d5b; }.sync.syncing::before { background: var(--teal); }
.side-status { align-items: center; display: flex; justify-content: space-between; margin-top: 8px; }
.search-field { align-items: center; background: var(--input); border: 1px solid var(--border); border-radius: 14px; display: flex; margin: 16px 0 24px; min-height: 44px; padding-left: 14px; }
.search-field .app-icon { color: var(--secondary); flex: 0 0 auto; }
.search { background: transparent; border: 0; border-radius: 0; flex: 1; margin: 0; min-height: 44px; padding-left: 10px; width: auto; }
.relay-health { color: var(--secondary); font-size: 12px; margin: 0; position: relative; }.relay-health summary { cursor: pointer; width: fit-content; }.relay-health ul { background: var(--card); border: 1px solid var(--border); border-radius: 10px; list-style: none; margin: 8px 0 0; padding: 8px; position: absolute; right: 0; width: 260px; z-index: 2; }.relay-health li { display: flex; gap: 12px; justify-content: space-between; padding: 3px 0; }
.section-label { color: var(--secondary); font-family: system-ui, sans-serif; font-size: 12px; letter-spacing: 1.5px; margin: 24px 0 10px; }
.note-card { background: var(--card); border: 1px solid var(--border); color: var(--ink); display: block; margin: 10px 0; min-height: 0; padding: 14px 16px; text-align: left; width: 100%; }
.note-card span { align-items: baseline; display: flex; gap: 12px; }.note-card strong { font-family: Georgia, serif; font-size: 19px; font-weight: 600; margin-right: auto; }.note-card small, .note-card p, .empty p, .desktop-empty p { color: var(--secondary); }.note-card p { font-size: 15px; line-height: 1.45; margin: 9px 0 0; }
.empty, .desktop-empty { padding: 72px 8px; text-align: center; }.empty h2, .desktop-empty h1 { font-family: Georgia, serif; font-size: 24px; }.desktop-empty { margin-top: 20vh; }
.new-note-button { align-items: center; display: flex; gap: 8px; justify-content: center; margin: 0 0 24px; width: 100%; }.new-note-button .app-icon { height: 20px; width: 20px; }
.editor-header { margin: 0 auto 22px; max-width: 920px; }.editor-header-spacer { margin-right: auto; }.read-view, .editor, .checklist-view { margin: 0 auto; max-width: 880px; }.read-view h1, .checklist-view h1, .title-input { color: var(--ink); font-family: Georgia, serif; font-size: 32px; font-weight: 600; }.title-input { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 8px 0; width: 100%; }.markdown, .checklist-view { font-size: 17px; line-height: 1.55; }.markdown h2 { font-family: Georgia, serif; font-size: 22px; }.markdown p { margin: 0 0 12px; }.bullet, .numbered { padding-left: 12px; }
.editor textarea { background: transparent; border: 0; box-sizing: border-box; color: var(--ink); font: 17px/1.55 system-ui, sans-serif; margin-top: 16px; min-height: 58vh; padding: 0 0 80px; resize: vertical; width: 100%; }.format-toolbar { background: var(--input); border-radius: 14px; display: flex; gap: 4px; margin-top: 20px; padding: 4px; position: sticky; bottom: 16px; }.format-toolbar button { background: transparent; border-color: transparent; color: var(--teal); min-width: 44px; }.format-toolbar .app-icon { height: 22px; width: 22px; }.numbered-list-icon { align-items: center; column-gap: 2px; display: inline-grid; font-size: 9px; font-weight: 700; grid-template-columns: 10px 12px; line-height: 9px; text-align: left; }.numbered-list-icon > span:last-child { display: flex; flex-direction: column; gap: 4px; }.numbered-list-icon i { background: currentColor; display: block; height: 2px; width: 12px; }.format-toolbar .switch-type-button { margin-left: auto; padding-inline: 12px; }
.progress { color: var(--secondary); }.checklist-view ul { list-style: none; padding: 0; }.checklist-view li { align-items: center; display: flex; gap: 12px; min-height: 48px; }.checklist-view li span, .checklist-item { flex: 1; }.checklist-item { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; min-height: 40px; padding: 4px 0; }.check { background: transparent; border: 1.5px solid var(--teal); border-radius: 50%; color: var(--teal); min-height: 24px; padding: 0; width: 24px; }.check.done { background: var(--teal); color: var(--paper); }.completed span { color: var(--secondary); text-decoration: line-through; }.add-item { display: flex; gap: 8px; }.add-item input { flex: 1; min-height: 44px; }.add-item button { min-height: 44px; }.clear-button { background: var(--input); border-color: transparent; color: var(--teal); margin-top: 24px; width: 100%; }
.dialog-scrim { align-items: center; background: rgb(0 0 0 / 40%); display: flex; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 4; }.dialog { background: var(--card); border-radius: 14px; max-width: 360px; padding: 24px; }.dialog h2 { font-family: Georgia, serif; margin-top: 0; }.dialog div { display: flex; gap: 10px; justify-content: end; }
@media (max-width: 899px) { .workspace { display: block; }.notes-pane { padding-top: 20px; }.detail-pane { border: 0; display: none; padding: 20px; }.workspace.has-detail .notes-pane { display: none; }.workspace.has-detail .detail-pane { display: block; } }
