:root {
  /* soft graphite dark: not black */
  --paper: #242629;
  --ink: #f2f2f3;
  --soft: #808389;
  --faint: #4a4d53;
  --line: #313338;
  --mark: #f2f2f3;
  --mark-wash: #26282c;
  --field: #1f2023;
  --dot: #3a3c41;
  --dot-hover: #55585e;
  --gutter-ink: #4a4d53;
  --code-ink: #e4e5e7;
  --select: #3f4a78;
  --select-ink: #ffffff;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='18' viewBox='0 0 16 18'%3E%3Cpath d='M2 1.5v12.2l3.1-2.9 2.2 5 1.9-.8-2.2-4.9H11z' fill='%23f2f2f3' stroke='%23242629' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 2 1, default;
}
/* palettes: highlight washes (--hl-*), the ink on them (--hl-ink), and solid swatches (--sw-*) for
   category brackets, menu dots and calendar lines. Palette 1 is soft and see-through; palette 2 is
   solid and brighter, built from the yellow selection highlight. Each has a dark and a light version. */
:root {
  --hl-yellow: rgba(242, 207, 91, .38); --hl-mint: rgba(95, 163, 140, .38); --hl-rose: rgba(222, 138, 158, .42);
  --hl-blue: rgba(124, 156, 196, .38); --hl-gray: rgba(142, 145, 151, .35); --hl-ink: inherit;
  --sw-yellow: #e9c25a; --sw-mint: #5fa38c; --sw-rose: #d48a99; --sw-blue: #7c9cc4; --sw-gray: #8e9197;
}
:root[data-theme="light"] {
  --hl-yellow: rgba(242, 196, 48, .42); --hl-mint: rgba(80, 170, 138, .30); --hl-rose: rgba(226, 120, 148, .30);
  --hl-blue: rgba(96, 140, 200, .28); --hl-gray: rgba(140, 145, 155, .25);
  --sw-yellow: #d9a925; --sw-mint: #3f8f74; --sw-rose: #c76a82; --sw-blue: #5b82b8; --sw-gray: #8b909c;
}
:root[data-palette="2"] {
  --hl-yellow: #f2cf5b; --hl-mint: #6fd6ad; --hl-rose: #f497b0; --hl-blue: #8ab8f5; --hl-gray: #b9bdc5; --hl-ink: #1b1e27;
  --sw-yellow: #f2cf5b; --sw-mint: #6fd6ad; --sw-rose: #f497b0; --sw-blue: #8ab8f5; --sw-gray: #b9bdc5;
}
:root[data-palette="2"][data-theme="light"] {
  --hl-yellow: #ffe27a; --hl-mint: #a8eccf; --hl-rose: #ffc4d3; --hl-blue: #bcd7ff; --hl-gray: #dfe2e7; --hl-ink: #1b1e27;
  --sw-yellow: #f0b400; --sw-mint: #17a874; --sw-rose: #e9557f; --sw-blue: #3483f5; --sw-gray: #8b909c;
}
:root { color-scheme: dark; }

/* light mode, picked with the switch at the bottom right */
:root[data-theme="light"] {
  --paper: #ffffff;
  --ink: #1b1e27;
  --soft: #8b909c;
  --faint: #c9ccd3;
  --line: #eceef2;
  --mark: #1b1e27;
  --mark-wash: #f2f3f5;
  --field: #f8f9fa;
  --dot: #e4e6ea;
  --dot-hover: #d0d3d8;
  --gutter-ink: #a8adb7;
  --code-ink: #24292f;
  --select: #cfdcff;
  --select-ink: #1b1e27;
  color-scheme: light;
  --cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='18' viewBox='0 0 16 18'%3E%3Cpath d='M2 1.5v12.2l3.1-2.9 2.2 5 1.9-.8-2.2-4.9H11z' fill='%231b1e27' stroke='%23ffffff' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 2 1, default;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); cursor: var(--cross); overflow-x: clip; }
body {
  font-family: "JetBrains Mono", Consolas, Monaco, monospace;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: var(--cross);
}
input { user-select: text; -webkit-user-select: text; cursor: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: var(--cross); }
::selection { background: var(--select); color: var(--select-ink); }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; border-radius: 6px; }

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: clamp(80px, 15vh, 150px) 16px 56px;
  text-align: center;
}

