/* local brain skin: matches the icon (glossy black tile, soft top light, fine grain, quiet glow).
   Looks only. Layout, type and wording stay in styles.css and the pages. Remove this file's <link> to undo. */

:root {
  --paper: #17181b;
  --ink: #f3f4f6;
  --soft: #a5a9b1;
  --faint: #5d6169;
  --line: #26282d;
  --field: #141518;
  --edge: #3b3e45;
  --mark-wash: #26282e;
  --chip: #33363d;

  --sky-top: #24262b;
  --sky-mid: #111215;
  --sky-low: #050506;
  --top-light: rgba(214, 224, 255, .11);
  --grain-opacity: .09;

  --glass: linear-gradient(180deg, rgba(255, 255, 255, .062), rgba(255, 255, 255, .018) 55%, rgba(255, 255, 255, .028));
  --glass-solid: linear-gradient(180deg, #25272c, #17181b 60%, #141518);
  --rim: rgba(255, 255, 255, .095);
  --rim-top: rgba(255, 255, 255, .20);
  --lift: 0 18px 40px -12px rgba(0, 0, 0, .65), 0 3px 10px rgba(0, 0, 0, .35);
  --glow: 0 0 18px rgba(190, 208, 255, .26);
  --button: linear-gradient(180deg, #ffffff, #eceef2 55%, #d9dce2);
  --button-ink: #121316;
}
:root[data-theme="light"] {
  --paper: #fbfbfc;
  --faint: #c9ccd3;
  --line: #e9ebef;
  --field: #f6f7f9;
  --edge: #cfd2d9;

  --sky-top: #ffffff;
  --sky-mid: #f8f9fb;
  --sky-low: #eceef2;
  --top-light: rgba(255, 255, 255, .9);
  --grain-opacity: .05;

  --glass: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .6) 55%, rgba(244, 245, 248, .8));
  --glass-solid: linear-gradient(180deg, #ffffff, #f7f8fa 60%, #f2f3f6);
  --rim: rgba(20, 24, 36, .11);
  --rim-top: #ffffff;
  --lift: 0 18px 40px -14px rgba(24, 30, 50, .22), 0 2px 8px rgba(24, 30, 50, .07);
  --glow: 0 6px 18px rgba(30, 36, 60, .18);
  --button: linear-gradient(180deg, #363a47, #1f222c 55%, #15171e);
  --button-ink: #ffffff;
}

/* ---- the surface: the tile's graphite-to-black fall, a soft light from the top ---- */
html, :root[data-theme="light"] {
  background:
    radial-gradient(120% 55% at 46% -8%, var(--top-light), transparent 70%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 46%, var(--sky-low) 100%) fixed,
    var(--sky-low);
  background-attachment: fixed;
}
body { background: transparent; min-height: 100vh; }

/* fine film grain on the background only: text, the logo and controls stay perfectly clean */
body::after, .acct::before, .cal::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2' intercept='-.5'/%3E%3CfeFuncG type='linear' slope='2' intercept='-.5'/%3E%3CfeFuncB type='linear' slope='2' intercept='-.5'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.9'/%3E%3C/svg%3E");
}
.acct, .cal {
  background:
    radial-gradient(120% 55% at 46% -8%, var(--top-light), transparent 70%),
    linear-gradient(180deg, var(--sky-top), var(--sky-mid) 46%, var(--sky-low));
}

/* ---- the mark ---- */
.s3 { overflow: visible; }
.s3 .ticks { fill: none; stroke: currentColor; stroke-linecap: round; }
.s3 .dot { fill: currentColor; filter: drop-shadow(0 0 5px rgba(196, 214, 255, .8)); }
.s3 .hot { filter: drop-shadow(0 0 3px rgba(196, 214, 255, .45)); }
:root[data-theme="light"] .s3 .dot, :root[data-theme="light"] .s3 .hot { filter: none; }
.corner-mark.corner-mark { width: 38px; height: 38px; top: 16px; right: 20px; }
.brand-mark.brand-mark { width: 1.35em; height: 1.35em; }

/* ---- primary button: a lit white pill (dark ink pill in light mode) ---- */
body:has(.corner-mark) main .go {
  background: var(--button); color: var(--button-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(0, 0, 0, .16), 0 8px 20px -10px rgba(0, 0, 0, .7);
  transition: box-shadow .25s, filter .25s, transform .12s;
}
body:has(.corner-mark) main .go:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(0, 0, 0, .16), var(--glow); }
body:has(.corner-mark) main .go:active:not(:disabled) { transform: translateY(1px); filter: brightness(.95); }

/* ---- fields: sunk glass with a lit lower lip, soft halo on focus ---- */
body:has(.corner-mark) main input, .acct input, .share-out input, .share-pop #shareTitle, .tpl-name, .tpl-rename {
  background-color: var(--field);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(255, 255, 255, .022));
  border-color: var(--rim);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .045);
  transition: border-color .2s, box-shadow .25s;
}
:root[data-theme="light"] body:has(.corner-mark) main input, :root[data-theme="light"] .acct input, :root[data-theme="light"] .share-out input,
:root[data-theme="light"] .share-pop #shareTitle {
  background-image: linear-gradient(180deg, rgba(20, 24, 36, .025), rgba(255, 255, 255, .6));
  box-shadow: inset 0 1px 2px rgba(20, 24, 36, .07);
}
body:has(.corner-mark) main input:focus-visible, .acct input:focus-visible, .share-pop #shareTitle:focus-visible {
  border-color: rgba(196, 212, 255, .46);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3), 0 0 0 3px rgba(170, 190, 255, .11), 0 0 22px -4px rgba(170, 190, 255, .28);
}
:root[data-theme="light"] body:has(.corner-mark) main input:focus-visible, :root[data-theme="light"] .acct input:focus-visible {
  border-color: rgba(40, 52, 96, .4); box-shadow: 0 0 0 3px rgba(70, 90, 160, .12);
}
body:has(.corner-mark) main input.bad, body:has(.corner-mark) main input.bad:focus-visible { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }

