/* account.chrislacey.com — same look as chrislacey.com, built for the phone first. */

:root {
  --ink: #061a38; --paper: #f7f4ee; --paper-2: #efe9df; --card: #ffffff; --text: #0e1b2e; --muted: #5a6a80;
  --line: rgba(6, 26, 56, .1); --line-2: rgba(6, 26, 56, .18);
  --sky: #1e9bf0; --sky-soft: #d7efff; --coral: #ff6b57; --sun: #ffc23d; --mint: #2fbf8f; --grape: #7c5cff;
  --ok: #138a63; --ok-soft: #dcf5ea; --warn: #b4501f; --warn-soft: #ffe9dc; --err: #c2352b; --err-soft: #fde4e1;
  --bubble-in: #eceae4; --bubble-out: #1e9bf0;
  --radius: 18px; --shadow: 0 1px 2px rgba(6, 26, 56, .05), 0 8px 24px -14px rgba(6, 26, 56, .22);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --tabbar: 64px; --top: 56px;
  --page: 898px; /* the Tesla browser's width: pages are laid out for the car first */
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #050f22; --paper-2: #0b1a33; --card: #0e2143; --text: #eaf2ff; --muted: #9fb2cc;
    --line: rgba(234, 242, 255, .1); --line-2: rgba(234, 242, 255, .2); --sky-soft: #0f3563;
    --ok: #4fd6a6; --ok-soft: #0d3a2c; --warn: #ffb27a; --warn-soft: #3d2614; --err: #ff8a80; --err-soft: #3d1714;
    --bubble-in: #1a2f55; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #050f22; --paper-2: #0b1a33; --card: #0e2143; --text: #eaf2ff; --muted: #9fb2cc;
  --line: rgba(234, 242, 255, .1); --line-2: rgba(234, 242, 255, .2); --sky-soft: #0f3563;
  --ok: #4fd6a6; --ok-soft: #0d3a2c; --warn: #ffb27a; --warn-soft: #3d2614; --err: #ff8a80; --err-soft: #3d1714;
  --bubble-in: #1a2f55; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.015em; line-height: 1.15; margin: 0; }
h2 { font-size: 24px; } h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; } h4 { font-size: 16px; }
p { margin: 0 0 10px; } p:last-child { margin-bottom: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip, .sr { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 10px; }
.i { width: 22px; height: 22px; flex: none; } .i-sm { width: 16px; height: 16px; } .i-lg { width: 28px; height: 28px; }
.muted { color: var(--muted); } .small { font-size: 13.5px; } .center { text-align: center; display: block; } .right { text-align: right; }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sky); margin: 0 0 8px; }

/* ── Frame ──────────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  min-height: calc(var(--top) + var(--safe-t)); padding: var(--safe-t) 12px 0;
  background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-title { font-size: 19px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-back, .top-brand, .top-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; text-decoration: none; flex: none; }
.top-back:active, .top-btn:active { background: var(--paper-2); }
.top-btn { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .top-btn { background: #fff; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .top-btn { background: #fff; color: var(--ink); } }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 14px/1 var(--display); letter-spacing: -.04em; }
:root[data-theme="dark"] .brand-mark { background: var(--sky); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { background: var(--sky); } }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 22px; margin: 0 auto 14px; }

.page { width: min(var(--page), 100%); margin: 0 auto; padding: 14px 16px calc(var(--tabbar) + var(--safe-b) + 28px); display: flex; flex-direction: column; gap: 12px; }
.signed-out .page { padding-bottom: 40px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around;
  height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
  /* On a screen wider than a page, the tabs line up with the page above them. */
  padding-inline: max(0px, calc((100% - var(--page)) / 2));
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.tabbar a[aria-current="page"] { color: var(--sky); }
.tabbar .badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--coral); color: #fff; font: 700 11px/19px var(--body); text-align: center; }
.rail-brand { display: none !important; }
/* Tablet and car: bigger labels for a screen read at arm's length. */
@media (min-width: 700px) {
  .tabbar a { font-size: 13px; gap: 4px; }
  .tabbar .i { width: 24px; height: 24px; }
}