/* name top left, smaller date top right; the space above the goals stays empty */
.brand, .date {
  position: absolute; top: 20px; margin: 0; z-index: 2;
  font-size: 16px; font-weight: 700;
  color: var(--ink);
}
.brand { left: 24px; }
button.date { padding: 0; }
.when { position: absolute; right: 24px; top: 44px; z-index: 2; display: flex; align-items: center; }
.date { position: static; font-size: 13px; font-weight: 400; color: var(--soft); }
.date:hover { color: var(--ink); }
.gap { height: clamp(40px, 9vw, 64px); }

/* goals */
.goals { list-style: none; margin: 0; padding: 0; text-align: left; }
/* left padding mirrors the check (44px + 14px gap) so text centres on the page */
.goal {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 6px 0 6px 58px;
}

/* rows can be dragged by their empty space */
.goal { cursor: grab; }
.goals.sorting, .goals.sorting .goal { cursor: grabbing; }
.goals.sorting .goal:not(.dragging) { transition: transform .15s var(--ease); }
.goal.dragging { z-index: 3; opacity: .85; }
.field { position: relative; flex: 1; min-width: 0; display: flex; justify-content: center; }
/* a goal is a one-line editor so it can be formatted like the notes; it grows with its text */
.goal-text {
  display: inline-block; min-width: 22ch; max-width: 100%;
  padding: 15px 2ch;
  outline: 0; background: transparent;
  font: inherit; font-size: 15px; line-height: 1.5; color: var(--ink);
  text-align: center; white-space: pre-wrap; overflow-wrap: anywhere;
  transition: color .35s;
  user-select: text; -webkit-user-select: text; cursor: text;
}
.goal-text b { font-weight: 700; }
.goal-text u { text-decoration: underline; text-underline-offset: 3px; }
.goal-text s { text-decoration: line-through; }
/* highlights (goals and notes) come from the palette */
.goal-text mark, .editor mark { color: var(--hl-ink); border-radius: 2px; background: var(--hl-yellow); }
.goal-text mark[data-c="mint"], .editor mark[data-c="mint"] { background: var(--hl-mint); }
.goal-text mark[data-c="rose"], .editor mark[data-c="rose"] { background: var(--hl-rose); }
.goal-text mark[data-c="blue"], .editor mark[data-c="blue"] { background: var(--hl-blue); }
.goal-text mark[data-c="gray"], .editor mark[data-c="gray"] { background: var(--hl-gray); }
.field::after {
  content: "";
  position: absolute; top: 50%;
  left: max(0px, calc(50% - var(--w, 0px) / 2));
  width: var(--w, 0px); max-width: 100%; height: 1.5px;
  background: var(--soft);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
  pointer-events: none;
}
.goal.done .goal-text { color: var(--soft); }
.goal.done .field::after { transform: scaleX(1); }
/* marking "faded": done goals just go gray, no line */
:root[data-marking="faded"] .field::after { display: none; }

.check {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
}
.check svg { width: 28px; height: 28px; overflow: visible; }
.check .ring { fill: transparent; stroke: var(--faint); stroke-width: 1.5; transition: stroke .25s, fill .3s; }
.check .tick {
  fill: none; stroke: var(--paper); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 20; stroke-dashoffset: 20;
  transition: stroke-dashoffset .35s var(--ease) .08s;
}
.check:hover .ring { stroke: var(--mark); }
.goal.done .check .ring { fill: var(--mark); stroke: var(--mark); }
.goal.done .check .tick { stroke-dashoffset: 0; }
.goal.pop .check svg { animation: pop .4s var(--ease); }
.check:disabled { opacity: .5; }
.check:disabled:hover .ring { stroke: var(--faint); }

/* hover controls: x deletes a row (sits outside the row so typing space is unchanged), + adds one */
.del, .add {
  display: grid; place-items: center;
  color: var(--soft);
  opacity: 0;
  transition: opacity .15s, color .15s;
}
.del svg, .add svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.del { position: absolute; right: -34px; top: 50%; width: 28px; height: 28px; margin-top: -14px; }
.del svg { width: 10px; height: 10px; }
.goal:hover .del, .del:focus-visible { opacity: 1; }
.del:hover { color: var(--ink); }
.add svg { width: 12px; height: 12px; }
.list:hover .add, .add:focus-visible { opacity: 1; }
.add:hover { color: var(--ink); }
@media (hover: none) { .del, .add { opacity: .5; } }
@media (max-width: 560px) { .del { right: -6px; } .goal { padding-left: 82px; padding-right: 24px; } }

