:root {
  --paper: #fff;
  --panel: #f1f0ec;
  --sidebar: #e9e8e4;
  --ink: #242321;
  --muted: #77736c;
  --line: rgba(60, 56, 49, .11);
  --yellow: #e9b500;
  --yellow-soft: #f7dc71;
  --glass: rgba(255, 255, 255, .72);
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); }
a { color: inherit; text-decoration: none; }
svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { display: grid; grid-template-columns: 240px minmax(280px, 320px) minmax(420px, 1fr); min-height: 100vh; }
.sidebar { position: relative; display: flex; flex-direction: column; padding: 44px 16px 26px; background: var(--sidebar); border-right: 1px solid var(--line); }
.sidebar-top { padding: 0 8px; }
.eyebrow { margin: 0 0 3px; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
.sidebar h1, .pane-header h2 { margin: 0; font-size: 2rem; letter-spacing: -.04em; }
.search { display: flex; align-items: center; gap: 7px; margin: 20px 0 18px; padding: 8px 10px; color: #7b7974; background: rgba(118,115,108,.12); border-radius: 10px; }
.search svg { width: 17px; height: 17px; }
.search input { min-width: 0; width: 100%; border: 0; outline: 0; font: inherit; font-size: .9rem; color: var(--ink); background: transparent; }
.folder { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 7px; min-height: 42px; padding: 4px 10px; border-radius: 9px; font-size: .95rem; }
.folder b { font-size: .85rem; color: var(--muted); font-weight: 500; }
.folder-icon { display: grid; place-items: center; color: var(--yellow); }
.folder-icon svg { width: 21px; fill: currentColor; stroke: none; }
.folder.is-active { background: rgba(255,255,255,.7); box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.sidebar-signoff { margin: auto 10px 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }

.notes-pane { background: var(--panel); border-right: 1px solid var(--line); }
.pane-header { display: flex; align-items: center; justify-content: space-between; min-height: 124px; padding: 42px 22px 18px; }
.round-control, .pill-control { display: inline-grid; place-items: center; border: 0; color: var(--ink); background: var(--glass); box-shadow: 0 8px 28px rgba(54,49,40,.08), inset 0 0 0 1px rgba(255,255,255,.7); backdrop-filter: blur(18px); }
.round-control { width: 42px; height: 42px; border-radius: 50%; }
.round-control svg { width: 22px; }
.note-list { padding: 0 10px 40px; }
.note-row { border-bottom: 1px solid var(--line); border-radius: 12px; }
.note-row a { display: block; padding: 15px 15px 13px; }
.note-row h3 { margin: 0 0 5px; font-size: .98rem; letter-spacing: -.01em; }
.note-row.is-selected { background: var(--yellow-soft); border-color: transparent; }
.note-preview { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-preview time { color: var(--ink); margin-right: 5px; }
.note-meta { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: var(--muted); font-size: .74rem; }
.tiny-folder svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.empty-state { padding: 40px 15px; color: var(--muted); text-align: center; }

.preview-pane { min-width: 0; background: var(--paper); }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; height: 84px; padding: 20px 30px; }
.pill-control { display: flex; gap: 9px; padding: 10px 15px; border-radius: 22px; font-size: .82rem; }
.pill-control span { font-size: 1.3rem; line-height: .7; }
.note-content { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; color: #383633; }
.preview-content { width: min(840px, calc(100% - 112px)); max-width: none; margin-left: clamp(44px, 5vw, 84px); padding: 30px 0 90px; }
.preview-content h1 { margin-bottom: 28px; font-size: 1.15rem; line-height: 1.22; letter-spacing: -.02em; }
.preview-content p, .preview-content li { margin: 0 0 20px; font-size: .94rem; line-height: 1.52; }
.preview-content .note-date { margin-bottom: 10px; font-size: .72rem; }
.note-date { margin: 0 0 7px; color: #9b978e; font-size: .72rem; text-align: center; }
.note-content h1 { margin: 0 0 38px; color: #302f2c; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; letter-spacing: -.045em; }
.note-content h2 { margin: 36px 0 10px; font-size: 1.25rem; letter-spacing: -.02em; }
.note-content p, .note-content li { font-family: inherit; font-size: 1.08rem; line-height: 1.58; }
.note-content blockquote { margin: 30px 0; padding: 1px 0 1px 22px; border-left: 3px solid var(--yellow); color: #68645d; font-style: italic; }
.note-content blockquote p { font-size: 1.08rem; }
.note-content ul { padding-left: 1.25rem; }
.note-content li { margin: .35rem 0; }

.post-shell { min-height: 100vh; background: var(--paper); }
.post-toolbar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left)); background: linear-gradient(var(--paper) 70%, transparent); }
.toolbar-actions { display: flex; gap: 8px; }
.post-toolbar button { font: inherit; cursor: pointer; }
.share-button.copied { color: var(--yellow); }
.full-note { width: min(680px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 100px; }
.full-note .note-date { margin-bottom: 10px; }
.full-note h1 { text-align: left; }
.post-footer { display: flex; justify-content: space-between; width: min(680px, calc(100% - 40px)); margin: 0 auto; padding: 25px 0 calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.post-footer a { color: #a67f00; }
.mobile-toolbar { display: none; }
.post-mobile-toolbar { display: none; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 240px minmax(330px, 1fr); }
  .preview-pane { display: none; }
  .note-row.is-selected { background: transparent; border-color: var(--line); }
}

@media (max-width: 650px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .app-shell { display: block; min-height: auto; }
  .sidebar { display: none; }
  .notes-pane { min-height: 100vh; border: 0; background: var(--paper); }
  .pane-header { min-height: 145px; padding: max(48px, env(safe-area-inset-top)) 20px 18px; align-items: flex-end; }
  .pane-header h2 { font-size: 2.15rem; }
  .pane-header .round-control { margin-bottom: 2px; }
  .note-list { padding: 0 12px 30px; }
  .note-row { margin: 0 0 2px; }
  .note-row a { padding: 14px 10px 13px; }
  .note-row h3 { font-size: 1.02rem; }
  .note-preview { font-size: .84rem; }
  .mobile-toolbar { position: fixed; z-index: 3; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); color: #a77e00; background: rgba(250,249,246,.84); border-top: 1px solid var(--line); backdrop-filter: blur(22px); }
  .mobile-toolbar span:last-child { justify-self: end; }
  .mobile-toolbar b { color: var(--muted); font-size: .72rem; font-weight: 500; }
  .post-toolbar { padding: max(16px, env(safe-area-inset-top)) 20px 8px; background: linear-gradient(var(--paper) 78%, transparent); }
  .post-toolbar .round-control { width: 46px; height: 46px; background: rgba(255,255,255,.84); box-shadow: 0 7px 24px rgba(0,0,0,.05), inset 0 0 0 1px rgba(60,60,67,.14); }
  .post-toolbar .toolbar-actions { gap: 0; padding: 0 2px; background: rgba(255,255,255,.84); border-radius: 24px; box-shadow: 0 7px 24px rgba(0,0,0,.05), inset 0 0 0 1px rgba(60,60,67,.14); }
  .post-toolbar .toolbar-actions .round-control { width: 44px; background: transparent; box-shadow: none; }
  .full-note { width: calc(100% - 56px); padding: 8px 0 110px; }
  .full-note .note-date { margin-bottom: 10px; color: #8e8e93; font-size: .87rem; line-height: 1.3; }
  .note-content h1 { margin-bottom: 36px; font-size: 1.45rem; line-height: 1.18; letter-spacing: -.025em; }
  .note-content h2 { margin: 32px 0 12px; font-size: 1.08rem; line-height: 1.25; letter-spacing: -.015em; }
  .note-content p, .note-content li { margin: 0 0 29px; font-size: 1.05rem; line-height: 1.52; }
  .note-content blockquote { margin: 29px 0 34px; padding-left: 18px; border-left-width: 2px; }
  .note-content blockquote p { font-size: 1.05rem; line-height: 1.52; }
  .post-mobile-toolbar { position: fixed; z-index: 4; right: 24px; bottom: max(18px, env(safe-area-inset-bottom)); left: 24px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
  .post-tool-cluster, .post-compose-control { display: flex; align-items: center; justify-content: center; min-height: 48px; color: #1c1c1e; background: rgba(250,250,250,.84); box-shadow: 0 7px 28px rgba(0,0,0,.08), inset 0 0 0 1px rgba(60,60,67,.14); backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35); }
  .post-tool-cluster { width: 168px; justify-content: space-around; padding: 0 10px; border-radius: 26px; }
  .post-tool-cluster span { display: grid; width: 40px; place-items: center; }
  .post-compose-control { width: 48px; height: 48px; border-radius: 50%; }
  .post-mobile-toolbar svg { width: 24px; height: 24px; stroke-width: 1.7; }
  .post-footer { display: none; }
}

@media (prefers-color-scheme: dark) {
  :root { --paper: #1c1c1e; --panel: #222224; --sidebar: #2c2c2e; --ink: #f2f2f0; --muted: #a4a19b; --line: rgba(255,255,255,.09); --glass: rgba(63,63,66,.72); --yellow: #ffd60a; --yellow-soft: #665614; }
  .note-content, .note-content h1 { color: #efede8; }
  .folder.is-active { background: rgba(255,255,255,.1); }
  .mobile-toolbar { background: rgba(28,28,30,.82); }
  .post-tool-cluster, .post-compose-control { color: #f2f2f0; background: rgba(54,54,56,.84); box-shadow: 0 7px 28px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.1); }
}

@media (prefers-reduced-motion: no-preference) {
  .note-row, .round-control { transition: background-color .18s ease, transform .18s ease; }
  .note-row:hover { background: rgba(233,181,0,.12); }
  .round-control:hover { transform: translateY(-1px); }
}

/* Appearance selector */
.classic-only { display: none; }
.style-picker { width: min(360px, calc(100% - 32px)); padding: 0; color: var(--ink); background: rgba(249,249,247,.94); border: 0; border-radius: 20px; box-shadow: 0 24px 80px rgba(0,0,0,.22); backdrop-filter: blur(24px) saturate(1.35); }
.style-picker::backdrop { background: rgba(0,0,0,.22); backdrop-filter: blur(3px); }
.style-picker form { padding: 18px; }
.style-picker-heading { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 13px; }
.style-picker-heading p { margin: 0 0 2px; color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.style-picker-heading h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.style-picker-close { width: 30px; height: 30px; padding: 0; color: var(--muted); background: rgba(118,115,108,.12); border: 0; border-radius: 50%; font: 1.25rem/1 system-ui, sans-serif; cursor: pointer; }
.style-choice { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 14px; color: inherit; background: transparent; border: 0; border-top: 1px solid var(--line); text-align: left; cursor: pointer; }
.style-choice span { display: grid; gap: 2px; }
.style-choice b { font-size: .94rem; }
.style-choice small { color: var(--muted); font-size: .76rem; }
.style-choice i { visibility: hidden; color: var(--yellow); font-size: 1rem; font-style: normal; }
.style-choice.is-selected i { visibility: visible; }

/* Classic Blog — an original adaptation of early fixed-width personal blogs. */
html[data-style="classic"] { color: #333; background: #fff; }
html[data-style="classic"] body { min-width: 0; padding: 0; color: #333; background: #fff; font-family: Arial, Helvetica, sans-serif; text-align: center; }
html[data-style="classic"] .notes-only { display: none !important; }
html[data-style="classic"] .classic-only { display: block; }
html[data-style="classic"] .classic-site { width: 770px; max-width: calc(100% - 32px); margin: 0 auto; padding-top: 28px; text-align: left; }
html[data-style="classic"] .classic-masthead { border-top: 1px solid #ccc; }
html[data-style="classic"] .classic-masthead h1 { margin: 0; padding: 18px 0 7px; color: #000; font: bold 36px/1 Helvetica, Arial, sans-serif; letter-spacing: -1.2px; text-align: center; }
html[data-style="classic"] .classic-masthead h1 a { color: #000; text-decoration: none; }
html[data-style="classic"] .classic-masthead > p { margin: 0 0 19px; color: #888; font: normal 18px/1.3 Helvetica, Arial, sans-serif; text-align: center; }
html[data-style="classic"] .classic-masthead nav { display: flex; align-items: center; gap: 22px; padding: 0 0 12px; border-bottom: 1px solid #000; font: bold 12px/1.2 Helvetica, Arial, sans-serif; text-transform: uppercase; }
html[data-style="classic"] .classic-masthead nav a,
html[data-style="classic"] .classic-masthead nav button { padding: 0; color: #000; background: none; border: 0; font: inherit; text-decoration: none; text-transform: inherit; cursor: pointer; }
html[data-style="classic"] .classic-masthead nav a:hover,
html[data-style="classic"] .classic-masthead nav button:hover { text-decoration: underline; }
html[data-style="classic"] .classic-masthead nav button { margin-left: auto; }
html[data-style="classic"] .classic-content-box { display: grid; grid-template-columns: minmax(0, 500px) 230px; gap: 40px; padding-top: 31px; }
html[data-style="classic"] .classic-entry { margin-bottom: 52px; }
html[data-style="classic"] .classic-entry h2 { margin: 0 0 3px; color: #000; font: bold 20px/1.2 Helvetica, Arial, sans-serif; letter-spacing: -.25px; text-transform: none; }
html[data-style="classic"] .classic-entry h2 a { color: #000; text-decoration: none; }
html[data-style="classic"] .classic-entry h2 a:hover { color: #d45b00; }
html[data-style="classic"] .classic-byline { margin: 0 0 18px; padding: 0 0 11px; color: #888; border-bottom: 1px dotted #bbb; font: italic 12px/1.4 Georgia, "Times New Roman", serif; }
html[data-style="classic"] a { color: #422c18; text-decoration: underline; }
html[data-style="classic"] a:hover { color: #c00; }
html[data-style="classic"] .classic-entry-body { color: #333; font: 14px/1.48 Arial, Helvetica, sans-serif; }
html[data-style="classic"] .classic-entry-body p { margin: 0 0 15px; }
html[data-style="classic"] .classic-entry-body h2,
html[data-style="classic"] .classic-entry-body h3 { margin: 28px 0 8px; color: #000; font: bold 14px/1.3 Helvetica, Arial, sans-serif; text-transform: uppercase; }
html[data-style="classic"] .classic-entry-body blockquote { margin: 0 18px 15px; padding-left: 10px; color: #555; border-left: 1px solid #aaa; font: italic 14px/1.48 Helvetica, Arial, sans-serif; }
html[data-style="classic"] .classic-entry-body ul,
html[data-style="classic"] .classic-entry-body ol { margin: 0 0 15px 40px; }
html[data-style="classic"] .classic-tags { margin: 22px 0 0; padding-top: 9px; color: #888; border-top: 1px dotted #bbb; font-size: 12px; }
html[data-style="classic"] .classic-sidebar section { margin-bottom: 30px; font-size: 13px; line-height: 1.45; }
html[data-style="classic"] .classic-sidebar h2,
html[data-style="classic"] .classic-comments h2 { margin: 0 0 10px; padding: 6px 2px; color: #000; border-top: 3px solid #000; border-bottom: 1px dotted #777; font: bold 14px/1.2 Helvetica, Arial, sans-serif; letter-spacing: 0; text-transform: uppercase; }
html[data-style="classic"] .classic-sidebar p { margin: 0 10px 14px; }
html[data-style="classic"] .classic-sidebar ul { margin: 0 0 8px 20px; padding: 0; list-style: square; }
html[data-style="classic"] .classic-sidebar li { margin-bottom: 9px; }
html[data-style="classic"] .classic-sidebar li a { text-decoration: none; }
html[data-style="classic"] .classic-sidebar li a:hover { text-decoration: underline; }
html[data-style="classic"] .classic-sidebar time { display: block; padding-top: 2px; color: #888; font-size: 11px; font-weight: bold; }
html[data-style="classic"] .classic-comments { margin: 20px 0 50px; color: #777; font-size: 13px; }
html[data-style="classic"] .classic-comments p { margin: 0; }
html[data-style="classic"] .classic-footer { padding: 13px 0 30px; border-top: 2px solid #ccc; color: #888; font-size: 12px; text-align: right; }
html[data-style="classic"] .classic-footer p { margin: 0; }
html[data-style="classic"] .style-picker { color: #222; background: #fff; border: 1px solid #999; border-radius: 0; box-shadow: 8px 8px 0 rgba(0,0,0,.18); font-family: Arial, Helvetica, sans-serif; text-align: left; }
html[data-style="classic"] .style-picker::backdrop { background: rgba(255,255,255,.72); backdrop-filter: none; }
html[data-style="classic"] .style-picker-close { background: #eee; border: 1px solid #aaa; border-radius: 0; }
html[data-style="classic"] .style-choice { border-color: #ccc; }
html[data-style="classic"] .style-choice i { color: #c00; }

@media (max-width: 760px) {
  html[data-style="classic"] .classic-site { max-width: calc(100% - 36px); padding-top: 18px; }
  html[data-style="classic"] .classic-masthead h1 { padding-top: 15px; font-size: 31px; }
  html[data-style="classic"] .classic-masthead > p { margin-bottom: 16px; font-size: 15px; }
  html[data-style="classic"] .classic-masthead nav { gap: 16px; font-size: 11px; }
  html[data-style="classic"] .classic-content-box { display: block; padding-top: 27px; }
  html[data-style="classic"] .classic-entry { margin-bottom: 42px; }
  html[data-style="classic"] .classic-entry h2 { font-size: 22px; }
  html[data-style="classic"] .classic-entry-body { font: 16px/1.55 Georgia, "Times New Roman", serif; }
  html[data-style="classic"] .classic-sidebar { padding-top: 4px; border-top: 2px solid #ccc; }
  html[data-style="classic"] .classic-sidebar section { margin: 25px 0; }
  html[data-style="classic"] .classic-footer { text-align: left; }
}

@media (prefers-color-scheme: dark) {
  .style-picker { color: #f2f2f0; background: rgba(44,44,46,.94); }
}
