/* Event Agent. Phone first: one column, a floating tab bar, sheets for details. Wide screens: a sidebar and a
   wider column (the end of this file). See docs/DESIGN.md. */
:root {
  --bg: #f5f4f0; --surface: #fff; --surface-2: #ecebe6; --ink: #111214; --muted: #6b6e76; --faint: #9b9da4; --line: #e6e4de;
  --primary: #111214; --on-primary: #fff; --accent: var(--ink); --danger: #c62828; --on-danger: #fff;
  --going: #1f7a46; --going-bg: #e1f3e8; --wait: #8f5300; --wait-bg: #fcefd5; --invited: #0f6f66; --invited-bg: #dcf1ee;
  --host: #ad2468; --host-bg: #fbe3ef; --pending: #2a5cb3; --pending-bg: #e2ebfb; --needs: #c2410c; --needs-bg: #ffecd8;
  --shadow: 0 1px 2px rgba(17, 18, 20, .04), 0 10px 30px rgba(17, 18, 20, .08);
  --radius: 18px; --col: 560px; --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f11; --surface: #18191c; --surface-2: #232428; --ink: #f2f2f3; --muted: #a0a3aa; --faint: #70737a; --line: #2a2b30;
    --primary: #f2f2f3; --on-primary: #111214; --danger: #ff7b72; --on-danger: #111214;
    --going: #6fd49a; --going-bg: #16301f; --wait: #f2b765; --wait-bg: #33260f; --invited: #6fd6c8; --invited-bg: #12302c;
    --host: #f59ac6; --host-bg: #3a1a2a; --pending: #8fb4ff; --pending-bg: #172440; --needs: #ffa66b; --needs-bg: #3a2010;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
       font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
main { max-width: var(--col); margin: 0 auto; padding: calc(8px + var(--safe-t)) 16px calc(var(--tabbar) + 40px + var(--safe-b)); }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .5; cursor: default; }
h1 { font-size: 32px; line-height: 1.12; letter-spacing: -.025em; font-weight: 750; margin: 6px 0 4px; }
h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.015em; margin: 0 0 6px; }
h3 { font-size: 17px; margin: 0 0 8px; }
.sub { color: var(--muted); font-size: 15px; margin: 0; }
.fine { color: var(--muted); font-size: 13px; margin: 10px 4px; }
.ok { color: var(--going); font-weight: 600; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }
svg { display: block; flex: none; }
i[data-icon] { display: inline-flex; }

/* ---------- controls ---------- */
input, textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
                          border-radius: 14px; padding: 0 16px; height: 52px; outline: none; }
textarea { height: auto; padding: 14px 16px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); }
.primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; margin-top: 12px;
           border-radius: 999px; background: var(--primary); color: var(--on-primary); font-weight: 650; font-size: 16px; }
.primary.danger { background: var(--danger); color: var(--on-danger); }
.quiet { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin-top: 8px;
         border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.quiet.danger { color: var(--danger); }
.text { display: block; margin: 10px auto 0; padding: 10px; color: var(--muted); font-size: 15px; }
.pill { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--primary); color: var(--on-primary);
        font-size: 14px; font-weight: 650; white-space: nowrap; }
.pill.soft { background: var(--surface-2); color: var(--ink); }
.pill.warn { background: var(--needs-bg); color: var(--needs); }
.icon { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface);
        box-shadow: var(--shadow); text-decoration: none; }