/* the count sits right under the goals, centered; the + (on hover) and its menu hang off its right side */
.foot { display: flex; justify-content: center; margin-top: 18px; }
.foot-in { position: relative; min-height: 30px; display: flex; align-items: center; }
.add, .add-menu { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); }
.add { width: 30px; height: 30px; margin-left: 6px; }
.tally:empty + .add { margin-left: -15px; } /* nothing counted yet: the + sits in the middle */
.add[hidden], .add-menu[hidden] { display: none; }
/* entry / category open centered just above the count */
.add-menu { display: flex; gap: 18px; align-items: center; white-space: nowrap; animation: fade .15s ease-out;
  left: 50%; top: auto; bottom: 100%; transform: translateX(-50%); margin-bottom: 2px; }
.add-menu button { font-size: 13px; color: var(--soft); padding: 4px 2px; }
.add-menu button:hover, .add-menu button:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* categories: a "]" to the right of the rows it groups; only the bracket takes the color */
.list { position: relative; }
.groups { position: absolute; top: 0; left: 100%; width: 0; height: 0; }
.group { position: absolute; left: 46px; width: 18px; }
.bracket {
  position: absolute; inset: 0; width: 18px; padding: 0;
  color: var(--faint); cursor: grab; touch-action: none;
}
.bracket::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 7px;
  border: 2px solid currentColor; border-left: 0; border-radius: 0 4px 4px 0;
  transition: color .15s;
}
.bracket:hover, .group.active .bracket { color: var(--soft); }
.group.active .bracket { cursor: grabbing; }
.bracket .end { position: absolute; left: 0; right: 0; height: 10px; cursor: ns-resize; }
.bracket .end.top { top: -4px; }
.bracket .end.bottom { bottom: -4px; }
.bracket[data-color="yellow"] { color: var(--sw-yellow); }
.bracket[data-color="mint"] { color: var(--sw-mint); }
.bracket[data-color="rose"], .bracket[data-color="red"] { color: var(--sw-rose); }
.bracket[data-color="blue"] { color: var(--sw-blue); }
.group-label { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 4px; }
.group-name { border: 0; outline: 0; background: transparent; padding: 4px 0; font: inherit; font-size: 13px; color: var(--soft); min-width: 0; cursor: text; }
.group-name::placeholder { color: var(--faint); }
.group-del { width: 22px; height: 22px; display: grid; place-items: center; color: var(--soft); opacity: 0; transition: opacity .15s; }
.group-del svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.group-del:hover { color: var(--ink); }
.group-label-in:hover .group-del, .group-del:focus-visible { opacity: 1; }
@media (hover: none) { .group-del { opacity: .5; } }

.group-label-in { display: flex; align-items: center; gap: 4px; }
/* version 2 on the left: a "[" with its name to its left */
.group.left .bracket::before { left: 6px; border-left: 2px solid currentColor; border-right: 0; border-radius: 4px 0 0 4px; }
.group.left .group-label { left: auto; right: 24px; }
.group.left .group-label-in { flex-direction: row-reverse; }
.group.left .group-name { text-align: right; }

/* narrow screens: the right edge holds the check and x, so the bracket flips to a "[" in the empty left margin */
@media (max-width: 600px) {
  .groups { left: 0; }
  .group { left: 4px; }
  .bracket::before { left: 6px; border-left: 2px solid currentColor; border-right: 0; border-radius: 4px 0 0 4px; }
  .group-label { left: 4px; top: -24px; transform: none; }
}

.tally { margin: 0; font-size: 15px; font-weight: 500; color: var(--soft); }
.tally.all { color: var(--ink); font-weight: 700; }
.today-link { margin-top: 18px; font-size: 14px; font-weight: 700; color: var(--mark); padding: 6px 10px; border-radius: 8px; }
.today-link:hover { background: var(--mark-wash); }

/* notes: pastebin, white */
.panel { margin: 72px 0 0; text-align: left; }

