:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #203749;
  background: #eef4f8;
  --accent: #285c7b;
  --line: #cbdce6;
  --muted: #4a6475;
  --surface: #fcfeff;
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, main, footer { max-width: 1120px; margin: auto; padding-inline: 24px; }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
nav, .row, .actions, .dates { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
nav[hidden] { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; white-space: nowrap; }
.wordmark { font: 500 1.65rem/1 Georgia, serif; letter-spacing: -.055em; }
.wordmark em { color: var(--accent); font-weight: inherit; letter-spacing: -.045em; }
.mark { position: relative; width: 36px; height: 36px; border-radius: 11px; background: var(--accent); }
.mark::before, .mark::after { content: ""; position: absolute; }
.mark::before { inset: 16px 7px 7px; border: 2px solid #fff; border-top: 0; border-radius: 0 0 12px 12px; }
.mark::after { inset: 10px 10px auto; height: 7px; border: 2px solid #b4d8e9; border-radius: 50%; }
nav { gap: 18px; }
nav a { color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: none; text-underline-offset: 5px; }
nav a:hover, nav a[aria-current] { color: var(--accent); text-decoration: underline; }
main { min-height: 64vh; padding-block: 36px 32px; }
footer { padding-block: 20px 32px; font-size: .875rem; }
footer a, .link { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1 { font: 500 clamp(2.65rem, 6vw, 4.5rem)/1.02 Georgia, serif; letter-spacing: -.045em; }
.heading { margin-bottom: 28px; }
.heading p, details p { color: var(--muted); margin-top: 12px; line-height: 1.55; }
.capture-sections { display: grid; gap: 16px; }
.capture-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.capture-sections details { margin: 0; }
.section-row { align-items: center; padding-block: 5px; gap: 8px; }
.section-icon { position: relative; display: grid; place-items: center; flex: 0 0 38px; height: 38px; padding: 0; border: 0; background: transparent; color: var(--accent); }
.section-icon:hover, .section-drop { background: #e5eff6; }
.section-grip { cursor: grab; touch-action: none; }
.section-grip::before { content: ""; width: 12px; height: 18px; background: radial-gradient(circle, currentColor 1.3px, transparent 1.6px) 0 0 / 6px 6px; }
.section-dragging { opacity: .55; }
.section-pencil::before { content: ""; width: 5px; height: 15px; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%); transform: rotate(42deg); }
.section-pencil::after { content: ""; position: absolute; width: 5px; height: 1px; background: var(--surface); transform: translate(2px, -3px) rotate(42deg); }
.item-actions { gap: 3px; }
.item-actions .section-icon { flex: 0 0 auto; width: 36px; }
.item-info { font-size: 1.2rem; }
.item-trash::before, .item-trash::after { content: ""; position: absolute; }
.item-trash::before { width: 10px; height: 10px; top: 16px; border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; }
.item-trash::after { width: 15px; height: 5px; top: 11px; background: currentColor; clip-path: polygon(32% 0, 68% 0, 68% 65%, 100% 65%, 100% 100%, 0 100%, 0 65%, 32% 65%); }
.section-editor { flex: 1; }
.section-editor .row { margin-top: 8px; }
.section-editor .row button { margin-top: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 20px; }
.label { display: inline-block; font-size: .95rem; font-weight: 700; border-radius: 8px; padding: 5px 10px; background: #eceee9; }
.todo { background: #dbeaf3; }
.ideas { background: #e1e8f6; }
.someday { background: #e0efec; }
.custom { background: #e3ebf0; }
textarea, select, input:not([type=checkbox]) { font: inherit; background: #fff; border: 1px solid var(--line); color: inherit; border-radius: 8px; padding: 10px; max-width: 100%; }
textarea { display: block; width: 100%; min-height: 94px; margin-top: 13px; resize: vertical; line-height: 1.55; }
details { margin-block: 16px; }
summary { cursor: pointer; font-weight: 700; }
.actions { margin-block: 16px; }
#dump-form .actions { justify-content: space-between; }
button, .primary { font: inherit; font-size: .875rem; font-weight: 650; color: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 8px 12px; cursor: pointer; }
.primary { display: inline-block; color: white; background: var(--accent); border-color: var(--accent); text-decoration: none; padding: 10px 16px; }
button:hover, .primary:hover { filter: brightness(.94); }
button:disabled { opacity: .5; cursor: default; }
button[aria-pressed=true] { background: #dbeaf3; }
:focus-visible { outline: 3px solid #986b21; outline-offset: 2px; }
.status, .muted { color: var(--muted); font-size: .875rem; }
.status:not(:empty) { margin-block: 8px; }
.welcome { max-width: 700px; margin: 16px auto; padding: clamp(24px, 6vw, 64px); }
.list { margin-top: 14px; }
.list > .muted { margin-top: 12px; }
.item { display: flex; align-items: start; gap: 12px; padding-block: 14px; }
.master-item { align-items: center; }
.master-filters input { flex: 1 1 220px; }
.master-filters + .actions:empty { display: none; }
.group-matches { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; max-height: 40vh; overflow: auto; }
.group-matches .group-match { display: flex; align-items: flex-start; gap: 8px; overflow-wrap: anywhere; }
.group-matches .group-match[hidden] { display: none; }
.group-match input { margin: .25em 0 0; }
.group-actions { justify-content: space-between; }
.item + .item { border-top: 1px solid var(--line); }
.item-content { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.original { white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
.link { border: 0; background: none; padding: 3px 0; text-decoration: underline; }
.danger { color: #963c35; }
dialog { width: min(570px, calc(100% - 28px)); max-height: 85vh; border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--surface); color: inherit; }
dialog::backdrop { background: #172c25a8; }
dialog .row { justify-content: space-between; }
dialog p, dialog h3, dialog label, .editor button { margin-top: 12px; }
dialog label { display: block; }
dialog select, dialog input { display: block; margin-top: 7px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 680px) {
  .header-inner { flex-wrap: wrap; padding-block: 12px; }
  main { padding-top: 30px; }
  textarea { min-height: 105px; }
  .item-actions { justify-content: end; }
}