.icon.spin svg { animation: spin 1s linear infinite; }
.stack > * + * { margin-top: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
        font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.chip.warn { display: inline-flex; align-items: center; gap: 6px; background: var(--needs-bg); color: var(--needs); border-color: transparent; font-weight: 600; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips.wrap .chip { height: 40px; font-size: 15px; }
.row-buttons { display: flex; gap: 8px; margin-top: 10px; }
.row-buttons > * { flex: 1; margin-top: 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.focus-card .chips { padding-bottom: 0; }
.focus-card .sub { font-size: 14px; margin-bottom: 12px; }
.focus-card .fine { margin: 10px 0 0; }
.focus-card .text { margin-top: 4px; padding-bottom: 0; }
.chip.focus { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.chip.focus svg { color: var(--muted); }
.focus-form { display: flex; gap: 8px; align-items: center; }
.focus-form input { height: 44px; flex: 1; min-width: 0; }
.focus-form .pill { height: 44px; }
.more-link { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.row-item.taste-row { display: grid; grid-template-columns: 110px 1fr 40px; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.icon.flat { box-shadow: none; background: transparent; color: var(--muted); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 30px; padding: 0; border-radius: 999px;
          background: var(--surface-2); border: 0; position: relative; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
                 background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch:checked { background: var(--going); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#feed-more, #ask-more { margin-bottom: 8px; }
#welcome h1 { margin-top: 4px; }
#welcome .section { margin-top: 22px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink);
           animation: spin .9s linear infinite; margin: 0 auto 12px; }
.spinner.small { display: block; width: 18px; height: 18px; border-width: 2px; margin: 0; }  /* a row that's still working */
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- page header ---------- */
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 8px 0 16px; }
.tools { display: flex; gap: 8px; margin-top: 8px; }
/* where you are, beside Search: filled in once a place is set */
#place.set { background: var(--primary); color: var(--on-primary); }
.chip.with-icon { display: inline-flex; align-items: center; gap: 6px; }
#sheet-body[data-sheet="place"] .seg { margin-bottom: 4px; }
.section { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 26px 4px 8px; }
#act-title { font-size: 25px; }
.eyebrow { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 0; }

/* ---------- sign in ---------- */
.signin { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; justify-content: center; padding-bottom: 40px; }
.signin .hero { margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand img { display: block; }
a.brand { text-decoration: none; margin-top: 16px; }
.doc { padding-bottom: 48px; }
.doc h2 { margin-top: 28px; }
.doc p, .doc li { line-height: 1.55; }
.doc li + li { margin-top: 6px; }
.signin h1 { font-size: 36px; }
.signin .sub { margin-top: 10px; }
.code { text-align: center; font-size: 28px; letter-spacing: .5em; font-variant-numeric: tabular-nums; height: 64px; padding-left: calc(16px + .5em); }

/* ---------- segmented control ---------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; margin-bottom: 8px; }
.seg button { height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 650; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
/* icon-only: as tall as a chip (28 + 3 + 3), so it sits in a chip row */
.seg.icons button { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; }
/* Discover: the filter chips and the order in one row. The chips are a size smaller here so all four fit beside the order on a
   375px phone; narrower than that they scroll, faded at the edge while there's more (.more, set in app.js) */
.filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.filter-row .chips { flex: 1; min-width: 0; padding: 2px 0; gap: 6px; }
.filter-row .chip { padding: 0 10px; font-size: 13px; }
.filter-row .chips.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
                          mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); }
.filter-row .seg { flex: none; margin: 0 0 0 auto; }
@media (min-width: 700px) {
  .filter-row .chips { gap: 8px; }
  .filter-row .chip { padding: 0 14px; font-size: 14px; }
}
/* a count in a segment: neutral, or teal on Invites (class "count invited") */
.count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--line);
         color: var(--ink); font-size: 12px; line-height: 20px; }

/* ---------- agenda ---------- */
.day { margin: 22px 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.day span { color: var(--muted); font-weight: 500; }
#feed > .day:first-child, #results > .day:first-child { margin-top: 6px; }
.day.off { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
.ev { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; width: 100%; padding: 12px 0; text-align: left; align-items: start; }
.ev + .ev { border-top: 1px solid var(--line); }
.tile { --h: 20; position: relative; flex: none; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
        color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -.02em;
        background: linear-gradient(140deg, hsl(var(--h) 72% 62%), hsl(calc(var(--h) + 40) 66% 44%)); }
.tile.big { width: 72px; height: 72px; font-size: 24px; }
/* a site's app icon: white behind it so Meetup's and Eventbrite's see-through marks read as icons in dark mode too; the ring keeps
   Luma's white icon off the page. No overflow: hidden on the tile, or the status pill below it gets cut off. */
.site { background: #fff; }
.site img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; box-shadow: 0 0 0 1px var(--line); }
.st { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 700;
      padding: 2px 8px; border-radius: 999px; border: 2px solid var(--bg); }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.going { background: var(--going-bg); color: var(--going); }
.host { background: var(--host-bg); color: var(--host); }
.pending { background: var(--pending-bg); color: var(--pending); }
.wait { background: var(--wait-bg); color: var(--wait); }
.invited { background: var(--invited-bg); color: var(--invited); }
.needs { background: var(--needs-bg); color: var(--needs); }
.ev .src { font-size: 13px; color: var(--muted); }
.ev .src .copies { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11.5px;
                   font-weight: 700; line-height: 18px; background: var(--surface-2); color: var(--muted); }  /* one event listed N times */
.sheet .fine.copies { margin: 12px 0 0; }
.ev .t { font-weight: 650; font-size: 16.5px; line-height: 1.25; margin: 2px 0 5px; letter-spacing: -.01em; }
.m { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-top: 2px; }
.m span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* how many are going and what it costs: what a site says in ink, our estimate muted, dashed and tagged */
.m.nums { flex-wrap: wrap; gap: 2px 14px; }
.m.nums .num { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); overflow: visible; }
.m.nums .num.est { color: var(--muted); }
.m.nums .num.est .v { border-bottom: 1px dashed var(--faint); }
.m .est-tag { font-size: 11px; font-weight: 700; line-height: 16px; padding: 0 6px; border-radius: 999px;
              border: 1px dashed var(--faint); color: var(--muted); overflow: visible; }
.sheet .fine.src-note { margin: 2px 0 6px 21px; }
.match { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
         background: var(--going-bg); color: var(--going); }
.match.mid { background: var(--surface-2); color: var(--muted); }
.match.new { background: var(--surface-2); color: var(--ink); }
.why { font-size: 14px; color: var(--muted); margin-top: 4px; }
.empty { text-align: center; padding: 40px 12px; }
.empty .glyph { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; background: var(--surface-2);
                display: grid; place-items: center; color: var(--muted); }
.empty .primary { max-width: 280px; margin: 18px auto 0; }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: var(--shadow); }
.card.soft { box-shadow: none; border: 1px solid var(--line); background: transparent; }
.card.warn { background: var(--wait-bg); box-shadow: none; }
.card.warn h3 { color: var(--wait); }
.label { font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.facts { margin: 0; padding-left: 18px; color: var(--ink); font-size: 15px; }
.review-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.review-item + .review-item { border-top: 1px solid var(--line); }
.review-item .chips { padding: 0; flex: none; }
.clash { font-size: 14px; }
.clash + .clash { margin-top: 8px; }
/* a card that folds: the summary is its heading and a chevron that turns when open */
.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary > h3, .fold > summary > .label { margin: 0; }
.fold > summary .chev { flex: none; transition: transform .15s; }
.fold[open] > summary { margin-bottom: 10px; }
.fold[open] > summary .chev { transform: rotate(90deg); }
.card.warn .chev { color: var(--wait); }
.fold-link { display: inline-block; margin-top: 10px; }
/* Discover: "What we've learned about you" is a slim line under the filters, not a card; open, the facts follow under it */
#learned-box { border: 0; border-radius: 0; padding: 0 2px; margin: 0 0 4px; }
#learned-box > summary { justify-content: flex-start; gap: 2px; min-height: 36px; cursor: pointer; }
#learned-box[open] > summary { margin-bottom: 4px; }
#learned-box[open] { padding-bottom: 8px; }

/* updates on your events (updates.py): My week's card and row line, and the event sheet's section */
.card.news h3 { margin: 0 0 6px; }
.news-item { display: block; width: 100%; text-align: left; padding: 10px 0; color: var(--ink); }
.news-item + .news-item { border-top: 1px solid var(--line); }
.news-item .sub { font-size: 13px; }
.news-item .sub b { color: var(--ink); font-weight: 650; }
.news-line { font-size: 15px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .unread-line { color: var(--accent); font-weight: 600; }
.updates { margin: 18px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.updates h3 { margin: 0 0 4px; font-size: 17px; }
.upd { padding: 10px 0; }
.upd + .upd { border-top: 1px solid var(--line); }
.upd-top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.upd-top .when { color: var(--muted); margin-left: auto; flex: none; }
.upd.unread .upd-top b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%;
                                 background: var(--accent); vertical-align: 1px; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink); }
.upd-body { font-size: 15px; margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.upd-body a { color: var(--accent); font-weight: 600; }
.upd-body.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.upd .more-link { display: inline-block; margin: 4px 0 0; padding: 0; }

/* ---------- discover ---------- */
.intent { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.focus-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 4px 10px; font-size: 14px; color: var(--muted); }
.focus-bar b { color: var(--ink); font-weight: 600; }
.intent .status { background: var(--surface-2); color: var(--ink); font-weight: 600; }
#discover { padding-bottom: 140px; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + 22px + var(--safe-b)); z-index: 5;
            max-width: var(--col); margin: 0 auto; padding: 0 16px; }
.composer-bar { display: flex; align-items: center; gap: 8px; }
.composer-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
                border-radius: 999px; padding: 5px 5px 5px 18px; box-shadow: var(--shadow); }
.composer-row input { border: 0; height: 44px; padding: 0; background: transparent; border-radius: 0; }
.send { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); }
.composer-reset { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
/* The agent on a phone or tablet: Search at the top of Discover opens the composer in the tab bar's place; closing it
   brings the tab bar back. From 960px the composer stays open under the column, beside the sidebar, so Search hides. */
.composer-close { display: none; }
@media (min-width: 960px) { #ask-open { display: none; } }
@media not all and (min-width: 960px) {
  .composer-close { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center;
                    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--muted); }
  body:not([data-agent="open"]) .composer, body[data-agent="open"] .tabbar { display: none; }
  body[data-agent="open"] .composer { bottom: calc(12px + var(--safe-b)); animation: up .2s ease-out; }
}
.skeleton { height: 76px; border-radius: 16px; background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2));
            background-size: 200% 100%; animation: shimmer 1.2s infinite; margin: 12px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- grouped rows (sites, profile) ---------- */
.group { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.group > * + * { border-top: 1px solid var(--line); }
.group textarea { border: 0; border-radius: 0; }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px;
            padding: 12px 16px; text-align: left; text-decoration: none; }
.row-item .who { flex: 1; min-width: 0; }
.row-item b { font-weight: 650; }
.row-item.danger { color: var(--danger); font-weight: 600; }
.row-item span.sub { display: block; font-size: 14px; }  /* a two-line row that's a button (spans: a button can't hold divs) */
/* A followed site's sheet: what you can do with it sits above its events (the list can be long), then the words for
   the kind of events you want from it */
.site-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.site-acts .pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; text-decoration: none; }
.site-acts .pill.danger { color: var(--danger); }
.want-form .section { display: block; }
.want-row { display: flex; gap: 8px; align-items: center; }
.want-row input { flex: 1; min-width: 0; height: 48px; }
.want-row .pill { height: 44px; }

/* Discover, right after the quick start: what's being read, then what was learned (app.js renderReading) */
.reading h3 { margin: 0; }
.reading .label-row { align-items: center; }
.reading-row { margin-top: 10px; font-size: 15px; }
.reading-row .sub { font-size: 14px; text-align: right; }
.reading .facts { margin-top: 10px; }
.welcome-group { margin-top: 16px; }

/* Add a site: a short conversation in a sheet (app.js addSite). The agent's words on the left, yours on the right in
   the primary fill; cards for what it found; one-tap answers under them. */
.chat { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 12px; min-height: 180px; }
.bubble { align-self: flex-start; max-width: 88%; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--surface-2);
          overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--primary); color: var(--on-primary); }