.paste {
  border: 1px solid var(--faint);
  border-radius: 13px;
  overflow: hidden;
  font-size: 13px;
}
.paste .bar {
  display: flex; justify-content: space-between; align-items: center; gap: 7px;
  padding: 9px 12px;
  background: var(--field);
  border-bottom: 1px solid var(--line);
}
/* the bar and line numbers are chrome: arrow cursor, no text selection, no typing cursor */
.paste .bar, .gutter { cursor: var(--cross); user-select: none; -webkit-user-select: none; }
.paste .bar span { font-size: 12px; color: var(--soft); }
.paste .body[hidden] { display: none; }
.paste:has(.body[hidden]) .bar { border-bottom: 0; }
.paste .body { display: flex; background: var(--field); }
.gutter {
  margin: 0;
  padding: 10px 10px 10px 12px;
  min-width: 44px;
  background: var(--field);
  border-right: 1px solid var(--line);
  color: var(--gutter-ink);
  text-align: right;
  font: inherit; line-height: 21px;

}
/* notes editor: one line per row so the line numbers stay aligned; formatting is saved as marks in the text */
.editor {
  flex: 1; min-width: 0;
  margin: 0; padding: 10px 12px;
  outline: 0; background: transparent;
  color: var(--code-ink);
  font: inherit; line-height: 21px;
  /* long lines wrap at the box edge; each line keeps its number on its first row */
  white-space: pre-wrap; overflow-wrap: anywhere; overflow: visible;
  tab-size: 4;
  user-select: text; -webkit-user-select: text; cursor: text;
  counter-reset: line;
}
.editor > div { position: relative; min-height: 21px; counter-increment: line; }
/* the box starts at 8 lines and grows downward with what you write */
.editor > div::before {
  content: counter(line);
  position: absolute; left: -56px; width: 44px; padding-right: 10px;
  text-align: right; color: var(--gutter-ink);
  user-select: none; -webkit-user-select: none; pointer-events: none;
}
.editor b, .editor strong { font-weight: 700; }
/* highlight colors for notes (see HL in app.js); see-through so they work on dark and light */
.bar-tools { display: flex; gap: 4px; }
.note-tool { width: 22px; height: 22px; display: grid; place-items: center; color: var(--soft); border-radius: 6px; }
.note-tool:hover, .note-tool[aria-expanded="true"] { color: var(--ink); }
.note-tool svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.paste { position: relative; }
/* save: only on hover, bottom right of the notes; everything already saves as you type */
.note-save { position: absolute; right: 10px; bottom: 8px; padding: 3px 8px; border-radius: 6px; font-size: 12px; color: var(--soft); background: var(--field); opacity: 0; transition: opacity .15s, color .15s; }
.paste:hover .note-save, .note-save:focus-visible, .note-save.ok { opacity: 1; }
.note-save:hover, .note-save.ok { color: var(--ink); }
@media (hover: none) { .note-save { opacity: .6; } }
/* share: a small panel under the notes bar */
.share-pop { display: grid; gap: 10px; padding: 18px 18px 14px; background: var(--field); border-bottom: 1px solid var(--line); text-align: center; animation: fade .12s ease-out; cursor: var(--cross); }
.share-pop[hidden] { display: none; }
.share-pop .sub { margin: 6px 0 0; font-size: 12px; color: var(--soft); }
.share-pop .go { justify-self: center; padding: 6px 8px; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.share-pop .go:hover { color: var(--soft); }
.share-pop .go.quiet { color: var(--soft); }
.share-out { display: grid; gap: 8px; }
.share-out[hidden] { display: none; }
.share-out div { display: flex; justify-content: center; gap: 16px; }
.share-out input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--faint); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 12px; text-align: center; outline: 0; }

/* right-click formatting menu: styles, then colors, then clear */
.fmt-menu {
  position: fixed; z-index: 20;
  display: grid; justify-items: center; gap: 2px;
  padding: 6px;
  border: 1px solid var(--faint); border-radius: 16px; background: var(--paper);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  animation: fade .1s ease-out;
}
.fmt-menu[hidden] { display: none; }
.fmt-menu button {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; font-size: 13px; color: var(--ink);
}
.fmt-menu button:hover, .fmt-menu button:focus-visible { background: var(--mark-wash); outline: 0; }
.fmt-menu b { font-weight: 700; }
.fmt-menu u { text-decoration: underline; text-underline-offset: 2px; }
.fmt-menu s { text-decoration: line-through; }
.fmt-menu .dot::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.fmt-menu .dot:hover::before, .fmt-menu .dot:focus-visible::before { transform: scale(1.2); }
.fmt-menu [data-color="yellow"] { --c: var(--sw-yellow); }
.fmt-menu [data-color="mint"] { --c: var(--sw-mint); }
.fmt-menu [data-color="rose"] { --c: var(--sw-rose); }
.fmt-menu [data-color="blue"] { --c: var(--sw-blue); }
.fmt-menu [data-color="gray"] { --c: var(--sw-gray); }
.fmt-row { display: flex; gap: 2px; }
.fmt-row + .fmt-row { padding-top: 4px; margin-top: 2px; border-top: 1px solid var(--line); }
.fmt-menu .dot { width: 22px; height: 22px; }
/* what the selection already has: lit button with a small dot under it */
.fmt-menu [aria-pressed="true"] { background: var(--mark-wash); position: relative; }
.fmt-menu .fmt-row [aria-pressed="true"]::after { content: ""; position: absolute; bottom: 1px; left: 50%; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: var(--ink); }
.fmt-menu .dot[aria-pressed="true"]::before { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
.fmt-foot { display: flex; width: 100%; margin-top: 2px; border-top: 1px solid var(--line); }
.fmt-menu .wide { flex: 1; width: auto; height: 24px; border-radius: 0 0 0 10px; font-size: 12px; color: var(--soft); }
.fmt-menu .wide + .wide { border-radius: 0 0 10px 0; border-left: 1px solid var(--line); }
.fmt-menu .wide:hover { color: var(--ink); }
.editor s, .editor strike { text-decoration: line-through; }
.editor u { text-decoration: underline; text-underline-offset: 3px; }


.status { margin: 72px 0 0; min-height: 20px; font-size: 13px; color: var(--soft); text-align: center; }

@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.16); } 100% { transform: scale(1); } }