/* ---- floating things: menus, popovers, toast ---- */
.postpone-menu, .tpl-pop, .fmt-menu, .toast, .add-menu .tpl-pop {
  background: var(--glass-solid);
  border: 1px solid var(--rim); border-top-color: var(--rim-top);
  box-shadow: var(--lift);
}

/* ---- the notes box: one pane of glass ---- */
.paste {
  background: var(--glass);
  border-color: var(--rim); border-top-color: var(--rim-top);
  box-shadow: var(--lift), inset 0 1px 0 rgba(255, 255, 255, .03);
}
.paste .bar { background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .008)); border-bottom-color: var(--rim); }
.paste .body, .share-pop { background: rgba(0, 0, 0, .17); }
.share-pop { border-bottom-color: var(--rim); }
:root[data-theme="light"] .paste .bar { background: linear-gradient(180deg, #ffffff, #f5f6f8); }
:root[data-theme="light"] .paste .body, :root[data-theme="light"] .share-pop { background: rgba(247, 248, 250, .75); }

/* ---- goal checks: a thin glass ring that lights up when done ---- */
.check .ring { stroke: color-mix(in srgb, var(--faint) 55%, var(--soft)); }
.check:hover .ring { stroke: var(--mark); filter: drop-shadow(0 0 4px rgba(190, 208, 255, .5)); }
.goal.done .check .ring { filter: drop-shadow(0 0 6px rgba(190, 208, 255, .55)); }
:root[data-theme="light"] .check:hover .ring, :root[data-theme="light"] .goal.done .check .ring { filter: none; }
.goal.done .check .tick { stroke: var(--sky-mid); }

/* ---- small controls ---- */
.seg button { border: 1px solid transparent; transition: background .2s, border-color .2s, color .2s; }
.seg button:hover:not(:disabled) { background: rgba(127, 135, 155, .09); }
.seg button[aria-checked="true"], body .pin-len button[aria-checked="true"], .hl-options button[aria-checked="true"] {
  color: var(--ink);
  background: var(--glass);
  border-color: var(--rim); border-top-color: var(--rim-top);
  box-shadow: 0 5px 14px -8px rgba(0, 0, 0, .8), 0 0 14px -6px rgba(190, 208, 255, .35);
}
:root[data-theme="light"] .seg button[aria-checked="true"], :root[data-theme="light"] body .pin-len button[aria-checked="true"], :root[data-theme="light"] .hl-options button[aria-checked="true"] {
  background: #ffffff; box-shadow: 0 4px 12px -7px rgba(24, 30, 50, .45);
}
body .notice { background: var(--glass); border-color: var(--rim); border-top-color: var(--rim-top); box-shadow: var(--lift); }
.acct .go:not(.anon-only):hover { text-shadow: 0 0 12px rgba(190, 208, 255, .5); }
:root[data-theme="light"] .acct .go:hover { text-shadow: none; }

/* calendar: the picked day sits in a drop of glass, today glows like the icon's dot */
.cal-grid button { transition: background .2s, box-shadow .2s; }
.cal-grid button:hover { background: rgba(127, 135, 155, .10); }
.cal-grid button.sel {
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--rim), inset 0 1px 0 var(--rim-top), var(--glow);
}
.cal-grid button.today { text-shadow: 0 0 10px rgba(200, 216, 255, .8); }
:root[data-theme="light"] .cal-grid button.today { text-shadow: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* the new background has to reach the right edge, so no strip is reserved for a scrollbar */
html, :root[data-theme="light"] { scrollbar-gutter: auto; }

/* ---- categories on phones: the name gets its own line above the group, a slim colored bar runs beside it ---- */
@media (max-width: 600px) {
  .goal.cat-start { margin-top: 30px; }
  .goals .goal.cat-start:first-child { margin-top: 24px; }
  .groups .group { left: 2px; }
  .groups .group .bracket::before {
    left: 7px; width: 3px; top: 2px; bottom: 2px;
    border: 0; border-radius: 3px; background: currentColor;
    box-shadow: 0 0 9px -1px color-mix(in srgb, currentColor 65%, transparent);
  }
  .groups .group .bracket:is(:not([data-color]), [data-color=""]) { color: color-mix(in srgb, var(--faint) 40%, var(--soft)); }
  .groups .group .group-label { left: 7px; right: auto; top: -33px; transform: none; white-space: nowrap; }
  .groups .group .group-label-in { flex-direction: row; gap: 6px; }
  .groups .group .group-name {
    text-align: left; padding: 3px 0; font-size: 12px; font-weight: 500; color: var(--soft); letter-spacing: .02em;
    max-width: calc(100vw - 80px); text-overflow: ellipsis;
  }
  .groups .group .group-del { width: 24px; height: 24px; }
  :root[data-theme="light"] .groups .group .bracket::before { box-shadow: none; }
}

/* ---- round 2 ---- */

.corner-mark { display: none; }
/* the icon is the centrepiece of the sign-in page. Crisp vector ticks; the orb is a soft sphere and its light
   is drawn with smooth gradients (no blur filters, which leave hard edges) */
.hero-mark { display: block; width: 136px; height: 136px; margin: 0 auto 26px; color: var(--ink); shape-rendering: geometricPrecision; overflow: visible; }
.hero-mark .ticks path { filter: none; }
.hero-mark .dot { fill: url(#lbOrb); filter: none; transform-box: fill-box; transform-origin: center; }
.hero-mark .halo-wide, .hero-mark .halo-core { transform-box: fill-box; transform-origin: center; pointer-events: none; }
.lbOrb-a { stop-color: #ffffff; } .lbOrb-b { stop-color: #f1f4fb; } .lbOrb-c { stop-color: #c3cde6; }
.lbHaloCore-c { stop-color: #e4ebff; } .lbHaloWide-c { stop-color: #9fb4ff; }
.hero-mark .halo-core { opacity: .42; } .hero-mark .halo-wide { opacity: .16; }
:root[data-theme="light"] .lbOrb-a { stop-color: #1f222b; } :root[data-theme="light"] .lbOrb-b { stop-color: #1b1e27; } :root[data-theme="light"] .lbOrb-c { stop-color: #171a22; }
:root[data-theme="light"] .lbHaloCore-c, :root[data-theme="light"] .lbHaloWide-c { stop-color: #3a4678; }
:root[data-theme="light"] .hero-mark .halo-core, :root[data-theme="light"] .hero-mark .halo-wide { display: none; }
@media (prefers-reduced-motion: no-preference) {
  /* arrive: the ticks rise in one by one around the ring, then the orb opens and its light spreads */
  /* then: a soft light circles the ring, the orb breathes slightly and now and then dims, like a status light */
  .hero-mark .ticks path {
    transform-box: fill-box; transform-origin: center;
    animation: tick-on .6s cubic-bezier(.2, .8, .2, 1) both, orbit 4.2s ease-in-out infinite, swell 4.2s ease-in-out infinite;
    animation-delay: calc(100ms + var(--i, 0) * 20ms), calc(1.8s + var(--i, 0) * 116.6ms), calc(1.8s + var(--i, 0) * 116.6ms);
  }
  .hero-mark .dot { animation: dot-on .9s cubic-bezier(.2, .8, .2, 1) 820ms both, pulse 4.8s cubic-bezier(.37, 0, .63, 1) 1.8s infinite; }
  .hero-mark .halo-core { animation: light-on 1.2s ease-out 950ms both, halo-pulse 4.8s cubic-bezier(.37, 0, .63, 1) 1.8s infinite; }
  .hero-mark .halo-wide { animation: light-on 1.8s ease-out 1s both, halo-pulse 4.8s cubic-bezier(.37, 0, .63, 1) 1.8s infinite; }
  @keyframes tick-on { from { opacity: 0; transform: scale(.55); } }
  @keyframes orbit { 0%, 30%, 100% { opacity: var(--o); } 12% { opacity: 1; } }
  @keyframes swell {
    0%, 30%, 100% { translate: 0 0; transform: rotate(0deg) rotate(var(--a)) scale(1, 1) rotate(calc(var(--a) * -1)); filter: blur(0); }
    12% { translate: calc(var(--dx) * .3) calc(var(--dy) * .3); transform: rotate(3deg) rotate(var(--a)) scale(1.05, .96) rotate(calc(var(--a) * -1)); filter: blur(1.8px); }
  }
  @keyframes dot-on { from { opacity: 0; transform: scale(.2); } }
  @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
  @keyframes light-on { from { opacity: 0; transform: scale(.5); } }
  @keyframes halo-pulse { 0%, 100% { transform: scale(.97); } 50% { transform: scale(1.04); } }
}
body:has(.hero-mark) h1 { font-size: 32px; letter-spacing: -.02em; }



/* buttons: crisper pill with a lit top edge, a little more weight */
body:has(.corner-mark) main .go { height: 46px; border-radius: 14px; letter-spacing: .01em; }
body:has(.corner-mark) main .link { transition: color .2s, text-shadow .2s; }
body:has(.corner-mark) main .link:hover { text-shadow: 0 0 14px rgba(200, 216, 255, .45); }
:root[data-theme="light"] body:has(.corner-mark) main .link:hover { text-shadow: none; }

/* notes box: a touch more depth, a hairline of light along its top */
.paste { border-radius: 16px; }
.paste .bar span { letter-spacing: .02em; }

/* the light/dark switch: a quiet pill when hovered */
.theme { border-radius: 999px; }

/* ---- round 3 ---- */

/* keyboard focus: a cold ring of light instead of a hard white outline */
:is(button, a, [role="radio"], [role="switch"]):focus-visible { outline: 1.5px solid rgba(205, 218, 255, .75); outline-offset: 3px; border-radius: 8px; box-shadow: 0 0 14px -2px rgba(175, 195, 255, .35); }
:root[data-theme="light"] :is(button, a, [role="radio"], [role="switch"]):focus-visible { outline-color: var(--ink); box-shadow: none; }


/* calendar: a little larger and easier to read; days with writing are full white */
.cal-in { width: 280px; }
.cal-grid span, .cal-grid button { height: 40px; line-height: 40px; }
.cal-grid button { border-radius: 10px; }
.cal-wk span { color: var(--soft); opacity: .7; }

/* hairlines fade at their ends, like the light along the icon's edge */
/* legal page section lines */
body:not(:has(.page)) main h2 { border-top: 0; background: linear-gradient(90deg, var(--rim), var(--rim) 60%, transparent) top / 100% 1px no-repeat; }

/* highlight picker: the bubble has the same outline as the other choices */
.hl-options button { border: 1px solid transparent; transition: background .2s, border-color .2s, color .2s; }
/* palette: 1 and 2 side by side */
.seg { flex-wrap: nowrap; }
/* features: two even columns, every entry the same distance from the next */
.sec-body .feat { display: block; columns: 2; column-gap: 40px; }
.sec-body .feat > div { break-inside: avoid; margin: 0 0 18px; }
@media (max-width: 640px) { .sec-body .feat { columns: 1; } }

/* ---- light mode: the same material as dark. Light from the top, a lit rim on every raised edge,
   depth from soft cool shadows where dark mode uses glow. Kept matte, not glassy. ---- */
:root[data-theme="light"] {
  --paper: #f6f7f9;
  --field: #f1f2f5;
  --sky-top: #fdfdfe;
  --sky-mid: #f3f4f7;
  --sky-low: #e4e6ec;
  --top-light: rgba(255, 255, 255, 1);
  --grain-opacity: .32;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .74) 60%, rgba(250, 251, 252, .86));
  --glass-solid: linear-gradient(180deg, #ffffff, #fafbfc 60%, #f5f6f8);
  --rim: rgba(18, 24, 44, .085);
  --rim-top: rgba(255, 255, 255, 1);
  --lift: 0 22px 44px -22px rgba(24, 32, 70, .30), 0 3px 10px -2px rgba(24, 32, 70, .07);
  --glow: 0 8px 22px -8px rgba(40, 52, 110, .35);
  --button: linear-gradient(180deg, #3a3e4b, #23262f 55%, #171920);
}
/* grain on light: soft-light keeps it a texture, not dirt */
:root[data-theme="light"] body::after, :root[data-theme="light"] .acct::before, :root[data-theme="light"] .cal::before { mix-blend-mode: soft-light; }
/* lit lip along the top of raised surfaces */
:root[data-theme="light"] .paste,
:root[data-theme="light"] .postpone-menu, :root[data-theme="light"] .tpl-pop, :root[data-theme="light"] .fmt-menu, :root[data-theme="light"] .toast {
  box-shadow: var(--lift), inset 0 1px 0 #ffffff;
}
:root[data-theme="light"] .paste .bar { background: linear-gradient(180deg, #ffffff, #f7f8fa); }
:root[data-theme="light"] .paste .body, :root[data-theme="light"] .share-pop { background: rgba(244, 245, 248, .7); }
/* fields: pressed into the surface, with a white lip below */
:root[data-theme="light"] body:has(.corner-mark) main input, :root[data-theme="light"] .acct input, :root[data-theme="light"] .share-out input,
:root[data-theme="light"] .share-pop #shareTitle {
  background-color: var(--field);
  background-image: linear-gradient(180deg, rgba(18, 24, 44, .035), rgba(255, 255, 255, .55));
  box-shadow: inset 0 1px 2px rgba(18, 24, 44, .08), 0 1px 0 #ffffff;
}
:root[data-theme="light"] body:has(.corner-mark) main input:focus-visible, :root[data-theme="light"] .acct input:focus-visible,
:root[data-theme="light"] .share-pop #shareTitle:focus-visible {
  border-color: rgba(50, 64, 130, .35);
  box-shadow: inset 0 1px 2px rgba(18, 24, 44, .06), 0 0 0 3px rgba(80, 100, 180, .10), 0 8px 20px -8px rgba(50, 64, 130, .30);
}
/* the dark button sits on the page with a soft shadow and a lit top edge */
:root[data-theme="light"] body:has(.corner-mark) main .go {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 12px 24px -12px rgba(20, 26, 50, .6);
}
:root[data-theme="light"] body:has(.corner-mark) main .go:hover:not(:disabled) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 14px 28px -10px rgba(30, 40, 90, .55);
}
/* picked choices: a white bead lifted off the page */
:root[data-theme="light"] .seg button[aria-checked="true"], :root[data-theme="light"] body .pin-len button[aria-checked="true"],
:root[data-theme="light"] .hl-options button[aria-checked="true"], :root[data-theme="light"] .cal-grid button.sel {
  background: var(--glass-solid);
  border-color: var(--rim);
  box-shadow: inset 0 1px 0 #ffffff, 0 6px 14px -8px rgba(24, 32, 70, .45);
}
/* done goals and hover on the circle: depth instead of glow */
:root[data-theme="light"] .goal.done .check .ring { filter: drop-shadow(0 3px 5px rgba(24, 32, 70, .28)); }
:root[data-theme="light"] .check:hover .ring { filter: drop-shadow(0 2px 4px rgba(24, 32, 70, .18)); }
:root[data-theme="light"] .acct, :root[data-theme="light"] .cal {
  background: radial-gradient(120% 55% at 46% -8%, #ffffff, transparent 70%), linear-gradient(180deg, var(--sky-top), var(--sky-mid) 46%, var(--sky-low));
}

/* ---- smoothness: state changes ease instead of snapping. Only what you touch moves. ---- */
html { scroll-behavior: smooth; }
.seg button, .hl-options button, .pin-len button, .cal-grid button, .note-tool, .sec-title, .acct-close, .cal-head button,
.add-menu button, .postpone-menu button, .fmt-menu button, .link, .go, .theme, .date, .who-name, .today-link {
  transition: color .28s cubic-bezier(.2, .8, .2, 1), background-color .28s cubic-bezier(.2, .8, .2, 1), border-color .28s,
    box-shadow .32s cubic-bezier(.2, .8, .2, 1), opacity .25s, text-shadow .28s;
}
.check .ring { transition: stroke .3s cubic-bezier(.2, .8, .2, 1), fill .35s cubic-bezier(.2, .8, .2, 1), filter .35s; }
.sec-title .chev { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: no-preference) {
  .postpone-menu, .tpl-pop, .fmt-menu, .toast { animation: pop-in .2s cubic-bezier(.2, .8, .2, 1); }
  @keyframes pop-in { from { opacity: 0; scale: .97; } }
  .acct, .cal { animation: fade .26s cubic-bezier(.2, .8, .2, 1); }
  .sec-body { animation: fade .3s cubic-bezier(.2, .8, .2, 1); }
}

/* ---- one spacing rhythm: 40px between groups, 12-16px inside a group ---- */
#secCustom { gap: 40px; }
#secPrivacy { gap: 12px; }
#secPrivacy > .block + * { margin-top: 4px; }
#secPrivacy > .legal-note { margin-top: 28px; }
/* share panel: each label sits close to its choice; groups are clearly apart */
.share-pop { gap: 8px; }
.share-pop .sub { margin-top: 14px; }
.share-pop > .sub:first-child, .share-pop > :first-child .sub { margin-top: 0; }
.share-pop > .go { margin-top: 10px; }
/* the floating close button keeps a small backing so text scrolling under it stays readable */
.acct-close { z-index: 3; padding: 5px 12px; border-radius: 999px; background: var(--glass-solid); border: 1px solid var(--rim); border-top-color: var(--rim-top); box-shadow: var(--lift); }

/* ---- wordmark: weight about 550 (the font files stop at 500 and 700, so 500 gets a hairline outline in its own color), evenly spaced; plain ink, no sheen ---- */
body:has(.hero-mark) h1 { font-size: 30px; font-weight: 500; -webkit-text-stroke: .3px currentColor; letter-spacing: .01em; margin-bottom: 10px; color: var(--ink); }
body:has(.hero-mark) .tagline { letter-spacing: .03em; }

/* ---- buttons: a touch more material. A soft sheen from the top, a hairline rim, a faint cool halo at rest ---- */
body:has(.corner-mark) main .go {
  background:
    radial-gradient(120% 95% at 50% -35%, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #f3f5f8, #dadee6);
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(10, 14, 30, .16), 0 0 0 1px rgba(255, 255, 255, .07),
    0 10px 24px -12px rgba(0, 0, 0, .85), 0 0 26px -10px rgba(190, 208, 255, .38);
}
body:has(.corner-mark) main .go:hover:not(:disabled) {
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(10, 14, 30, .16), 0 0 0 1px rgba(255, 255, 255, .10),
    0 10px 24px -12px rgba(0, 0, 0, .85), 0 0 30px -8px rgba(190, 208, 255, .5);
}
:root[data-theme="light"] body:has(.corner-mark) main .go {
  background:
    radial-gradient(120% 95% at 50% -35%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #353946, #17191f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(0, 0, 0, .35), 0 0 0 1px rgba(16, 20, 36, .5),
    0 12px 24px -12px rgba(20, 26, 50, .6);
}
:root[data-theme="light"] body:has(.corner-mark) main .go:hover:not(:disabled) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 -1px 0 rgba(0, 0, 0, .35), 0 0 0 1px rgba(16, 20, 36, .5),
    0 14px 28px -10px rgba(30, 40, 90, .55);
}
/* picked choices get the same hairline rim as the button */
.seg button[aria-checked="true"], body .pin-len button[aria-checked="true"], .hl-options button[aria-checked="true"] {
  box-shadow: inset 0 1px 0 var(--rim-top), 0 5px 14px -8px rgba(0, 0, 0, .8), 0 0 14px -6px rgba(190, 208, 255, .35);
}
/* small icon buttons (notes bar, calendar arrows) get a soft bead behind them on hover */
.note-tool, .cal-head button { border-radius: 8px; }
.note-tool:hover, .cal-head button:hover { background: rgba(127, 135, 155, .12); }

/* ---- sign-in button: the same glass as the fields, raised instead of sunk. Same height and corners as the
   fields, a lit top edge, white text; it glows softly on hover like the orb ---- */
body:has(.corner-mark) main .go {
  height: 44px; border-radius: 13px; color: var(--ink); font-weight: 600;
  background: linear-gradient(180deg, #2c2f36, #1c1e23 55%, #17181c);
  border: 1px solid rgba(255, 255, 255, .10); border-top-color: rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 22px -12px rgba(0, 0, 0, .9);
}
body:has(.corner-mark) main .go:hover:not(:disabled) {
  border-color: rgba(205, 218, 255, .30); border-top-color: rgba(225, 233, 255, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 10px 22px -12px rgba(0, 0, 0, .9), 0 0 22px -6px rgba(185, 204, 255, .35);
}
:root[data-theme="light"] body:has(.corner-mark) main .go {
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f5f6f8 60%, #eef0f3);
  border: 1px solid rgba(18, 24, 44, .12); border-top-color: #ffffff;
  box-shadow: inset 0 1px 0 #ffffff, 0 8px 18px -10px rgba(24, 32, 70, .35);
}
:root[data-theme="light"] body:has(.corner-mark) main .go:hover:not(:disabled) {
  border-color: rgba(50, 64, 130, .28);
  box-shadow: inset 0 1px 0 #ffffff, 0 10px 22px -10px rgba(40, 52, 110, .4);
}

/* ---- contact icons, centered at the very bottom of settings: email, then GitHub ---- */
.contact { display: flex; justify-content: center; gap: 6px; margin: 36px auto 0; }
.contact-link { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--soft); opacity: .75;
  transition: color .28s cubic-bezier(.2, .8, .2, 1), opacity .28s, background-color .28s, filter .28s; }
.contact-link svg { width: 18px; height: 18px; }
.contact-link:hover { color: var(--ink); opacity: 1; background: rgba(127, 135, 155, .12); filter: drop-shadow(0 0 6px rgba(190, 208, 255, .45)); }
:root[data-theme="light"] .contact-link:hover { filter: none; }

/* GitHub icon, top right of the sign-in page */
.corner-github { position: fixed; top: 14px; right: 18px; z-index: 20; }

/* settings and calendar cover the page: the page's own scrollbar steps aside so they sit truly centered */
html:has(.acct:not([hidden])), html:has(.cal:not([hidden])) { overflow: hidden; }
/* section titles: the arrow is balanced by an equal space on the left, so the words sit exactly on center */
.sec-title::before { content: ""; width: 12px; flex: none; }
/* contact icons: same optical size; the email's orb lights up like the logo's on hover */
.contact { gap: 10px; }
.contact-link svg { width: 19px; height: 19px; }

/* contact icons, sharper: whole-pixel size, solid color (no see-through dimming), lit from the top like the logo */
.contact-link { width: 38px; height: 38px; opacity: 1; color: var(--ink); }
.contact-link svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35)); }
.icon-lit-a { stop-color: #e9ecf2; } .icon-lit-b { stop-color: #9097a3; }
:root[data-theme="light"] .icon-lit-a { stop-color: #4a4f5c; } :root[data-theme="light"] .icon-lit-b { stop-color: #14161c; }
:root[data-theme="light"] .contact-link svg { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .9)); }
.contact-link:hover svg { filter: drop-shadow(0 0 6px rgba(190, 208, 255, .5)); }
.contact-link:hover .icon-lit-b { stop-color: #d2d7e2; }
:root[data-theme="light"] .contact-link:hover svg { filter: none; }
:root[data-theme="light"] .contact-link:hover .icon-lit-b { stop-color: #000; }

/* contact icons: the earlier soft glow on hover, and in settings they sit slightly greyed out until hovered */
.contact-link:hover svg { filter: drop-shadow(0 0 6px rgba(190, 208, 255, .45)); }
.acct .contact-link { opacity: .72; }
.acct .contact-link .icon-lit-a, .acct .contact-link .icon-lit-b { stop-color: var(--soft); }
.acct .contact-link:hover { opacity: 1; }
.acct .contact-link:hover .icon-lit-a { stop-color: #f3f4f6; }
.acct .contact-link:hover .icon-lit-b { stop-color: #c9cfdc; }
:root[data-theme="light"] .acct .contact-link:hover .icon-lit-a, :root[data-theme="light"] .acct .contact-link:hover .icon-lit-b { stop-color: var(--ink); }

/* contact icons: a barely-there glow on hover; greyed out until hovered in settings and on the sign-in page */
.contact-link:hover svg { filter: drop-shadow(0 0 3px rgba(190, 208, 255, .2)); }
.corner-github { opacity: .72; }
.corner-github .icon-lit-a, .corner-github .icon-lit-b { stop-color: var(--soft); }
.corner-github:hover { opacity: 1; }
.corner-github:hover .icon-lit-a { stop-color: #f3f4f6; }
.corner-github:hover .icon-lit-b { stop-color: #c9cfdc; }
:root[data-theme="light"] .corner-github:hover .icon-lit-a, :root[data-theme="light"] .corner-github:hover .icon-lit-b { stop-color: var(--ink); }

/* "edited after sharing": always on the bar's one line, right after the note's name, at every width;
   it trims with an ellipsis instead of dropping to a second line */
.paste .bar { flex-wrap: nowrap; }
.bar-title { display: flex; flex: 1 1 auto; min-width: 0; align-items: baseline; gap: 8px; }
.bar-title .note-name { flex: 0 1 auto; field-sizing: content; width: auto; min-width: 5ch; max-width: 55%; }
.note-edited { position: static; transform: none; order: 0; flex: 0 1 auto; min-width: 0; max-width: none;
  font-size: 11.5px; text-align: left; opacity: .85; }
.note-edited::before { content: "·"; margin-right: 8px; opacity: .6; }
@container (max-width: 700px) { .paste .bar { flex-wrap: nowrap; } .bar-title { display: flex; } .note-edited { position: static; order: 0; flex: 0 1 auto; } }

/* GitHub (and email) icons: hover only brightens them, no glow around the button */
.contact-link:hover, .contact-link:hover svg { filter: none; }

/* fields filled by a password manager stay plain gray: no yellow tint (Firefox, Zen) and no blue or yellow fill (Chrome, Edge) */
input:autofill, input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  filter: none !important;
  background-image: none !important;
  -webkit-box-shadow: 0 0 0 1000px var(--autofill, #45484e) inset !important;
  box-shadow: 0 0 0 1000px var(--autofill, #45484e) inset !important;
  -webkit-text-fill-color: var(--ink) !important;
  caret-color: var(--ink);
  transition: background-color 600000s 0s, color 600000s 0s !important;
}

/* goal circles: never a typing cursor or caret in or over them, in any browser (Firefox/Zen included) */
.check, .check *, .check:disabled { cursor: var(--cross) !important; user-select: none; -webkit-user-select: none; caret-color: transparent; }
.goal .field + .check, .goal .check svg { -moz-user-focus: ignore; }

/* contact icons: softer edges. Normal anti-aliasing, no hard 1px shadow, a hair of blur to round off the outline */
.contact-link svg, :root[data-theme="light"] .contact-link svg { shape-rendering: auto; filter: blur(.2px); }
.contact-link:hover svg { filter: blur(.2px); }

/* ---- scrollbars: thin, no track, the same soft gray as the text, and only visible while scrolling
   (or while the pointer is over a scrollable area on pages without the app script) ---- */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
:root.scrolling *, :root.scrolling { scrollbar-color: rgba(165, 169, 177, .38) transparent; }
:root:not(.has-scroll-js) :hover { scrollbar-color: rgba(165, 169, 177, .3) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; }
:root.scrolling ::-webkit-scrollbar-thumb { background: rgba(165, 169, 177, .38); }
:root.scrolling ::-webkit-scrollbar-thumb:hover { background: rgba(165, 169, 177, .6); }
:root:not(.has-scroll-js) :hover::-webkit-scrollbar-thumb { background: rgba(165, 169, 177, .3); }
:root[data-theme="light"].scrolling ::-webkit-scrollbar-thumb { background: rgba(27, 30, 39, .25); }
:root[data-theme="light"].scrolling *, :root[data-theme="light"].scrolling { scrollbar-color: rgba(27, 30, 39, .25) transparent; }

/* the typing cursor only shows over actual text; empty parts of the notes and goals show the normal pointer */
#noteText, .goal-text, .goal-text:focus { cursor: var(--cross) !important; }
#noteText.over-text, .goal-text.over-text { cursor: text !important; }
.gutter, .paste .body { cursor: var(--cross); }

/* sign-in page: the light / dark switch stays hidden until hovered  */
body:has(.corner-mark) .theme { opacity: 0; }
body:has(.corner-mark) .theme:hover, body:has(.corner-mark) .theme:focus-visible { opacity: 1; }
/* phones can't hover: it's invisible there too. The first tap in the corner shows it, the next one switches */
@media (hover: none) {
  body:has(.corner-mark) .theme, body:has(.corner-mark) .theme:hover, body:has(.corner-mark) .theme:focus-visible { opacity: 0; }
  body:has(.corner-mark) .theme.shown { opacity: 1; }
}

/* contact icons on sharp phone and laptop screens: no softening filter (Safari rasterizes it at low resolution, which blurs) */
@media (min-resolution: 1.5dppx) {
  .contact-link svg, .contact-link:hover svg, :root[data-theme="light"] .contact-link svg { filter: none; }
}