.bubble.wait { color: var(--muted); }
.chat-card { align-self: stretch; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.chat-card .head { margin-bottom: 10px; }
.chat-card .head > div { flex: 1; min-width: 0; }
.chat-card .head b { display: block; font-weight: 650; }
.chat-card p { margin: 8px 0 0; font-size: 15px; }
.chat-card .fine { margin: 8px 0 0; }
.chat-card .bar { margin: 12px 0 4px; }
.chat-card .bar > span { background: var(--ink); }
.chat-card .label-row { align-items: center; }
.chat-card .sample { margin: 12px 0 0; }
.chat .row-buttons .pill { height: 44px; font-size: 15px; }
.chat > .row-buttons { margin-top: 0; }
.chat-card .steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; }
.steps .mark { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.steps .done .mark { background: var(--going-bg); color: var(--going); }
.steps .now .mark { border: 2px solid var(--pending); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .steps .now .mark { animation: none; } }
.status.pending { background: var(--pending-bg); color: var(--pending); }
.status.going { background: var(--going-bg); color: var(--going); }
.status.needs { background: var(--needs-bg); color: var(--needs); white-space: nowrap; }
.chat-form { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 10px 0 2px; background: var(--surface); }
.chat-form input { flex: 1; min-width: 0; height: 48px; border-radius: 999px; }
.chat-form .send { width: 48px; height: 48px; }

.sheet .choice { margin: 14px 0 4px; background: var(--surface-2); box-shadow: none; }
.chev { color: var(--faint); }
.logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
/* sites you follow: their own icon (served by us), or initials on a color from the name like an event tile */
.followed-logo:not(.site) { --h: 20; font-size: 15px; background: linear-gradient(140deg, hsl(var(--h) 72% 62%), hsl(calc(var(--h) + 40) 66% 44%)); }
.followed-logo img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; box-shadow: 0 0 0 1px var(--line); }
.add-tile { background: var(--surface-2); color: var(--ink); }
.looking { display: grid; justify-items: center; gap: 4px; padding: 24px 0 12px; text-align: center; }
.sheet .sample { margin: 10px 0 4px; background: var(--surface-2); box-shadow: none; }
.sheet .sample .row-item { min-height: 0; }
.sheet .sample .sub { font-size: 14px; }

