/* iONotes website: shared look (2026-11-16 redesign to match the iPhone app). Every page links this first; legal.css and
   staff.css add page-specific pieces. Tokens keep their old names (--bg, --surface, --line, --brand…) so page styles work. */
:root {
  --bg: #F7F7FA; --surface: #FFFFFF; --surface-2: #F1F1F5; --text: #0E0E13; --muted: #6A6A75; --faint: #9A9AA5;
  --line: rgba(0, 0, 0, .07); --line-strong: rgba(0, 0, 0, .12);
  --brand: #5B4BF0; --brand-2: #8F83FF; --brand-ink: #4A3BDB; --brand-soft: rgba(91, 75, 240, .09); --brand-glow: rgba(124, 108, 255, .28);
  --ok: #1A8A4A; --bad: #C93C3C; --star: #F2B600;
  --shadow: 0 1px 2px rgba(16, 16, 30, .04), 0 8px 24px -12px rgba(16, 16, 30, .10);
  --shadow-lg: 0 2px 4px rgba(16, 16, 30, .04), 0 30px 60px -24px rgba(40, 30, 120, .28);
  --radius: 20px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Source Serif 4", "Iowan Old Style", Georgia, serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0B0F; --surface: #16161C; --surface-2: #1D1D25; --text: #F4F4F7; --muted: #A0A0AC; --faint: #6E6E7A;
    --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .14);
    --brand: #8F83FF; --brand-ink: #A99FFF; --brand-soft: rgba(143, 131, 255, .14); --brand-glow: rgba(110, 95, 255, .30);
    --ok: #4CD38A; --bad: #FF7A7A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 70px -24px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --bg: #0B0B0F; --surface: #16161C; --surface-2: #1D1D25; --text: #F4F4F7; --muted: #A0A0AC; --faint: #6E6E7A;
  --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .14);
  --brand: #8F83FF; --brand-ink: #A99FFF; --brand-soft: rgba(143, 131, 255, .14); --brand-glow: rgba(110, 95, 255, .30);
  --ok: #4CD38A; --bad: #FF7A7A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 70px -24px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
       -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
::selection { background: var(--brand-soft); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Header: one line always; the wordmark never wraps. */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 78%, transparent);
               -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
               border-bottom: 1px solid transparent; transition: border-color .2s; }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--bg); } }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .bar, header.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; flex-wrap: nowrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--text); flex-shrink: 0;
        white-space: nowrap; font: 700 19px/1 var(--display); letter-spacing: -.02em; }
.logo img { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.wordmark { white-space: nowrap; }
.logo .tag { font: 600 12px/1 var(--sans); letter-spacing: 0; color: var(--brand-ink); background: var(--brand-soft);
             padding: 5px 9px; border-radius: 999px; }
.nav { display: flex; align-items: center; gap: 4px; white-space: nowrap; min-width: 0; }
.nav a, .nav .navlink { color: var(--muted); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; text-decoration: none; }
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.btn, .nav a.btn:hover { color: #fff; background: linear-gradient(135deg, #5B4BF0 0%, #7A6CFF 60%, #8F83FF 100%); }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; cursor: pointer;
       font: 600 16px/1 var(--sans); padding: 13px 22px; text-decoration: none !important; white-space: nowrap;
       color: #fff; background: linear-gradient(135deg, #5B4BF0 0%, #7A6CFF 60%, #8F83FF 100%);
       box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 20px -8px rgba(91, 75, 240, .65);
       transition: transform .15s ease, box-shadow .2s ease, filter .2s; }
.btn:hover { filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 12px 26px -8px rgba(91, 75, 240, .75); }
.btn:active { transform: scale(.98); }
.btn.ghost, .btn.secondary { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong) inset, var(--shadow); }
.btn.ghost:hover, .btn.secondary:hover { filter: none; box-shadow: 0 0 0 1px var(--brand) inset, var(--shadow); }
.btn.small { padding: 9px 16px; font-size: 15px; }
.btn.big { padding: 16px 28px; font-size: 17px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-sm-nav { padding: 9px 16px; font-size: 14px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }

/* Type */
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--sans); letter-spacing: .02em; color: var(--brand-ink);
           background: var(--brand-soft); padding: 8px 14px; border-radius: 999px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.muted { color: var(--muted); }

/* Signed-in person in the header: initial + first name + Sign out */
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; white-space: nowrap; min-width: 0; }
.who .avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: #fff;
               font: 700 13px/1 var(--sans); background: linear-gradient(135deg, #5B4BF0, #8F83FF); }
.who .name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 16ch; }
.who button, .who .link { background: none; border: 0; padding: 7px 12px; border-radius: 999px; font: 500 14px/1 var(--sans);
                          color: var(--muted); cursor: pointer; box-shadow: 0 0 0 1px var(--line-strong) inset; }
.who button:hover { color: var(--text); }
@media (max-width: 420px) { .who { gap: 8px; } .who .avatar { display: none; } .who .name { max-width: 9ch; } .logo .tag { padding: 5px 8px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 40px 0 48px; color: var(--muted); font-size: 14px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; align-items: flex-start; }
.site-footer .brand-col { max-width: 320px; }
.site-footer .brand-col p { margin: 12px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer a { color: var(--muted); }
.site-footer .logo { color: var(--text); }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }

/* Reveal on scroll, only when motion is welcome and JS is on (html.js) */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
  html.js .reveal.in { opacity: 1; transform: none; }
}