/* username top right (opens the account screen), with an eye that hides it */
/* the name lines up with the date's right edge; the eye waits on its left until the name or date is hovered */
.who { position: absolute; top: 17px; right: 18px; z-index: 2; display: flex; align-items: center; }
.who-name { padding: 3px 6px; font-size: 13px; font-weight: 400; color: var(--ink); border-radius: 6px; }
.who-name:hover { color: var(--soft); }
.who.masked .who-name { color: var(--soft); }
.eye { position: absolute; right: 100%; top: 50%; margin-top: -13px; width: 26px; height: 26px; display: grid; place-items: center; color: var(--faint); border-radius: 6px; opacity: 0; transition: opacity .15s, color .15s; }
.who:hover .eye, .eye:focus-visible, .page:has(.when:hover) .eye { opacity: 1; }
/* the lock does the same beside the date, and stays visible while the day is locked */
.lock { position: absolute; right: 100%; top: 50%; margin-top: -12px; width: 24px; height: 24px; display: grid; place-items: center; color: var(--faint); border-radius: 6px; opacity: 0; transition: opacity .15s, color .15s; }
.lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lock .shackle { transform: translateY(-1.5px) translateX(2.5px); transform-origin: 10.5px 7px; transition: transform .2s var(--ease); }
.lock[aria-pressed="true"] .shackle { transform: none; }
.when:hover .lock, .lock:focus-visible { opacity: 1; }
.lock:hover { color: var(--ink); }
.lock[aria-pressed="true"] { opacity: 1; color: var(--soft); }
@media (hover: none) { .eye, .lock { opacity: .6; } }
.eye:hover { color: var(--soft); }
.eye svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.eye .eye-shut, .who.masked .eye .eye-open { display: none; }
.who.masked .eye .eye-shut { display: block; }