/* ---------- sync: where reading your events stands, and its controls ---------- */
.status-line { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 0; padding: 4px 0; color: var(--muted);
               font-size: 15px; text-align: left; }
.status-line svg { color: var(--faint); flex: none; }
.status-line.warn, .sub.warn { color: var(--needs); }
.mini-spin { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink);
             animation: spin .9s linear infinite; }
.sync-tile { background: var(--surface-2); color: var(--ink); }
.sync-tile.spin svg { animation: spin 1s linear infinite; }
.sync-card { margin: 16px 0 4px; background: var(--surface-2); box-shadow: none; }
.sync-glyph { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
              background: var(--surface); color: var(--muted); }
.sync-glyph.ok { background: var(--going-bg); color: var(--going); }
.sync-glyph.bad { background: var(--needs-bg); color: var(--needs); }
.sync-glyph .spinner { width: 20px; height: 20px; margin: 0; border-width: 2.5px; }
.sync-glyph.none { display: none; }
.sync-glyph.stop { color: var(--faint); }
/* sync history, which the Sync sheet's status card opens: Sync › History › one sync */
.sheet-back { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 10px -6px; padding: 4px 6px; color: var(--muted);
              font-size: 15px; font-weight: 600; }
.hist { background: var(--surface-2); box-shadow: none; }
.hist .row-item { padding: 11px 14px; }
.hist + .hist, .far + .hist, .fine + .hist { margin-top: 12px; }
.hist .sync-glyph { width: 32px; height: 32px; }
#sheet-body[data-sheet^="sync-"] .day { font-size: 15px; margin: 18px 4px 8px; }
.run-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 6px; }
.run-head h2 { margin: 0; font-size: 20px; }
.run-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; margin: 14px 2px 0; }
.run-meta dt { color: var(--muted); }
.run-meta dd { margin: 0; font-variant-numeric: tabular-nums; }
.logo.sm { width: 30px; height: 30px; border-radius: 8px; }
.site-end { flex: none; }
.site-end.ok { color: var(--going); }
.site-end.bad { color: var(--needs); }
.site-end.off { color: var(--faint); }
.run-details { padding: 0 14px 12px 56px; }
.group > .run-details:only-child { padding: 12px 14px; }
.run-details summary { font-size: 13px; font-weight: 650; color: var(--muted); cursor: pointer; }
.raw { display: block; margin-top: 6px; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface);
       border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.far { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; background: var(--needs-bg); color: var(--needs);
       border-radius: 14px; padding: 10px 12px; margin: 14px 0 0; }
