
:root {
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, "Cascadia Mono", monospace;
  --bg: #fbfaf7; --ink: #1d1d1b; --muted: #62615c; --faint: #85837d; --rule: #e7e4dc; --rule-strong: #d6d2c7;
  --accent: #d9a400; --accent-ink: #8a6700; --marker: #fde180; --btn: #1d1d1b; --btn-ink: #fbfaf7;
  --card: #ffffff; --card-edge: rgba(40, 32, 10, .08); --tint: rgba(29, 29, 27, .055);
  --danger: #c4321c; --danger-tint: rgba(196, 50, 28, .08); --good: #1f7a3a; --good-tint: rgba(31, 122, 58, .09); --field: #ffffff;
  --side: #1f1c19; --side-2: #110f0d; --side-ink: #f3efe6; --side-muted: #b3ac9f;
  --shadow: 0 1px 2px rgba(30, 25, 10, .05), 0 12px 32px -14px rgba(30, 25, 10, .16);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414; --ink: #ecebe8; --muted: #a3a29d; --faint: #85847e; --rule: #2a2a29; --rule-strong: #3a3a38;
    --accent: #e8b923; --accent-ink: #f0c955; --marker: rgba(232, 185, 35, .45); --btn: #ecebe8; --btn-ink: #141414;
    --card: #1c1c1b; --card-edge: rgba(255, 255, 255, .07); --tint: rgba(236, 235, 232, .07);
    --danger: #ff6b55; --danger-tint: rgba(255, 107, 85, .1); --good: #5fd27f; --good-tint: rgba(95, 210, 127, .1); --field: #222221;
    --side: #1b1916; --side-2: #0d0c0b;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 12px 30px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
.ic { width: 18px; height: 18px; flex: none; }
.ic-fill { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.email { overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1:focus { outline: none; }

/* ---- the frame ---- */
.layout { min-height: 100vh; min-height: 100dvh; display: grid; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 680; font-size: 18px; letter-spacing: -.015em; text-decoration: none; }
.brand img { display: block; }
.content { display: flex; flex-direction: column; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; padding: 0 20px; }
main { flex: 1; width: 100%; outline: none; }
.foot { display: grid; gap: 10px; padding: 28px 20px 36px; color: var(--faint); font-size: 13.5px; }
.foot p:first-child { display: flex; gap: 8px; align-items: flex-start; max-width: 60ch; }
.foot .ic { width: 15px; height: 15px; margin-top: 2px; }
.foot__links { display: flex; gap: 18px; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { color: var(--ink); }
.loading { padding: 40px 0; text-align: center; }

/* signed out: the dark panel about notelet Cloud, the form beside it */
.side { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 28px; padding: 28px 24px 30px; color: var(--side-ink); background: linear-gradient(180deg, var(--side), var(--side-2)); }
.side::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 209, 46, .16), transparent); pointer-events: none; }
.brand--side { color: var(--side-ink); }
.side__body { display: grid; gap: 22px; }
.side__kicker { font-size: 14px; font-weight: 600; color: #ffd12e; }
.side__title { font-size: clamp(30px, 4vw, 44px); line-height: 1.04; letter-spacing: -.04em; font-weight: 720; max-width: 13ch; }
.side .mark { color: #ffd12e; }
.side__list { display: grid; gap: 16px; max-width: 44ch; }
.side__list li { display: flex; gap: 12px; color: var(--side-muted); font-size: 15.5px; line-height: 1.45; }
.side__list b { color: var(--side-ink); font-weight: 620; }
.side__list .ic { width: 20px; height: 20px; margin-top: 1px; color: #ffd12e; }
.side__left { display: block; margin-top: 4px; color: #ffd12e; font-weight: 600; font-variant-numeric: tabular-nums; }
.side__foot { margin-top: auto; font-size: 13.5px; color: var(--side-muted); }
.side__foot a { text-decoration: none; }
.side__foot a:hover { color: var(--side-ink); }
.out main { display: grid; align-content: start; justify-items: center; padding: 8px 20px 0; }
.out main > * { width: 100%; max-width: 420px; }
.out .foot { width: 100%; max-width: 460px; margin: 0 auto; }
/* on a phone the form comes first, the panel after it */
@media (max-width: 899px) {
  .out .layout { display: flex; flex-direction: column; }
  .out .content { flex: 1; }
  .side { order: 2; gap: 18px; padding: 32px 20px 36px; }
  .brand--side { display: none; }
  .side__body { gap: 16px; }
  .side__title { font-size: 30px; }
  .side__foot { display: none; }
  .out .top { height: 64px; }
  .out main { padding-top: 12px; }
}
@media (min-width: 900px) {
  .out .layout { grid-template-columns: minmax(380px, 5fr) 7fr; }
  .side { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 36px 44px; gap: 0; }
  .side__body { margin-top: auto; margin-bottom: auto; }
  .out .top .brand { visibility: hidden; }
  .out main { align-content: center; padding-bottom: 24px; }
}

/* signed in: no panel; a bar with who's signed in, the account in cards */
.in .side { display: none; }
.in .top { width: 100%; max-width: 980px; margin: 0 auto; border-bottom: 1px solid var(--rule); }
.in main { max-width: 980px; margin: 0 auto; padding: 32px 20px 8px; }
.in .foot { width: 100%; max-width: 980px; margin: 0 auto; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who__email { color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; font-weight: 680; font-size: 15px; color: #1d1d1b; background: #ffd12e; }
@media (max-width: 560px) { .who__email { display: none; } }

/* ---- type ---- */
h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.06; letter-spacing: -.035em; font-weight: 720; text-wrap: balance; }
h2 { font-size: 18px; font-weight: 660; letter-spacing: -.015em; }
.lede { margin-top: 10px; color: var(--muted); font-size: 16.5px; text-wrap: pretty; }
.page-head { display: grid; gap: 6px; margin-bottom: 26px; }
.page-head .lede { margin-top: 0; }

/* ---- the form views ---- */
.panel { display: grid; gap: 18px; }
.panel > .icon-badge { margin-bottom: 4px; }
.icon-badge { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.icon-badge .ic { width: 26px; height: 26px; }
.icon-badge.danger { color: var(--danger); background: var(--danger-tint); }
.switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--tint); }
.switch button { min-height: 38px; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; box-shadow: none; }
.switch button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--card-edge); }
.social { display: grid; gap: 10px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-size: 14px; font-weight: 600; }
.field { position: relative; display: block; }
input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--rule-strong); background: var(--field); color: var(--ink); font: 400 16px var(--sans); transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--faint); }
input:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--rule-strong)); }
input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field input { padding-right: 48px; }
.peek { position: absolute; right: 4px; top: 4px; width: 40px; min-height: 40px; height: 40px; padding: 0; border-radius: 10px; background: transparent; color: var(--faint); box-shadow: none; }
.peek:hover { color: var(--ink); background: var(--tint); }
.hint { font-size: 13px; font-weight: 400; color: var(--faint); }
.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.fine { font-size: 13.5px; color: var(--faint); text-wrap: pretty; }