/* account: full screen, centered, sections open like drawers */
.acct {
  position: fixed; inset: 0; z-index: 12; overflow-y: auto;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center;
  padding: 80px 16px 40px;
  scrollbar-gutter: stable both-edges; /* the scrollbar never pushes the column off center */
  animation: fade .15s ease-out;
}
.acct[hidden] { display: none; }
.acct-close { position: fixed; top: 18px; right: 24px; padding: 4px 6px; font-size: 13px; color: var(--soft); }
.acct-close:hover { color: var(--ink); }
.acct-in { width: min(340px, 100%); text-align: center; margin: 0 auto; }
.acct-user { margin: 0 0 40px; font-size: 22px; font-weight: 400; text-align: center; overflow-wrap: anywhere; }
.acct-user.masked { color: var(--soft); }
.sec { }
.sec-title {
  width: 100%; padding: 22px 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 500; color: var(--ink);
}
.sec-title:hover { color: var(--soft); }
.sec-title .chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.sec-title[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sec-body { padding: 6px 0 34px; display: grid; gap: 40px; animation: fade .2s ease-out; }
.sec-body[hidden] { display: none; }
.sec-body form, .sec-body .block, .step2 { display: grid; gap: 12px; }
.sub { margin-bottom: 4px !important; }
.step2[hidden] { display: none; }
.sub { margin: 0; font-size: 12px; color: var(--soft); }
.fine { margin: 0; font-size: 12px; line-height: 1.7; color: var(--soft); }
.acct input {
  width: 100%; height: 42px; padding: 0 14px;
  border: 1px solid var(--faint); border-radius: 12px;
  background: var(--field); color: var(--ink); caret-color: var(--ink);
  font: inherit; font-size: 14px; text-align: center; outline: 0; cursor: text;
}
.acct input:focus-visible { border-color: var(--soft); }
/* a saved password filled in by the browser: gray, like the field (never the browser's yellow or blue) */
:root { --autofill: #45484e; }
:root[data-theme="light"] { --autofill: #e2e4e8; }
.acct input:autofill, .acct input:-webkit-autofill, .acct input:-webkit-autofill:hover, .acct input:-webkit-autofill:focus {
  background-color: var(--autofill) !important; box-shadow: 0 0 0 100px var(--autofill) inset !important;
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink);
  transition: background-color 600000s 0s, color 600000s 0s;
}
.acct input::placeholder { color: var(--soft); }
/* actions on the account page are plain underlined words, no button shapes */
.acct .go {
  justify-self: center; padding: 6px 8px;
  background: none; border: 0; color: var(--ink);
  font-size: 14px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.acct .go:hover { color: var(--soft); }
.acct .go:disabled { opacity: .5; }
.acct .go.danger { color: #c47d78; }
.form-msg { margin: 0; min-height: 18px; font-size: 12px; color: var(--soft); }
.hl-pick { display: flex; gap: 22px; align-items: center; justify-content: center; }
.hl-options { display: grid; gap: 4px; text-align: left; }
.hl-options button { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 13px; color: var(--soft); }
.hl-options button[aria-checked="true"] { color: var(--ink); background: var(--mark-wash); }
.hl-options i { width: 14px; height: 14px; border-radius: 4px; background: var(--hl-swatch, #3f4a78); }
.hl-options [data-hl="yellow"] i { background: #f2cf5b; }
.hl-options [data-hl="mint"] i { background: #5fa38c; }
.hl-options [data-hl="rose"] i { background: #de8a9e; }
.hl-options [data-hl="gray"] i { background: #8e9197; }
.hl-options [data-hl=""] i { background: #7d8bd0; }
.hl-preview { margin: 0; width: 120px; font-size: 13px; line-height: 1.8; color: var(--ink); text-align: left; }
.hl-preview span { background: var(--select); color: var(--select-ink); padding: 1px 2px; border-radius: 2px; }
.acct-about { margin: 0 auto; font-size: 12px; line-height: 1.8; color: var(--soft); text-align: center; }

/* anonymous session: account-only parts hide, tab-only notes show */
.anon-only { display: none !important; }
:root.anon .anon-only { display: revert !important; }
:root.anon .signed-only, :root.anon .eye, :root.anon #secAccount, :root.anon [aria-controls="secAccount"] { display: none !important; }
.acct a.go { display: inline-block; }
.anon-note { margin: 14px 0 0; font-size: 12px; color: var(--soft); text-align: center; }
.import { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 11; width: min(420px, calc(100% - 32px));
  padding: 14px 18px; border: 1px solid var(--faint); border-radius: 13px; background: var(--paper); text-align: center; font-size: 13px; }
.import[hidden] { display: none; }
.import p { margin: 0 0 8px; color: var(--ink); }
.import div { display: flex; justify-content: center; gap: 22px; }
.import button { font-size: 13px; color: var(--soft); text-decoration: underline; text-underline-offset: 4px; }
.import button:hover { color: var(--ink); }

/* highlight colors (dark, then light) */
:root[data-hl="yellow"] { --select: #f2cf5b; --select-ink: #1b1e27; }
:root[data-hl="mint"] { --select: #2f5d50; --select-ink: #ffffff; }
:root[data-hl="rose"] { --select: #84495a; --select-ink: #ffffff; }
:root[data-hl="gray"] { --select: #50535a; --select-ink: #ffffff; }
:root[data-theme="light"][data-hl="yellow"] { --select: #ffe27a; --select-ink: #1b1e27; }
:root[data-theme="light"][data-hl="mint"] { --select: #c9ecdf; --select-ink: #1b1e27; }
:root[data-theme="light"][data-hl="rose"] { --select: #fbd2dc; --select-ink: #1b1e27; }
:root[data-theme="light"][data-hl="gray"] { --select: #dfe2e7; --select-ink: #1b1e27; }

/* calendar: full screen, opened from the date */
.cal {
  position: fixed; inset: 0; z-index: 10;
  display: grid; place-items: center;
  background: var(--paper);
  animation: fade .15s ease-out;
}
.cal[hidden] { display: none; }
.cal-in { position: relative; margin-bottom: 14vh; width: 252px; font-size: 13px; text-align: center; }
.cal-today { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); padding: 4px 6px; font-size: 13px; font-weight: 400; color: var(--soft); text-decoration: underline; text-underline-offset: 4px; }
.cal-today:hover { color: var(--ink); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-weight: 700; }
.cal-head button { width: 32px; height: 32px; color: var(--soft); }
.cal-head button:hover { color: var(--ink); }
.cal-wk, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-wk span { height: 28px; color: var(--faint); }
.cal-grid span, .cal-grid button { height: 36px; line-height: 36px; }
.cal-grid button { position: relative; color: var(--faint); border-radius: 8px; }
.cal-grid button.has { color: var(--ink); }
/* a short line under days with something written; yellow from 5 goals up */
.cal-grid button.has::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 12px; height: 2px; margin-left: -6px; border-radius: 2px; background: var(--sw-blue); }
.cal-grid button.lots::after { background: var(--sw-yellow); }
.cal-grid button.today { font-weight: 700; }
.cal-grid button.sel { color: var(--ink); background: var(--mark-wash); }
.cal-grid button:hover { color: var(--ink); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* theme switch: bottom right, shows on hover */
.theme {
  position: fixed; right: 0; bottom: 0; z-index: 5;
  padding: 18px 24px;
  font-size: 13px; color: var(--soft);
  opacity: 0; transition: opacity .2s, color .2s;
}
.theme:hover, .theme:focus-visible { opacity: 1; color: var(--ink); }
/* touch screens: the switch sits at the end of the page instead of floating over it */
@media (hover: none) { .theme { position: static; display: block; margin: 0 auto 24px; opacity: .6; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
}
#secPrivacy { gap: 18px; }
#secCustom { gap: 34px; }

/* two or three word choices side by side */
.seg { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.seg button { padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--soft); }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { color: var(--ink); background: var(--mark-wash); }
.seg button:disabled { opacity: .35; }
.pal-swatch { display: flex; justify-content: center; gap: 8px; }
.pal-swatch i { width: 14px; height: 14px; border-radius: 4px; }
.pal-swatch [data-c="yellow"] { background: var(--sw-yellow); }
.pal-swatch [data-c="mint"] { background: var(--sw-mint); }
.pal-swatch [data-c="rose"] { background: var(--sw-rose); }
.pal-swatch [data-c="blue"] { background: var(--sw-blue); }
.pal-swatch [data-c="gray"] { background: var(--sw-gray); }
.legal-note { display: grid; gap: 10px; margin-top: 18px; }

/* features: a short list of what does what */
.feat { margin: 0; display: grid; gap: 14px; text-align: left; }
.feat div { display: grid; gap: 2px; }
.feat dt { font-size: 13px; color: var(--ink); }
.feat dd { margin: 0; font-size: 12px; line-height: 1.7; color: var(--soft); }
.feat-note { padding-top: 6px; color: var(--ink); }

/* a locked day: nothing to add, move or delete */
.page.locked .del, .page.locked .add, .page.locked .add-menu, .page.locked .group-del, .page.locked .note-save { display: none; }
.page.locked .goal, .page.locked .bracket { cursor: var(--cross); }
.page.locked .goal-text, .page.locked .editor { cursor: var(--cross); }
.page.locked .check:disabled { opacity: 1; }

/* notes bar: "edited after sharing" beside the title */
.bar-title { display: flex; align-items: baseline; gap: 10px; }
.note-edited { font-size: 11px; color: var(--soft); opacity: .8; }
.note-edited:hover { color: var(--ink); opacity: 1; }
.note-edited[hidden] { display: none; }

/* calendar: "shared" below the month, and the list of links */
.cal-in[hidden] { display: none; }
.cal-shared-btn { margin-top: 22px; padding: 4px 6px; font-size: 13px; color: var(--soft); text-decoration: underline; text-underline-offset: 4px; }
.cal-shared-btn:hover { color: var(--ink); }
.shares { position: relative; width: min(380px, calc(100% - 32px)); max-height: 100%; overflow-y: auto; padding: 72px 0 48px; text-align: center; }
.shares[hidden] { display: none; }
.cal:has(.shares:not([hidden])) { place-items: start center; overflow-y: auto; }
.cal-back { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); padding: 4px 6px; font-size: 13px; color: var(--soft); text-decoration: underline; text-underline-offset: 4px; }
.cal-back:hover { color: var(--ink); }
.shares-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.shares-note { margin: 0 0 30px; }
.sh-item { display: grid; gap: 8px; padding: 22px 0; }
.sh-item + .sh-item { border-top: 1px solid var(--line); }
.sh-day { justify-self: center; font-size: 14px; color: var(--ink); }
.sh-day:hover { color: var(--soft); }
.sh-item .sub { margin: 8px 0 0; font-size: 12px; color: var(--soft); }
.sh-stale { color: var(--ink); }
.sh-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.sh-actions .go { padding: 4px 6px; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.sh-actions .go:hover { color: var(--soft); }
.sh-actions .go.quiet { color: var(--soft); }
.sh-actions .go.danger { color: #c47d78; }
.sh-item .form-msg { margin: 0; min-height: 16px; font-size: 12px; color: var(--soft); overflow-wrap: anywhere; }

/* notes fill the screen: the box breaks out of the narrow column and, as a flex column, gives all the
   room left to the writing area (width up to 1100px, height down to the bottom of the window) */
.note-tool .i-shrink, .note-tool[aria-pressed="true"] .i-grow { display: none; }
.note-tool[aria-pressed="true"] .i-shrink { display: block; }
.paste { display: flex; flex-direction: column; }
.paste .body { flex: 1 1 auto; }
.page.wide .panel {
  --wide: min(1100px, calc(100vw - 48px));
  width: var(--wide); margin-left: calc((100% - var(--wide)) / 2);
}
.page.wide .paste { min-height: calc(100vh - 120px); min-height: calc(100dvh - 120px); }

/* entry / category: plain choices, never a typing cursor, always above the rows */
.add-menu { z-index: 4; user-select: none; -webkit-user-select: none; }
.add-menu, .add-menu button { cursor: var(--cross); }

/* hide goals: a quiet word just above the goals, shown on hover; hidden goals let the notes move up */
.goals-toggle { display: block; margin: -30px auto 0; padding: 8px 14px; font-size: 12px; color: var(--soft); opacity: 0; transition: opacity .15s, color .15s; user-select: none; }
.goals-toggle:hover { color: var(--ink); }
/* only shows while the pointer is on the word's own spot */
.goals-toggle:focus-visible, .goals-toggle:hover { opacity: 1; }
.page.no-goals .list, .page.no-goals .today-link { display: none; }
/* goals hidden: the notes sit higher, closer to the top of the page */
.page.no-goals { padding-top: clamp(64px, 10vh, 110px); }
.page.no-goals .gap { height: 0; }
.page.no-goals .panel { margin-top: 4px; }
/* goals hidden: "show" stays in the same spot as "hide", always visible so it's easy to find */
.page.no-goals .goals-toggle { opacity: .6; }
.page.no-goals .goals-toggle:hover, .page.no-goals .goals-toggle:focus-visible { opacity: 1; }
@media (hover: none) { .goals-toggle { opacity: .5; } }

/* everything on the site is lowercase, except what people type themselves */
body { text-transform: lowercase; }
.editor, .goal-text, .group-name, input, textarea, #whoName, #acctUser, #viewName { text-transform: none; }
input::placeholder { text-transform: lowercase; }
.sh-item .form-msg { text-transform: none; }
.note-tool[hidden] { display: none; }
#shareBurnInfo u { text-underline-offset: 3px; }

/* the typing cursor only over the goal's own line, not the empty space above and below it */
.goal-text { padding-top: 0; padding-bottom: 0; }
.field { padding: 15px 0; }

/* shared list: minimal, on the left; just each note's name and date, click one for its settings */
.shares { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 100%); padding: 72px 24px 40px; text-align: left; overflow-y: auto; }
.cal-back { left: 24px; transform: none; }
.shares-title { margin: 0 0 18px; font-size: 13px; font-weight: 400; color: var(--soft); }
.sh-item { padding: 0; gap: 0; }
.sh-item + .sh-item { border-top: 0; }
.sh-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; width: 100%; padding: 8px 0; text-align: left; }
.sh-name { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; }
.sh-date { flex: none; font-size: 12px; color: var(--soft); }
.sh-row:hover .sh-name { color: var(--soft); }
.sh-detail { display: grid; gap: 8px; padding: 6px 0 18px; text-align: center; }
.sh-detail[hidden] { display: none; }