.far svg { margin-top: 1px; }
.timeline { list-style: none; margin: 0; padding: 12px 14px; }
.timeline li { display: grid; grid-template-columns: auto 10px 1fr; gap: 10px; font-size: 13.5px; padding: 3px 0; align-items: start; }
.timeline .at { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-top: 6px; }
.timeline .dot.ok { background: var(--going); }
.timeline .dot.bad { background: var(--needs); }
.timeline .more { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
                  color: var(--muted); font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.timeline .more.same { font-family: inherit; }
/* a radio drawn like iOS settings' choices: a ring, filled when chosen */
.radio { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; padding: 0;
         border-radius: 50%; border: 2px solid var(--faint); background: var(--surface); cursor: pointer; }
.radio:checked { border: 7px solid var(--ink); }
.radio:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label.row-item { cursor: pointer; }
/* the Week tab while a sync runs: a small spinning ring on the icon's corner */
.tabbar a i { position: relative; display: grid; }
.tabbar a.syncing i::after { content: ""; position: absolute; top: -3px; right: -6px; width: 9px; height: 9px; border-radius: 50%;
                             border: 2px solid var(--line); border-top-color: var(--accent); background: var(--surface);
                             animation: spin .9s linear infinite; }
.field { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 52px; margin: 0; font-weight: 500; }
.field span { width: 110px; flex: none; color: var(--ink); font-size: 15px; }
.field input { border: 0; border-radius: 0; padding: 0; height: 50px; background: transparent; text-align: right; color: var(--muted); }
.field input:focus { color: var(--ink); }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; z-index: 10; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); display: flex; gap: 2px;
          padding: 5px; border-radius: 999px; border: 1px solid var(--line); box-shadow: var(--shadow);
          background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.tabbar a { width: min(72px, calc((100vw - 40px) / 5)); height: 52px; border-radius: 999px; display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted);
            text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tabbar a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.tabbar .side-brand { display: none; }
body[data-view="action"] .tabbar, body[data-view="connect"] .tabbar { display: none; }  /* full-screen views on a phone */

/* ---------- the cloud browser (connect, needs you) ---------- */
.browser { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column;
           padding: var(--safe-t) 0 var(--safe-b); max-width: none; }
.browser-bar { display: grid; grid-template-columns: 88px 1fr 88px; align-items: center; gap: 8px; padding: 8px 12px;
               max-width: 900px; width: 100%; margin: 0 auto; }  /* both sides as wide as two buttons: the address stays centred */
.bar-end { display: flex; gap: 8px; justify-content: flex-end; }
.browser-bar .icon { box-shadow: none; background: var(--surface-2); }
.addr { text-align: center; min-width: 0; }
.addr > span { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; font-size: 15px; }
.addr small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner { margin: 0 12px 8px; padding: 10px 14px; border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 14px;
          max-width: 876px; align-self: center; width: calc(100% - 24px); }
.banner.go { color: var(--ink); font-weight: 600; }
.stage { position: relative; flex: 1; min-height: 0; margin: 0 8px 8px; max-width: 900px; width: calc(100% - 16px); align-self: center; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 16px; background: #000; }
.stage-wait, .stage-done { position: absolute; inset: 0; border-radius: 16px; background: var(--surface); display: flex;
                           flex-direction: column; align-items: center; justify-content: center; text-align: center;
                           color: var(--muted); padding: 24px; }
.stage-done h2 { color: var(--ink); margin-top: 16px; }
.stage-done .primary, .stage-wait .primary { max-width: 320px; margin-top: 24px; }
#connect-meanwhile .primary { display: block; margin: 20px auto 4px; }  /* "Back to People" while connections are read */
.bigcheck { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--going-bg); color: var(--going); }
.bigcheck svg { width: 38px; height: 38px; }
.bigcheck.bad { background: var(--needs-bg); color: var(--needs); }
/* the agent's question while it signs you in: near the top, so a phone's keyboard doesn't cover it */
.stage-ask { position: absolute; inset: 0; border-radius: 16px; background: var(--surface); overflow: auto;
             display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 24px 24px; }
.stage-ask > :not(.ask-icon) { width: 100%; max-width: 360px; }
.stage-ask .sub { margin-bottom: 18px; }
.ask-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2);
            margin-bottom: 14px; }