/* Left-hand rail: only a wide screen with a mouse. Touch screens keep the bottom tabs. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body.signed-in { padding-left: 220px; }
  .tabbar { top: 0; right: auto; width: 220px; height: auto; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 16px 12px; border-top: 0; border-right: 1px solid var(--line); }
  .tabbar a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 15px; }
  .tabbar a:hover { background: var(--paper-2); color: var(--text); }
  .tabbar a[aria-current="page"] { background: var(--sky-soft); }
  .tabbar .badge { position: static; margin-left: auto; }
  .rail-brand { display: flex !important; margin-bottom: 14px; font: 700 18px/1 var(--display) !important; color: var(--text) !important; }
  .top-brand { display: none; }
  .page { padding-bottom: 48px; }
}

/* Rotate notice: only on a phone held upright, only on pages that need width. */
.rotate-hint { display: none; }
@media (orientation: portrait) and (max-width: 700px) {
  .wants-landscape .rotate-hint { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 50; padding: calc(var(--safe-t) + 10px) 16px 10px; background: var(--sun); color: #3b2a00; font-weight: 600; font-size: 14.5px; }
  .wants-landscape .top { top: 44px; }
}

/* ── Building blocks ────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card.private { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.section-title { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 10px 2px 0; }
.flash { margin: 0; padding: 12px 14px; border-radius: 14px; font-weight: 500; background: var(--sky-soft); }
.flash[data-kind="ok"] { background: var(--ok-soft); color: var(--ok); }
.flash[data-kind="error"] { background: var(--err-soft); color: var(--err); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; background: var(--paper-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.link { color: var(--sky); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link.danger, .danger { color: var(--err); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); } .empty h2 { color: var(--text); font-size: 21px; margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

.btn {
  --bg: var(--ink); --fg: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 999px; background: var(--bg); color: var(--fg); font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn .i { width: 19px; height: 19px; }
.btn.ghost { --bg: transparent; --fg: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn.ok { --bg: var(--ok); } .btn.danger.ghost { --fg: var(--err); }
.btn.block { display: flex; width: 100%; } .btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }
:root[data-theme="dark"] .btn:not(.ghost):not(.ok) { --bg: #fff; --fg: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.ghost):not(.ok) { --bg: #fff; --fg: var(--ink); } }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }

/* Avatars */
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 15px/1 var(--display); color: #fff; letter-spacing: -.02em; }
.av-0 { background: #1e9bf0; } .av-1 { background: #ff6b57; } .av-2 { background: #2fbf8f; } .av-3 { background: #7c5cff; } .av-4 { background: #e4a11b; } .av-5 { background: #0b2753; }
.av-lg { width: 54px; height: 54px; font-size: 19px; } .av-xl { width: 72px; height: 72px; font-size: 25px; }

/* Lists of rows (inbox, people, menus) */
.list { list-style: none; margin: 0; padding: 4px 0; }
.list.card { padding: 4px 0; }
.list > li + li > .row { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; width: 100%; background: none; border: 0; text-align: left; cursor: pointer; position: relative; }
.row.static { cursor: default; }
.row:active:not(.static) { background: var(--paper-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.row-top strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.row-top time { flex: none; color: var(--muted); font-size: 13px; }
.row-top time.late { color: var(--err); font-weight: 600; }
.row-sub { color: var(--muted); font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row.is-new .row-top strong { font-weight: 750; }
.row.is-new .row-sub { color: var(--text); }
.row-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--paper-2); flex: none; }
.chev { color: var(--muted); width: 18px; height: 18px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sky); flex: none; }
.kind { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12.5px; vertical-align: 1px; }
.kind-text { color: var(--sky); } .kind-update { color: var(--grape); } .kind-form { color: var(--mint); } .kind-call { color: var(--coral); }

/* Chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line-2); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip b { background: var(--coral); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 12px; line-height: 19px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
:root[data-theme="dark"] .chip.on { background: #fff; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.on { background: #fff; color: var(--ink); } }
.filter summary { cursor: pointer; font-size: 14px; color: var(--muted); padding: 4px 2px; }
.filter .chips { margin-top: 8px; flex-wrap: wrap; }

/* Forms */
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-form { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
@media (min-width: 560px) { .grid-form { grid-template-columns: 1fr 1fr; } .grid-form .wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field > span:first-child { color: var(--muted); }
.field small { font-weight: 400; color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 13px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--paper);
  font-size: 16px; font-weight: 400; -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 25%, transparent); }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; min-height: 34px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--sky); flex: none; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.checks legend { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.pw { display: flex; gap: 8px; }
.pw-toggle { flex: none; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); font-weight: 600; font-size: 14px; cursor: pointer; }
.inline-add { display: flex; gap: 8px; margin-top: 10px; } .inline-add input, .inline-add select { flex: 1; }
.inline { display: inline; margin: 0; }
.x { border: 0; background: none; padding: 6px; margin-left: auto; color: var(--muted); cursor: pointer; border-radius: 8px; }
.x:active { background: var(--paper-2); color: var(--err); }
details.adder > summary, details.editcard > summary { cursor: pointer; list-style: none; }
details.adder > summary::-webkit-details-marker, details.editcard > summary::-webkit-details-marker { display: none; }
details.adder > summary { color: var(--sky); font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; margin-top: 4px; }
details.adder form + form { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
details.editcard > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.editcard > summary > span:first-child { display: flex; flex-direction: column; min-width: 0; }
details.editcard[open] > summary { margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }

/* Definition lists */
.dl { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 8px 14px; margin: 0; font-size: 15px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; overflow-wrap: anywhere; }
.dl.compact { font-size: 13.5px; gap: 3px 10px; margin-top: 6px; }
.mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mini li:last-child { border-bottom: 0; }

/* ── Pages ──────────────────────────────────────────────────────────────── */
.hello h2 { font-size: 28px; }
.inbox-cta { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.inbox-cta > span { flex: 1; display: flex; flex-direction: column; }
.inbox-cta small { color: var(--muted); }
.inbox-cta.has-new { background: var(--ink); color: #fff; border-color: var(--ink); }
.inbox-cta.has-new small { color: #b9c9e6; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-size: 12.5px; font-weight: 600; text-align: center; }
.quick-btn .i { color: var(--sky); }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tl:last-child { border-bottom: 0; }
.tl time { font: 600 13px/1.5 var(--mono); color: var(--muted); }
.tl p { color: var(--muted); font-size: 14px; margin: 2px 0 0; } .tl small { color: var(--muted); }
.tl.now { background: var(--sky-soft); margin: 0 -16px; padding-inline: 16px; border-radius: 12px; }
.tl.past { opacity: .55; }
.earlier summary { cursor: pointer; color: var(--muted); font-size: 14px; padding-bottom: 6px; }

.search { position: relative; }
.search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 42px !important; border-radius: 99px !important; background: var(--card) !important; }
.count { margin: 0 2px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.person-head { display: flex; align-items: center; gap: 14px; padding: 4px 2px; }
.person-head h2 { font-size: 24px; }
.person-head p { margin: 2px 0 0; }
.person-actions { display: flex; gap: 8px; }
.act { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 11px 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-size: 12.5px; font-weight: 600; color: var(--sky); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: 1; text-align: center; white-space: nowrap; padding: 9px 12px; border-radius: 11px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.tabs a[aria-current="page"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

.item-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.item-body { font-size: 16.5px; line-height: 1.55; white-space: normal; padding: 14px; background: var(--paper); border-radius: 14px; margin: 10px 0; overflow-wrap: anywhere; }
.more-info summary { cursor: pointer; color: var(--sky); font-weight: 600; font-size: 14.5px; margin: 8px 0; }
.done-bar { margin-top: 6px; }
audio { width: 100%; margin: 8px 0; }

/* Conversation */
.chat { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; }
.chat-day { text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 12px 0 4px; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 20px; background: var(--bubble-in); align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble p { margin: 0; overflow-wrap: anywhere; }
.bubble small { display: block; font-size: 11.5px; opacity: .7; margin-top: 3px; }
.bubble.out { align-self: flex-end; background: var(--bubble-out); color: #fff; border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
.bubble.auto { opacity: .7; }
.bubble.failed { background: var(--err-soft); color: var(--err); }
.composer { position: sticky; bottom: calc(var(--tabbar) + var(--safe-b) + 8px); background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; padding: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; z-index: 20; }
@media (min-width: 900px) and (hover: hover) and (pointer: fine) { .composer { bottom: 12px; } }
.composer-opts { display: flex; gap: 6px; }
.composer-opts label { flex: 1; min-width: 0; }
.composer-opts select { min-height: 34px; padding: 4px 28px 4px 10px; font-size: 13px; border-radius: 99px; background-color: var(--paper-2); border: 0; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { min-height: 42px; max-height: 180px; resize: none; border-radius: 20px; padding: 10px 14px; border-width: 1px; }
.send { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: var(--sky); color: #fff; display: grid; place-items: center; cursor: pointer; }
.send .i { width: 20px; height: 20px; }
[data-sms-meter] { padding: 0 10px; min-height: 1em; }

.tagrow { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 99px; background: var(--sky-soft); font-size: 13.5px; font-weight: 600; margin: 0; }
.tag button { border: 0; background: none; cursor: pointer; font-size: 17px; line-height: 1; padding: 0 5px; color: var(--muted); }
.history { list-style: none; margin: 0; display: flex; flex-direction: column; }
.history li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history p, .history h4 { margin: 6px 0 4px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 8px; }
.stat { background: var(--paper); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.card > .stat-row .stat { background: var(--paper); }
.page > .stat-row .stat { background: var(--card); border: 1px solid var(--line); }
.stat strong { font: 700 24px/1.1 var(--display); } .stat span { color: var(--muted); font-size: 13px; }
.bars { width: 100%; height: auto; margin-top: 10px; }
.bars rect { fill: var(--sky); } .bars .axis { stroke: var(--line-2); } .bars .tick { fill: var(--muted); font: 11px var(--body); } .bars .end { text-anchor: end; }
.toplist { margin: 6px 0 0; padding-left: 22px; font-size: 14.5px; }
.toplist li { padding: 5px 0; } .toplist li span { overflow-wrap: anywhere; } .toplist li b { float: right; margin-left: 10px; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.trend { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.trend strong { font: 700 20px/1.1 var(--display); }
.spark { width: 100%; height: 34px; } .spark rect { fill: var(--sky); }
.records { list-style: none; margin: 0; padding: 0; } .records li { padding: 10px 0; border-bottom: 1px solid var(--line); } .records li:last-child { border-bottom: 0; }

.me-card { display: flex; align-items: center; gap: 14px; }
.me-card div { display: flex; flex-direction: column; }
.steps { padding-left: 20px; margin: 6px 0 0; } .steps li { margin: 4px 0; }
.push-step { background: var(--paper); border-radius: 14px; padding: 12px 14px; }
.cap { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cap > div:first-child { display: flex; flex-direction: column; }
.seg { display: flex; background: var(--paper-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg label { flex: 1; } .seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 7px 4px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.seg input[value="deny"]:checked + span { color: var(--err); }
.seg input[value="grant"]:checked + span { color: var(--ok); }
.seg input:disabled + span { opacity: .4; cursor: default; }
.seg input:focus-visible + span { outline: 2px solid var(--sky); }

/* Sign-in pages */
.auth .page { min-height: 100vh; justify-content: center; max-width: 420px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.auth-head { text-align: center; } .auth-head h2 { font-size: 27px; } .auth-head p { margin-top: 6px; }
.auth-foot { text-align: center; } .auth-foot a { color: var(--muted); text-decoration: none; font-size: 14px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.cap .pill { align-self: flex-start; margin: 3px 0; }
.row-sub .kind { margin-right: 4px; }
.page > .pill { align-self: flex-start; }
.tl small { display: block; }

/* ── My day (home) ──────────────────────────────────────────────────────── */
.day-top h2 { font-size: 26px; flex: 1; }
.day-title { display: flex; align-items: center; gap: 6px; }
.day-nav { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--card); flex: none; text-decoration: none; }
.day-nav.fwd .i { transform: rotate(180deg); }
.day-headline { color: var(--muted); margin: 6px 0 0; font-size: 15.5px; }
.nownext { display: grid; gap: 10px; }
@media (min-width: 560px) { .nownext { grid-template-columns: 1fr 1fr; } .nownext .nn:only-child { grid-column: 1 / -1; } }
.nn { border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); --accent: var(--sky); border-left: 6px solid var(--accent); }
.nn.now { background: var(--ink); color: #fff; border-color: var(--ink); border-left-color: var(--accent); }
.nn.now small, .nn.now .nn-label { color: #b9c9e6; }
.nn-label { font: 600 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nn strong { font: 700 21px/1.2 var(--display); letter-spacing: -.01em; }
.nn small { color: var(--muted); font-size: 14px; }
.nn .btn { align-self: flex-start; margin-top: 8px; }
.nn.now .btn { --bg: var(--sky); --fg: #fff; }
.nn.free { --accent: var(--mint); }
[data-kind="family"] { --accent: var(--coral); } [data-kind="work"] { --accent: var(--sky); } [data-kind="health"] { --accent: var(--mint); }
[data-kind="event"] { --accent: var(--grape); } [data-kind="travel"] { --accent: var(--sun); } [data-kind="admin"] { --accent: #8a97a8; }
[data-kind="open"], [data-kind="held"] { --accent: var(--line-2); }
.day-card { padding-top: 8px; }
.day-card .tl { grid-template-columns: 66px 14px 1fr; gap: 10px; padding: 12px 0; align-items: start; }
.day-card .tl time { font-size: 13px; line-height: 1.35; }
.day-card .tl time small { display: block; color: var(--muted); opacity: .75; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent, var(--sky)); margin-top: 5px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, var(--sky)) 22%, transparent); }
.day-card .tl strong { font-weight: 650; font-size: 16px; }
.day-card .tl .join { margin-top: 8px; }
.day-card .tl.now { background: var(--sky-soft); margin: 0 -16px; padding-inline: 16px; border-radius: 14px; border-bottom-color: transparent; }
.day-card .tl.next .tl-dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent, var(--sky)) 12%, transparent); } }
.now-pill { background: var(--sky); color: #fff; }
.day-summary { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.day-src { margin-top: 10px; }
.empty.compact { padding: 24px 8px; } .empty.compact h2 { font-size: 18px; }
.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.glance-item { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.glance-item .i { color: var(--muted); width: 19px; height: 19px; }
.glance-item strong { font: 700 22px/1.1 var(--display); margin-top: 4px; }
.glance-item span { font-size: 12.5px; color: var(--muted); line-height: 1.25; }
.glance-item.hot { background: var(--ink); color: #fff; border-color: var(--ink); } .glance-item.hot span, .glance-item.hot .i { color: #b9c9e6; }
.glance-item.warm strong { color: var(--warn); }

/* ---------------------------------------------------------------- travel -- */
.section-label { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 4px 8px; }
.trip-state[data-state="soon"], .trip-state[data-state="now"] { color: var(--sky); font-weight: 600; }
.trip-hero { --accent: var(--sun); border-top: 6px solid var(--accent); }
.trip-hero h2 { font-size: 28px; margin: 2px 0 4px; }
.trip-hero .eyebrow { display: flex; align-items: center; gap: 6px; color: var(--text); }
.trip-hero[data-state="soon"] .eyebrow, .trip-hero[data-state="now"] .eyebrow { color: var(--sky); }
.trip-dates { font-weight: 600; margin: 0 0 2px; }
.trip-next { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--ink); color: #fff; text-decoration: none; }
.trip-next .nn-label { opacity: .75; font: 600 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.trip-next small { opacity: .85; }
.trip-facts { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 560px) { .trip-facts { grid-template-columns: 1fr 1fr; } }
.trip-facts > div { background: var(--paper); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.trip-facts span { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.trip-summary { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.conf > summary { cursor: pointer; color: var(--sky); font-weight: 600; font-size: 14px; }
.conf code { display: inline-block; margin-top: 4px; font: 700 17px/1.2 var(--mono); letter-spacing: .08em; user-select: all; }
.trip-day { margin-top: 18px; scroll-margin-top: 70px; }
.trip-day h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 8px; font-size: 17px; }
.trip-day h3 small { font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.trip-day.today h3 small { color: var(--sky); }
.trip-day.past { opacity: .6; }
.trip-free { margin: 0 4px; }
.trip-items { list-style: none; margin: 0; padding: 4px 16px; }
.trip-item { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trip-item:last-child { border-bottom: 0; }
.trip-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent, var(--sky)) 18%, transparent); color: var(--text); }
.trip-ic .i { width: 19px; height: 19px; }
.trip-body { min-width: 0; }
.trip-head strong { font-weight: 650; font-size: 16px; }
.route { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; font: 700 20px/1 var(--mono); letter-spacing: .04em; }
.route .i { color: var(--muted); }
.trip-time { margin: 3px 0 0; font-weight: 600; font-size: 14.5px; }
.trip-meta { margin: 3px 0 0; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.trip-detail { margin: 6px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.trip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.trip-actions:empty { display: none; }
.trip-edit { margin-top: 8px; }
.trip-edit > summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.trip-edit .center { margin-top: 10px; }
.trip-item.done strong { text-decoration: line-through; color: var(--muted); }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.todo-list li:last-child { border-bottom: 0; }
.todo-list form { margin: 0; }
.todo-list small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.tick { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line-2); background: var(--card); display: grid; place-items: center; cursor: pointer; padding: 0; color: transparent; }
.todo-list li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.todo-list li.done strong { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.trip-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 14px 16px; border-radius: 18px; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--sun); box-shadow: var(--shadow); }
.trip-banner .row-main strong { font-size: 16px; }
.trip-banner[data-state="soon"] .row-sub, .trip-banner[data-state="now"] .row-sub { color: var(--sky); font-weight: 600; }