/* ---- buttons ---- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--btn); color: var(--btn-ink); font: 600 15.5px/1 var(--sans); cursor: pointer; text-decoration: none; transition: transform .12s, opacity .12s, background-color .12s; }
button:hover, .btn:hover { opacity: .92; }
button:active, .btn:active { transform: scale(.985); }
button.secondary, .btn.secondary { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
button.secondary:hover, .btn.secondary:hover { opacity: 1; background: color-mix(in srgb, var(--ink) 4%, var(--card)); }
button.quiet { min-height: 34px; padding: 0 2px; background: transparent; color: var(--muted); font-weight: 500; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); }
button.quiet:hover { color: var(--ink); text-decoration-color: currentColor; }
button.danger { background: var(--danger); color: #fff; }
button.small, .btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
button.wide, .btn.wide { width: 100%; }
button:disabled { opacity: .5; cursor: default; transform: none; }
.provider { min-height: 48px; font-weight: 600; }
.provider .ic-fill { width: 19px; height: 19px; }
.provider--google { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.provider--google:hover { opacity: 1; background: color-mix(in srgb, var(--ink) 4%, var(--card)); }
.provider--apple { background: #000; color: #fff; }
@media (prefers-color-scheme: dark) { .provider--apple { background: #fff; color: #000; } }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---- notes ---- */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--tint); font-size: 14.5px; }
.note .ic { width: 17px; height: 17px; margin-top: 2px; }
.note.good { color: var(--good); background: var(--good-tint); }
.note.bad { color: var(--danger); background: var(--danger-tint); }
.note.gold { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 13%, transparent); }

/* ---- the account ---- */
.grid { display: grid; gap: 16px; }
@media (min-width: 820px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid > .span { grid-column: 1 / -1; } }
.card { display: grid; align-content: start; gap: 16px; padding: 24px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow), 0 0 0 1px var(--card-edge); scroll-margin-top: 20px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__head h2 { display: flex; align-items: center; gap: 10px; }
.card__head h2 .ic { color: var(--faint); }
.card.danger h2, .card.danger h2 .ic { color: var(--danger); }
.big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.big b { font-size: 34px; font-weight: 720; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.big span { color: var(--muted); }
.meter { height: 10px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.meter > span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffd12e, #e8a400); }
.meter.full > span { background: var(--danger); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 620; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.badge .ic { width: 14px; height: 14px; }
.plans { display: grid; gap: 10px; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.plan > div { display: grid; gap: 2px; }
.plan b { font-weight: 650; }
.current { display: grid; gap: 4px; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.current b { font-size: 17px; }
.list { display: grid; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--rule); }
.list > li:first-child { border-top: 0; padding-top: 2px; }
.list .dev { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; color: var(--muted); background: var(--tint); }
.list .dev .ic { width: 20px; height: 20px; }
.list > li > div:nth-child(2) { display: grid; gap: 1px; flex: 1; min-width: 0; }
.list b { font-weight: 620; overflow-wrap: anywhere; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 620; vertical-align: 1px; color: var(--good); background: var(--good-tint); }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; font-family: var(--mono); letter-spacing: .04em; }
.code { display: flex; justify-content: center; gap: 8px; margin: 4px 0; }
.code span { display: grid; place-items: center; width: 44px; height: 56px; border-radius: 12px; font: 700 26px/1 var(--mono); background: var(--card); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.code i { align-self: center; width: 12px; height: 3px; border-radius: 2px; background: var(--rule-strong); }
@media (max-width: 420px) { .code span { width: 34px; height: 48px; font-size: 21px; } .card { padding: 20px; } }