.ask-error { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--needs-bg); color: var(--needs);
             font-size: 14px; font-weight: 600; }
.code-input { text-align: center; font-size: 26px !important; letter-spacing: .3em; font-variant-numeric: tabular-nums; }

/* ---------- RSVP progress ---------- */
.plan { list-style: none; margin: 22px 0 8px; padding: 18px 16px 0; background: var(--surface); border-radius: var(--radius);
        box-shadow: var(--shadow); }
.plan:empty { display: none; }  /* cleared before the first step comes in */
.plan li { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 14px; padding: 0 0 22px; }
.plan li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.plan li.done:not(:last-child)::before { background: var(--ink); }
.dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: var(--surface); }
.done > .dot { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.now > .dot { border-color: var(--ink); border-top-color: transparent; animation: spin 1s linear infinite; }
.needs-you > .dot { background: var(--needs); border-color: var(--needs); color: var(--bg); }
.fail > .dot { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.plan b { display: block; font-weight: 600; line-height: 26px; }
.plan li:not(.done):not(.now):not(.needs-you):not(.fail) b { color: var(--muted); }
.plan small { display: block; color: var(--muted); font-size: 14px; }
.plan .pill { margin-top: 8px; }
.result { text-align: center; padding: 8px 0 4px; }
.result .bigcheck { margin: 0 auto 14px; }
.result .sub { margin-bottom: 4px; }
#act-steps { margin: 10px 0 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
#act-steps li { margin: 6px 0; }
#act-steps img { display: block; max-width: 100%; border-radius: 10px; margin-top: 6px; border: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
#act-fields label:not(.check) { display: block; font-weight: 600; margin: 14px 0 6px; }

/* ---------- sheet ---------- */
.sheet { border: 0; padding: 0; width: 100%; max-width: var(--col); max-height: 88dvh; margin: auto auto 0; overflow: auto;
         border-radius: 26px 26px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sheet[open] { animation: up .22s ease-out; }
.sheet::backdrop { background: rgba(10, 10, 12, .38); }
#sheet-body { padding: 0 20px calc(22px + var(--safe-b)); }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 16px; }
.sheet .head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.sheet .head h2 { margin: 0 0 6px; }
.title-link { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -4px 0 -4px 4px; border-radius: 50%;
              vertical-align: middle; color: var(--accent); }  /* the title's own way out to the event's page */
.title-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet .m { font-size: 15px; margin-top: 6px; }
.sheet .summary { font-size: 15px; line-height: 1.45; margin: 14px 0 0; overflow-wrap: anywhere; }
.sheet .summary.fresh { animation: summary-in .3s ease-out; }  /* Claude's summary taking the rules one's place */
@keyframes summary-in { from { opacity: .3; } }
a.m { width: fit-content; max-width: 100%; color: var(--accent); text-decoration: none; border-radius: 6px; }  /* address → maps */
a.m:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signin-host { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 14px; font-weight: 600; }
.signin-form input { font-size: 17px; }  /* 16px or more, so iPhones don't zoom in on focus */
.pw { position: relative; }
.pw input { padding-right: 76px; }
.pw-show { position: absolute; right: 6px; top: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface-2);
           font-size: 14px; font-weight: 600; color: var(--ink); }
.sheet .links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.sheet .links a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
                  background: var(--surface-2); text-decoration: none; font-size: 14px; font-weight: 600; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 700px) {
  .sheet { margin: auto; border-radius: 26px; }
}

/* ---------- toast ---------- */
.toast { position: fixed; z-index: 50; top: calc(12px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: max-content;
         max-width: calc(100% - 32px); margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg);
         font-size: 14px; box-shadow: var(--shadow); }
/* a site you're connecting needs you (or couldn't connect): a card that drops in at the top of any screen, like a
   notification, and stays until you act on it or close it */
.ready-card { position: fixed; z-index: 40; top: calc(12px + var(--safe-t)); left: 50%; transform: translateX(-50%);
              width: min(520px, calc(100% - 24px)); padding: 12px 8px 12px 12px;
              border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
              animation: drop .22s ease-out;
              /* phone: the button under the words, so a longer reason still reads across; wider: all on one line */
              display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "logo text close" ". go ."; gap: 10px 12px;
              align-items: start; }
@media (min-width: 700px) {
  .ready-card { grid-template-columns: auto 1fr auto auto; grid-template-areas: "logo text go close"; align-items: center; }
}
#ready-logo { grid-area: logo; }
#ready-go { grid-area: go; justify-self: start; }
.ready-card .icon { grid-area: close; }
.ready-text { grid-area: text; min-width: 0; display: flex; flex-direction: column; align-self: center; }
.ready-text b { font-weight: 650; line-height: 1.25; }
.ready-text .sub { font-size: 14px; line-height: 1.3; }
.ready-card .icon { width: 32px; height: 32px; flex: none; box-shadow: none; background: none; color: var(--muted); }
@keyframes drop { from { transform: translate(-50%, -16px); opacity: 0; } }

/* ---------- wide screens: a sidebar instead of the tab bar, a wider column ---------- */
@media (hover: hover) {
  .ev:hover .t, a.row-item:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
  .row-item:is(button):hover, .chip:hover { background: var(--surface-2); }
  .hist .row-item:is(button):hover, .sync-card .row-item:is(button):hover { background: var(--line); }
  .tabbar a:hover { color: var(--ink); }
  a.m:hover span { text-decoration: underline; text-underline-offset: 3px; }
  .primary:hover, .pill:hover, .send:hover { filter: brightness(1.15); }
  .icon:hover, .composer-close:hover, .composer-reset:hover { background: var(--surface-2); }
  .composer-close:hover, .composer-reset:hover { color: var(--ink); }
}
@media (min-width: 960px) {
  :root { --side: 240px; --col: 720px; }
  main { max-width: none; margin: 0 0 0 var(--side); padding: 32px 48px 64px; }
  main > .view:not(.browser) { max-width: var(--col); margin: 0 auto; }
  body[data-view="signin"] main { margin-left: 0; }
  h1 { font-size: 36px; }

  .tabbar { inset: 0 auto 0 0; transform: none; width: var(--side); flex-direction: column; align-items: stretch; gap: 4px;
            padding: 22px 14px; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none;
            background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  body[data-view="action"] .tabbar { display: flex; }
  .tabbar a { width: auto; height: 44px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 14px;
              border-radius: 12px; font-size: 15px; }
  .tabbar .side-brand { display: flex; height: auto; padding: 0 10px 22px; color: var(--ink); font-size: 17px; font-weight: 700;
                        letter-spacing: -.01em; background: none !important; }

  /* Discover: the composer sits under the column, with no tab bar below it */
  .composer { left: var(--side); bottom: 24px; max-width: calc(var(--col) + 96px); padding: 0 48px; }
  #discover { padding-bottom: 110px; }
  .ready-card { left: calc(50% + var(--side) / 2); top: 20px; }  /* over the column, not the sidebar */

  /* sign in: the pitch beside the form */
  .signin { display: grid; grid-template-columns: 1.15fr 1fr; align-content: center; column-gap: 72px; max-width: 980px;
            margin: 0 auto; padding: 40px 0; min-height: 100dvh; }
  .signin .hero { grid-row: 1 / span 4; align-self: center; margin: 0; }
  .signin h1 { font-size: 48px; }
  .signin > :not(.hero) { grid-column: 2; align-self: center; background: var(--surface); border-radius: 24px; padding: 28px;
                          box-shadow: var(--shadow); }

  .sheet { max-width: 520px; }
  .card { padding: 18px 20px; }
}

/* ---------- people: who you know, and where they're going ---------- */
.av { --h: 20; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 14px;
      font-weight: 700; color: hsl(var(--h) 45% 24%); background: hsl(var(--h) 60% 88%); }
.av.sm { width: 24px; height: 24px; font-size: 10px; box-shadow: 0 0 0 2px var(--surface); }
.av.big { width: 64px; height: 64px; font-size: 22px; }
.ppl { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 14px; color: var(--ink); }
.ppl .faces { display: flex; flex: none; }
.ppl .faces .av + .av { margin-left: -7px; }
.ppl b { font-weight: 650; }
#people .ev .av.sm, #days .av.sm, #invites .av.sm, .list .av.sm { box-shadow: 0 0 0 2px var(--bg); }
.sheet .section { margin: 20px 0 8px; }
.sheet .group.flat { background: var(--surface-2); box-shadow: none; }
.person-row .who .sub { font-size: 14px; }
.sheet .head.person { margin-bottom: 4px; }
.radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); display: grid; place-items: center; }
[aria-checked="true"] > .radio { border-color: var(--ink); }
[aria-checked="true"] > .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.row-item.pick { justify-content: flex-start; text-align: left; }
.invite-link { margin-top: 12px; }
.card.same { background: var(--needs-bg); box-shadow: none; }
.card.same .eyebrow { margin: 0 0 6px; color: var(--needs); }
.card.same p { margin: 0; font-size: 15px; }
.card.same .sub { margin-top: 2px; font-size: 14px; }
.card.same .pill.soft { background: var(--surface); }
.card.same .row-buttons .pill { min-width: 0; padding: 0 10px; }
.card.same .named { white-space: nowrap; }
.logo.src { background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 700; }
.steps { margin: 12px 0 4px; padding-left: 22px; font-size: 15px; }
.steps li + li { margin-top: 6px; }
/* a person's profiles as small brand icons beside their name */
.profile-icons { display: inline-flex; gap: 4px; margin: 0 2px 0 6px; vertical-align: middle; }
.profile-icons:empty { display: none; }
.profile-icon { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; overflow: hidden; flex: none;
                color: #fff; font: 800 10px/1 system-ui, sans-serif; text-decoration: none; background: var(--surface-2); }
.profile-icon img { width: 100%; height: 100%; object-fit: cover; }
.profile-icon svg { width: 62%; height: 62%; }
.profile-icon.linkedin { background: #0a66c2; }
.profile-icon.x { background: #000; }
.profile-icon.instagram { background: linear-gradient(45deg, #f9a825, #e91e63 55%, #7b1fa2); }
.profile-icons.big { display: flex; gap: 8px; margin: 8px 0 0; }
.profile-icons.big .profile-icon { width: 30px; height: 30px; border-radius: 8px; font-size: 14px; }
.title-line { display: flex; align-items: center; flex-wrap: wrap; }
.textlink { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; flex: none; }
/* ---------- met: who you probably met at which event (the People tab; met.py) ---------- */
.met-tally { margin: 10px 4px 0; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.met-tally b { color: var(--ink); font-weight: 650; }
.met-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 4px 0; font-size: 13px; color: var(--muted); }
.met-key span { display: inline-flex; align-items: center; gap: 6px; }
.met-key .line { width: 24px; border-top: 2px solid var(--faint); opacity: .6; }
.met-key .line.either { border-top-style: dashed; }
.met-key .ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--going); }
.met-graph { position: relative; margin: 22px 0 0; padding-left: 4px; }
.met-graph > * { position: relative; }
.met-graph > svg.met-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.met-wires path, .met-wires line { fill: none; stroke: var(--faint); stroke-opacity: .55; stroke-width: 1.5; }
.met-wires path.either { stroke-dasharray: 3 4; stroke-opacity: .8; }
.met-wires path.lit { stroke: var(--accent); stroke-opacity: 1; stroke-width: 2; }
.met-wk { margin: 0 0 12px 28px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.met-day { margin-bottom: 30px; }
.met-day > .fine { margin: 4px 0 0 28px; }
.met-ev { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; }
.met-ev + .met-ev { margin-top: 12px; }
.met-ev .what { min-width: 0; }
.met-ev b { display: block; font-weight: 650; line-height: 1.3; }
.met-ev .sub { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.met-ev.empty-day b { font-weight: 500; color: var(--muted); }
.met-dot { flex: none; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--bg); }
.met-dot.none { background: var(--bg); border: 2px solid var(--faint); }
.met-dot.you { background: var(--accent); }
.met-fan { display: flex; flex-wrap: wrap; gap: 30px 2px; margin: 28px 0 0 30px; }
.met-p { width: 46px; display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 12px; }
.met-p .nm { max-width: 100%; font-size: 11px; line-height: 1.2; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.met-p.lit .nm { color: var(--accent); font-weight: 600; }
.met-p .av { position: relative; box-shadow: 0 0 0 3px var(--bg); }
.met-p .av.more { background: var(--surface-2); color: var(--muted); font-size: 13px; }
.av.listed { position: relative; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--going); }
.met-p .av.listed { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--going); }
.av:has(> .tick) { position: relative; }  /* the badge sits on its own face, in a sheet too */
.av .tick { position: absolute; right: -4px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
            background: var(--going); color: var(--bg); box-shadow: 0 0 0 2px var(--bg); }
.met-note { margin: 0 0 6px; padding: 7px 10px; border-radius: 10px; font-size: 13px; color: var(--wait); background: var(--wait-bg); }
.sheet .met-at { margin: 2px 0 0; font-weight: 600; }
.met-why { list-style: none; margin: 14px 0 6px; padding: 0; border: 1px solid var(--line); border-radius: 14px; }
.met-why li { display: flex; gap: 10px; padding: 10px 12px; font-size: 14px; }
.met-why li + li { border-top: 1px solid var(--line); }
.met-why .mk { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.met-why .sub { display: block; font-size: 13px; }
.av .tick.ask { background: var(--wait-bg); color: var(--wait); font-size: 11px; font-weight: 800; }
/* the wheel: the events someone could be from; the one in the middle band is the one you mean */
.met-wheel-wrap { position: relative; margin: 12px 0 0; border-radius: 14px; background: var(--surface-2); }
.met-wheel-wrap .band { position: absolute; left: 6px; right: 6px; top: 60px; height: 60px; border-radius: 10px; background: var(--surface);
                        box-shadow: 0 1px 3px rgba(0, 0, 0, .12); pointer-events: none; }
.met-wheel { position: relative; height: 180px; padding: 60px 0; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory;
             scrollbar-width: none; outline: none;
             -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.met-wheel::-webkit-scrollbar { display: none; }
.met-wheel:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 14px; }
.met-wheel .opt { display: flex; flex-direction: column; justify-content: center; width: 100%; height: 60px; padding: 0 18px; text-align: left;
                  scroll-snap-align: center; scroll-snap-stop: always; opacity: .45; transition: opacity .15s; }
.met-wheel .opt[aria-selected="true"] { opacity: 1; }
.met-wheel .opt b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.met-wheel .opt .sub { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet .met-hint { margin: 6px 4px 0; text-align: center; }

@media (prefers-color-scheme: dark) {
  .av { color: hsl(var(--h) 60% 88%); background: hsl(var(--h) 30% 26%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
